/* The landing page: her window at the top, parchment below.
 *
 * Only what the home page needs beyond style.css. Motion is transform and opacity only, so it
 * stays on the compositor, and every piece of it has a resting state for prefers-reduced-motion.
 * The sky is five gradient layers crossfaded by --k1..--k4, which landing.js sets from the
 * hours slider: night → predawn → sunrise → day → bright, the phases of the Reels.
 */

@font-face { font-family: "Josefin Sans"; font-weight: 400; font-display: swap; src: url(/assets/fonts/josefin-400.woff2) format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-weight: 600; font-display: swap; src: url(/assets/fonts/josefin-600.woff2) format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-weight: 700; font-display: swap; src: url(/assets/fonts/josefin-700.woff2) format("woff2"); }
@font-face { font-family: "Patrick Hand"; font-weight: 400; font-display: swap; src: url(/assets/fonts/patrick-hand-400.woff2) format("woff2"); }

html, body { overflow-x: hidden; }
body { padding: 0; }
.wrap { padding-block: 0; padding-inline: 20px; }
main { display: block; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Pills: the app's one filled button. */
.pill {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--moss);
  color: var(--cream);
  border: var(--stroke) solid var(--ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  transition: transform .15s ease-out;
}
.pill:hover { color: var(--cream); background: #4b6229; }
.pill:active { transform: scale(.97); }

/* Top bar: sits on the sky, so both pieces are pills that read on any phase of it. ---- */

.hero { position: relative; }
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  height: 64px;
  max-width: 1120px;             /* the sky is full width, so the bar spans it rather than the text column */
}
.hero .brand {
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: var(--cream);
  border: var(--stroke) solid var(--ink);
  font-size: 18px;
}
.hero .brand img { width: 28px; height: 28px; }

/* Hero: her window fills the first screen, with the hours control tucked under its hill;
   the words and the badge follow. */

.hero-words { text-align: center; padding: 34px 20px 10px; }
.hero h1 {
  font-size: clamp(32px, 7.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.6px;
  margin: 0 0 12px;
}
.hero .lede { font-size: clamp(17px, 2.6vw, 19px); max-width: 540px; margin: 0 auto 4px; }

/* Her window: sky, hill, and Mimi on it. */
.window {
  position: relative;
  height: clamp(440px, calc(100vh - 300px), 600px);
  height: clamp(440px, calc(100svh - 300px), 600px);
  overflow: hidden;
  --crest: 79px;                 /* where the hill's top sits at the middle, from the bottom */
  --mimi-w: 260px;               /* her box; she stands in the lower two thirds, with room to hop */
  --mimi-h: calc(var(--mimi-w) * 530 / 440);
  --k1: 1; --k2: 1; --k3: 1; --k4: .33;
}
@media (min-width: 640px) { .window { --mimi-w: 350px; } }

.sky { position: absolute; inset: 0; }
.layer { position: absolute; inset: 0; transition: opacity .25s linear; }
.l-night   { background: linear-gradient(#1e2c2c, #3e5a56); }
.l-predawn { background: linear-gradient(#344854, #788a86); opacity: var(--k1); }
.l-sunrise { background: linear-gradient(#d6d6cc, #f7d0ac); opacity: var(--k2); }
.l-day     { background: linear-gradient(var(--sky-top), var(--teal)); opacity: var(--k3); }
.l-bright  { background: linear-gradient(#e2f2e8, #bee2d2); opacity: var(--k4); }

.stars { position: absolute; inset: 0; opacity: calc(1 - var(--k1)); transition: opacity .25s linear; }
.stars i {
  position: absolute; left: var(--x); top: var(--y);
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--moon);
  animation: twinkle 2.8s ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes twinkle {
  0%, 100% { opacity: .35; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.35); }
}

.moon {
  position: absolute; right: 11%; top: 21%;
  width: 64px; height: 64px;
  opacity: calc(1 - var(--k2));
  transform: translateY(calc(var(--k2) * 30px));
  transition: opacity .25s linear, transform .25s linear;
}

.cloud {
  position: absolute; left: 0; height: auto;
  opacity: var(--k2);
  transition: opacity .25s linear;
  will-change: transform;
  animation: drift linear infinite;
}
.c1 { width: 132px; top: 16%; animation-duration: 80s;  animation-delay: -22s; --park: 14; }
.c2 { width: 92px;  top: 38%; animation-duration: 105s; animation-delay: -70s; --park: 72; }
.c3 { width: 68px;  top: 52%; animation-duration: 125s; animation-delay: -40s; --park: 38; }
@keyframes drift {
  from { transform: translateX(-160px); }
  to   { transform: translateX(calc(100vw + 40px)); }
}

.hill { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 120px; display: block; }
.hill-grass { fill: var(--grass); }
.hill-night { fill: #2f4838; opacity: calc(1 - var(--k2)); transition: opacity .25s linear; }
.hill-edge  { fill: none; stroke: var(--ink); stroke-width: 3px; stroke-linecap: round; }

.stage {
  position: absolute; left: 0; right: 0; margin: 0 auto;
  bottom: calc(var(--crest) - var(--mimi-h) * 0.113);
  width: var(--mimi-w); height: var(--mimi-h);
}
.mimi { position: absolute; inset: 0; }
.mimi img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity .18s linear;
}
.mimi img.on { opacity: 1; }
.mimi img[hidden] { display: none; }

.bubble {
  position: absolute; left: 50%; bottom: 72%;
  transform: translate(-50%, 0);
  margin: 0; padding: 8px 14px 6px;
  font-family: var(--hand); font-size: 22px; line-height: 1.15;
  color: var(--ink); background: var(--cream);
  border: var(--stroke) solid var(--ink); border-radius: 16px;
  width: max-content; max-width: 86vw; text-align: center;
  transition: opacity .2s linear;
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -7.5px;
  width: 12px; height: 12px; background: var(--cream);
  border-right: var(--stroke) solid var(--ink); border-bottom: var(--stroke) solid var(--ink);
  transform: translateX(-50%) rotate(45deg);
}
.bubble.pop { animation: pop .24s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop {
  from { transform: translate(-50%, 6px) scale(.86); }
  to   { transform: translate(-50%, 0) scale(1); }
}
.hero[data-level="passed"] .bubble { opacity: 0; }

/* Her z's, drawn here so they float on across the loop. */
.zs { position: absolute; left: 63%; top: 26%; width: 0; height: 0; font-family: var(--hand); font-size: 28px; line-height: 1; opacity: 0; transition: opacity .2s linear; }
.hero .zs { color: var(--moon); }
.hero[data-level="passed"] .zs { opacity: 1; }
.zs i { position: absolute; left: 0; top: 0; font-style: normal; animation: zfloat 2.4s ease-out infinite; }
.zs i:nth-child(2) { animation-delay: .8s; }
.zs i:nth-child(3) { animation-delay: 1.6s; }
@keyframes zfloat {
  0%   { opacity: 0; transform: translate(0, 0) scale(.7); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(24px, -50px) scale(1.3); }
}

/* The hours control. */
.control {
  position: relative;
  max-width: 560px;
  margin: -30px auto 0;
  padding: 18px 22px 16px;
  border: var(--stroke) solid var(--ink);
}
.control-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.control label { font-weight: 600; font-size: 17px; }
.control output { font-weight: 700; font-size: 24px; font-variant-numeric: tabular-nums; }

#hours {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 44px; margin: 2px 0 0;
  background: transparent; cursor: pointer;
  --fill: 88.9%;
}
#hours::-webkit-slider-runnable-track {
  height: 12px; border-radius: 999px;
  background: linear-gradient(90deg, var(--grass) var(--fill), var(--sage) var(--fill));
  border: var(--stroke) solid var(--ink);
}
#hours::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; margin-top: -10.5px;
  border-radius: 50%; background: var(--cream);
  border: var(--stroke) solid var(--ink);
  box-shadow: inset 0 0 0 6px var(--moss);
}
#hours::-moz-range-track { height: 12px; border-radius: 999px; background: var(--sage); border: var(--stroke) solid var(--ink); }
#hours::-moz-range-progress { height: 12px; border-radius: 999px; background: var(--grass); }
#hours::-moz-range-thumb {
  width: 27px; height: 27px; border-radius: 50%; background: var(--cream);
  border: var(--stroke) solid var(--ink); box-shadow: inset 0 0 0 6px var(--moss);
}
#hours:focus-visible { outline: none; }
#hours:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--moss); outline-offset: 3px; }
#hours:focus-visible::-moz-range-thumb { outline: 3px solid var(--moss); outline-offset: 3px; }

.ticks { position: relative; height: 18px; margin: 0 15px; font-size: 13px; color: var(--subtle); }
.ticks span { position: absolute; left: var(--v); transform: translateX(-50%); }

.level { font-weight: 600; font-size: 18px; margin: 8px 0 4px; }
.rule { font-size: 14px; color: var(--subtle); margin: 0; line-height: 1.5; }

.get { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 14px 0 0; text-align: center; }
.badge { display: inline-block; padding: 13px; line-height: 0; }  /* the clear space Apple asks for: a quarter of the badge's height */
.badge img { display: block; height: 52px; width: auto; }
.fine-print { font-size: 14px; color: var(--subtle); max-width: 440px; line-height: 1.5; }

/* The load moment: the words, then her, then the control. Nothing moves without JS. */
.hero-words > *, .stage, .control, .get { transition: opacity .6s ease-out, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .hero:not(.ready) .hero-words > *, .js .hero:not(.ready) .stage, .js .hero:not(.ready) .control, .js .hero:not(.ready) .get { opacity: 0; }
.js .hero:not(.ready) .hero-words > *, .js .hero:not(.ready) .control, .js .hero:not(.ready) .get { transform: translateY(10px); }
.js .hero:not(.ready) .stage { transform: translateY(14px); }
.hero.ready .stage { transition-delay: .1s; }
.hero.ready .control { transition-delay: .35s; }
.hero.ready h1 { transition-delay: .5s; }
.hero.ready .lede { transition-delay: .6s; }
.hero.ready .get { transition-delay: .7s; }

/* Sections ---------------------------------------------------------------- */

/* Everything below the hero sits on the same centre line as the hero. */
section.wrap { padding-top: 60px; text-align: center; }
section h2 {
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.15;
  border: 0; padding: 0;
  margin: 0 0 10px;
}
section > p, .rooms > p { max-width: 560px; margin-inline: auto; text-wrap: pretty; }
.aside {
  display: block;
  font-family: var(--hand); font-size: 20px; line-height: 1.25;
  color: var(--subtle);
  margin: 14px auto 0;
}

/* 1. Her five moods: three over two on a phone, one row from 640px, a little wider than the
   text from 840px. Every row is centred, and nothing scrolls sideways. */
.strip {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px 8px;
  margin: 18px 0 0; padding: 0;
}
.strip li {
  flex: 0 0 calc((100% - 16px) / 3);
  min-width: 0;
  text-align: center;
  opacity: 0; transform: scale(.88);
  transition: opacity .4s ease-out, transform .55s cubic-bezier(.34, 1.56, .64, 1);
  transition-delay: calc(var(--i) * 70ms);
}
.in .strip li { opacity: 1; transform: none; }
.strip img { display: block; width: 100%; max-width: 156px; height: auto; margin: -19% auto -6%; }  /* her box has headroom for a hop; pull it up */
.strip b { display: block; font-weight: 600; font-size: 15px; }
.strip q { display: block; quotes: none; font-family: var(--hand); font-size: 17px; line-height: 1.2; color: var(--subtle); min-height: 2.4em; padding: 0 4px; }
@media (min-width: 640px) {
  .strip { flex-wrap: nowrap; }
  .strip li { flex: 1 1 0; }
}
@media (min-width: 840px) {
  .strip { margin-inline: -60px; }
}

/* 2. Friends: the real leaderboard, and the three nudges. */
.shot { display: block; width: 100%; max-width: 460px; height: auto; margin: 18px auto 12px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; }
.chips li {
  padding: 10px 18px 8px;
  border-radius: 999px;
  background: var(--cream);
  border: var(--stroke) solid var(--ink);
  font-weight: 600; font-size: 15px; line-height: 1;
  opacity: 0; transform: translateX(48px);
  transition: opacity .35s ease-out, transform .6s cubic-bezier(.34, 1.56, .64, 1);
  transition-delay: calc(var(--i) * 110ms + 120ms);
}
.in .chips li { opacity: 1; transform: none; }

/* 3. Bedtime: a dusk card, and the lamp coming on. */
.night {
  position: relative;
  display: grid; gap: 14px;
  padding: 26px 26px 0;
  text-align: center;
  border-radius: var(--radius);
  border: var(--stroke) solid var(--ink);
  background: linear-gradient(var(--dusk-top), var(--dusk));
  color: var(--cream);
  overflow: hidden;
}
.night h2 { color: var(--cream); }
.night p { color: #d5ddd4; max-width: none; }
.night-pic { position: relative; margin: 0 -26px 0; line-height: 0; }
.night-pic img { width: 100%; height: auto; }
.veil { position: absolute; inset: 0; background: var(--dusk-top); opacity: .94; transition: opacity 1.2s ease-out .35s; }
.in .veil { opacity: 0; }
@media (min-width: 640px) {
  .night { grid-template-columns: 1fr 1fr; align-items: end; gap: 24px; padding-right: 0; text-align: left; }
  .night-words { padding-bottom: 26px; }
  .night-pic { margin: 0; }
}

/* 4. Her room, night 1 and night 14, and the cookies that fill it. */
.cookies { list-style: none; display: flex; justify-content: center; gap: 6px; margin: 14px 0 16px; padding: 0; }
.cookies li {
  line-height: 0;
  opacity: 0; transform: translateY(-40px);
  transition: opacity .3s ease-out, transform .65s cubic-bezier(.34, 1.56, .64, 1);
  transition-delay: calc(var(--i) * 90ms + 80ms);
}
.in .cookies li { opacity: 1; transform: none; }
.cookie { width: 30px; height: 30px; }
.rooms { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg {
  display: inline-flex; gap: 2px;
  padding: 3px; margin: 0 0 14px;
  border: var(--stroke) solid var(--ink); border-radius: 999px;
  background: var(--cream);
}
.seg label {
  display: inline-block; padding: 11px 20px 9px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.seg input:checked + label { background: var(--moss); color: var(--cream); }
.seg input:focus-visible + label { outline: 3px solid var(--moss); outline-offset: 2px; }
.room-pics {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 800 / 1250;
  border-radius: var(--radius);
  border: var(--stroke) solid var(--ink);
  overflow: hidden;
  background: var(--sage);
}
.room-pics img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity .5s ease; }
.room-pics .full { opacity: 0; }
.rooms.full .room-pics .full, .rooms:has(#night14:checked) .room-pics .full { opacity: 1; }

/* 5. Mimi Plus: the app's butter plus, and her five outfits in the moods' row. The crops are
   tight to her, so they need none of the moods' pull-up. */
.plus-mark { display: inline-block; width: .9em; height: .9em; vertical-align: -.1em; margin-left: 4px; }
.outfits img { max-width: 132px; margin: 0 auto 4px; }
.price { font-weight: 600; margin-top: 18px; text-wrap: balance; }
.plus .aside { margin-top: 4px; }

/* 6. Private by design: ticks that draw themselves. */
.ticks-list { list-style: none; margin: 14px auto 0; padding: 0; max-width: 520px; text-align: left; }
.ticks-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.tick { flex: 0 0 24px; width: 24px; height: 24px; margin-top: 2px; }
.tick path {
  fill: none; stroke: var(--moss); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24;
  transition: stroke-dashoffset .45s ease-out;
  transition-delay: calc(var(--i) * 90ms + 100ms);
}
.in .tick path { stroke-dashoffset: 0; }

/* 7. The end. */
.cta { text-align: center; padding-top: 72px; }
.app-icon { display: block; width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 22px; border: var(--stroke) solid var(--ink); }
.cta h2 { margin-bottom: 6px; }
.cta p { color: var(--subtle); margin-bottom: 18px; }
.cta .pill { font-size: 17px; padding: 15px 26px 13px; }

.site-footer { margin-top: 64px; padding-block: 22px 44px; }
.site-footer .legal { font-size: 12.5px; max-width: 520px; margin: 12px auto 0; line-height: 1.5; }

/* Still, for anyone who asked for it. ------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .hero:not(.ready) .hero-words > *, .js .hero:not(.ready) .stage, .js .hero:not(.ready) .control, .js .hero:not(.ready) .get { opacity: 1; transform: none; }
  .strip li, .chips li, .cookies li { opacity: 1; transform: none; }
  .veil { opacity: 0; }
  .tick path { stroke-dashoffset: 0; }
  .cloud { transform: translateX(calc(var(--park, 30) * 1vw)); }
}
