/* Prolific Publishers — Apple-light design system */
:root {
  --ink: #1d1d1f;
  --ink-2: #494949;
  --ink-3: #6e6e73;
  --paper: #ffffff;
  --paper-2: #f5f5f7;
  --accent: #0071e3;
  --accent-ink: #0066cc;
  --radius: 18px;
  --nav-h: 70px;
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); overflow-x: clip; }
body {
  font: 400 100%/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

/* ---------- nav: translucent chrome, content scrolls under ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  transition: box-shadow 300ms var(--ease-out);
}
.nav { border-bottom: 1px solid rgba(0,0,0,0.10); }
.nav.is-scrolled { box-shadow: 0 6px 18px rgba(0,0,0,0.05); }
.nav-inner {
  max-width: 1024px; margin: 0 auto; height: var(--nav-h);
  display: flex; align-items: center; gap: 28px; padding: 0 22px;
}
.nav-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-text strong { font-weight: 700; font-size: 1.04rem; letter-spacing: -0.012em; }
.brand-text small { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-3); }
.nav-brand img { border-radius: 6px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a {
  color: var(--ink-2); font-size: 0.82rem; letter-spacing: 0.005em;
  transition: color 160ms var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  font-size: 0.8rem; font-weight: 500; color: #fff; background: var(--accent);
  padding: 6px 14px; border-radius: 980px;
  transition: transform 160ms var(--ease-out), background 160ms var(--ease-out);
}
.nav-cta:hover { background: var(--accent-ink); }
.nav-cta:active { transform: scale(0.96); }

/* ---------- hero ---------- */
.hero {
  min-height: 70vh; justify-content: center;
  padding: calc(var(--nav-h) + 3vh) 22px 3vh;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero-kicker {
  font-size: 1.02rem; font-weight: 600; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.hero-title {
  margin-top: 14px;
  font-size: clamp(3.3rem, 9.5vw, 7.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.hero-sub {
  margin-top: 22px; max-width: 620px;
  font-size: clamp(1.02rem, 1.6vw, 1.25rem);
  line-height: 1.5; color: var(--ink-2);
  letter-spacing: 0.002em;
}
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block; border-radius: 980px; font-size: 1rem; font-weight: 500;
  padding: 12px 24px;
  transition: transform 140ms var(--ease-out), background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-quiet { color: var(--accent-ink); }
.btn-quiet:hover { text-decoration: underline; }
.btn-sm { font-size: 0.9rem; padding: 9px 18px; }

.hero-book {
  margin: 6vh auto 0; width: min(680px, 86vw);
  will-change: transform;
}
.hero-book img { filter: drop-shadow(0 30px 45px rgba(0,0,0,0.18)); }

/* ---------- stats ---------- */
.stats {
  max-width: 880px; margin: 9vh auto 0; padding: 0 22px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  text-align: center;
}
.stat strong {
  display: block; font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.stat span { font-size: 0.85rem; color: var(--ink-3); }

/* ---------- section heads ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 5vh; padding: 0 22px; }
.section-head h2 {
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -0.022em; line-height: 1.06;
}
.section-head p { margin-top: 12px; color: var(--ink-2); font-size: 1.06rem; }

/* ---------- catalog ---------- */
.catalog { padding: 4vh 0 4vh; }
.book {
  max-width: 1024px; margin: 0 auto; padding: 6vh 22px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 6vw, 72px); align-items: center;
}
.book:nth-child(odd) .book-media { order: 2; }
.book-media { position: relative; }
.book-media img {
  margin: 0 auto; max-height: 560px; width: auto; max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.16);
  transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
  will-change: transform;
}
.book-media img[src$=".png"] { border-radius: 0; box-shadow: none; filter: drop-shadow(0 24px 36px rgba(0,0,0,0.16)); }
.book:hover .book-media img { box-shadow: 0 34px 60px rgba(0,0,0,0.20); }
.book-eyebrow {
  font-size: 0.78rem; font-weight: 600; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.book-info h3 {
  margin-top: 8px; font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700; letter-spacing: -0.018em; line-height: 1.12;
}
.book-author { margin-top: 6px; color: var(--ink-3); font-size: 0.98rem; }
.author-link { color: var(--accent-ink); }
.author-link:hover { text-decoration: underline; }
.book-desc { margin-top: 14px; color: var(--ink-2); line-height: 1.55; }
.book-formats { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.book-formats li {
  font-size: 0.78rem; font-weight: 500; color: var(--ink-2);
  background: var(--paper-2); border-radius: 980px; padding: 5px 12px;
}
.book-info .btn { margin-top: 22px; }

/* ---------- authors ---------- */
.authors { padding: 14vh 0 10vh; }
.author-grid {
  max-width: 900px; margin: 0 auto; padding: 0 22px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.author-card {
  background: var(--paper-2); border-radius: var(--radius); padding: 34px 20px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), background 220ms var(--ease-out);
}
.author-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,0.10); background: #fff; }
.author-card:active { transform: translateY(-1px) scale(0.98); }
.author-mono {
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #3a3a3c, #1d1d1f); color: #f5f5f7;
  font-weight: 600; font-size: 1.3rem; letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.author-mono.lg { width: 84px; height: 84px; font-size: 1.6rem; margin: 0 auto 14px; }
.author-name { font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em; }
.author-meta { font-size: 0.82rem; color: var(--ink-3); }

/* ---------- house ---------- */
.house { background: var(--ink); color: #f5f5f7; padding: 14vh 22px; }
.house-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.house h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -0.022em; }
.house-lede { margin-top: 18px; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.4; font-weight: 500; }
.house p:not(.house-lede) { margin-top: 18px; color: #a1a1a6; line-height: 1.6; }

/* ---------- footer ---------- */
.footer { background: var(--paper-2); padding: 8vh 22px 5vh; }
.footer-inner { max-width: 1024px; margin: 0 auto; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.footer-brand img { border-radius: 7px; }
.footer-cols { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.footer-cols h4 { font-size: 0.82rem; color: var(--ink-3); font-weight: 600; margin-bottom: 10px; }
.footer-cols a { display: block; color: var(--ink-2); font-size: 0.92rem; margin-bottom: 7px; }
.footer-cols a:hover { color: var(--ink); }
.footer-cols p { color: var(--ink-2); font-size: 0.92rem; line-height: 1.6; }
.footer-legal { margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(0,0,0,0.08); font-size: 0.78rem; color: var(--ink-3); }

/* ---------- author sheet ---------- */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.4);
  opacity: 0;
}
.sheet {
  position: fixed; z-index: 51;
  left: 50%; bottom: 0;
  width: min(560px, 100vw);
  max-height: 86dvh;
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 60px rgba(0,0,0,0.22);
  transform: translate(-50%, 100%);
  touch-action: none;
  will-change: transform;
  display: flex; flex-direction: column;
}
.sheet-grab {
  flex: 0 0 auto; padding: 10px 0 4px; cursor: grab;
}
.sheet-grab::before {
  content: ""; display: block; width: 40px; height: 5px; border-radius: 3px;
  background: rgba(0,0,0,0.18); margin: 0 auto;
}
.sheet-content { padding: 14px 30px 40px; overflow-y: auto; text-align: center; }
.sheet-content h3 { font-size: 1.6rem; letter-spacing: -0.018em; }
.sheet-role { margin-top: 4px; color: var(--ink-3); font-size: 0.88rem; }
.sheet-content > p:not(.sheet-role) { margin-top: 16px; color: var(--ink-2); line-height: 1.55; text-align: left; }
.sheet-shelf { margin-top: 24px; display: flex; gap: 14px; justify-content: center; }
.sheet-shelf a { width: 110px; transition: transform 200ms var(--ease-out); }
.sheet-shelf a:hover { transform: translateY(-4px); }
.sheet-shelf img { border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,0.18); }
.sheet-open, .sheet-open body { overflow: hidden; }
.page-scale { transition: none; will-change: transform; transform-origin: 50% 0; }

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(26px); will-change: transform, opacity; }
.reveal.in { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.book .book-media, .book .book-info { opacity: 0; transform: translateY(34px); }
.book.in .book-media, .book.in .book-info { opacity: 1; transform: none; transition: opacity 750ms var(--ease-out), transform 750ms var(--ease-out); }
.book.in .book-info { transition-delay: 90ms; }

/* ---------- focus ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .book { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .book:nth-child(odd) .book-media { order: 0; }
  .book-media img { max-height: 380px; }
  .book-formats { justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .author-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .sheet-shelf { flex-wrap: wrap; }
}

/* ---------- reduced motion / transparency / contrast ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .book .book-media, .book .book-info { opacity: 1; transform: none; transition: none; }
  .hero-book { transform: none !important; }
  .sheet { transition: opacity 200ms ease; }
  .book-media img, .author-card, .btn { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .sheet { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .nav { background: #fff; border-bottom: 1px solid var(--ink); }
  .book-formats li { border: 1px solid var(--ink-3); }
}

/* ================= premium effects layer ================= */
.hero { position: relative; }
.hero > * { position: relative; z-index: 1; }

/* rotating word */
.swap-wrap { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.swap-word {
  display: inline-block;
  background: linear-gradient(100deg, #0071e3, #7c5cff);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  transition: transform 480ms cubic-bezier(0.32, 0.9, 0.35, 1), opacity 380ms ease, filter 380ms ease;
  will-change: transform, opacity, filter;
}
.swap-word.g-stories   { background-image: linear-gradient(100deg, #0071e3, #7c5cff); }
.swap-word.g-curiosity { background-image: linear-gradient(100deg, #ff9500, #ff2d55); }
.swap-word.g-courage   { background-image: linear-gradient(100deg, #ff375f, #ff9f0a); }
.swap-word.g-wonder    { background-image: linear-gradient(100deg, #bf5af2, #64d2ff); }
.swap-word.g-puzzles   { background-image: linear-gradient(100deg, #e6a700, #ff6b35); }
.swap-word.swap-out { transform: translateY(-1.05em); opacity: 0; filter: blur(7px); }
.swap-word.swap-prep { transition: none; transform: translateY(1.05em); opacity: 0; filter: blur(7px); }

/* aurora */
.aurora { position: absolute; inset: -10% -20% auto; height: 120vh; z-index: 0; pointer-events: none; overflow: visible; }
.aurora i {
  position: absolute; width: 46vw; height: 46vw; border-radius: 50%;
  filter: blur(70px); opacity: 0.16; will-change: transform;
}
.aurora i:nth-child(1) { left: 4%; top: 6%; background: radial-gradient(circle, #0071e3, transparent 65%); animation: drift-a 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { right: 2%; top: 12%; background: radial-gradient(circle, #bf5af2, transparent 65%); animation: drift-b 31s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { left: 32%; top: 34%; background: radial-gradient(circle, #ff9f0a, transparent 65%); animation: drift-c 24s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(9vw, 7vh) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-8vw, 10vh) scale(0.92); } }
@keyframes drift-c { to { transform: translate(6vw, -6vh) scale(1.08); } }

/* hero background video (Higgsfield) */
.hero-video { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-video video { width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.hero-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.5)); }


/* cover tilt + per-book glow */
.book-media { perspective: 950px; }
.book-media img { position: relative; z-index: 1; transform-style: preserve-3d; }
.book-media::before {
  content: ""; position: absolute; inset: 6% 10%;
  background: radial-gradient(closest-side, var(--glow, rgba(0,113,227,0.5)), transparent 72%);
  filter: blur(46px); opacity: 0; transition: opacity 900ms var(--ease-out) 150ms;
}
.book.in .book-media::before { opacity: 0.55; }

/* magnetic buttons */
.btn-primary, .nav-cta { transform: translate(var(--magx, 0px), var(--magy, 0px)); }
.btn-primary:active, .nav-cta:active { transform: translate(var(--magx, 0px), var(--magy, 0px)) scale(0.96); }

/* richer section-head reveal */
.section-head.reveal { filter: blur(14px); transform: translateY(34px) scale(0.985); }
.section-head.reveal.in { filter: blur(0); transform: none; transition: opacity 750ms var(--ease-out), transform 750ms var(--ease-out), filter 750ms var(--ease-out); }

/* dark house section backdrop (Higgsfield) */
.house { position: relative; overflow: hidden; }
.house-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.house-inner { position: relative; z-index: 1; }

@media (max-width: 820px) {
  .aurora i { width: 70vw; height: 70vw; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora i { animation: none; }
  .swap-word { transition: opacity 200ms ease; }
  .swap-word.swap-out, .swap-word.swap-prep { transform: none; filter: none; }
  .hero-video { display: none; }
  .section-head.reveal { filter: none; transform: none; }
}

/* badge + interactive aurora */

.badge-best {
  display: inline-block; margin-left: 10px; padding: 3px 10px;
  background: linear-gradient(100deg, #ff9500, #ff2d55); color: #fff;
  border-radius: 980px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  vertical-align: 1px;
}
.aurora { will-change: transform; }
@media (max-width: 820px) {
  
}

.footer-map { width: 100%; max-width: 280px; height: 170px; border: 0; border-radius: 12px; margin-top: 14px; box-shadow: 0 8px 20px rgba(0,0,0,0.08); }

.footer-lockup { width: min(320px, 70vw); mix-blend-mode: multiply; }
