@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500&display=swap');

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

:root {
  --bg: #0b0b0d;
  --bg2: #111114;
  --bg3: #1a1a1f;
  --accent: #c8a96e;
  --text: #e8e4dc;
  --muted: #7a7570;
  --border: rgba(200, 169, 110, 0.15);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── SCROLL PROGRESS ── */
.scroll-line {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  width: 0%;
  z-index: 300;
  opacity: .8;
  transition: width .1s;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background: rgba(11, 11, 13, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}

.nav-logo img {
  height: 42px;
  width: 42px;
  object-fit: contain;
  filter: invert(1);
}

.nav-name {
  font-family: 'Playfair Display', serif;
  font-size: .95rem;
  letter-spacing: .12em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .3s;
}

.nav-links a:hover { color: var(--accent); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 4rem;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 65% 35%, rgba(139,58,58,.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 25% 70%, rgba(200,169,110,.07) 0%, transparent 55%),
    linear-gradient(180deg, #0b0b0d 0%, #0e0a0a 100%);
}

.hero-content {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}

.eyebrow {
  font-size: .7rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.eyebrow::before,
.eyebrow::after {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--accent);
  opacity: .45;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 1.04;
  font-weight: 700;
  margin-bottom: .5rem;
}

.author-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  letter-spacing: .25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 3rem;
  font-style: italic;
  font-family: 'Playfair Display', serif;
  line-height: 1.8;
}

.cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: .85rem 2.2rem;
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .3s;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0b0b0d;
  font-weight: 500;
}

.btn-primary:hover {
  background: #d4b880;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(232, 228, 220, .2);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── SECTION BASE ── */
section { padding: 7rem 2rem; }

.container {
  max-width: 1120px;
  margin: 0 auto;
}

.s-label {
  font-size: .68rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

.s-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  margin-bottom: 1rem;
}

.s-rule {
  width: 38px;
  height: 1px;
  background: var(--accent);
  opacity: .5;
  margin-bottom: 3rem;
}

/* ── ABOUT ── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 5rem;
  align-items: center;
}

.img-wrap { position: relative; }

.img-box {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  overflow: hidden;
}

.img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame {
  position: absolute;
  top: -12px; left: -12px;
  right: 12px; bottom: 12px;
  border: 1px solid rgba(200, 169, 110, .18);
  pointer-events: none;
}

.flip-card {
  width: 100%;
  aspect-ratio: 3/4;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  scale: 1;
  transition: scale 0.2s ease, transform 0.65s ease;
}

.flip-card:hover .flip-card-inner {
  scale: 1.04;
  transform: rotateY(180deg);
  transition: scale 0.2s ease, transform 0.65s ease 0.15s;
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.flip-card-front img,
.flip-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.about-body p {
  color: var(--muted);
  margin-bottom: 1.2rem;
  font-size: .96rem;
}

.about-body strong {
  color: var(--text);
  font-weight: 400;
}

/* ── BOOKS ── */
#books { background: var(--bg); }

.books-intro {
  max-width: 620px;
  margin-bottom: 4.5rem;
}

.books-intro p {
  color: var(--muted);
  font-size: .96rem;
}

/* Featured book */
.book-featured {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
  padding: 3rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  position: relative;
}

.f-badge {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  padding: .28rem .75rem;
  border: 1px solid rgba(200, 169, 110, .28);
}

.book-spine {
  width: 160px;
  aspect-ratio: 2/3;
  background: var(--bg2);
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.book-spine img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.big-num {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  font-weight: 700;
  color: rgba(200, 169, 110, .07);
  line-height: 1;
  margin-bottom: -.8rem;
  display: block;
}

.f-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  margin-bottom: .45rem;
}

.f-desc {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.8;
}

.f-tag {
  display: block;
  margin-top: .9rem;
  font-size: .68rem;
  color: var(--muted);
  font-style: italic;
  letter-spacing: .07em;
}

/* Status badges */
.badge {
  display: inline-block;
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .24rem .7rem;
  margin-bottom: 1rem;
}

.b-revision { background: rgba(200,169,110,.1); color: var(--accent); border: 1px solid rgba(200,169,110,.22); }
.b-dev      { background: rgba(139,58,58,.1);   color: #c47a7a;       border: 1px solid rgba(139,58,58,.22); }
.b-literary { background: rgba(90,90,120,.1);   color: #9090b8;       border: 1px solid rgba(90,90,120,.22); }
.b-spec     { background: rgba(50,100,90,.1);   color: #70b8aa;       border: 1px solid rgba(50,100,90,.22); }

/* Book grid */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.book-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  transition: border-color .3s, transform .3s;
  overflow: hidden;
}

.book-card:hover {
  border-color: rgba(200, 169, 110, .35);
  transform: translateY(-5px);
}

.book-card.speculative { border-color: rgba(50,100,90,.2); }
.book-card.speculative:hover { border-color: rgba(70,160,140,.4); }

.card-cover {
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg3);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}

.book-card:hover .card-cover img { transform: scale(1.04); }

.card-cover-empty {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}

.card-cover-spec {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(160deg, #0d1a18, #0a1510);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #70b8aa;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}

.card-body { padding: 1.8rem; }

.card-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(200, 169, 110, .07);
  line-height: 1;
  margin-bottom: -.3rem;
  display: block;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  margin-bottom: .4rem;
}

.card-desc {
  font-size: .86rem;
  color: var(--muted);
  margin-top: .7rem;
  line-height: 1.78;
}

.card-tag {
  display: block;
  font-size: .67rem;
  color: var(--muted);
  font-style: italic;
  margin-top: .7rem;
  letter-spacing: .06em;
}

/* ── THEMES ── */
#themes { background: var(--bg2); }

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  margin-top: 3rem;
}

.theme-cell {
  padding: 2rem 1.5rem;
  background: var(--bg3);
  border-bottom: 2px solid transparent;
  transition: border-color .3s;
}

.theme-cell:hover { border-bottom-color: var(--accent); }

.t-icon {
  font-size: 1.4rem;
  margin-bottom: .7rem;
  opacity: .75;
}

.t-name {
  font-family: 'Playfair Display', serif;
  font-size: .98rem;
  margin-bottom: .35rem;
}

.t-desc {
  font-size: .78rem;
  color: var(--muted);
}

/* ── SUBSCRIBE ── */
#subscribe { background: var(--bg3); }

.subscribe-center {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.sub-desc {
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: .95rem;
  line-height: 1.8;
}

.sub-form { width: 100%; }

.sub-honey { display: none; }

.sub-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sub-input {
  flex: 1;
  min-width: 220px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(200,169,110,.25);
  color: var(--text);
  padding: .85rem 1.2rem;
  font-size: .85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color .3s;
}

.sub-input::placeholder { color: var(--muted); }

.sub-input:focus { border-color: var(--accent); }

.sub-btn { white-space: nowrap; }

.sub-fine {
  margin-top: 1rem;
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .05em;
}

/* ── CONTACT ── */
#contact { background: var(--bg); }

.contact-center {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.contact-center p {
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: .95rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.c-link {
  color: var(--muted);
  text-decoration: none;
  font-size: .8rem;
  letter-spacing: .09em;
  padding: .7rem 1.4rem;
  border: 1px solid var(--border);
  transition: all .3s;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.c-link:hover {
  color: var(--accent);
  border-color: rgba(200, 169, 110, .3);
}

/* ── FOOTER ── */
footer {
  padding: 2rem 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .07em;
}

.footer-logo {
  height: 32px;
  width: 32px;
  object-fit: contain;
  filter: invert(1);
  opacity: .4;
}

/* ── HAMBURGER ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  z-index: 201;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all .3s;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; position: fixed; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 65px;
    left: 0; right: 0;
    background: rgba(11,11,13,.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0;
    z-index: 199;
  }

  .nav-links.open { display: flex; }

  .nav-links li {
    padding: 0;
    border-bottom: 1px solid rgba(200,169,110,.07);
  }

  .nav-links a {
    display: block;
    padding: .85rem 1.5rem;
    font-size: .8rem;
  }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .book-featured { grid-template-columns: 1fr; }
  .book-spine { display: block; width: 100%; max-height: 400px; }
  .book-spine img { width: 100%; height: 100%; object-fit: cover; }
  footer { flex-direction: column; gap: .5rem; text-align: center; }
}

/* ── YOUNG READERS PAGE ── */
/* Palette: bg #f0f4ff · text #1a1a2e · accent #f5c842 · highlight #a78bfa · secondary #4abfcc */

.yr-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(160deg, #1a1a2e 0%, #12122a 60%);
}

.yr-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(167,139,250,.18) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 70%, rgba(74,191,204,.12) 0%, transparent 50%);
}

.yr-eyebrow {
  font-size: .7rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #f5c842;
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.yr-eyebrow::before,
.yr-eyebrow::after {
  content: '';
  width: 36px;
  height: 1px;
  background: #f5c842;
  opacity: .5;
}

.yr-penname {
  font-family: 'Playfair Display', serif;
  font-size: clamp(.9rem, 2vw, 1.2rem);
  letter-spacing: .25em;
  color: #a78bfa;
  text-transform: uppercase;
  margin-bottom: 2rem;
  font-weight: 400;
}

.yr-tagline {
  font-size: 1rem;
  color: rgba(240,244,255,.65);
  max-width: 520px;
  margin: 0 auto 3rem;
  font-style: italic;
  font-family: 'Playfair Display', serif;
  line-height: 1.8;
}

.yr-book-section {
  background: #f0f4ff;
  padding: 7rem 2rem;
}

.yr-book-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 5rem;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
}

.yr-cover-wrap { position: relative; }

.yr-cover {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(26,26,46,.2), 0 4px 20px rgba(245,200,66,.2);
  display: block;
}

.yr-cover-frame {
  position: absolute;
  top: -10px; left: -10px;
  right: 10px; bottom: 10px;
  border: 1px solid rgba(245,200,66,.35);
  border-radius: 4px;
  pointer-events: none;
}

.yr-pen-badge {
  display: inline-block;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #a78bfa;
  padding: .28rem .75rem;
  border: 1px solid rgba(167,139,250,.35);
  margin-bottom: 1.2rem;
}

.yr-book-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: .3rem;
  color: #1a1a2e;
}

.yr-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #4abfcc;
  font-style: italic;
  margin-bottom: 2rem;
}

.yr-desc p {
  color: #3a3a5e;
  font-size: .95rem;
  line-height: 1.85;
  margin-bottom: 1.2rem;
}

.yr-chars {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: #fff;
  border-left: 3px solid #f5c842;
  box-shadow: 0 2px 12px rgba(26,26,46,.06);
}

.yr-chars-title {
  font-size: .68rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 1rem;
}

.yr-chars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}

.yr-char { font-size: .85rem; color: #3a3a5e; }
.yr-char strong { color: #1a1a2e; font-weight: 500; }

.yr-buy-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.btn-amazon {
  background: #f5c842;
  color: #1a1a2e;
  font-weight: 600;
  padding: .85rem 2rem;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .3s;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.btn-amazon:hover { background: #f9d86a; transform: translateY(-2px); }

.btn-universal {
  background: transparent;
  color: #1a1a2e;
  border: 1px solid rgba(26,26,46,.2);
  padding: .85rem 2rem;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .3s;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.btn-universal:hover { border-color: #4abfcc; color: #4abfcc; transform: translateY(-2px); }

.yr-audio-section {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(26,26,46,.12);
}

.yr-audio-label {
  font-family: 'Inter', sans-serif;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 1rem;
}

.yr-audio-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.btn-audio {
  background: transparent;
  color: #1a1a2e;
  border: 1px solid rgba(26,26,46,.25);
  padding: .7rem 1.5rem;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .3s;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.btn-audio:hover { border-color: #1a1a2e; background: #1a1a2e; color: #fff; transform: translateY(-2px); }

.btn-audio-spotify { border-color: #1DB954; color: #1DB954; }
.btn-audio-spotify:hover { background: #1DB954; border-color: #1DB954; color: #fff; }

.yr-info-strip {
  background: #1a1a2e;
  padding: 3rem 2rem;
}

.yr-info-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  text-align: center;
}

.yr-info-item .label {
  font-size: .65rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #f5c842;
  margin-bottom: .4rem;
}

.yr-info-item .value {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #f0f4ff;
}

.yr-back {
  background: #f0f4ff;
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(26,26,46,.08);
}

.yr-back a {
  color: #3a3a5e;
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color .3s;
}

.yr-back a:hover { color: #a78bfa; }

@media (max-width: 768px) {
  .yr-book-grid { grid-template-columns: 1fr; gap: 3rem; }
  .yr-cover-wrap { max-width: 280px; margin: 0 auto; }
  .yr-chars-grid { grid-template-columns: 1fr; }
  .yr-info-inner { gap: 2rem; }
}