/* Knowledge Publishing — Stylesheet
   Japandi editorial · Warm minimal · Modern precise */

:root {
  --bg:           #F5F1EB;
  --bg-warm:      #EDE8DF;
  --bg-dark:      #2B3328;
  --text:         #1A1A18;
  --text-mid:     #4A4A48;
  --text-muted:   #8A8A87;
  --teal:         #2CBFAA;
  --teal-dark:    #229488;
  --border:       #DEDAD3;
  --white:        #FFFFFF;
  --font-display: 'Cormorant', Georgia, serif;
  --font-body:    'Jost', system-ui, sans-serif;
  --font-kanji:   'Noto Serif JP', serif;
  --max-w:        1160px;
  --max-w-narrow: 680px;
  --gutter:       clamp(24px, 5vw, 80px);
  --section-v:    clamp(80px, 10vw, 140px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.75;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 var(--gutter); }

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.75s ease, transform 0.75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* Navigation */
#nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 20px 0; transition: background 0.35s, box-shadow 0.35s, padding 0.35s; }
#nav.scrolled { background: rgba(245,241,235,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--border); padding: 14px 0; }
.nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; }
.logo-img { width: 160px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mid); transition: color 0.2s; font-weight: 400; }
.nav-link:hover { color: var(--teal); }

/* Hero */
#hero { min-height: 100svh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background-color: var(--bg); }
#hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(44,191,170,0.04) 0%, transparent 70%); pointer-events: none; }
.hero-inner { text-align: center; padding: 120px var(--gutter) 80px; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.hero-logo-img { width: clamp(220px, 38vw, 420px); height: auto; }
.hero-tagline { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(22px, 3vw, 32px); color: var(--text-mid); }
.hero-mission { max-width: 620px; font-size: clamp(16px, 1.6vw, 19px); color: var(--text-mid); line-height: 1.8; text-align: center; }
.hero-scroll { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 12px; }
.scroll-label { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); }
.scroll-line { width: 1px; height: 56px; background: linear-gradient(to bottom, var(--text-muted), transparent); animation: scrollPulse 2s ease-in-out infinite; }
@keyframes scrollPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

/* Hero Shelf */
.hero-shelf { display: flex; gap: clamp(24px, 4vw, 48px); align-items: flex-end; justify-content: center; padding: 8px 0; }
.shelf-item { display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; }
.shelf-cover { width: auto; height: clamp(140px, 16vw, 200px); object-fit: contain; border-radius: 2px; box-shadow: 0 2px 6px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.12); transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.35s ease; display: block; }
.shelf-item:hover .shelf-cover { transform: translateY(-8px); box-shadow: 0 4px 10px rgba(0,0,0,0.1), 0 16px 32px rgba(0,0,0,0.15); }
.shelf-title { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 400; transition: color 0.2s; text-align: center; }
.shelf-item:hover .shelf-title { color: var(--teal); }

/* Book Sections */
.book-section { padding: var(--section-v) 0; position: relative; overflow: hidden; }
.bg-light { background-color: var(--bg); }
.bg-warm { background-color: var(--bg-warm); }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 6vw, 96px); align-items: start; }
.book-grid--reverse .book-content-col { order: 1; }
.book-grid--reverse .book-image-col { order: 2; }

/* Book Cover */
.book-image-col { position: relative; display: flex; justify-content: center; align-items: flex-start; }
.cover-wrap { display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 1; }
.book-cover { width: 100%; max-width: 300px; border-radius: 2px; box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.12), 0 28px 48px rgba(0,0,0,0.08); transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.5s ease; }
.book-cover:hover { transform: translateY(-10px) rotate(0.8deg); box-shadow: 0 4px 8px rgba(0,0,0,0.06), 0 16px 40px rgba(0,0,0,0.15), 0 48px 64px rgba(0,0,0,0.1); }
.book-cover--notebook { max-width: 260px; }

/* Interior Preview */
.interior-preview { display: flex; flex-direction: column; gap: 8px; }
.interior-img { width: 100%; max-width: 380px; border-radius: 2px; border: 1px solid var(--border); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.interior-caption { font-size: 14px; letter-spacing: 0.05em; color: var(--text-muted); padding-left: 2px; }

/* Interior pair (Shinka left+right side by side) */
.interior-preview--pair { max-width: 100%; }
.interior-pair { display: flex; gap: 8px; }
.interior-img--half { max-width: none; width: 50%; flex-shrink: 0; }

/* Zoomable */
.interior-img--zoomable { cursor: zoom-in; transition: opacity 0.2s, transform 0.3s ease; }
.interior-img--zoomable:hover { opacity: 0.92; transform: scale(1.01); }
.zoom-hint { font-size: 12px; color: var(--teal); letter-spacing: 0.05em; font-style: italic; }

/* Book Content */
.book-content-col { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.book-label { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal); font-weight: 400; }
.book-title { font-family: var(--font-display); font-size: clamp(40px, 6vw, 72px); font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; color: var(--text); }
.book-title--kanji { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 16px; }
.kanji { font-family: var(--font-kanji); font-weight: 300; font-size: 0.72em; color: var(--text-muted); letter-spacing: 0.05em; }
.book-subtitle { font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 34px); font-weight: 400; font-style: italic; color: var(--text-mid); letter-spacing: 0.01em; margin-top: -8px; }
.book-author { font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 400; }

/* Book Hook */
.book-hook { font-family: var(--font-display); font-size: clamp(17px, 1.8vw, 21px); font-style: italic; color: var(--text-mid); padding-left: 20px; border-left: 2px solid var(--teal); line-height: 1.55; }

/* Pull Quote */
.book-quote { padding: 20px 24px; background: rgba(44,191,170,0.06); border-left: 2px solid var(--teal); border-radius: 0 4px 4px 0; }
.book-quote p { font-family: var(--font-display); font-size: clamp(16px, 1.7vw, 19px); font-style: italic; color: var(--text-mid); line-height: 1.65; margin-bottom: 8px; }
.book-quote cite { font-size: 14px; color: var(--text-muted); letter-spacing: 0.05em; font-style: normal; }

/* Description */
.book-description { display: flex; flex-direction: column; gap: 14px; }
.book-description p { font-size: clamp(16px, 1.5vw, 19px); color: var(--text-mid); line-height: 1.8; }

/* Features */
.book-features { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.book-features li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; color: var(--text-mid); line-height: 1.6; }
.book-features li::before { content: ''; flex-shrink: 0; width: 18px; height: 1px; background: var(--teal); margin-top: 14px; }

/* CTA */
.book-cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 8px; }
.book-cta--multi { flex-direction: column; align-items: flex-start; gap: 12px; }
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-buy { display: inline-flex; align-items: center; gap: 10px; background: var(--teal); color: var(--white); border: none; cursor: pointer; padding: 14px 28px; font-family: var(--font-body); font-size: 15px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; border-radius: 2px; transition: background 0.25s, transform 0.2s; }
.btn-buy:hover { background: var(--teal-dark); transform: translateY(-2px); }
.btn-buy:active { transform: translateY(0); }
.btn-buy--outline { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-buy--outline:hover { background: var(--teal); color: var(--white); }
.btn-arrow { width: 18px; height: 18px; transition: transform 0.2s; }
.btn-buy:hover .btn-arrow { transform: translateX(4px); }
.btn-note { font-size: 14px; color: var(--text-muted); }

/* Quote Rotator */
.quote-rotator { padding: 28px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); position: relative; min-height: 110px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.quote-track { position: relative; min-height: 80px; }
.quote-slide { position: absolute; top: 0; left: 0; opacity: 0; transform: translateY(8px); transition: opacity 0.6s, transform 0.6s; pointer-events: none; }
.quote-slide.active { opacity: 1; transform: translateY(0); position: relative; pointer-events: auto; }
.rotating-quote { font-family: var(--font-display); font-size: clamp(16px, 1.6vw, 19px); font-style: italic; color: var(--text-mid); line-height: 1.65; margin-bottom: 6px; }
.rotating-attr { font-size: 14px; letter-spacing: 0.08em; color: var(--text-muted); }
.quote-dots { display: flex; gap: 6px; }
.quote-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border); border: none; cursor: pointer; padding: 0; transition: background 0.2s, transform 0.2s; }
.quote-dot.active { background: var(--teal); transform: scale(1.2); }

/* Coming Soon */
.section-coming-soon { padding: clamp(60px, 8vw, 100px) 0; text-align: center; background: var(--bg-warm); border-top: 1px solid var(--border); }
.coming-label { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.coming-title { font-family: var(--font-display); font-size: clamp(32px, 4.2vw, 58px); font-weight: 300; letter-spacing: -0.01em; color: var(--text); line-height: 1; margin-bottom: 20px; white-space: nowrap; }
.coming-subtitle { font-family: var(--font-display); font-style: italic; font-size: clamp(18px, 2.2vw, 28px); color: var(--text-mid); margin-bottom: 12px; font-weight: 400; }
.coming-text { font-size: 17px; color: var(--text-muted); }

/* Contact */
.section-contact { padding: var(--section-v) 0; border-top: 1px solid var(--border); }
.contact-header { text-align: center; margin-bottom: 48px; }
.contact-label { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.contact-title { font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 42px); font-weight: 400; color: var(--text); line-height: 1.1; margin-bottom: 16px; white-space: nowrap; }
.contact-text { font-size: 17px; color: var(--text-muted); line-height: 1.7; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mid); font-weight: 400; }
.form-input, .form-textarea { width: 100%; padding: 13px 16px; background: var(--white); border: 1px solid var(--border); border-radius: 2px; font-family: var(--font-body); font-size: 16px; font-weight: 400; color: var(--text); transition: border-color 0.2s, box-shadow 0.2s; outline: none; -webkit-appearance: none; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus, .form-textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(44,191,170,0.12); }
.form-textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.form-submit { display: flex; justify-content: flex-start; }
.btn-submit { min-width: 200px; }
.form-success { font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--teal-dark); padding: 16px 0; border-top: 1px solid var(--border); text-align: center; }

/* Footer */
#footer { background: var(--bg-dark); padding: clamp(60px, 8vw, 100px) 0 48px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.footer-logo-img { width: clamp(160px, 25vw, 240px); height: auto; opacity: 0.9; }
.footer-tagline { font-family: var(--font-display); font-style: italic; font-size: 19px; color: rgba(255,255,255,0.5); font-weight: 300; }

/* Social Icons */
.footer-social { display: flex; gap: 20px; align-items: center; }
.social-link { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: rgba(255,255,255,0.5); transition: color 0.2s, background 0.2s; }
.social-link:hover { color: var(--teal); }
.social-icon { width: 20px; height: 20px; }

.footer-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.footer-link { font-size: 14px; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-link:hover { color: var(--teal); }
.footer-sep { color: rgba(255,255,255,0.2); }
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.3); letter-spacing: 0.04em; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); width: 100%; text-align: center; }

/* Lightbox */
#lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
#lightbox.active { opacity: 1; pointer-events: all; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(27,27,24,0.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lb-content { position: relative; z-index: 1; max-width: min(90vw, 1000px); max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 16px; transform: scale(0.95); transition: transform 0.3s; }
#lightbox.active .lb-content { transform: scale(1); }
.lb-img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 2px; box-shadow: 0 24px 80px rgba(0,0,0,0.5); }
.lb-caption { font-size: 14px; color: rgba(255,255,255,0.6); letter-spacing: 0.05em; text-align: center; }
.lb-close { position: absolute; top: -44px; right: 0; background: none; border: none; color: rgba(255,255,255,0.7); font-size: 32px; cursor: pointer; line-height: 1; padding: 4px 8px; transition: color 0.2s; }
.lb-close:hover { color: var(--white); }

/* Responsive — Tablet */
@media (max-width: 900px) {
  .book-grid, .book-grid--reverse { grid-template-columns: 1fr; }
  .book-grid--reverse .book-content-col { order: 2; }
  .book-grid--reverse .book-image-col { order: 1; }
  .book-cover { max-width: 200px; }
  .book-cover--notebook { max-width: 180px; }
  .interior-img { max-width: 300px; }
}

/* Responsive — Mobile */
@media (max-width: 600px) {
  :root { --gutter: 20px; }
  .book-cover { max-width: 220px; }
  .interior-img { max-width: 100%; }
  .interior-pair { flex-direction: column; gap: 12px; }
  .interior-img--half { width: 100%; }
  .book-cta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn-buy { width: 100%; justify-content: center; }
  .hero-inner { gap: 28px; }
  .logo-img { width: 130px; }
  .hero-shelf { gap: 20px; }
  .nav-links { gap: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .coming-title { white-space: normal; font-size: clamp(28px, 7vw, 48px); }
  .contact-title { white-space: normal; font-size: clamp(26px, 6vw, 36px); }
}

/* Focus & Accessibility */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .scroll-line, .book-cover, .btn-buy, .quote-slide { transition: none !important; animation: none !important; }
}
