/*
Theme Name: Shinryusha
Theme URI:
Author: 新流舎株式会社
Author URI:
Description: Single-page theme for Shinryusha Co., Ltd. publishing company.
Version: 1.0.0
License: Proprietary
Text Domain: shinryusha
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:  #FAF8F5;
  --ink:    #2A2620;
  --sepia:  #8B7355;
  --light:  #EDE9E3;
  --border: #D8D3CC;
  --muted:  #B0A898;
}

body {
  font-family: 'Noto Serif JP', serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
  position: relative;
}

/* ── GRAIN OVERLAY ── */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
}

/* ── HEADER ── */
header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px;
  height: 72px;
  background: rgba(250,248,245,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.logo-en {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

nav { display: flex; gap: 40px; }

/* wp_nav_menu() list normalization */
nav ul { display: flex; gap: 40px; list-style: none; margin: 0; padding: 0; }
nav ul li { margin: 0; padding: 0; }

nav a {
  text-decoration: none;
  color: var(--sepia);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
}

nav a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--sepia);
  transition: width 0.3s;
}

nav a:hover::after { width: 100%; }

/* ── HERO ── */
#hero {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.hero-image-wrap {
  width: 100%;
}

.hero-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  opacity: 0.92;
}

/* ── SECTION COMMON ── */
section {
  padding: 96px 56px;
  border-bottom: 1px solid var(--border);
}

.sec-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--sepia);
  margin-bottom: 48px;
}

.sec-eyebrow::before {
  content: '';
  display: block;
  width: 32px; height: 1px;
  background: var(--sepia);
}

.sec-eyebrow::after {
  content: '';
  display: block;
  flex: 1; height: 1px;
  background: var(--border);
}

/* ── ABOUT ── */
#about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  padding-top: 80px;
}

.about-heading {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 32px;
  position: relative;
  padding-left: 20px;
}

.about-heading::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 3px; height: calc(100% - 8px);
  background: var(--sepia);
}

.about-body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: #555;
  line-height: 2.2;
}

/* ── WORKS ── */
.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.book-card a {
  display: block;
  text-decoration: none;
}

.book-cover {
  width: 100%;
  padding-bottom: 150%;
  background: var(--light);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: opacity 0.3s;
}

.book-card a:hover .book-cover { opacity: 0.75; }

.book-cover::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 6px; height: 100%;
  background: var(--border);
}

.book-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.works-more {
  overflow: hidden; max-height: 0;
  transition: max-height 0.5s ease;
  margin-top: 20px;
}

.works-more.open { max-height: 600px; }

.view-more-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  background: none; border: none;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--sepia);
  padding: 0;
}

.vmb-line {
  width: 40px; height: 1px;
  background: var(--sepia);
  transition: width 0.3s;
}

.view-more-btn:hover .vmb-line { width: 80px; }

/* ── CONTACT ── */
#contact .contact-form-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.form-row { margin-bottom: 20px; }

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--sepia);
  margin-bottom: 6px;
}

.required {
  background: var(--sepia); color: #fff;
  font-size: 9px; padding: 1px 5px;
  letter-spacing: 0.08em;
}

.optional {
  border: 1px solid var(--border); color: var(--muted);
  font-size: 9px; padding: 1px 5px;
}

.field-box {
  display: block; width: 100%; height: 40px;
  background: var(--light);
  border: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 300;
  padding: 0 8px;
}

.field-box:focus { outline: none; border-bottom-color: var(--sepia); }
.field-box.textarea {
  height: 120px;
  padding: 8px;
  resize: vertical;
}

.privacy-link { margin-bottom: 28px; }

.privacy-link a {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px; font-weight: 300;
  color: var(--sepia);
  text-decoration: underline; cursor: pointer;
  text-underline-offset: 3px;
}

.btn-submit {
  display: inline-block;
  padding: 14px 56px;
  background: var(--ink); color: var(--cream);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px; font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  border: none; cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover { background: var(--sepia); }

/* ── CONTACT FORM 7 調整 ── */
.wpcf7-form p { margin-bottom: 20px; }
.wpcf7-form .wpcf7-form-control-wrap { display: block; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  display: block; width: 100%;
  background: var(--light);
  border: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 300;
  padding: 0 8px;
  height: 40px;
}
.wpcf7-form textarea { height: 120px; padding: 8px; resize: vertical; }
.wpcf7-form input:focus,
.wpcf7-form textarea:focus { outline: none; border-bottom-color: var(--sepia); }
.wpcf7-form input[type="submit"] {
  display: inline-block;
  padding: 14px 56px;
  background: var(--ink); color: var(--cream);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px; font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  border: none; cursor: pointer;
  transition: background 0.3s;
}
.wpcf7-form input[type="submit"]:hover { background: var(--sepia); }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(42,38,32,0.6);
  z-index: 1000; align-items: center; justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--cream);
  border: 1px solid var(--border);
  width: 560px; max-width: 90vw;
  max-height: 80vh; overflow-y: auto;
  padding: 40px; position: relative;
}

.modal-box h3 {
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 300;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--sepia);
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-box p {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px; font-weight: 300;
  color: #666; margin-bottom: 12px; line-height: 1.9;
}

.modal-close {
  position: absolute; top: 16px; right: 20px;
  font-size: 18px; cursor: pointer;
  background: none; border: none; color: var(--sepia);
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 64px 56px 28px;
  position: relative;
}

footer::before {
  content: '';
  position: absolute; top: 0; left: 56px; right: 56px;
  height: 1px;
  background: linear-gradient(to right, var(--sepia), transparent);
}

.footer-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: start;
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand-ja {
  font-size: 20px; font-weight: 700;
  letter-spacing: 0.1em;
}

.footer-brand-en {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px; font-weight: 300;
  color: var(--sepia);
  letter-spacing: 0.25em; text-transform: uppercase;
  margin-top: 8px;
}

.footer-meta { display: flex; flex-wrap: wrap; gap: 24px 48px; }

.footer-meta-item { display: flex; flex-direction: column; gap: 4px; }

.footer-meta-item dt {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 9px; font-weight: 300;
  color: var(--sepia);
  letter-spacing: 0.2em; text-transform: uppercase;
}

.footer-meta-item dd {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px; font-weight: 300;
  color: rgba(250,248,245,0.6);
}

.footer-bottom {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px; font-weight: 300;
  color: rgba(250,248,245,0.25);
  letter-spacing: 0.12em;
}

/* ── WordPress 管理バー対応 ── */
html { scroll-padding-top: 72px; }
body.admin-bar header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar header { top: 46px; }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  header { padding: 0 24px; height: 60px; }
  nav { gap: 20px; }
  nav ul { gap: 20px; }
  section { padding: 64px 24px; }
  #about { grid-template-columns: 1fr; gap: 40px; padding: 64px 24px; }
  .works-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  footer { padding: 48px 24px 20px; }
  footer::before { left: 24px; right: 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}
