/* Nightmare Fall home page: one fall from the night sky down to a warm bed. */
:root {
  --night: #120d24;
  --cream: #f6ead6;
  --body: #efe4d2;
  --muted: #cfc3e0;
  --soft: #ddd1ea;
  --gold: #ffd27a;
  --gold-hi: #ffe6ae;
  --ink: #1d1236;
  --paper: #efe1c6;
  --line: rgba(255, 210, 122, .16);
  --serif: 'Young Serif', Georgia, 'Times New Roman', serif;
  --hand: 'Patrick Hand', 'Bradley Hand', 'Segoe Print', cursive;
  --sans: Nunito, 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(56px, 7vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  color: var(--cream);
  font: 18px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  background-color: var(--night);
  background-image:
    url(/img/home/stars.png),
    radial-gradient(ellipse 60% 22% at 72% 97%, rgba(255, 168, 84, .22), rgba(255, 168, 84, 0)),
    linear-gradient(180deg, #120d24 0%, #150f2b 30%, #1b1335 55%, #22163c 75%, #2c1a3a 90%, #382035 100%);
  background-size: 640px 640px, 100% 100%, 100% 100%;
  background-repeat: repeat, no-repeat, no-repeat;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; scroll-margin-top: 8px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--gold); color: var(--ink); font-weight: 800; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
.h2 { font-family: var(--serif); font-size: clamp(34px, 4.2vw, 56px); line-height: 1.08; text-wrap: balance; }
.hand { font-family: var(--hand); }
.text { color: var(--body); }
.depth { display: flex; align-items: center; gap: 12px; font: 20px/1.3 var(--hand); color: var(--gold); }
.depth i { position: relative; width: 72px; height: 6px; border-radius: 3px; background: rgba(255, 210, 122, .2); overflow: hidden; }
.depth i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--d, 0%); border-radius: 3px; background: var(--gold); }
.head { display: flex; flex-direction: column; gap: 18px; }
.head.center { align-items: center; text-align: center; }

/* The App Store button */
.cta {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 0 28px 0 22px; border-radius: 18px;
  background-color: var(--gold);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 55%);
  color: var(--ink); text-decoration: none;
  box-shadow: 0 10px 28px rgba(255, 190, 80, .28), inset 0 -3px 0 rgba(150, 85, 10, .32);
  transition: transform .2s ease, filter .2s ease;
}
.cta:hover { color: var(--ink); transform: translateY(-2px); filter: brightness(1.06); }
.cta svg { flex: none; }
.cta span { display: flex; flex-direction: column; line-height: 1.12; }
.cta small { font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.cta b { font: 400 24px/1.12 var(--serif); }
.cta.big { min-height: 68px; border-radius: 20px; padding-right: 32px; }
.cta.big b { font-size: 26px; }
.cta.small { white-space: nowrap; min-height: 44px; padding: 0 20px; border-radius: 14px; font-weight: 800; font-size: 15px; gap: 0; }
@keyframes glow {
  0%, 100% { box-shadow: 0 10px 28px rgba(255, 190, 80, .28), inset 0 -3px 0 rgba(150, 85, 10, .32); }
  50% { box-shadow: 0 12px 46px rgba(255, 190, 80, .55), inset 0 -3px 0 rgba(150, 85, 10, .32); }
}
@media (prefers-reduced-motion: no-preference) { .cta.pulse { animation: glow 3.4s ease-in-out infinite; } }

/* Hero: the story as a silent film behind the offer */
.hero { position: relative; min-height: clamp(720px, 100svh, 940px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; background: var(--night); }
.hero-media img, .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-media video { opacity: 0; transition: opacity 1.2s ease; }
.hero-media video.is-playing { opacity: 1; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 70% at 50% 45%, rgba(18, 13, 36, 0) 55%, rgba(18, 13, 36, .55) 100%),
    linear-gradient(180deg, rgba(18, 13, 36, .75) 0%, rgba(18, 13, 36, .2) 24%, rgba(18, 13, 36, 0) 40%, rgba(18, 13, 36, .35) 58%, rgba(18, 13, 36, .9) 80%, var(--night) 100%);
}
.hero-top { position: absolute; inset: clamp(84px, 10vh, 112px) 0 auto; z-index: 1; display: flex; justify-content: center; pointer-events: none; }
.nav { position: absolute; inset: 0 0 auto; z-index: 3; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--cream); text-decoration: none; font: 20px var(--serif); text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-weight: 700; font-size: 15px; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.link { color: var(--cream); text-decoration: none; }
.link:hover { color: var(--gold); }
.hero-copy { position: relative; width: 100%; padding-bottom: 56px; }
.hero-inner { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.hero-logo { width: clamp(220px, 21vw, 300px); height: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .6)); }
.hero h1 { font-family: var(--serif); font-size: clamp(42px, 5.4vw, 78px); line-height: 1.02; letter-spacing: -.015em; text-wrap: balance; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.lead { max-width: 640px; font-size: clamp(18px, 1.5vw, 20px); color: var(--body); text-shadow: 0 2px 16px rgba(0, 0, 0, .7); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 4px; }
.hero .cta-row, .hero .checks { justify-content: center; }
.watch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--cream); font: 800 16px var(--sans); text-decoration: none; cursor: pointer; }
.watch:hover { color: var(--gold); }
.watch .ring { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(246, 234, 214, .75); display: flex; align-items: center; justify-content: center; background: rgba(18, 13, 36, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.checks { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; font-weight: 700; color: var(--soft); }
.checks li { display: flex; align-items: center; gap: 8px; }

/* At a glance */
.glance { border-block: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.glance .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 24px; padding-top: 34px; padding-bottom: 34px; }
.fact { display: flex; align-items: center; gap: 14px; }
.fact b { font: 400 54px/1 var(--serif); color: var(--gold); }
.fact span { font: 21px/1.15 var(--hand); }

/* Two columns that stack on a phone */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: clamp(40px, 6vw, 80px); align-items: center; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* Story */
.frames { position: relative; padding-bottom: 48px; }
.frame { border: 8px solid var(--paper); border-radius: 10px; aspect-ratio: 760 / 1344; object-fit: cover; box-shadow: 0 30px 60px rgba(0, 0, 0, .55); }
.frames .a { width: 64%; transform: rotate(-2.5deg); }
.frames .b { position: absolute; right: 2%; bottom: 0; width: 44%; border-width: 7px; transform: rotate(4deg); box-shadow: 0 30px 60px rgba(0, 0, 0, .6); }
.note { display: flex; align-items: flex-start; gap: 14px; margin-top: 6px; padding: 18px 20px; border-radius: 18px; background: rgba(255, 210, 122, .08); border: 1px solid rgba(255, 210, 122, .22); font-size: 17px; }
.note svg { flex: none; margin-top: 2px; }

/* How it plays */
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.steps li { display: flex; align-items: flex-start; gap: 18px; }
.icon { flex: none; width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid rgba(255, 210, 122, .6); display: flex; align-items: center; justify-content: center; color: var(--gold); }
.steps h3 { margin-bottom: 4px; font: 24px/1.2 var(--serif); }
.steps p, .card p, .perks p, .nightly p { font-size: 17px; color: var(--muted); }
.fairy-note { display: flex; align-items: center; gap: 18px; margin-top: 8px; padding-top: 22px; border-top: 1px solid rgba(255, 210, 122, .18); font-size: 17px; color: var(--body); }
.fairy-note img { width: 76px; height: auto; flex: none; }
.fairy-note .hand { font-size: 22px; color: var(--gold); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }
@media (prefers-reduced-motion: no-preference) { .bob { animation: bob 4.6s ease-in-out infinite; } }
.phone { width: min(310px, 78vw); aspect-ratio: 480 / 1040; margin: 0 auto; padding: 10px; border-radius: 46px; background: #0b0818; box-shadow: 0 0 0 1px rgba(255, 210, 122, .35), 0 40px 90px rgba(0, 0, 0, .6), 0 0 140px rgba(255, 200, 110, .2); }
.phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; background: var(--night); }

/* Heroes */
.heroes { display: flex; flex-direction: column; gap: 116px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 124px 28px; }
.card { display: flex; flex-direction: column; gap: 14px; padding: 0 32px 34px; border-radius: 32px; background-color: #21163f; border: 1px solid rgba(255, 210, 122, .18); }
.card.mila { background-image: radial-gradient(ellipse 70% 50% at 50% 22%, rgba(255, 214, 140, .30), rgba(255, 214, 140, 0) 72%); }
.card.vigo { background-color: #1b1840; border-color: rgba(160, 185, 255, .2); background-image: radial-gradient(ellipse 70% 50% at 50% 22%, rgba(140, 170, 255, .28), rgba(140, 170, 255, 0) 72%); }
.card .pic { height: 290px; margin-top: -56px; display: flex; align-items: flex-end; justify-content: center; }
.card .pic img { height: 340px; width: auto; max-width: none; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.card .name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 8px; }
.card h3 { font: 38px/1 var(--serif); }
.chip { padding: 2px 14px; border-radius: 999px; border: 1px solid rgba(255, 210, 122, .5); font: 19px/1.5 var(--hand); color: var(--gold); }

/* Worlds */
.worlds-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 48px; margin-bottom: 44px; }
.worlds-head .head { max-width: 620px; }
.worlds-head p { max-width: 420px; }
.worlds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 32px 20px; }
.world { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.world img { width: 100%; aspect-ratio: 480 / 1040; object-fit: cover; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 24px 50px rgba(0, 0, 0, .5); transition: transform .35s ease; }
.world:hover img { transform: translateY(-6px); }
.world figcaption { display: flex; flex-direction: column; line-height: 1.2; }
.world figcaption span { font: 18px var(--hand); color: var(--gold); }
.world figcaption b { font: 400 19px var(--serif); }

/* Bosses: the shelf of plush friends */
.shelf { max-width: 1080px; margin: 52px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 40px 0; }
.plush { margin: 0; display: flex; flex-direction: column; align-items: center; }
.plush .pic { height: 150px; display: flex; align-items: flex-end; justify-content: center; padding: 0 10px; }
.plush .pic img { max-height: 140px; width: auto; }
.plank { width: 100%; height: 14px; background-color: #6e4529; background-image: linear-gradient(180deg, rgba(255, 222, 170, .35) 0, rgba(255, 222, 170, .35) 2px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, .28) 100%); box-shadow: 0 12px 20px rgba(0, 0, 0, .45); }
.plush figcaption { margin-top: 14px; font: 19px var(--hand); }

/* Every night */
.nightly { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); gap: 20px; margin-top: 40px; }
.nightly article { display: flex; align-items: center; gap: 20px; padding: 18px; border-radius: 26px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 210, 122, .16); }
.nightly img { flex: none; width: 108px; aspect-ratio: 480 / 1040; object-fit: cover; border-radius: 14px; }
.nightly h3 { margin-bottom: 8px; font: 22px/1.2 var(--serif); }
.nightly p { font-size: 16px; line-height: 1.55; }

/* For grown-ups */
.parents { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 48px 64px; align-items: start; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 30px 28px; }
.perks li { display: flex; flex-direction: column; gap: 8px; }
.perks h3 { font: 800 18px/1.3 var(--sans); }
.perks p { font-size: 16px; line-height: 1.55; }

/* Home: the last call */
.final { background-image: radial-gradient(ellipse 50% 60% at 74% 52%, rgba(255, 170, 80, .24), rgba(255, 170, 80, 0) 72%); padding-bottom: calc(var(--section) + 16px); }
.final-logo { width: min(340px, 80%); height: auto; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .4)); }
.final h2 { font-size: clamp(38px, 5vw, 68px); line-height: 1.04; }
.final .cta-row { gap: 20px 28px; margin-top: 6px; }
.qr { display: flex; align-items: center; gap: 16px; }
.qr img { width: 96px; height: 96px; border-radius: 12px; image-rendering: pixelated; }
.qr p { max-width: 150px; font-size: 15px; line-height: 1.45; color: var(--soft); }
.final .frame { width: min(360px, 82%); margin: 0 auto; transform: rotate(2deg); box-shadow: 0 30px 70px rgba(0, 0, 0, .5), 0 0 120px rgba(255, 170, 80, .25); }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; font-size: 15px; color: var(--muted); }
.foot .who { display: flex; align-items: center; gap: 12px; }
.foot .who img { width: 32px; height: 32px; border-radius: 8px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot nav a { min-height: 44px; display: inline-flex; align-items: center; }

/* The phone's always-there button */
.sticky { display: none; }

/* The trailer, full screen with sound */
.trailer { width: min(1100px, 94vw); max-width: none; padding: 0; border: 0; border-radius: 18px; background: #000; overflow: visible; }
.trailer::backdrop { background: rgba(8, 5, 18, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.trailer video { width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: #000; }
.trailer .close { position: absolute; top: -56px; right: 0; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(246, 234, 214, .6); background: rgba(18, 13, 36, .7); color: var(--cream); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.trailer .close:hover { color: var(--gold); border-color: var(--gold); }

@media (max-width: 760px) {
  .nav-links, .brand span { display: none; }
  .hero { min-height: 0; display: block; }
  .hero-media { position: relative; height: min(80svh, 720px); }
  .hero-media img, .hero-media video { object-position: 50% 30%; }
  .hero-scrim { inset: 0 0 auto; height: min(80svh, 720px); background: linear-gradient(180deg, rgba(18, 13, 36, .7) 0%, rgba(18, 13, 36, .1) 26%, rgba(18, 13, 36, 0) 48%, rgba(18, 13, 36, .85) 82%, var(--night) 100%); }
  .hero-top { top: 76px; }
  .hero-copy { margin-top: -190px; padding-bottom: 44px; }
  .hero-logo { width: 200px; }
  .qr { display: none; }
  .trailer .close { top: auto; bottom: -60px; right: 50%; transform: translateX(50%); }
  .sticky {
    position: fixed; inset: auto 0 0; z-index: 20;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(18, 13, 36, .94); border-top: 1px solid rgba(255, 210, 122, .25);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: transform .3s ease, visibility .3s;
  }
  .sticky.is-away { transform: translateY(120%); visibility: hidden; }
  .sticky img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
  .sticky .who { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
  .sticky .who b { font: 400 17px var(--serif); }
  .sticky .who span { font-size: 13px; color: var(--muted); }
  .foot .wrap { padding-bottom: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  .cta, .world img, .sticky { transition: none; }
}
