/* Gladly home. Tokens mirror Shared/SkyTheme.swift (Pastel Haze) and DESIGN.md. */

/* ----------------------------------------------------------------- the sky, as animatable tokens */
@property --t { syntax: "<color>"; inherits: true; initial-value: #EFE6FF; }
@property --b { syntax: "<color>"; inherits: true; initial-value: #FFEDE3; }
@property --i { syntax: "<color>"; inherits: true; initial-value: #2A2340; }
@property --a { syntax: "<color>"; inherits: true; initial-value: #6A4BD0; }
@property --o { syntax: "<color>"; inherits: true; initial-value: #FFFFFF; }
@property --dark { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --stars { syntax: "<number>"; inherits: true; initial-value: 0; }

/* top, bottom, ink, accent, on-accent. Night and Ink stay night skies in both appearances. */
[data-sky="daybreak"] { --t: #EFE6FF; --b: #FFEDE3; --i: #2A2340; --a: #6A4BD0; --o: #FFFFFF; --dark: 0; --stars: 0; }
[data-sky="clear"]    { --t: #DDEBFF; --b: #E8E4FF; --i: #1B2A44; --a: #2C5AAE; --o: #FFFFFF; --dark: 0; --stars: 0; }
[data-sky="meadow"]   { --t: #DCF2E4; --b: #EEF5DA; --i: #1D3326; --a: #2B7048; --o: #FFFFFF; --dark: 0; --stars: 0; }
[data-sky="dusk"]     { --t: #EADFFF; --b: #FFDDEA; --i: #2C2140; --a: #6A45C2; --o: #FFFFFF; --dark: 0; --stars: 0; }
[data-sky="night"]    { --t: #2A3068; --b: #1A1F4A; --i: #F4F0FF; --a: #B7A8FF; --o: #1C1840; --dark: 1; --stars: 1; }
[data-sky="lagoon"]   { --t: #D6F1EF; --b: #DEEAFB; --i: #123A40; --a: #1F6A74; --o: #FFFFFF; --dark: 0; --stars: 0; }
[data-sky="marigold"] { --t: #FFEBC9; --b: #FFDCC6; --i: #3D2410; --a: #9E440D; --o: #FFFFFF; --dark: 0; --stars: 0; }
[data-sky="lavender"] { --t: #E7DDFF; --b: #F8DFF1; --i: #2D2245; --a: #7A3FB8; --o: #FFFFFF; --dark: 0; --stars: 0; }
[data-sky="rain"]     { --t: #E2E8EF; --b: #E7EAF1; --i: #1F2B38; --a: #3E5A78; --o: #FFFFFF; --dark: 0; --stars: 0; }
[data-sky="blossom"]  { --t: #FFE3EE; --b: #FBE4F4; --i: #3A1B2C; --a: #A12F66; --o: #FFFFFF; --dark: 0; --stars: 0; }
[data-sky="paper"]    { --t: #F6F2EA; --b: #EFE9DD; --i: #1C1617; --a: #2E2729; --o: #FFFFFF; --dark: 0; --stars: 0; }
[data-sky="ink"]      { --t: #26252E; --b: #17161D; --i: #FAF7F2; --a: #F2EEE6; --o: #1C1B22; --dark: 1; --stars: 0; }

@media (prefers-color-scheme: dark) {
  /* Daybreak keeps its light pastel morning in dark mode too (owner pick, 2026-10-10): the page opens light. */
  [data-sky="clear"]    { --t: #173B66; --b: #0D1E3A; --i: #E3F1FF; --a: #A9C4FF; --o: #0D1E3A; --dark: 1; }
  [data-sky="meadow"]   { --t: #1E3D2C; --b: #10241A; --i: #E4F7E6; --a: #9FD9B4; --o: #10241A; --dark: 1; }
  [data-sky="dusk"]     { --t: #3A2C6E; --b: #291A3F; --i: #F1EAFF; --a: #C7B3FF; --o: #291A3F; --dark: 1; }
  [data-sky="night"]    { --t: #1E2350; --b: #0B0E26; }
  [data-sky="lagoon"]   { --t: #0F4250; --b: #082530; --i: #DDF8F5; --a: #8FD8D6; --o: #082530; --dark: 1; }
  [data-sky="marigold"] { --t: #5A3A10; --b: #33200A; --i: #FFEFD2; --a: #FFC98A; --o: #33200A; --dark: 1; }
  [data-sky="lavender"] { --t: #33275C; --b: #1E1638; --i: #EFE8FF; --a: #D0BBFF; --o: #1E1638; --dark: 1; }
  [data-sky="rain"]     { --t: #263443; --b: #151E28; --i: #E5EDF5; --a: #B2C6DD; --o: #151E28; --dark: 1; }
  [data-sky="blossom"]  { --t: #4F2236; --b: #2C1320; --i: #FFE6EF; --a: #FFB0CF; --o: #2C1320; --dark: 1; }
  [data-sky="paper"]    { --t: #1E1D1A; --b: #161513; --i: #F2EEE6; --a: #F2EEE6; --o: #161513; --dark: 1; }
  [data-sky="ink"]      { --t: #1C1B22; --b: #111015; }
}

:root {
  /* inkSecondary: ink eased toward the sky, never ink at opacity (DESIGN.md) */
  --i2: color-mix(in oklab, var(--i) 74%, var(--t));
  /* frosted white cards: 60% on light skies, 10% on dark ones */
  --glass: rgb(255 255 255 / calc(0.62 - 0.5 * var(--dark)));
  --glass-edge: rgb(255 255 255 / calc(0.75 - 0.6 * var(--dark)));
  --shade: color-mix(in oklab, var(--i) 22%, transparent);
  --radius: 28px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --sky-time: 1.1s;
  color-scheme: light dark;
  transition: --t var(--sky-time) var(--ease-io), --b var(--sky-time) var(--ease-io), --i var(--sky-time) var(--ease-io),
    --a var(--sky-time) var(--ease-io), --o var(--sky-time) var(--ease-io), --dark var(--sky-time) var(--ease-io),
    --stars var(--sky-time) var(--ease-io);
}

/* ----------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--b);
  color: var(--i);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.06; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--a); outline-offset: 3px; border-radius: 12px; }
.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 { position: absolute; left: 16px; top: -60px; z-index: 30; padding: 10px 16px; border-radius: 999px; background: var(--a); color: var(--o); font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.i { width: 1.15em; height: 1.15em; flex: none; }

/* ----------------------------------------------------------------- sky field */
.sky-field { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(180deg, var(--t), var(--b)); }
.sky-glow { /* the sun's glow, kept to the right so it never sits behind text */
  position: absolute; width: 70vmax; height: 70vmax; right: -24vmax; top: -18vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 255 255 / .7), rgb(255 255 255 / .22) 48%, rgb(255 255 255 / 0));
  opacity: calc(1 - var(--dark) * 0.85);
}
.cloud { position: absolute; fill: #fff; opacity: calc(0.7 - 0.62 * var(--dark)); filter: drop-shadow(0 10px 16px rgb(110 90 170 / .10)); }
.cloud-a { width: 150px; right: 3%; top: 22%; opacity: calc(0.55 - 0.5 * var(--dark)); animation: drift 70s linear infinite alternate; }
.cloud-b { width: 110px; right: 30%; top: 9%; opacity: calc(0.45 - 0.41 * var(--dark)); animation: drift 90s linear infinite alternate-reverse; }
@keyframes drift { to { transform: translateX(-8vw); } }
.stars {
  position: absolute; inset: 0; opacity: var(--stars);
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 28% 64%, #fff 50%, transparent 52%),
    radial-gradient(1.8px 1.8px at 46% 22%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 63% 80%, #fff 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 77% 36%, #fff 50%, transparent 52%), radial-gradient(1.1px 1.1px at 88% 70%, #fff 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 7% 82%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 36% 42%, #fff 50%, transparent 52%),
    radial-gradient(1.7px 1.7px at 55% 54%, #fff 50%, transparent 52%), radial-gradient(1.1px 1.1px at 93% 12%, #fff 50%, transparent 52%);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { filter: brightness(.75); } to { filter: brightness(1.15); } }
.moon { position: absolute; width: 130px; right: 9%; top: 13%; opacity: var(--stars); filter: drop-shadow(0 0 28px rgb(255 243 209 / .45)); transform: translateY(calc((1 - var(--stars)) * 40px)); }
.grain {
  position: absolute; inset: 0; opacity: .07; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .4  0 0 0 0 .6  0 0 0 .6 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
}

/* ----------------------------------------------------------------- header */
.bar { position: sticky; top: 0; z-index: 20; }
.bar::before { /* the sky's own glass, so the bar stays legible over any content */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in oklab, var(--t) 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 color-mix(in oklab, var(--i) 8%, transparent);
  opacity: 0; transition: opacity 240ms ease;
}
.bar.is-scrolled::before { opacity: 1; }
.bar-inner { width: min(1160px, 100% - 40px); margin-inline: auto; height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 21px; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 2px 8px var(--shade); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 999px; font-size: 15.5px; font-weight: 700; color: var(--i2); text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
@media (hover: hover) { .nav a:hover { background: var(--glass); color: var(--i); } }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 54px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
  font: 800 17px/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: transform 140ms var(--ease-out), box-shadow 200ms ease, background-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-accent { background: var(--a); color: var(--o); box-shadow: 0 10px 24px -8px color-mix(in oklab, var(--a) 70%, transparent); }
@media (hover: hover) { .btn-accent:hover { box-shadow: 0 14px 30px -8px color-mix(in oklab, var(--a) 80%, transparent); } }
.btn-glass { background: var(--glass); color: var(--i); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.bar .btn-sm { margin-left: 4px; }
.store-status { /* a status, not a control: no button shape */
  display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 6px;
  font-weight: 750; font-size: 15.5px; color: var(--i2);
}
.text-link { display: inline-flex; align-items: center; min-height: 44px; gap: 6px; margin-top: 16px; font-weight: 800; color: var(--a); text-decoration: none; }
.text-link span { transition: transform 200ms var(--ease-out); }
@media (hover: hover) { .text-link:hover span { transform: translateX(4px); } }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 34px; }

/* ----------------------------------------------------------------- ritual: copy left, phone holds right */
.ritual { --ph: min(660px, 78vh); width: min(1160px, 100% - 40px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(40px, 7vw, 120px); }
.beat { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; padding-block: 64px; max-width: 560px; }
.beat-hero { min-height: calc(100vh - 68px); padding-top: 24px; max-width: 700px; }
.kicker { font-size: 15.5px; font-weight: 800; color: var(--i2); margin-bottom: 18px; letter-spacing: .01em; }
h1 { font-weight: 900; }
/* the H1 carries the search terms in its small first line and the brand line at display size */
h1 .kicker { display: block; line-height: 1.4; }
.h1-line { display: block; font-size: clamp(44px, 5.3vw, 72px); letter-spacing: -0.03em; line-height: 1.0; }
.nowrap { white-space: nowrap; }
@media (max-width: 420px) { .nowrap { white-space: normal; } }
.lede { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; font-weight: 600; color: var(--i2); margin-top: 24px; max-width: 30ch; }
.beat h2 { font-size: clamp(34px, 4vw, 54px); font-weight: 900; letter-spacing: -0.025em; }
.beat > p:not([class]) { font-size: 19px; color: var(--i2); font-weight: 550; margin-top: 18px; max-width: 44ch; }
.fine { font-size: 14.5px; font-weight: 600; color: var(--i2); margin-top: 12px; }

.ritual-phone { grid-column: 2; grid-row: 1 / span 7; position: sticky; top: calc(50vh - var(--ph) / 2 + 30px); height: var(--ph); align-self: start; }
.ritual-copy { grid-column: 1; }
.phone {
  height: 100%; aspect-ratio: 660 / 1434; padding: 10px; border-radius: 54px; background: #15121B;
  box-shadow: 0 0 0 1.5px rgb(255 255 255 / .08) inset, 0 40px 80px -24px var(--shade), 0 18px 34px -18px var(--shade);
}
.phone-screen { position: relative; height: 100%; border-radius: 44px; overflow: hidden; background: var(--t); isolation: isolate; }
.screen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.025); filter: blur(8px); transition: opacity 520ms var(--ease-out), transform 620ms var(--ease-out), filter 520ms var(--ease-out); }
.screen.is-on { opacity: 1; transform: none; filter: none; }
.island { position: absolute; top: 1.6%; left: 50%; width: 31%; height: 4.1%; transform: translateX(-50%); border-radius: 999px; background: #0B0A0E; z-index: 2; }
.beat-shot { display: none; }

/* affirmation sampler */
.affirmation { margin-top: 30px; padding: 24px 26px 22px; border-radius: var(--radius); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 18px 40px -26px var(--shade); }
.affirmation-label { font-size: 13.5px; font-weight: 800; color: var(--i2); }
.affirmation-text { margin: 8px 0 18px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 850; line-height: 1.18; letter-spacing: -0.015em; min-height: 2.36em; transition: opacity 220ms ease, filter 220ms ease, transform 260ms var(--ease-out); }
.affirmation-text.is-out { opacity: 0; filter: blur(4px); transform: translateY(6px); }

/* Pastel Bun mood faces */
.bun { display: block; width: 100%; aspect-ratio: 1; }
.bun svg { width: 100%; height: 100%; overflow: visible; }
.buns { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 76px)); gap: 14px; }
.buns li { display: grid; gap: 8px; justify-items: center; font-size: 14.5px; font-weight: 700; color: var(--i2); }

/* gratitude stickers */
.stickers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; max-width: 540px; }
.sticker {
  --tilt: 0deg;
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  font-size: 16px; font-weight: 700; color: var(--i);
  background: color-mix(in oklab, var(--c) 16%, var(--glass)); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--c) 34%, transparent);
  transform: rotate(var(--tilt)); transition: transform 280ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease;
}
.sticker svg { width: 20px; height: 20px; flex: none; }
.sticker .ic { color: color-mix(in oklab, var(--c) 72%, var(--i)); }
.sticker[aria-pressed="true"] { background: var(--c); color: #2A1830; box-shadow: 0 8px 16px -8px color-mix(in oklab, var(--c) 90%, #000), inset 0 -2px 0 rgb(0 0 0 / .08); }
.sticker[aria-pressed="true"] .ic { color: #2A1830; }
.sticker:active { transform: rotate(var(--tilt)) scale(.95); }
.peanut-says { margin-top: 18px; display: inline-block; align-self: flex-start; padding: 10px 18px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge); font-weight: 700; font-size: 16px; }

.quote-bubble { margin-top: 28px; align-self: flex-start; position: relative; padding: 20px 24px; border-radius: 24px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 18px 40px -26px var(--shade); font-size: clamp(22px, 2.2vw, 27px); font-weight: 850; letter-spacing: -0.01em; line-height: 1.2; }
.quote-bubble span { display: block; margin-top: 8px; font-size: 14.5px; font-weight: 700; color: var(--i2); letter-spacing: 0; }

/* example month of mood faces */
.month { margin-top: 30px; display: grid; grid-template-columns: repeat(7, 44px); gap: 10px; }
.month .bun { opacity: 0; transform: scale(.9) translateY(6px); transition: opacity 360ms var(--ease-out), transform 420ms var(--ease-out); transition-delay: calc(var(--d) * 28ms); }
.month.is-in .bun { opacity: 1; transform: none; }

.tag-premium { display: inline-flex; align-self: flex-start; align-items: center; gap: 7px; margin-top: 22px; padding: 8px 14px; border-radius: 999px; background: #FFE3A3; color: #4A2D06; font-size: 14.5px; font-weight: 800; }

/* ----------------------------------------------------------------- sections after the ritual */
section:not(.ritual) { padding-block: clamp(96px, 14vh, 160px); }
section h2 { font-size: clamp(36px, 4.6vw, 62px); font-weight: 900; letter-spacing: -0.028em; }
.section-lede { font-size: clamp(18px, 1.5vw, 21px); font-weight: 600; color: var(--i2); margin-top: 16px; max-width: 46ch; }
h3 { font-size: 20px; font-weight: 850; letter-spacing: -0.01em; }

/* film */
.film .wrap { text-align: center; }
.film .section-lede { margin-inline: auto; }
.film-frame {
  position: relative; margin-top: 48px; border-radius: var(--radius); overflow: hidden; background: #1A1730; aspect-ratio: 16 / 9;
  box-shadow: 0 50px 100px -40px var(--shade), 0 24px 40px -24px var(--shade), inset 0 0 0 1px rgb(255 255 255 / .2);
}
.film-video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
/* controls sit on a soft scrim so they read over pastel and night frames alike */
.film-ui {
  position: absolute; inset: auto 0 0 0; padding: 48px 18px 12px; color: #fff; text-align: left;
  background: linear-gradient(180deg, rgb(20 16 40 / 0), rgb(20 16 40 / .62));
  transition: opacity 260ms ease, transform 320ms var(--ease-out);
}
.film-frame.is-idle .film-ui:not(:focus-within) { opacity: 0; transform: translateY(8px); pointer-events: none; }
.film-frame.is-idle { cursor: none; }
.film-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.film-spacer { flex: 1; }
.film-time { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; padding-left: 4px; text-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.film-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: #fff; transition: transform 140ms var(--ease-out), background-color 160ms ease;
}
.film-btn .i { width: 24px; height: 24px; }
@media (hover: hover) { .film-btn:hover { background: rgb(255 255 255 / .16); } }
.film-btn:active { transform: scale(.92); }
.film-btn:focus-visible, .film-range:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.film-btn .i-pause, .film-frame.is-playing .film-btn .i-play { display: none; }
.film-frame.is-playing .film-btn .i-pause { display: block; }
[data-film-mute] .i { display: none; }
[data-film-mute][data-level="muted"] .i-muted, [data-film-mute][data-level="low"] .i-low, [data-film-mute][data-level="high"] .i-high { display: block; }
.film-volume { display: flex; align-items: center; gap: 2px; }
.film-volume.no-level .film-level { display: none; } /* iOS sets volume with the hardware buttons only */

/* range inputs: a 6px track drawn on the input itself, a 28px hit area, a white thumb */
.film-range {
  --p: 0%; --buf: 0%;
  -webkit-appearance: none; appearance: none; display: block; height: 28px; margin: 0; cursor: pointer; background:
    linear-gradient(#fff, #fff) left center / var(--p) 5px no-repeat,
    linear-gradient(rgb(255 255 255 / .42), rgb(255 255 255 / .42)) left center / var(--buf) 5px no-repeat,
    linear-gradient(rgb(255 255 255 / .22), rgb(255 255 255 / .22)) center / 100% 5px no-repeat;
  border-radius: 999px;
}
.film-seek { width: 100%; }
.film-level { width: 92px; }
.film-range::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .35); transition: transform 140ms var(--ease-out); }
.film-range::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .35); }
.film-range::-moz-range-track { background: transparent; }
.film-range:active::-webkit-slider-thumb { transform: scale(1.25); }
@media (hover: hover) { .film-seek:not(:hover):not(:focus-visible)::-webkit-slider-thumb { transform: scale(.75); } }

/* Peanut stage */
.peanut-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.stage { position: relative; height: clamp(420px, 46vw, 560px); border-radius: 36px; overflow: hidden; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 40px 80px -40px var(--shade); }
.hill { position: absolute; left: -10%; right: -10%; bottom: -46%; height: 70%; border-radius: 50%; background: linear-gradient(180deg, rgb(255 255 255 / calc(.85 - .7 * var(--dark))), rgb(255 255 255 / calc(.35 - .3 * var(--dark)))); }
.peanut-hit { position: absolute; left: 50%; bottom: 13%; width: min(84%, 440px); aspect-ratio: 806 / 577; transform: translateX(-50%); padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.peanut-hit:focus-visible { outline-offset: 8px; border-radius: 40px; }
.peanut-rig, .night-peanut { position: absolute; inset: 0; display: block; }
.rig-part { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.rig-body { position: absolute; inset: 0; transform-origin: 50% 91.89%; will-change: transform; }
.rig-shadow { position: absolute; left: 19%; width: 62%; top: 88.5%; height: 7%; border-radius: 50%; background: rgb(60 30 90 / .16); filter: blur(5px); }
.rig-face { position: absolute; inset: 0; pointer-events: none; }
.bubble {
  position: absolute; left: 50%; top: 9%; transform: translateX(-50%); z-index: 2; width: max-content; max-width: 86%;
  padding: 12px 20px; border-radius: 20px; background: rgb(255 255 255 / calc(.92 - .78 * var(--dark))); color: var(--i);
  font-weight: 750; font-size: 17px; text-align: center; box-shadow: 0 10px 24px -14px var(--shade);
  transition: opacity 200ms ease, transform 300ms var(--ease-out);
}
.bubble.is-swap { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.97); }
.breath { position: absolute; left: 50%; bottom: 20%; width: 300px; height: 300px; margin-left: -150px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--a) 26%, transparent), transparent); opacity: 0; transform: scale(.6); }
.breath.is-on { animation: breathe 8s var(--ease-io) infinite; }
@keyframes breathe { 0%, 100% { opacity: .35; transform: scale(.65); } 50% { opacity: .9; transform: scale(1.15); } }
.fx { position: absolute; width: 30px; height: 30px; pointer-events: none; z-index: 3; }
.fx svg { width: 100%; height: 100%; }

.peanut-copy > p { font-size: 19px; color: var(--i2); font-weight: 550; margin-top: 18px; max-width: 42ch; }
.mood-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 30px; max-width: 470px; }
.mood-pick button {
  display: grid; justify-items: center; gap: 8px; padding: 12px 4px 10px; border: 0; border-radius: 22px; background: transparent; cursor: pointer;
  font-size: 14.5px; font-weight: 700; color: var(--i2); transition: background-color 180ms ease, transform 140ms var(--ease-out);
}
.mood-pick .bun { width: 62px; transition: transform 300ms var(--ease-out); }
.mood-pick button:active { transform: scale(.95); }
@media (hover: hover) { .mood-pick button:hover { background: var(--glass); } .mood-pick button:hover .bun { transform: translateY(-3px); } }
.mood-pick button[aria-checked="true"] { background: var(--glass); color: var(--i); box-shadow: inset 0 0 0 2px var(--a); }
.mood-pick button[aria-checked="true"] .bun { transform: scale(1.08); }
.peanut-copy h3 { margin-top: 44px; }
.gifts { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gifts li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge); font-weight: 700; font-size: 15px; }
.gifts li:has(> .gift) { padding: 0; background: none; box-shadow: none; } /* the button carries the pill once the script runs */
.gift {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 6px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge); font-weight: 700; font-size: 15px; color: var(--i);
  transition: transform 140ms var(--ease-out), background-color 180ms ease, box-shadow 180ms ease;
}
@media (hover: hover) { .gift:hover { box-shadow: inset 0 0 0 1.5px var(--a); } }
.gift:active { transform: scale(.96); }
.gift[aria-pressed="true"] { background: var(--a); color: var(--o); box-shadow: 0 8px 18px -10px var(--a); }
.gift[aria-pressed="true"] b { background: var(--o); color: var(--a); }
.rig-gift { position: absolute; inset: 0; pointer-events: none; }
.rig-gift svg { animation: gift-on 420ms var(--ease-out); }
@keyframes gift-on { from { opacity: 0; transform: translateY(-3%) scale(.96); } }
.gifts b { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px; background: var(--a); color: var(--o); font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* promise */
.slot { margin: 0; font-weight: 900; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .28em; font-size: clamp(52px, 9vw, 132px); letter-spacing: -0.04em; line-height: 1.02; }
/* The reel stacks the words with a gap wider than any font's ascenders/descenders, and the window reaches a
   little past the line box. On fonts with tall metrics (Segoe UI on Windows), the neighbouring words stay out
   of view and the current word's own descenders aren't clipped. Step = word height + gap, mirrored in home.js. */
.slot-window { display: inline-block; box-sizing: content-box; height: 1.12em; padding-block: .2em; margin-block: -.2em; overflow: hidden; vertical-align: bottom; }
.slot-reel { display: flex; flex-direction: column; gap: .6em; color: var(--a); }
.slot-reel span { height: 1.12em; line-height: 1.12em; white-space: nowrap; }
.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; margin-top: 72px; padding-top: 36px; border-top: 1.5px solid color-mix(in oklab, var(--i) 14%, transparent); }
.promises p { margin-top: 10px; color: var(--i2); font-weight: 550; font-size: 17px; }

/* skies */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
.tiles .tile { aspect-ratio: 1 / 1.08; }
.tile {
  position: relative; aspect-ratio: 3 / 4; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  padding: 14px; border: 0; border-radius: 24px; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, var(--t), var(--b)); color: var(--i);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .5), 0 14px 30px -20px rgb(40 30 80 / .45);
  transition: transform 220ms var(--ease-out), box-shadow 220ms ease;
}
.tile { overflow: hidden; isolation: isolate; }
.tile span, .tile em { position: relative; z-index: 1; }
.tile span { font-weight: 850; font-size: 16px; line-height: 1.15; }
/* each sky's own scene (Shared/SkyBackground.swift), drawn small; it moves only while a tile is touched or chosen */
.tile-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.tile-scene * { animation-play-state: paused; }
.tile:hover .tile-scene *, .tile:focus-visible .tile-scene *, .tile[aria-checked="true"] .tile-scene * { animation-play-state: running; }
.sc-drift { animation: sc-drift 9s ease-in-out infinite alternate; }
.sc-drift.sc-slow { animation-duration: 13s; animation-direction: alternate-reverse; }
@keyframes sc-drift { to { transform: translateX(14px); } }
.sc-breathe { transform-box: fill-box; transform-origin: center; animation: sc-breathe 4s ease-in-out infinite alternate; }
@keyframes sc-breathe { to { transform: scale(1.06); } }
.sc-twinkle { animation: sc-twinkle 2.4s ease-in-out infinite alternate; }
@keyframes sc-twinkle { to { opacity: .3; } }
.sc-swell { animation: sc-swell 3.2s ease-in-out infinite alternate; }
@keyframes sc-swell { to { transform: translateX(-6px) translateY(1.5px); } }
.sc-fall { animation: sc-fall 1.4s linear infinite; }
@keyframes sc-fall { to { transform: translate(-4px, 108px); } }
.sc-petal { animation: sc-petal 6s linear infinite; }
@keyframes sc-petal { 0% { transform: translate(0, -20px) rotate(0); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translate(8px, 40px) rotate(160deg); opacity: 0; } }
.tile .tile-lock { display: inline-grid; place-items: center; width: 26px; height: 22px; padding: 0; color: var(--i); }
.tile .tile-lock svg { width: 13px; height: 13px; }
.tile em { font-style: normal; font-size: 12.5px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: rgb(255 255 255 / calc(.7 - .58 * var(--dark))); }
@media (hover: hover) { .tile:hover { transform: translateY(-4px); } }
.tile:active { transform: scale(.97); }
.tile[aria-checked="true"] { box-shadow: 0 0 0 3px var(--b), 0 0 0 6px var(--a), 0 18px 34px -20px rgb(40 30 80 / .5); }
.tile[aria-checked="true"]::after { content: ""; position: absolute; right: 14px; top: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--a) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 14px no-repeat; }
.skies .fine { margin-top: 18px; }
.extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; margin-top: 64px; max-width: 900px; }
.extras .tag-premium { margin-top: 14px; display: inline-flex; }
.extras p:not([class]) { margin-top: 10px; color: var(--i2); font-weight: 550; font-size: 17px; }

/* premium */
.plan { border-radius: 36px; padding: clamp(28px, 4.5vw, 56px); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 40px 80px -48px var(--shade); }
.plan-head p { margin-top: 16px; font-size: 19px; color: var(--i2); font-weight: 550; max-width: 54ch; }
.plan-head h2 { font-size: clamp(32px, 3.8vw, 50px); max-width: 18ch; }
.plan-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; margin-top: 40px; }
.plan-col { padding: 26px 28px; border-radius: var(--radius); }
.plan-col ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.plan-col li { position: relative; padding-left: 30px; font-weight: 600; font-size: 16.5px; color: var(--i2); }
.plan-col li::before, .plan-col li::after { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%; }
.plan-col li::before { background: color-mix(in oklab, var(--a) 20%, transparent); }
.plan-col li::after {
  background: var(--a);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 12.5l4 4 8-9' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 13px no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 12.5l4 4 8-9' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 13px no-repeat;
}
.plan-col-premium { background: var(--a); color: var(--o); }
.plan-col-premium li, .plan-col-premium .fine { color: color-mix(in oklab, var(--o) 84%, var(--a)); }
.plan-col-premium li::before { background: color-mix(in oklab, var(--o) 22%, transparent); }
.plan-col-premium li::after { background: var(--o); }
.price { margin-top: 24px; padding-top: 20px; border-top: 1.5px solid color-mix(in oklab, var(--o) 24%, transparent); font-size: 18px; font-weight: 600; }
.price strong { display: block; font-size: 34px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; }

/* goodnight */
.night { padding-bottom: 0 !important; overflow-x: clip; } /* the glass hill under Peanut is wider than the column */
.night-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.night-peanut { position: relative; width: 260px; aspect-ratio: 806 / 577; margin-bottom: 40px; }
.night-peanut::before { /* a soft glass hill to stand on */
  content: ""; position: absolute; left: -38%; right: -38%; top: 80%; height: 46%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 255 255 / .16), rgb(255 255 255 / .05) 70%, transparent);
}
.night h2 { font-size: clamp(48px, 7vw, 100px); letter-spacing: -0.035em; }
.night .section-lede { margin-inline: auto; }
.cta-center { justify-content: center; }
/* FAQ */
.faq-inner { max-width: 860px; }
.faq-list { margin-top: 36px; display: grid; gap: 10px; }
.faq details { border-radius: 22px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.faq summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 22px;
  font-size: 18px; font-weight: 800; cursor: pointer; border-radius: 22px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform 220ms var(--ease-out); color: var(--i2); }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { padding: 0 22px 20px; color: var(--i2); font-weight: 550; font-size: 17px; max-width: 70ch; }
.faq details a { color: var(--a); font-weight: 750; }
.foot { margin-top: clamp(96px, 14vh, 160px); padding: 28px 0 36px; border-top: 1px solid color-mix(in oklab, var(--i) 14%, transparent); font-size: 15px; color: var(--i2); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; column-gap: 22px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; color: var(--i2); }
@media (hover: hover) { .foot a:hover { color: var(--i); text-decoration: underline; text-underline-offset: 3px; } }

/* ----------------------------------------------------------------- entrances (content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(18px); filter: blur(4px); transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out), filter 700ms var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }
.beat-hero > * { animation: rise 900ms var(--ease-out) both; }
.beat-hero > :nth-child(2) { animation-delay: 80ms; }
.beat-hero > :nth-child(3) { animation-delay: 160ms; }
.beat-hero > :nth-child(4) { animation-delay: 240ms; }
.ritual-phone .phone { animation: rise-phone 1100ms var(--ease-out) 120ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }
@keyframes rise-phone { from { opacity: 0; transform: translateY(40px) rotate(2deg); } }

/* ----------------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .cloud-a { display: none; }
}
@media (max-width: 1080px) {
  .nav a:nth-child(5) { display: none; }
  .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body { font-size: 17px; }
  .nav { display: none; }
  .bar .btn-sm { margin-left: auto; }
  .ritual { display: block; }
  .ritual-phone { display: none; }
  .beat, .beat-hero { min-height: 0; max-width: none; padding-block: 56px; }
  .beat-hero { padding-top: 28px; }
  .beat-shot { display: block; margin: 40px auto 0; width: min(300px, 78vw); padding: 8px; border-radius: 46px; background: #15121B; box-shadow: 0 30px 60px -24px var(--shade); }
  .beat-shot img { width: 100%; height: auto; border-radius: 38px; }
  /* copy first, then Peanut, with the moods right under the stage so a tap and its reaction share the screen */
  .peanut-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .peanut-copy { display: contents; }
  .peanut-copy > h2 { order: 1; }
  .peanut-copy > p:first-of-type { order: 2; }
  .stage { order: 3; margin-top: 32px; height: clamp(360px, 95vw, 460px); }
  .mood-pick { order: 4; margin-top: 16px; max-width: none; }
  .peanut-copy > h3 { order: 5; }
  .gifts { order: 6; }
  .peanut-copy > .fine { order: 7; }
  .plan-cols { grid-template-columns: 1fr; }
  .extras { grid-template-columns: 1fr; gap: 28px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cloud-a { display: none; }
  .moon { width: 72px; right: 6%; top: 9%; }
}
@media (max-width: 760px) {
  .film-frame { aspect-ratio: 9 / 16; width: min(100%, calc(80svh * 9 / 16)); margin-inline: auto; }
}
@media (max-width: 560px) {
  .wrap, .bar-inner, .ritual { width: calc(100% - 32px); }
  .brand { font-size: 19px; }
  .bar .btn-sm { padding: 0 14px; }
  .cta-row .btn, .cta-row .store-status { width: 100%; }
  .buns { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .month { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 10px; border-radius: 18px; }
  .tile span { font-size: 14px; }
  .promises { grid-template-columns: 1fr; gap: 26px; }
  .mood-pick { gap: 2px; }
  .mood-pick .bun { width: 48px; }
  .mood-pick button { font-size: 13px; padding-inline: 0; }
  .bubble { font-size: 15.5px; }
  .film-ui { padding: 40px 10px 8px; }
  .film-level { width: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile-scene * { animation: none !important; }
  .rig-gift svg { animation: none; }
  :root { --sky-time: .01s; }
  html { scroll-behavior: auto; }
  .cloud, .stars, .breath.is-on { animation: none; }
  .beat-hero > *, .ritual-phone .phone { animation: none; }
  .screen { transform: none; filter: none; transition: opacity 200ms linear; }
  .js .reveal { transform: none; filter: none; transition: opacity 300ms linear; }
  .month .bun { transform: none; transition: opacity 200ms linear; transition-delay: 0ms; }
  .sticker, .tile, .btn { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .bar::before { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--t); }
}
