/* Risen landing: one day, sunrise to night. Colour comes from the fixed sky; acts are transparent. */
@font-face { font-family: 'Unbounded'; src: url(/fonts/unbounded.woff2) format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url(/fonts/fredoka.woff2) format('woff2'); font-weight: 300 700; font-display: swap; }
:root {
  --violet: #352c55; --deep: #120e24; --ink-d: #211a3a; --lime: #d0d851; --paper: #f5f4ea;
  --sky1: #120e24; --sky2: #2a2249; --ink: var(--paper); --ink-2: rgba(245, 244, 234, .74); --line: rgba(245, 244, 234, .18);
  --face: 'Unbounded', system-ui, sans-serif; --text: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
  --gut: clamp(16px, 4vw, 56px); --r: 14px; --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
body[data-tone="light"] { --ink: var(--ink-d); --ink-2: rgba(33, 26, 58, .76); --line: rgba(33, 26, 58, .16); color-scheme: light; }
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--text); background: #120e24; color: var(--ink); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; transition: color .35s; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; }
h1, h2 { font-family: var(--face); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.3vw, 62px); }
h2 { font-size: clamp(26px, 3.4vw, 50px); }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; z-index: -1; background: linear-gradient(var(--sky1), var(--sky2)); }
.stars { position: absolute; inset: 0 0 30%; opacity: var(--stars, 1);
  background-image: radial-gradient(1.4px 1.4px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 26% 60%, #fff, transparent), radial-gradient(1.6px 1.6px at 38% 14%, #fff, transparent), radial-gradient(1px 1px at 52% 40%, #fff, transparent), radial-gradient(1.4px 1.4px at 67% 18%, #fff, transparent), radial-gradient(1px 1px at 78% 52%, #fff, transparent), radial-gradient(1.5px 1.5px at 89% 26%, #fff, transparent), radial-gradient(1px 1px at 8% 70%, #fff, transparent), radial-gradient(1px 1px at 60% 74%, #fff, transparent), radial-gradient(1.2px 1.2px at 94% 66%, #fff, transparent); }
.sun { position: absolute; left: 0; top: 0; width: clamp(90px, 13vw, 190px); aspect-ratio: 1; border-radius: 50%; background: var(--suncol, #f6c94f); transform: translate(var(--sx, 50vw), var(--sy, 90vh)) translate(-50%, -50%); box-shadow: 0 0 90px 30px color-mix(in srgb, var(--suncol, #f6c94f) 45%, transparent); }

/* ---------- top bar: the clock is the navigation ---------- */
.bar { position: fixed; z-index: 40; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--gut); pointer-events: none; }
.bar > * { pointer-events: auto; }
.bar-brand { display: inline-flex; align-items: baseline; gap: .04em; color: var(--ink); font: 500 26px/1 'Fredoka', var(--text); text-decoration: none; transition: color .35s; }
.bar-brand svg { width: .78em; height: .76em; align-self: center; fill: currentColor; transform: translateY(.04em); }
.clock { position: relative; display: none; gap: clamp(14px, 2.6vw, 38px); padding: 6px 4px 12px; border-bottom: 1px solid var(--line); }
.clock a { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); text-decoration: none; padding: 4px 2px; transition: color .25s; }
.clock a:hover, .clock a.on { color: var(--ink); }
.clock-sun { position: absolute; left: 0; bottom: -5px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; background: var(--suncol, #f6c94f); transform: translateX(var(--cx, 0)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 20%, transparent); }
.cta { display: inline-flex; align-items: center; justify-content: center; height: 54px; padding: 0 28px; border-radius: 12px; background: var(--lime); color: var(--ink-d); font-family: var(--face); font-size: 15px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; box-shadow: 0 10px 28px rgba(18, 14, 36, .28); transition: transform .25s var(--ease), box-shadow .25s; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(18, 14, 36, .34); }
.cta:active { transform: scale(.98); }
.cta.small { height: 40px; padding: 0 16px; font-size: 12.5px; box-shadow: none; }
.cta.big { height: 62px; padding: 0 36px; font-size: 17px; }
body[data-tone="light"] .cta { background: var(--violet); color: var(--lime); }
.night .cta, .hero .cta { background: var(--lime); color: var(--ink-d); }

/* ---------- the running day: a ring that closes as you scroll ---------- */
.day { position: fixed; z-index: 39; right: var(--gut); bottom: 18px; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; background: color-mix(in srgb, var(--deep) 86%, transparent); color: var(--paper); box-shadow: 0 10px 30px rgba(18, 14, 36, .3); }
.day svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.day circle { fill: none; stroke-width: 5; }
.day .bg { stroke: rgba(245, 244, 234, .18); }
.day .fg { stroke: var(--lime); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--done, 0)); transition: stroke-dashoffset .5s var(--ease); }
.day b { display: block; font-family: var(--face); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.day small { display: block; font-size: 12px; color: rgba(245, 244, 234, .76); white-space: nowrap; }

body[data-mid] { --ink-2: var(--ink); }
.day { transition: opacity .25s; }
.day.off { opacity: 0; pointer-events: none; }
.bar { background: color-mix(in srgb, var(--sky1) 62%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---------- acts ---------- */
.act { position: relative; }
.stage { position: sticky; top: 0; height: 100dvh; overflow: hidden; display: grid; }
.dawn, .life, .desk { padding: clamp(56px, 9vh, 96px) var(--gut); }

/* phone: real app screens; they change on their own and as you scroll the first screen */
.phone { --ph: min(calc(100dvh - 104px), 720px); position: relative; height: var(--ph); aspect-ratio: 390 / 845; padding: calc(var(--ph) * .014); border-radius: calc(var(--ph) * .078); background: #17132b; box-shadow: 0 0 0 1px rgba(245, 244, 234, .28), 0 34px 80px rgba(18, 14, 36, .5); }
.ph-screen { position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--ph) * .066); background: #f0ece6; }
.ph-island { position: absolute; z-index: 3; left: 50%; top: calc(var(--ph) * .012); width: 31%; height: calc(var(--ph) * .032); border-radius: 99px; background: #0a0815; transform: translateX(-50%); }
.scr { position: absolute; inset: 0; padding-top: calc(var(--ph) * .05); opacity: 0; transition: opacity .5s; background: #f0ece6; }
.scr:last-child { background: #0f1012; }
.scr.on { opacity: 1; }
.scr img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* hero: photo, copy, phone; each plane moves at its own rate */
.hero { height: 140vh; }
.hero .stage { background: #120e24; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: clamp(24px, 4vw, 64px); padding: 72px clamp(var(--gut), 8vw, 130px) 0 var(--gut); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 112%; object-fit: cover; object-position: 50% 62%; transform: translateY(calc(var(--p, 0) * -7%)); }
.hero .stage::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 14, 36, .78), rgba(18, 14, 36, .2) 62%, transparent), linear-gradient(0deg, rgba(18, 14, 36, .6), transparent 45%); }
.hero-copy { position: relative; z-index: 2; align-self: end; padding-bottom: clamp(28px, 7vh, 64px); color: var(--paper); transform: translateY(calc(var(--p, 0) * -8vh)); }
.hero-copy p { max-width: 50ch; margin-top: 12px; color: rgba(245, 244, 234, .9); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.soon { font-size: 14px; color: rgba(245, 244, 234, .86); }
.hero .phone { z-index: 2; margin-bottom: calc(var(--ph) * -.1); transform: translateY(calc(var(--p, 0) * -9vh)); }
.hero-m { position: absolute; z-index: 4; left: calc(var(--ph) * -.12); bottom: calc(var(--ph) * .13); width: calc(var(--ph) * .17); }
.hero-m svg { width: 100%; height: auto; display: block; }

/* dawn: one photo, one question */
.dawn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.dawn-photo { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); box-shadow: 0 24px 60px rgba(18, 14, 36, .3); }
.dawn-in > p { margin-top: 14px; font-size: 19px; color: var(--ink-2); max-width: 34ch; }
.faces { display: flex; gap: clamp(6px, 1.4vw, 14px); margin-top: 24px; }
.faces button { width: clamp(46px, 5.4vw, 62px); padding: 6px; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; opacity: .7; transition: transform .3s var(--ease), opacity .2s; }
.faces button:hover { opacity: 1; }
.faces svg { display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.faces .e { fill: currentColor; stroke: none; }
.faces button[aria-pressed="true"] { opacity: 1; background: var(--lime); color: var(--ink-d); transform: scale(1.14); }

/* habits: the list on the left, the tree answers on the right */
.habits { height: 170vh; }
.habits .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: 72px var(--gut) 32px; }
.h-list { margin-top: 20px; border-top: 1px solid var(--line); }
.h-list li { display: flex; align-items: center; gap: 14px; min-height: 50px; border-bottom: 1px solid var(--line); font-weight: 600; }
.h-list i { flex: none; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink-2); transition: background-color .25s, box-shadow .25s, transform .4s var(--ease); }
.h-list li.on i { background: var(--violet); box-shadow: none; transform: scale(1.08); }
.h-list li.on i::after { content: ''; display: block; width: 8px; height: 14px; margin: 4px 0 0 9px; border: solid var(--lime); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }
.h-list small { margin-left: auto; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.h-list em { margin-left: auto; padding: 1px 8px; border-radius: 6px; background: var(--violet); color: var(--lime); font-size: 12px; font-style: normal; }
.h-tree { border-radius: var(--r); overflow: hidden; box-shadow: 0 24px 60px rgba(33, 26, 58, .22); }
.h-tree svg, .n-tree svg { display: block; width: 100%; height: auto; }

/* the peak: the page floods lime the moment the crown changes hands */
.crown { height: 230vh; }
.crown .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; padding: 72px var(--gut) 32px; }
.flood { position: absolute; inset: 0; background: var(--lime); clip-path: circle(var(--flood, 0%) at 72% 50%); }
.c-copy { position: relative; z-index: 1; display: grid; }
.c-copy h2 { grid-area: 1 / 1; align-self: end; transition: opacity .35s, transform .5s var(--ease); }
.c-b { opacity: 0; transform: translateY(14px); font-size: clamp(30px, 4.4vw, 66px); }
.crown.won .c-a { opacity: 0; transform: translateY(-14px); }
.crown.won .c-b { opacity: 1; transform: none; color: var(--ink-d); }
.c-talk { grid-area: 2 / 1; margin-top: 12px; min-height: 1.6em; font-size: 18px; font-weight: 600; color: var(--ink-2); }
.crown.won .c-talk { color: var(--ink-d); }
.c-photo { grid-area: 3 / 1; width: 100%; max-width: 480px; height: clamp(120px, 26vh, 240px); margin-top: 18px; object-fit: cover; object-position: 50% 30%; border-radius: var(--r); box-shadow: 0 18px 44px rgba(33, 26, 58, .2); }
.board { position: relative; z-index: 1; width: min(540px, 100%); justify-self: end; padding: 18px; border-radius: 18px; background: var(--deep); color: var(--paper); box-shadow: 0 30px 70px rgba(33, 26, 58, .3); }
.checkin { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 12px 14px; border-radius: 10px; background: var(--lime); color: var(--ink-d); opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .3s, transform .45s var(--ease); }
.checkin b { font-size: 15px; }
.checkin span { grid-row: 2; font-size: 13px; }
.checkin strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--face); font-size: 20px; font-variant-numeric: tabular-nums; }
.crown.in .checkin { opacity: 1; transform: none; }
.rows { position: relative; height: 272px; margin-top: 12px; }
.rows li { position: absolute; inset: 0 0 auto; height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 8px; border-radius: 10px; transform: translateY(calc(var(--r0, 0) * 68px)); transition: transform .7s var(--ease), background-color .3s; }
.rows li.you { background: rgba(245, 244, 234, .08); }
.rows .rk { width: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: rgba(245, 244, 234, .68); }
.rows .m { width: 50px; height: 56px; flex: none; }
.rows .m svg { width: 100%; height: 100%; }
.rows .nm { flex: 1; min-width: 0; font-weight: 700; }
.rows .pt { font-family: var(--face); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.board-n { display: block; margin-top: 6px; font-size: 12px; color: rgba(245, 244, 234, .7); }

/* the rest of life: one composed block, nothing to swipe */
.life h2 { max-width: 18em; margin-bottom: 24px; }
.bento { display: grid; grid-template-columns: 1fr 1.5fr 1fr; grid-template-rows: repeat(2, minmax(190px, auto)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 22px; overflow: hidden; border-radius: var(--r); background: var(--paper); color: var(--ink-d); box-shadow: 0 14px 40px rgba(33, 26, 58, .14); }
.tile h3 { font-size: 15px; font-weight: 700; }
.tile .big { font-family: var(--face); font-size: clamp(30px, 3.2vw, 46px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; margin-top: auto; }
.tile.money { background: var(--violet); color: var(--paper); }
.tile.goals { grid-column: 1; grid-row: 2; background: var(--lime); }
.tile.agenda { grid-column: 2; grid-row: 1 / span 2; padding: 0; }
.tile.agenda img { width: 100%; height: 46%; min-height: 150px; object-fit: cover; }
.tile.agenda > div { padding: 18px 22px 22px; }
.tile.agenda ul { margin: 8px 0 10px; }
.tile.agenda li { display: flex; gap: 14px; padding: 8px 0; border-top: 1px solid rgba(33, 26, 58, .14); font-weight: 600; }
.tile.agenda b { font-variant-numeric: tabular-nums; color: var(--violet); }
.tile.strava { grid-column: 3; grid-row: 1 / span 2; justify-content: flex-end; color: #fff; min-height: 300px; }
.tile.strava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.strava::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(18, 14, 36, .86), transparent 60%); }
.tile.strava > div { position: relative; z-index: 1; }
.tile.strava p { margin-top: 6px; font-size: 18px; font-weight: 600; line-height: 1.25; }

/* desk: the real dashboard */
.desk { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 3vw, 48px); align-items: center; padding-right: 0; }
.d-copy p { margin: 14px 0 22px; max-width: 34ch; color: var(--ink-2); }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px 0 0 12px; box-shadow: 0 30px 80px rgba(18, 14, 36, .45); }
.shot figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-2); }

/* night: the tree has grown */
.n-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(64px, 11vh, 110px) var(--gut) 48px; }
.n-tree { border-radius: var(--r); overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
.n-copy p { margin: 14px 0 26px; max-width: 44ch; color: var(--ink-2); }
.foot { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 20px var(--gut) 86px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.foot a { color: var(--ink); }
.foot span { margin-left: auto; }

/* ---------- wide ---------- */
@media (min-width: 900px) { .clock { display: flex; } }

/* ---------- phone: its own composition; the mockup still in the first screen ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .cta { height: 48px; padding: 0 22px; font-size: 14px; }
  .cta.small { height: 36px; padding: 0 12px; font-size: 11.5px; }
  .cta.big { height: 54px; padding: 0 24px; font-size: 15px; }
  .day { right: 12px; bottom: 12px; padding: 6px 10px 6px 6px; }
  .day svg { width: 32px; height: 32px; }
  .day small { display: none; }

  .hero { height: 110vh; }
  .hero .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: start; gap: 14px; padding: 60px var(--gut) 0; }
  .hero .stage::after { background: linear-gradient(180deg, rgba(18, 14, 36, .82), rgba(18, 14, 36, .3) 62%, transparent); }
  .hero-copy { padding: 0; transform: none; }
  .hero-copy h1 { font-size: 25px; }
  .hero-copy p { font-size: 14px; margin-top: 8px; }
  .cta-row { margin-top: 12px; gap: 8px 14px; }
  .soon { font-size: 12.5px; }
  .hero .phone { --ph: 560px; justify-self: center; margin: 0; transform: translateY(calc(var(--p, 0) * -6vh)); }
  .hero-m { left: -30px; bottom: auto; top: 250px; width: 72px; }

  .dawn { grid-template-columns: minmax(0, 1fr); }

  .habits { height: 150vh; }
  .habits .stage { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; padding: 60px var(--gut) 12px; }
  .h-copy h2 { font-size: 21px; }
  .h-list { margin-top: 10px; }
  .h-list li { min-height: 36px; font-size: 14px; gap: 10px; }
  .h-list i { width: 20px; height: 20px; }
  .h-list li.on i::after { width: 6px; height: 11px; margin: 3px 0 0 7px; }
  .h-tree svg { height: 34dvh; width: 100%; }

  .crown { height: 190vh; }
  .crown .stage { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 10px; align-content: center; padding: 60px var(--gut) 66px; }
  .flood { clip-path: circle(var(--flood, 0%) at 50% 62%); }
  .c-copy h2 { font-size: 20px; }
  .c-b { font-size: 24px; }
  .c-talk { font-size: 14px; margin-top: 6px; }
  .c-photo { display: none; }
  .board { padding: 12px; justify-self: stretch; width: 100%; }
  .rows { height: 208px; margin-top: 8px; }
  .rows li { height: 52px; transform: translateY(calc(var(--r0, 0) * 52px)); gap: 8px; }
  .rows .m { width: 40px; height: 46px; }
  .rows .pt { font-size: 15px; }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .tile.agenda, .tile.strava { order: 1; }
  .tile.money, .tile.goals { grid-column: auto; grid-row: auto; min-height: 170px; padding: 16px; font-size: 14px; }
  .tile.agenda, .tile.strava { grid-column: 1 / -1; grid-row: auto; }
  .tile.agenda img { height: 150px; }
  .tile.strava { min-height: 240px; }

  .desk { grid-template-columns: minmax(0, 1fr); padding-right: var(--gut); }
  .shot img { border-radius: 10px; }

  .n-in { grid-template-columns: minmax(0, 1fr); }
  .foot span { margin-left: 0; width: 100%; }
}
@media (max-width: 899px) and (min-width: 761px) {
  .desk { grid-template-columns: minmax(0, 1fr); padding-right: var(--gut); }
  .shot img { border-radius: 12px; }
  .hero .phone { --ph: min(calc(100dvh - 104px), 560px); }
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .tile.money, .tile.goals, .tile.agenda, .tile.strava { grid-column: auto; grid-row: auto; }
}

/* ---------- reduced motion: no pinning, every act shows its finished state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: 100dvh; }
  .habits, .crown { height: auto; }
  .habits .stage, .crown .stage { position: static; height: auto; min-height: 90dvh; }
  .hero-bg, .hero-copy, .hero .phone { transform: none !important; }
  .flood { display: none; }
  *, *::before, *::after { transition: none !important; }
}
