/* humph.app landing. The page is one crossing from payday to payday: the sky changes with each section (dawn, noon,
   golden hour, day, night, sunrise, dusk, payday). Colors come from tokens.css; fonts are self-hosted (OFL). */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/fonts/fraunces.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("/fonts/fraunces-italic.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/fonts/nunito.woff2") format("woff2"); }

@property --sky-top { syntax: "<color>"; inherits: true; initial-value: #F9D9CF; }
@property --sky-bottom { syntax: "<color>"; inherits: true; initial-value: #FBE7C4; }

:root {
  --display: "Fraunces", ui-serif, Georgia, serif;
  --body: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --night: #16123A;
  --night-deep: #0E0B26;
  --gutter: clamp(20px, 5vw, 48px);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sky-top: #F9D9CF;
  --sky-bottom: #FBE7C4;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.landing {
  margin: 0;
  color: #1E1A33;
  font: 500 18px/1.55 var(--body);
  background: var(--sky-bottom);
  overflow-x: clip;
  transition: --sky-top 1.1s var(--ease-out), --sky-bottom 1.1s var(--ease-out), color 0.8s;
}
body[data-sky="dawn"] { --sky-top: #F9D9CF; --sky-bottom: #FBE7C4; }
body[data-sky="noon"] { --sky-top: #FFF6E3; --sky-bottom: #FBE7C4; }
body[data-sky="golden"] { --sky-top: #FFD48A; --sky-bottom: #FBE7C4; }
body[data-sky="day"] { --sky-top: #FFFBF5; --sky-bottom: #F7EEDF; }
body[data-sky="night"] { --sky-top: #0E0B26; --sky-bottom: #2A2358; }
body[data-sky="sunrise"] { --sky-top: #D9C2E4; --sky-bottom: #F9D9CF; }
body[data-sky="dusk"] { --sky-top: #D9C2E4; --sky-bottom: #F7EEDF; }
body[data-sky="payday"] { --sky-top: #FFD48A; --sky-bottom: #F9D9CF; }

a { color: #3A2FA0; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #6050DC; outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: #FFFBF5; padding: 10px 14px; border-radius: 12px; }
.skip:focus { left: 12px; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding-inline: var(--gutter); }

/* Type */
.display { font-family: var(--display); font-weight: 800; font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: -0.02em; line-height: 1.02; text-wrap: balance; }
h1.display { font-size: clamp(46px, 7.4vw, 96px); margin: 0 0 22px; }
h2.display { font-size: clamp(36px, 5.2vw, 68px); margin: 0 0 18px; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: #4F4A63; max-width: 34em; margin: 0 0 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 14px 6px 10px; border-radius: 999px; background: #ECE9FC; color: #3A2FA0; font-weight: 800; font-size: 14px; letter-spacing: 0.02em; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6050DC; box-shadow: 0 0 0 4px rgba(96, 80, 220, 0.18); }
.eyebrow--night { background: #2A2566; color: #C9C2FF; }
.eyebrow--night::before { background: #FFC24D; box-shadow: 0 0 0 4px rgba(255, 194, 77, 0.2); }

/* Sky and stars */
.sky { position: fixed; inset: 0; z-index: -2; background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom)); }
.stars { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s; background-image:
  radial-gradient(2px 2px at 8% 12%, #FFE7A8 50%, transparent 51%), radial-gradient(1.5px 1.5px at 22% 30%, #FFFFFF 50%, transparent 51%),
  radial-gradient(2px 2px at 35% 8%, #FFFFFF 50%, transparent 51%), radial-gradient(1.5px 1.5px at 48% 22%, #FFE7A8 50%, transparent 51%),
  radial-gradient(2.5px 2.5px at 62% 14%, #FFFFFF 50%, transparent 51%), radial-gradient(1.5px 1.5px at 74% 34%, #FFE7A8 50%, transparent 51%),
  radial-gradient(2px 2px at 86% 10%, #FFFFFF 50%, transparent 51%), radial-gradient(1.5px 1.5px at 93% 28%, #FFFFFF 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 15% 45%, #FFFFFF 50%, transparent 51%), radial-gradient(2px 2px at 55% 40%, #FFE7A8 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 80% 48%, #FFFFFF 50%, transparent 51%), radial-gradient(2px 2px at 30% 55%, #FFE7A8 50%, transparent 51%);
  animation: twinkle 4.5s ease-in-out infinite alternate; }
body[data-sky="night"] .stars { opacity: 1; }
@keyframes twinkle { from { filter: brightness(0.7); } to { filter: brightness(1.25); } }

/* Navigation and the trail */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 12px var(--gutter); transition: background 0.4s, box-shadow 0.4s; }
.nav.is-solid { background: rgba(255, 251, 245, 0.78); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 rgba(30, 26, 51, 0.06); }
body[data-sky="night"] .nav { color: #F4F0FF; }
body[data-sky="night"] .nav.is-solid { background: rgba(22, 18, 58, 0.72); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); }
body[data-sky="night"] .trail-line { border-top-color: rgba(201, 194, 255, 0.35); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 24px; font-variation-settings: "SOFT" 100; min-height: 44px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 4px 12px rgba(96, 80, 220, 0.25); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { color: inherit; opacity: 0.8; text-decoration: none; font-weight: 800; padding: 10px 14px; border-radius: 12px; min-height: 44px; display: inline-flex; align-items: center; transition: background 0.2s, opacity 0.2s; }
.nav-links a:hover { opacity: 1; background: rgba(96, 80, 220, 0.08); }
@media (max-width: 760px) { .nav-links { display: none; } .nav .btn--small { margin-left: auto; } }
.trail { position: absolute; left: var(--gutter); right: var(--gutter); bottom: -2px; height: 18px; pointer-events: none; }
.trail-line { position: absolute; left: 0; right: 22px; top: 9px; border-top: 2px dashed rgba(167, 121, 60, 0.35); }
.trail-humph { position: absolute; top: 0; left: 0; width: 18px; height: 18px; border-radius: 50%; background: #E3A857 url("/assets/icon.png") center/cover; box-shadow: 0 2px 6px rgba(30, 26, 51, 0.25); transform: translateX(calc(var(--progress, 0) * (100vw - 2 * var(--gutter) - 40px))); transition: transform 0.15s linear; }
.trail-oasis { position: absolute; right: 0; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #19B394; box-shadow: 0 0 0 4px rgba(25, 179, 148, 0.2); }

/* Buttons: the app's pressable style, a solid edge underneath that the button drops into */
.btn { --edge: #4636B8; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 18px; font: 800 17px/1 var(--body); text-decoration: none; border: 0; cursor: pointer; transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out), background 0.2s; }
.btn--primary { background: #6050DC; color: #FFFFFF; box-shadow: 0 5px 0 var(--edge), 0 14px 30px rgba(96, 80, 220, 0.35); }
.btn--primary:hover { background: #6C5DE6; }
.btn--primary:active { transform: translateY(5px); box-shadow: 0 0 0 var(--edge), 0 6px 14px rgba(96, 80, 220, 0.3); }
.btn--ghost { background: rgba(255, 251, 245, 0.7); color: #1E1A33; box-shadow: 0 4px 0 #E6D6BD; }
.btn--ghost:active { transform: translateY(4px); box-shadow: 0 0 0 #E6D6BD; }
.btn--small { min-height: 44px; padding: 0 18px; font-size: 15px; border-radius: 14px; background: #6050DC; color: #FFFFFF; box-shadow: 0 4px 0 var(--edge); }
.btn--small:active { transform: translateY(4px); box-shadow: 0 0 0 var(--edge); }
.btn--big { min-height: 64px; padding: 0 38px; font-size: 20px; border-radius: 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.cta-row--center { justify-content: center; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font-weight: 800; font-size: 15px; color: #4F4A63; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: #19B394 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }

/* The iPhone frame, drawn in CSS around a real screenshot */
.phone { position: relative; margin: 0; width: min(300px, 70vw); padding: 11px; border-radius: 54px; background: linear-gradient(145deg, #2E2950, #16123A 55%, #2E2950); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 30px 60px -18px rgba(30, 26, 51, 0.45), 0 12px 24px -12px rgba(30, 26, 51, 0.35); }
.phone::before { content: ""; position: absolute; top: 21px; left: 50%; width: 31%; height: 26px; transform: translateX(-50%); border-radius: 20px; background: #0E0B26; z-index: 2; }
.phone img { width: 100%; height: auto; border-radius: 44px; background: #F7EEDF; }

/* Humph alive: parts from the generator, animated around their pivots */
.humph { width: 100%; height: auto; overflow: visible; }
.humph [data-part] { transform-box: view-box; }
.humph--alive [data-part="tail"] { transform-origin: 43.68px 143.25px; animation: wag 2.6s ease-in-out infinite; }
.humph--alive [data-part="ear"] { transform-origin: 139.3px 58.2px; animation: twitch 5.5s ease-in-out infinite; }
.humph--alive [data-part="eye"] { transform-origin: 162.03px 75.75px; animation: blink 4.2s infinite; }
.humph--alive [data-part="scarfTails"] { transform-origin: 176.88px 121.88px; animation: flutter 3s ease-in-out infinite; }
.humph--alive [data-part="rig"] { animation: breathe 3.6s ease-in-out infinite; transform-origin: 109px 214px; }
.humph--sleeping [data-part^="z"] { animation: drift 3.6s ease-in-out infinite; }
.humph--sleeping [data-part="z2"] { animation-delay: 1.2s; }
.humph--sleeping [data-part="z3"] { animation-delay: 2.4s; }
/* Celebrating on the spot: a happy squash and sway about his feet, so he stays planted on the sand. */
.humph--cheer [data-part="rig"] { animation: cheer 1.8s ease-in-out infinite; transform-origin: 109px 214px; }
.humph--cheer [data-part="head"] { animation: bob 0.9s ease-in-out infinite; transform-origin: 160.68px 108.38px; }
@keyframes wag { 0%, 100% { transform: rotate(0deg); } 40% { transform: rotate(-14deg); } 60% { transform: rotate(8deg); } }
@keyframes twitch { 0%, 88%, 100% { transform: rotate(0deg); } 92% { transform: rotate(-12deg); } 96% { transform: rotate(4deg); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes flutter { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(7deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.01, 0.985); } }
@keyframes drift { 0% { transform: translate(0, 0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(10px, -26px); opacity: 0; } }
@keyframes cheer { 0%, 100% { transform: rotate(0deg) scale(1, 1); } 25% { transform: rotate(-2deg) scale(1.02, 0.975); } 50% { transform: rotate(0deg) scale(0.99, 1.025); } 75% { transform: rotate(2deg) scale(1.02, 0.975); } }
@keyframes bob { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-5deg); } }

.bubble { position: relative; display: inline-block; margin: 0; padding: 12px 18px; border-radius: 22px; background: #FFFBF5; color: #1E1A33; font-weight: 800; font-size: 17px; box-shadow: 0 10px 24px rgba(74, 52, 20, 0.14); }
.bubble::after { content: ""; position: absolute; left: 28px; bottom: -8px; width: 18px; height: 18px; background: inherit; transform: rotate(45deg); border-radius: 4px; }
.bubble--right::after { left: auto; right: 34px; }

/* 1. Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 140px; isolation: isolate; }
.hero-scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent); mask-image: linear-gradient(to bottom, #000 82%, transparent); }
.sun { position: absolute; right: 12%; top: 22%; width: clamp(160px, 22vw, 320px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #FFD48A, #FFB627 60%); box-shadow: 0 0 0 30px rgba(255, 182, 39, 0.12), 0 0 0 70px rgba(255, 182, 39, 0.07), 0 0 140px 40px rgba(255, 182, 39, 0.35); animation: rise 2.4s var(--ease-out) both; }
@media (max-width: 760px) { .sun { right: -60px; top: 9%; width: 170px; } .cloud--a { top: 6%; } .cloud--b { display: none; } }
@keyframes rise { from { transform: translateY(120px) scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
.cloud { position: absolute; width: 150px; opacity: 0.9; animation: cloud-drift 38s linear infinite alternate; }
.cloud--a { top: 16%; left: 8%; }
.cloud--b { top: 30%; right: 38%; width: 110px; animation-duration: 52s; opacity: 0.75; }
@keyframes cloud-drift { from { translate: -30px 0; } to { translate: 60px 0; } }
.dunes { position: absolute; left: 0; width: 100%; bottom: 0; }
.dunes--far { height: 46%; fill: #F1D9AE; }
.dunes--near { height: 34%; fill: #E9C68C; }
.palm { position: absolute; bottom: 3%; width: 130px; }
.palm--a { left: -18px; }
.palm--b { right: 2%; width: 96px; bottom: 6%; }
@media (max-width: 760px) { .palm--b { display: none; } .palm--a { width: 84px; left: -24px; bottom: 1%; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }
.squiggle { position: relative; font-style: italic; color: #4636B8; white-space: nowrap; }
.squiggle svg { position: absolute; left: 0; right: 0; bottom: -0.08em; width: 100%; height: 0.32em; overflow: visible; }
.squiggle path { fill: none; stroke: #FFB627; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 1.2s 0.9s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-stage { position: relative; display: flex; justify-content: center; min-height: 520px; }
.phone--hero { transform: rotate(4deg); animation: float 6s ease-in-out infinite; z-index: 1; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.hero-humph { position: absolute; left: max(0px, calc(50% - 300px)); bottom: -40px; width: clamp(170px, 20vw, 250px); z-index: 2; }
.hero-humph svg { animation: walk-in 1.6s 0.3s var(--ease-out) both; }
@keyframes walk-in { from { transform: translateX(-120px); opacity: 0; } 60% { opacity: 1; } to { transform: none; } }
.hero-humph .bubble { position: absolute; top: -10px; left: 40%; opacity: 0; transform: translateY(10px) scale(0.9); transition: opacity 0.5s var(--ease-bounce), transform 0.5s var(--ease-bounce); white-space: nowrap; }
.hero-humph .bubble.is-on { opacity: 1; transform: none; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; width: 30px; height: 48px; border-radius: 20px; border: 2px solid rgba(30, 26, 51, 0.35); }
.scroll-hint span { position: absolute; left: 50%; top: 9px; width: 6px; height: 10px; margin-left: -3px; border-radius: 3px; background: #6050DC; animation: scrolly 1.8s ease-in-out infinite; }
@keyframes scrolly { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.hero .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero .reveal:nth-child(4) { transition-delay: 0.24s; }
.hero .reveal:nth-child(5) { transition-delay: 0.32s; }

/* Sticky, scroll-scrubbed sections */
.sticky { position: sticky; top: 0; min-height: 100svh; display: flex; align-items: center; padding: 100px 0 60px; }
.vanish { height: 320vh; }
.moods { height: 380vh; }
@media (max-width: 760px) { .vanish { height: 260vh; } .moods { height: 300vh; } }

/* 2. The money vanishes */
.vanish-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .vanish-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.beats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.beat { font-size: clamp(19px, 1.8vw, 24px); color: #4F4A63; opacity: 0.25; transform: translateX(-10px); transition: opacity 0.5s, transform 0.5s var(--ease-out); }
.beat strong { color: #1E1A33; font-family: var(--display); font-variation-settings: "SOFT" 100; }
.beat.is-on { opacity: 1; transform: none; }
.beat--answer { margin-top: 10px; padding: 18px 22px; border-radius: 22px; background: #FFFBF5; box-shadow: 0 12px 30px rgba(74, 52, 20, 0.12); }
.beat--answer strong { color: #4636B8; }
.vanish-meter { display: grid; justify-items: center; gap: 6px; }
.flask { width: min(230px, 50vw); filter: drop-shadow(0 20px 30px rgba(74, 52, 20, 0.18)); }
.flask-glass { fill: rgba(255, 251, 245, 0.85); }
.flask-outline { fill: none; stroke: #A8916C; stroke-width: 4; }
.flask-water { fill: #19B394; animation: wave 2.4s linear infinite; }
.flask-cap { fill: #C98B3E; }
@keyframes wave { from { transform: translateX(0); } to { transform: translateX(-100px); } }
.meter-amount { font-size: clamp(54px, 7vw, 92px); margin: 8px 0 0; font-variant-numeric: tabular-nums; color: #1E1A33; }
.meter-amount.is-empty { color: #D8542F; }
@media (max-width: 959px) {
  .vanish-grid { gap: 20px; }
  .vanish-meter { order: -1; grid-template-columns: auto 1fr; grid-template-rows: auto auto; justify-items: start; align-items: end; column-gap: 18px; row-gap: 0; }
  .vanish-meter .flask { grid-row: 1 / 3; width: 84px; }
  .vanish-meter .meter-amount { font-size: 54px; margin: 0; }
  .vanish h2.display { font-size: 32px; }
  .beat { font-size: 18px; }
  .sticky { padding: 84px 0 110px; }
}
.meter-day { margin: 0; font-weight: 800; color: #6E6882; letter-spacing: 0.04em; text-transform: uppercase; font-size: 14px; }

/* The receipt ticker under the beats */
.ticker { margin-top: 24px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker-track { display: flex; gap: 10px; width: max-content; animation: ticker 28s linear infinite; }
.ticker span { padding: 8px 14px; border-radius: 12px; background: #FFFBF5; border: 1px dashed #E6D6BD; font-weight: 800; font-size: 15px; color: #4F4A63; white-space: nowrap; font-variant-numeric: tabular-nums; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (max-width: 959px) { .ticker { display: none; } }

/* 3. Moods */
.moods-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .moods-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mood-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 14px; border: 2px solid #E6D6BD; background: #FFFBF5; color: #1E1A33; font: 800 15px/1 var(--body); cursor: pointer; transition: transform 0.12s, background 0.2s, border-color 0.2s; }
.chip:active { transform: scale(0.94); }
.chip.is-on { background: #ECE9FC; border-color: #6050DC; color: #3A2FA0; }
.mood-stage { position: relative; display: grid; justify-items: center; gap: 14px; }
.mood-disc { position: absolute; top: 4%; width: min(420px, 80vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #FFF1CC, rgba(255, 241, 204, 0)); transition: background 0.6s; }
.mood-stage[data-tone="2"] .mood-disc, .mood-stage[data-tone="3"] .mood-disc { background: radial-gradient(circle at 50% 40%, #FBE3DA, rgba(251, 227, 218, 0)); }
.mood-stage[data-tone="4"] .mood-disc { background: radial-gradient(circle at 50% 40%, #FDE2EA, rgba(253, 226, 234, 0)); }
.mood-figures { position: relative; width: min(380px, 78vw); aspect-ratio: 1; }
.mood { position: absolute; inset: 0; opacity: 0; transform: scale(0.94) translateY(10px); transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-bounce); }
.mood.is-on { opacity: 1; transform: none; }
.mood-label { margin: 0; min-height: 3em; max-width: 26em; text-align: center; font-family: var(--display); font-style: italic; font-size: clamp(19px, 1.8vw, 23px); font-variation-settings: "SOFT" 100; }
.pace { width: min(380px, 80vw); }
@media (max-width: 959px) {
  .moods-grid { gap: 14px; }
  .mood-stage { order: -1; gap: 8px; }
  .mood-figures { width: 190px; }
  .mood-disc { width: 230px; top: 0; }
  .mood-label { font-size: 17px; min-height: 2.6em; }
  .pace { width: min(280px, 80vw); }
  .moods h2.display { font-size: 30px; margin-bottom: 10px; }
  .moods .lead { display: none; }
}
.pace-track { position: relative; height: 14px; border-radius: 999px; background: #EFE3CF; overflow: visible; }
.pace-fill { position: absolute; inset: 0 auto 0 0; width: 30%; border-radius: inherit; background: #19B394; transition: width 0.6s var(--ease-out), background 0.6s; }
.pace-mark { position: absolute; left: 60%; top: -5px; width: 4px; height: 24px; border-radius: 2px; background: #1E1A33; }
.pace-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; font-weight: 800; color: #6E6882; }

/* 3b. Try it */
.try { padding: 120px 0; }
.try-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .try-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.try-card { position: relative; padding: 26px; border-radius: 34px; background: #FFFBF5; box-shadow: 0 1px 2px rgba(74, 52, 20, 0.06), 0 24px 60px rgba(74, 52, 20, 0.16); }
.try-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.try-label { margin: 0; font-weight: 800; color: #4F4A63; }
.try-amount { margin: 4px 0 0; font-size: clamp(54px, 6vw, 72px); font-variant-numeric: tabular-nums; transition: color 0.3s; }
.try-amount.is-over { color: #D8542F; font-size: clamp(38px, 4.4vw, 54px); }
.try-humph { width: 130px; margin: -18px -10px 0 0; }
.try-humph { position: relative; aspect-ratio: 1; }
.try-humph .pose { position: absolute; inset: 0; width: 100%; opacity: 0; transition: opacity 0.35s; }
.try-humph[data-pose="steady"] .pose--steady, .try-humph[data-pose="thirsty"] .pose--thirsty, .try-humph[data-pose="collapsed"] .pose--collapsed { opacity: 1; }
.try-humph.is-sip { animation: sip 0.6s var(--ease-bounce); }
.try-humph.is-gulp { animation: gulp 0.8s ease-in-out; }
@keyframes sip { 30% { transform: translateY(-8px) scale(0.98, 1.03); } 60% { transform: translateY(0) scale(1.02, 0.98); } }
@keyframes gulp { 20%, 60% { transform: rotate(-4deg); } 40%, 80% { transform: rotate(4deg); } }
.try-bar { height: 12px; border-radius: 999px; background: #EFE3CF; overflow: hidden; margin: 14px 0 10px; }
.try-bar span { display: block; height: 100%; width: 100%; border-radius: inherit; background: #19B394; transition: width 0.5s var(--ease-out), background 0.4s; }
.try-line { margin: 0 0 18px; min-height: 2.8em; font-family: var(--display); font-style: italic; font-variation-settings: "SOFT" 100; color: #4F4A63; }
.try-usuals { display: flex; flex-wrap: wrap; gap: 10px; }
.usual { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px 0 8px; border-radius: 16px; border: 0; background: #FFF1CC; color: #1E1A33; font: 800 15px/1 var(--body); cursor: pointer; box-shadow: 0 4px 0 #F0D896; transition: transform 0.12s var(--ease-out), box-shadow 0.12s; }
.usual img { width: 26px; height: 26px; }
.usual b { color: #7A4E00; }
.usual:active { transform: translateY(4px) scale(0.97); box-shadow: 0 0 0 #F0D896; }
.try-log { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; max-height: 156px; overflow: hidden; }
.try-log li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: #F7EEDF; font-weight: 700; font-size: 15px; animation: slide-in 0.35s var(--ease-out); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } }
.float-cost { position: absolute; font-weight: 900; color: #D8542F; pointer-events: none; animation: float-up 0.9s var(--ease-out) forwards; }
@keyframes float-up { to { transform: translateY(-46px); opacity: 0; } }

/* 4. How it works */
.how { padding: 120px 0 80px; }
.section-head { text-align: center; max-width: 820px; margin: 0 auto 56px; }
.how-grid { display: grid; gap: 40px; }
@media (min-width: 960px) { .how-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding-block: 24px; opacity: 0.3; transition: opacity 0.5s; }
.step.is-on { opacity: 1; }
.step-n { font-size: 84px; line-height: 1; color: transparent; -webkit-text-stroke: 2px #6050DC; margin-bottom: 8px; }
.step.is-on .step-n { color: #ECE9FC; }
.step h3 { margin: 0 0 10px; font-family: var(--display); font-size: clamp(28px, 3vw, 40px); line-height: 1.08; font-variation-settings: "SOFT" 100; letter-spacing: -0.01em; }
.step p { margin: 0; color: #4F4A63; font-size: 19px; max-width: 28em; }
.how-phone { display: none; }
@media (min-width: 960px) {
  .how-phone { display: block; }
  .phone--sticky { position: sticky; top: calc(50vh - 300px); margin-inline: auto; }
}
.phone--sticky { aspect-ratio: 603 / 1311; height: auto; }
.phone--sticky .screen { position: absolute; inset: 11px; width: calc(100% - 22px); opacity: 0; transform: translateY(14px) scale(0.98); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); }
.phone--sticky .screen.is-on { opacity: 1; transform: none; }
.phone--sticky .screen:first-child { position: relative; inset: auto; width: 100%; }
@media (max-width: 959px) {
  .step { min-height: auto; opacity: 1; padding-block: 28px; }
  .step::after { content: ""; display: block; width: min(240px, 64vw); aspect-ratio: 603 / 1311; margin: 26px auto 0; border-radius: 38px; background: center/cover no-repeat; box-shadow: 0 0 0 10px #16123A, 0 30px 50px -20px rgba(30, 26, 51, 0.5); }
  .step[data-step="0"]::after { background-image: url("/assets/screens/pay-schedule-light.webp"); }
  .step[data-step="1"]::after { background-image: url("/assets/screens/home-light.webp"); }
  .step[data-step="2"]::after { background-image: url("/assets/screens/quick-add-light.webp"); }
  .step[data-step="3"]::after { background-image: url("/assets/screens/worth-it-light.webp"); }
  .step[data-step="4"]::after { background-image: url("/assets/screens/history-light.webp"); }
}

/* 5. Night */
.night { position: relative; padding: 140px 0 0; color: #F4F0FF; overflow: hidden; min-height: 100svh; background: linear-gradient(to bottom, rgba(14, 11, 38, 0), #0E0B26 140px, #16123A 55%, #2A2358); }
.stars--night { opacity: 1; height: 60%; }
.night .lead { color: #C9C2FF; }
.night-scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 72%; object-fit: cover; object-position: center 40%; opacity: 0.85; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 30%, #000 60%); mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 30%, #000 60%); }
.night-grid { position: relative; display: grid; gap: 40px; align-items: center; padding-bottom: 120px; }
@media (min-width: 960px) { .night-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.streak { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 10px 18px; border-radius: 999px; background: #2A2566; color: #FFD98A; font-weight: 900; }
.flame { width: 18px; height: 24px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #FFE7A8, #FFC24D 45%, #F2668B); animation: flicker 0.9s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scale(1, 1) rotate(-3deg); } to { transform: scale(0.9, 1.1) rotate(3deg); } }
.night-stage { position: relative; display: flex; justify-content: center; }
.phone--night { transform: rotate(-3deg); }
.night-humph { position: absolute; right: max(0px, calc(50% - 320px)); bottom: -30px; width: clamp(160px, 18vw, 230px); }

/* 6. Privacy */
.privacy { padding: 120px 0; }
.promises { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.promise { padding: 28px; border-radius: 28px; background: rgba(255, 251, 245, 0.82); box-shadow: 0 1px 2px rgba(74, 52, 20, 0.06), 0 14px 34px rgba(74, 52, 20, 0.1); }
.promise svg { width: 52px; height: 52px; margin-bottom: 16px; fill: none; stroke: #6050DC; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; padding: 8px; border-radius: 16px; background: #ECE9FC; }
.promise h3 { margin: 0 0 6px; font-family: var(--display); font-size: 26px; font-variation-settings: "SOFT" 100; }
.promise p { margin: 0; color: #4F4A63; }

/* 7. Pricing */
.pricing { padding: 120px 0; }
.plans { display: grid; gap: 20px; max-width: 920px; margin: 0 auto; }
@media (min-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.plan { position: relative; padding: 32px; border-radius: 30px; background: #FFFBF5; box-shadow: 0 1px 2px rgba(74, 52, 20, 0.06), 0 16px 40px rgba(74, 52, 20, 0.1); }
.plan h3 { margin: 0; font-size: 20px; font-weight: 900; }
.plan-price { font-size: 64px; margin: 6px 0 4px; }
.plan-price small { font-family: var(--body); font-size: 18px; font-weight: 800; color: inherit; opacity: 0.7; margin-left: 4px; }
.plan ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li::before { content: ""; flex: none; margin-top: 5px; width: 16px; height: 16px; border-radius: 50%; background: #19B394; }
.plan--pro { background: linear-gradient(160deg, #6050DC, #3A2FA0); color: #FFFFFF; box-shadow: 0 24px 60px rgba(96, 80, 220, 0.4); }
.plan--pro li::before { background: #FFB627; }
.plan-alt { margin: 0; opacity: 0.85; font-weight: 700; font-size: 15px; }
.plan-badge { position: absolute; top: 24px; right: 24px; padding: 6px 12px; border-radius: 999px; background: #FFB627; color: #1E1A33; font-weight: 900; font-size: 13px; }

/* 8. The tale */
.tale { padding: 120px 0; }
.tale-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .tale-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.tale-humph { position: relative; width: min(320px, 70vw); margin: 0 auto; }
.tale-humph .bubble { position: absolute; top: -6px; right: 0; font-family: var(--display); font-size: 26px; font-style: italic; }
.storybook { font-family: var(--display); font-size: clamp(22px, 2.2vw, 29px); line-height: 1.45; font-variation-settings: "SOFT" 100, "opsz" 36; font-weight: 500; margin: 0; max-width: 26em; }
.storybook::first-letter { float: left; font-size: 3.4em; line-height: 0.85; margin: 6px 12px 0 0; color: #6050DC; font-weight: 900; }

/* 9. Finale */
.finale { position: relative; min-height: 115svh; display: grid; align-items: start; padding-top: 150px; overflow: hidden; text-align: center; isolation: isolate; }
.finale-scene { position: absolute; left: 0; right: 0; bottom: 0; height: 62%; z-index: -1; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%); mask-image: linear-gradient(to bottom, transparent, #000 22%); }
.finale-scene img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
@media (max-width: 700px) { .finale-scene { height: 58%; } .finale-scene img { object-position: center 75%; } }
.finale-copy { position: relative; }
.finale h2.display { font-size: clamp(48px, 8vw, 110px); color: #1E1A33; text-shadow: 0 2px 0 rgba(255, 251, 245, 0.6); }
.finale .lead { margin-inline: auto; color: #1E1A33; }
.store-note { font-weight: 800; color: #1E1A33; opacity: 0.8; }
.finale-humph { position: absolute; left: 38%; bottom: 3%; width: clamp(160px, 18vw, 240px); translate: -50% 0; }
/* On phones the scene's palm stands mid-frame: Humph waits on the open sand where the trail starts. */
@media (max-width: 700px) { .finale-humph { left: 30%; bottom: 96px; } }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; opacity: 0; }
.confetti.is-on i { animation: fall var(--d, 2.6s) var(--delay, 0s) cubic-bezier(0.3, 0.6, 0.6, 1) forwards; }
@keyframes fall { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x, 0), 80vh) rotate(var(--r, 540deg)); } }

/* Footer and the dock */
.footer { padding: 36px 0 120px; background: #16123A; color: #C9C2FF; }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.footer a { color: #F4F0FF; min-height: 44px; display: inline-flex; align-items: center; }
.footer p { margin: 0; }
.dock { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 24px; background: rgba(255, 251, 245, 0.86); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); box-shadow: 0 16px 40px rgba(30, 26, 51, 0.22); transform: translateY(140%); transition: transform 0.5s var(--ease-bounce); }
.dock.is-on { transform: none; }
.dock img { width: 40px; height: 40px; border-radius: 11px; }
.dock p { margin: 0; display: grid; line-height: 1.2; font-size: 15px; }
.dock p span { color: #6E6882; font-weight: 700; font-size: 13px; }
.dock .btn { margin-left: auto; }
@media (min-width: 960px) { .dock { left: auto; right: 24px; bottom: 24px; width: 380px; } }

/* Reduced motion: everything settles, nothing scrubs or loops */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .squiggle path { stroke-dashoffset: 0; }
  .vanish, .moods { height: auto; }
  .sticky { position: static; min-height: auto; padding: 100px 0; }
  .beat { opacity: 1; transform: none; }
}

/* Small phones (down to 280 px): single-column grids may shrink below their content, buttons never wrap,
   and the finale keeps its copy clear of Humph. */
body { overflow-x: clip; }
.try-grid, .plans { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 960px) { .try-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hero-grid > *, .try-grid > *, .plans > *, .how-grid > *, .night-grid > *, .tale-grid > *, .moods-grid > *, .vanish-grid > * { min-width: 0; }
.btn, .btn--small { white-space: nowrap; }
.nav .btn--small { flex: none; }
.brand { min-width: 0; }
@media (max-width: 420px) {
  .nav { gap: 10px; }
  .brand { font-size: 21px; gap: 8px; }
  .nav .btn--small { padding: 0 14px; font-size: 14px; }
  .dock { left: 8px; right: 8px; gap: 10px; padding: 8px 8px 8px 10px; }
  .dock .btn { padding: 0 16px; min-height: 44px; font-size: 15px; }
  .plan { padding: 24px 22px; }
  .plan-price { font-size: clamp(44px, 15vw, 64px); }
  .try-card { padding: 20px; border-radius: 28px; }
  .try-humph { width: 96px; margin: -10px -6px 0 0; }
}
@media (max-width: 340px) {
  .nav .brand span { display: none; }
  .dock img { display: none; }
  .dock p span { display: none; }
}
@media (max-width: 700px) {
  .finale { padding-bottom: 300px; }
  .finale-humph { width: clamp(120px, 38vw, 170px); }
  .btn--big { padding: 0 28px; font-size: 18px; min-height: 58px; }
}

/* Waitlist form */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.waitlist { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; max-width: 520px; }
.cta-row--center .waitlist { justify-content: center; margin-inline: auto; }
.waitlist-input { flex: 1 1 220px; min-width: 0; min-height: 52px; padding: 0 18px; border: 2px solid #E6D6BD; border-radius: 18px; background: #FFFBF5; color: #1E1A33; font: 700 17px/1 var(--body); box-shadow: inset 0 2px 0 rgba(74, 52, 20, 0.05); transition: border-color 0.2s, box-shadow 0.2s; }
.waitlist-input::placeholder { color: #8A8499; font-weight: 600; }
.waitlist-input:focus-visible { outline: none; border-color: #6050DC; box-shadow: 0 0 0 4px rgba(96, 80, 220, 0.2); }
.finale .waitlist-input { min-height: 64px; border-radius: 22px; font-size: 19px; }
.waitlist-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.waitlist .btn[disabled] { opacity: 0.7; cursor: progress; }
.waitlist-note { flex: 1 0 100%; margin: 0; font-weight: 800; font-size: 15px; color: #4F4A63; }
.finale .waitlist-note { color: #1E1A33; }
.waitlist-note[data-state="error"] { color: #B23A18; }
.waitlist-note[data-state="done"] { color: #0E7C66; animation: slide-in 0.35s var(--ease-out); }
.waitlist[data-state="done"] .waitlist-input, .waitlist[data-state="done"] .btn { display: none; }
@media (max-width: 420px) { .waitlist .btn { flex: 1 1 100%; } .finale .waitlist .btn--big { padding: 0 20px; } }
