:root {
  --purple: #70449A;
  --lavender: #B79BE3;
  --pink: #F05A9D;
  --blue: #8CC9EE;
  --teal: #249BA6;
  --white: #FFFFFF;
  --navy: #17345D;
  --cream: #FFF9F0;
  --ink: #142846;
  --shadow: 0 24px 70px rgba(23, 52, 93, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.65;
  overflow-x: hidden;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 99; left: 1rem; top: -5rem; background: var(--navy); color: white; padding: .75rem 1rem; border-radius: 999px; }
.skip-link:focus { top: 1rem; }

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 126px;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: .25s ease;
}
.site-header.is-scrolled { height: 100px; background: rgba(255, 249, 240, .94); backdrop-filter: blur(16px); box-shadow: 0 8px 30px rgba(23,52,93,.08); }
.brand { display: inline-flex; align-items: center; text-decoration: none; border-radius: 18px; }
.official-logo-crop { display: block; width: 170px; height: 113px; overflow: hidden; border-radius: 16px; box-shadow: 0 8px 24px rgba(23,52,93,.09); transition: width .25s ease, height .25s ease, box-shadow .25s ease; }
.official-logo { display: block; width: 100%; height: 100%; object-fit: contain; }
.site-header.is-scrolled .official-logo-crop { width: 142px; height: 95px; box-shadow: 0 5px 16px rgba(23,52,93,.08); }
.site-nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.8vw, 2.5rem); font-family: "Fredoka", sans-serif; font-size: .91rem; font-weight: 500; }
.site-nav a { text-decoration: none; position: relative; }
.site-nav a::after { content: ""; position: absolute; height: 3px; left: 0; right: 100%; bottom: -.35rem; background: var(--pink); border-radius: 2px; transition: .2s; }
.site-nav a:hover::after, .site-nav a:focus-visible::after { right: 0; }
.menu-button { display: none; border: 0; background: transparent; padding: .5rem; }
.menu-button span:not(.sr-only) { display: block; width: 25px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

.button { border: 0; border-radius: 999px; padding: .92rem 1.3rem; background: var(--purple); color: white; font-family: "Fredoka", sans-serif; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; box-shadow: 0 8px 22px rgba(112,68,154,.24); transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover, .button:focus-visible { transform: translateY(-2px); background: #5f3688; box-shadow: 0 12px 28px rgba(112,68,154,.32); }
.button-small { padding: .66rem 1rem; font-size: .84rem; }
.button-light { background: white; color: var(--purple); box-shadow: none; }
.text-link { font-family: "Fredoka", sans-serif; font-weight: 600; color: var(--navy); text-underline-offset: .35rem; text-decoration-thickness: 2px; }
.eyebrow { margin: 0 0 .8rem; font-family: "Fredoka", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; font-size: .74rem; color: var(--teal); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Fredoka", sans-serif; line-height: 1.08; letter-spacing: -.035em; }

.hero {
  min-height: 760px;
  padding: 150px clamp(1.25rem, 7vw, 7rem) 90px;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(360px, 1.12fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 78% 45%, rgba(183,155,227,.36), transparent 30%), radial-gradient(circle at 15% 15%, rgba(140,201,238,.25), transparent 23%), var(--cream);
}
.hero::before { content: ""; position: absolute; width: 420px; height: 420px; background: var(--pink); opacity: .07; border-radius: 41% 59% 66% 34% / 38% 40% 60% 62%; left: -220px; bottom: -160px; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { max-width: 760px; margin-bottom: 1.6rem; font-size: clamp(3rem, 6.5vw, 6.7rem); color: var(--navy); }
.hero h1 em { color: var(--purple); font-family: "Caveat", cursive; font-weight: 600; letter-spacing: -.02em; }
.hero-lede { max-width: 560px; font-size: clamp(1rem, 1.4vw, 1.25rem); }
.hero-actions { display: flex; align-items: center; gap: 1.35rem; margin: 2rem 0 1rem; }
.fine-print { font-size: .72rem; opacity: .68; }
.hero-art { min-height: 580px; position: relative; display: grid; place-items: center; }
.book-mockup { position: relative; width: min(390px, 72vw); aspect-ratio: .88; transform: rotate(3deg); filter: drop-shadow(0 32px 35px rgba(23,52,93,.22)); transition: transform .35s ease; }
.book-mockup:hover { transform: rotate(1deg) translateY(-8px); }
.book-spine { position: absolute; z-index: -1; left: -17px; top: 7px; bottom: 5px; width: 28px; background: #5b347d; border-radius: 10px 0 0 10px; }
.book-cover { height: 100%; padding: 9% 9% 6%; background: var(--purple); color: white; border: 4px solid white; border-radius: 6px 18px 18px 6px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; position: relative; }
.book-cover::before { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; background: var(--pink); top: -100px; right: -80px; opacity: .65; }
.cover-kicker { z-index: 1; font-family: "Fredoka", sans-serif; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; background: var(--pink); padding: .4rem .7rem; border-radius: 999px; }
.book-cover h2 { z-index: 1; font-size: clamp(1.9rem, 4vw, 3rem); margin: .65rem 0 1rem; }
.book-cover h2 em { font-family: "Caveat", cursive; font-size: 1.2em; color: #fbe4a9; }
.artwork-slot { flex: 1; width: 100%; min-height: 170px; display: grid; place-content: center; gap: .25rem; border: 2px dashed rgba(255,255,255,.55); border-radius: 47% 53% 45% 55% / 55% 45% 55% 45%; background: rgba(255,255,255,.09); font-family: "Fredoka", sans-serif; }
.artwork-slot small { font: italic .67rem "Libre Baskerville", serif; opacity: .75; }
.cover-publisher { font-family: "Fredoka", sans-serif; text-transform: uppercase; letter-spacing: .12em; font-size: .62rem; margin: .9rem 0 0; }
.sunny-orbit { position: absolute; border: 1px dashed rgba(112,68,154,.25); border-radius: 50%; }
.orbit-one { width: 540px; height: 540px; }
.orbit-two { width: 660px; height: 660px; }
.sunny-reserved { position: absolute; right: -1rem; bottom: 2rem; width: 170px; transform: rotate(-4deg); filter: drop-shadow(0 14px 20px rgba(23,52,93,.16)); }
.sunny-reserved img { display: block; width: 100%; height: auto; border-radius: 22px; }

.book-section { padding: clamp(5.5rem, 10vw, 10rem) clamp(1.25rem, 7vw, 7rem); background: white; }
.section-heading { max-width: 770px; margin: 0 auto 3.5rem; text-align: center; }
.book-section--preview-hidden .section-heading { margin-bottom: 0; }
.section-heading h2, .brand-story h2, .world-explorer h2, .future-shelf h2 { font-size: clamp(2.15rem, 4vw, 4rem); color: var(--navy); }
.section-heading > p:last-child { max-width: 650px; margin: 0 auto; }
.flagship-copy { max-width: 700px; margin: 0 auto; }
.flagship-copy p { margin-bottom: 1rem; }
.flagship-copy p:last-child { margin-bottom: 0; }
.preview-shell { max-width: 1160px; margin: auto; }
.preview-meta { display: flex; justify-content: space-between; font-family: "Fredoka", sans-serif; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--purple); margin-bottom: 1rem; }
.preview-stage { min-height: 520px; }
.preview-page { min-height: 520px; display: grid; grid-template-columns: 1fr 1.08fr; border: 1px solid #eee4f3; border-radius: 28px; overflow: hidden; background: #fffdfa; box-shadow: var(--shadow); }
.preview-page[hidden] { display: none; }
.preview-copy { padding: clamp(2rem, 5.5vw, 5rem); display: flex; flex-direction: column; justify-content: center; }
.page-number { font-family: "Fredoka", sans-serif; text-transform: uppercase; font-size: .72rem; letter-spacing: .13em; color: var(--teal); }
.story-copy { font-family: "Caveat", cursive; font-weight: 600; font-size: clamp(2.6rem, 4.6vw, 5rem); line-height: .98; color: var(--purple); margin-bottom: 1.5rem; }
.story-copy.dialogue { font-size: clamp(2.3rem, 4vw, 4.3rem); }
.story-copy.dialogue em { color: var(--pink); }
.story-copy.dialogue strong { color: var(--navy); }
.preview-note { max-width: 440px; font-size: .92rem; }
.preview-visual { min-height: 100%; display: grid; place-content: center; padding: 3rem; text-align: center; background: var(--lavender); color: var(--navy); font-family: "Fredoka", sans-serif; position: relative; overflow: hidden; }
.preview-visual::before, .preview-visual::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.22); }
.preview-visual::before { width: 290px; height: 290px; top: -110px; right: -80px; }
.preview-visual::after { width: 200px; height: 200px; bottom: -80px; left: -70px; }
.preview-visual span, .preview-visual strong, .preview-visual small { position: relative; z-index: 1; display: block; }
.preview-visual strong { font-size: clamp(1.4rem, 2.6vw, 2.4rem); margin: .35rem 0; }
.preview-visual small { font: italic .78rem "Libre Baskerville", serif; }
.preview-purple { color: white; background: linear-gradient(145deg, var(--purple), #9b6fc3); }
.preview-pink { background: linear-gradient(145deg, #ffd5e7, var(--pink)); }
.preview-blue { background: linear-gradient(145deg, #dff4ff, var(--blue)); }
.gift-grid { grid-template-columns: 1fr 1fr; gap: 1rem; background: #f6ebff; }
.gift-grid span { width: 155px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 26px; background: white; box-shadow: 0 12px 25px rgba(112,68,154,.12); font-family: "Caveat", cursive; font-size: 1.55rem; color: var(--purple); transform: rotate(-2deg); }
.gift-grid span:nth-child(even) { transform: rotate(2deg); color: var(--pink); }
.envelope { width: 260px; aspect-ratio: 1.45; background: white; border-radius: 8px; box-shadow: 0 18px 40px rgba(112,68,154,.18); display: grid; place-items: center; position: relative; transform: rotate(-4deg); }
.envelope::before { content: ""; position: absolute; inset: 0; clip-path: polygon(0 0, 50% 55%, 100% 0); background: #f8ecf3; }
.envelope span { color: var(--purple); font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.2rem; line-height: 1.05; transform: rotate(4deg); }
.coffee-cup { width: 190px; height: 180px; background: white; border-radius: 12px 12px 70px 70px; display: grid; place-items: center; box-shadow: 0 18px 40px rgba(23,52,93,.14); position: relative; }
.coffee-cup::after { content: ""; position: absolute; right: -55px; top: 28px; width: 75px; height: 88px; border: 18px solid white; border-left: 0; border-radius: 0 60px 60px 0; }
.coffee-cup span { font-family: "Caveat", cursive; font-weight: 700; font-size: 2.5rem; color: var(--pink); }
.preview-controls { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.round-button { width: 47px; aspect-ratio: 1; border: 1px solid #ddcee8; border-radius: 50%; background: white; color: var(--purple); cursor: pointer; font-size: 1.2rem; transition: .2s; }
.round-button:hover, .round-button:focus-visible { background: var(--purple); color: white; transform: translateY(-2px); }
.preview-dots { display: flex; gap: .5rem; }
.preview-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: #d7c8e1; cursor: pointer; transition: .25s; }
.preview-dots button.is-active { width: 30px; background: var(--pink); }

.world-section { padding: clamp(5.5rem, 10vw, 10rem) clamp(1.25rem, 7vw, 7rem); background: var(--navy); color: white; overflow: hidden; position: relative; }
.world-section::before { content: ""; position: absolute; width: 650px; height: 650px; top: 11%; right: -330px; border: 1px dashed rgba(255,255,255,.15); border-radius: 50%; }
.brand-story { max-width: 1160px; margin: 0 auto clamp(6rem, 10vw, 10rem); display: grid; grid-template-columns: 1fr .9fr; gap: clamp(3rem, 7vw, 8rem); align-items: end; position: relative; }
.brand-story h2, .world-explorer h2, .future-shelf h2 { color: white; }
.brand-story-copy { font-size: 1.04rem; opacity: .83; }
.brand-story-copy p { margin-bottom: 1rem; }
.brand-story-copy p:last-child { margin-bottom: 0; }
.world-explorer { max-width: 1160px; margin: 0 auto clamp(7rem, 10vw, 10rem); display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(3rem, 7vw, 8rem); align-items: center; position: relative; }
.explorer-copy > p:not(.eyebrow) { opacity: .8; }
.tab-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.8rem; }
.tab-list button { border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: .65rem .9rem; color: white; background: transparent; font: 500 .78rem "Fredoka", sans-serif; cursor: pointer; }
.tab-list button[aria-selected="true"] { background: var(--pink); border-color: var(--pink); }
.explorer-card { min-height: 440px; padding: clamp(2rem, 5vw, 4.5rem); border-radius: 40px; background: var(--cream); color: var(--navy); box-shadow: 0 28px 70px rgba(0,0,0,.2); display: grid; align-items: center; transform: rotate(1deg); }
.world-panel[hidden] { display: none; }
.panel-label { font: 700 .7rem "Fredoka", sans-serif; text-transform: uppercase; letter-spacing: .13em; color: var(--teal); }
.world-panel h3 { font-size: clamp(2rem, 3.6vw, 3.5rem); color: var(--purple); }
.detail-chips, .place-list, .character-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
.detail-chips span, .place-list span { padding: .55rem .75rem; border-radius: 10px; background: #eee6f5; font: 500 .76rem "Fredoka", sans-serif; }
.place-list span:nth-child(3n+2) { background: #dff5fb; }
.place-list span:nth-child(3n+3) { background: #ffe5f0; }
.character-list { display: grid; grid-template-columns: 1fr 1fr; }
.character-list span { display: grid; padding: .75rem .9rem; border-radius: 14px; background: white; box-shadow: 0 6px 18px rgba(23,52,93,.08); font-size: .7rem; line-height: 1.35; }
.character-list strong { font-family: "Fredoka", sans-serif; color: var(--purple); font-size: .92rem; }
.future-shelf { max-width: 1160px; margin: auto; position: relative; }
.shelf-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.shelf-heading h2 { max-width: 640px; margin-bottom: 0; }
.book-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2rem); margin-top: 3rem; }
.future-book { min-height: 300px; padding: 1.7rem; border-radius: 10px 25px 25px 10px; display: flex; flex-direction: column; justify-content: flex-end; color: var(--navy); box-shadow: 8px 12px 0 rgba(255,255,255,.1); transition: transform .25s; }
.future-book:hover { transform: translateY(-8px) rotate(-1deg); }
.future-book span { margin-bottom: auto; font: 700 .67rem "Fredoka", sans-serif; text-transform: uppercase; letter-spacing: .13em; }
.future-book strong { font: 600 clamp(1.5rem, 2.4vw, 2.3rem) "Caveat", cursive; }
.future-book small { font-size: .65rem; opacity: .7; }
.future-one { background: var(--lavender); transform: rotate(-1deg); }
.future-two { background: var(--blue); transform: rotate(1deg); }
.future-three { background: #f8b6d3; transform: rotate(-.5deg); }

.site-footer { padding: 3rem clamp(1.25rem, 7vw, 7rem); background: var(--purple); color: white; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem 2rem; }
.site-footer p { margin-bottom: 0; font-size: .78rem; opacity: .8; }
.footer-mark { font: 600 1.1rem "Fredoka", sans-serif !important; opacity: 1 !important; }
.copyright { grid-column: 1 / -1; font-size: .65rem !important; }

.signup-dialog { width: min(560px, calc(100vw - 2rem)); border: 0; border-radius: 30px; padding: clamp(2rem, 5vw, 4rem); color: var(--navy); background: var(--cream); box-shadow: 0 35px 100px rgba(23,52,93,.35); }
.signup-dialog::backdrop { background: rgba(23,52,93,.65); backdrop-filter: blur(6px); }
.signup-dialog h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--purple); }
.dialog-close { position: absolute; top: 1rem; right: 1rem; width: 40px; aspect-ratio: 1; border: 0; border-radius: 50%; background: white; color: var(--navy); font-size: 1.4rem; cursor: pointer; }
.signup-dialog label { display: block; font: 600 .78rem "Fredoka", sans-serif; margin-bottom: .5rem; }
.form-row { display: flex; gap: .6rem; }
.form-row input { min-width: 0; flex: 1; border: 1px solid #d7c6e1; border-radius: 999px; padding: .9rem 1.1rem; color: var(--navy); background: white; }
.form-status { margin: .65rem 0 0; font-size: .68rem; opacity: .7; }
.form-status.is-success { color: var(--teal); opacity: 1; font-weight: 700; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .site-header { height: 96px; }
  .official-logo-crop { width: 120px; height: 80px; border-radius: 13px; }
  .site-header.is-scrolled .official-logo-crop { width: 105px; height: 70px; }
  .menu-button { display: block; }
  .site-nav { position: absolute; top: calc(100% + .5rem); left: 1rem; right: 1rem; padding: 1.3rem; background: var(--cream); border-radius: 22px; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; opacity: 0; transform: translateY(-12px); pointer-events: none; transition: .2s; }
  .site-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .site-nav a { padding: .35rem; }
  .hero { grid-template-columns: 1fr; padding-top: 125px; text-align: center; }
  .hero-lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { min-height: 520px; }
  .sunny-reserved { right: 4%; }
  .preview-page { grid-template-columns: 1fr; }
  .preview-copy { min-height: 380px; text-align: center; align-items: center; }
  .preview-visual { min-height: 370px; }
  .brand-story, .world-explorer { grid-template-columns: 1fr; }
  .brand-story { gap: 1rem; }
  .world-explorer { gap: 2rem; }
}

@media (max-width: 620px) {
  .site-header { padding-left: 1rem; padding-right: 1rem; }
  .official-logo-crop { width: 108px; height: 72px; }
  .hero { min-height: auto; gap: 1rem; }
  .hero h1 { font-size: clamp(3.2rem, 16vw, 5rem); }
  .hero-actions { flex-direction: column; }
  .hero-art { min-height: 450px; }
  .book-mockup { width: 76vw; }
  .sunny-reserved { width: 132px; right: -2%; bottom: 1rem; }
  .orbit-one { width: 420px; height: 420px; }
  .orbit-two { width: 510px; height: 510px; }
  .book-section, .world-section { padding-left: 1rem; padding-right: 1rem; }
  .preview-stage, .preview-page { min-height: 660px; }
  .preview-copy { min-height: 330px; padding: 2rem 1.4rem; }
  .preview-visual { min-height: 330px; padding: 1.5rem; }
  .gift-grid { gap: .65rem; }
  .gift-grid span { width: 115px; }
  .envelope { width: 210px; }
  .explorer-card { min-height: 470px; padding: 2rem 1.25rem; }
  .character-list { grid-template-columns: 1fr; }
  .shelf-heading { display: block; }
  .book-cards { grid-template-columns: 1fr; }
  .future-book { min-height: 240px; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .copyright { grid-column: auto; }
  .form-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
