/* One L1fe brand round 3 (23 Oct 2026): the homepage system.

   Ground and ink are the app's own (src/ui/theme/tokens.ts: background #F4F4EF, text #1B2420,
   brand green #31796D and its dark #1E4A43). The five place colours are the plates from rounds 1
   and 2; they only ever mean a place where data lives. Type: Hedvig Letters Serif for what is
   said, Hedvig Letters Sans for what is read and pressed (a Swedish family, OFL, self-hosted latin).
   One orchestrated moment, the switch on the stage; nothing else moves on its own. */

@font-face { font-family: 'Hedvig Serif'; font-weight: 400; font-display: swap; src: url('fonts/hedvig-serif-latin.woff2') format('woff2'); }
@font-face { font-family: 'Hedvig Sans'; font-weight: 400; font-display: swap; src: url('fonts/hedvig-sans-latin.woff2') format('woff2'); }

:root {
  --ground: #F4F4EF; --sheet: #FFFFFF; --ink: #1B2420; --ink-2: #4F5751; --ink-3: #626A63; --rule: #DCDCD2; --well: #EAEAE3;
  --green: #31796D; --deep: #1E4A43; --soft: #E4EFEB; --band: #BFD8D0; --on-deep: #FFFFFF;
  --p0: #2F4BD8; --p1: #E4572E; --p2: #CF3F78; --p3: #C98E0F; --p4: #6B7A75;
  --serif: 'Hedvig Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Hedvig Sans', 'Avenir Next', 'Segoe UI', Helvetica, Arial, sans-serif;
  --gut: clamp(20px, 4.4vw, 64px); --max: 1320px;
  --shadow: 0 1px 1px rgba(27, 36, 32, .04), 0 18px 40px -24px rgba(27, 36, 32, .28);
  color-scheme: light;
}
[data-ground=night] {
  --ground: #0F1C19; --sheet: #172824; --ink: #EEF2EC; --ink-2: #B9C4BC; --ink-3: #93A097; --rule: #2A3B36; --well: #1D302B;
  --green: #7CC4B1; --deep: #E9EEE9; --soft: #183A33; --band: #2F5E54; --on-deep: #0F1C19;
  --p0: #8EA2FF; --p1: #FF9470; --p2: #FF86B5; --p3: #F2C14E; --p4: #C3D2CD;
  --shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 24px 48px -28px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 18px/1.55 var(--sans); -webkit-font-smoothing: antialiased; font-kerning: normal; }
::selection { background: var(--band); color: var(--ink); }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* the preview's own line: not part of the design */
.ribbon { font: 13px/1.4 var(--sans); background: var(--well); color: var(--ink-2); padding: 7px var(--gut); display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: center; }
.ribbon a { color: var(--ink); }
.t5 .ribbon { display: none; }

/* the wordmark: the 1 is the mark. Hover it, and it shows what it stands for */
.wordmark { font: 26px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.one { color: var(--green); display: inline-block; position: relative; transition: text-shadow .5s cubic-bezier(.2, .8, .2, 1); }
.wordmark:hover .one, .wordmark:focus-visible .one, .one.register {
  text-shadow: -.16em -.05em 0 rgba(47, 75, 216, .75), .15em -.08em 0 rgba(228, 87, 46, .75), -.1em .1em 0 rgba(207, 63, 120, .75), .17em .07em 0 rgba(201, 142, 15, .8), 0 -.13em 0 rgba(107, 122, 117, .75);
  transition-duration: .18s;
}

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.scrolled { border-bottom-color: var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.top nav { display: flex; align-items: center; gap: 30px; font-size: 16px; }
.top nav a:not(.btn) { text-decoration: none; color: var(--ink-2); }
.top nav a:not(.btn):hover { color: var(--ink); }

/* actions */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 10px; border: 0; background: var(--deep); color: var(--on-deep); font: 17px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, transform .2s; }
.btn:hover { background: var(--green); }
.btn:active { transform: translateY(1px); }
.btn.small { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.btn.quiet:hover { box-shadow: inset 0 0 0 1px var(--ink-3); background: transparent; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.more { font-size: 17px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--ink-3); }
.more:hover { text-decoration-color: var(--green); }

/* ── the hero ──────────────────────────────────────────────────────────── */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 32px; align-items: center; min-height: min(calc(100svh - 104px), 900px); padding-top: 12px; padding-bottom: 40px; }
.hero .copy { max-width: 600px; padding-bottom: 40px; }
/* the headline and its deck: the problem large, the product and the benefit right under it */
.hero h1 { font-size: clamp(38px, 4.5vw, 66px); line-height: 1.04; letter-spacing: -.018em; }
.hero h1 .l1, .hero h1 .l2 { display: block; }
.hero h1 .l2 { margin-top: .5em; font-size: .52em; line-height: 1.2; letter-spacing: -.008em; max-width: 19em; }
.hero .lede { margin-top: 28px; font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 32em; }
.hero .acts { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; margin-top: 34px; }
.hero .note { margin-top: 22px; font-size: 15px; color: var(--ink-3); max-width: 30em; }

/* the stage: the clouds and the Twin, the switch, the name */
.stage { margin: 0; display: grid; justify-items: center; align-content: center; position: relative; }
.stage .view { position: relative; width: 100%; height: clamp(440px, 62vh, 640px); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage img.still:not([src]) { display: none; }
.stage .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .6s; pointer-events: none; }
.stage.stills:not(.is-one) .still-off, .stage.stills.is-one .still-on { opacity: 1; }
html:not(.js) .stage .still-on { opacity: 1; }
.place { position: absolute; left: 0; top: 0; margin: 0; display: grid; justify-items: center; text-align: center; gap: 1px; width: 210px; margin-left: -105px; margin-top: 0; pointer-events: none; font-size: 15px; line-height: 1.3; transition: opacity .3s; }
.place b { font: 19px/1.15 var(--serif); font-weight: 400; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.place b::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.place span { color: var(--ink-3); }
/* without the engine (reduced motion, no WebGL2) the switch swaps two stills, and a legend stands in for the labels */
.legend { display: none; list-style: none; margin: 10px 0 0; padding: 0; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 15px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.stage.stills .place { display: none; }
.stage.stills:not(.is-one) .legend { display: flex; }
.stage.stills canvas { display: none; }
html:not(.js) .place, html:not(.js) .control, html:not(.js) canvas { display: none; }
.beat { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font: 19px/1.3 var(--serif); color: var(--ink-2); opacity: 0; transition: opacity .5s; pointer-events: none; }
.stage.is-five .beat { opacity: 1; }

.control { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.flip-text { font-size: 16px; color: var(--ink-2); min-width: 10.5em; }
/* the switch: five spots wait on the track; the knob sweeps them up and turns into the 1 */
.flip { --w: 160px; --h: 56px; --k: 46px; position: relative; width: var(--w); height: var(--h); border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: var(--well); box-shadow: inset 0 0 0 1px var(--rule), inset 0 2px 4px rgba(27, 36, 32, .06); transition: background .5s .25s, box-shadow .5s; }
.flip .track { position: absolute; inset: 0 14px 0 calc(var(--k) + 14px); display: flex; align-items: center; justify-content: space-between; }
.flip .track i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); transition: transform .25s cubic-bezier(.5, 0, .75, 0), opacity .25s; }
.flip .knob { position: absolute; top: calc((var(--h) - var(--k)) / 2); left: calc((var(--h) - var(--k)) / 2); width: var(--k); height: var(--k); border-radius: 50%; background: var(--sheet); box-shadow: 0 1px 2px rgba(27, 36, 32, .18), 0 4px 10px rgba(27, 36, 32, .12); transition: transform .55s cubic-bezier(.65, 0, .25, 1); display: grid; place-items: center; }
[data-ground=night] .flip .knob { background: #E9EEE9; }
[data-ground=night] .flip[aria-checked=true] .knob { background: #0F1C19; }
.flip .knob span { font: 26px/1 var(--serif); color: var(--green); opacity: 0; transform: scale(.6); transition: opacity .3s .35s, transform .4s .35s cubic-bezier(.2, .9, .3, 1.3); }
.flip[aria-checked=true] { background: var(--deep); box-shadow: inset 0 0 0 1px var(--deep); }
.flip[aria-checked=true] .knob { transform: translateX(calc(var(--w) - var(--h))); }
.flip[aria-checked=true] .knob span { opacity: 1; transform: none; }
.flip[aria-checked=true] .track i { transform: scale(0); opacity: 0; }
.flip[aria-checked=true] .track i:nth-child(1) { transition-delay: .05s; }
.flip[aria-checked=true] .track i:nth-child(2) { transition-delay: .12s; }
.flip[aria-checked=true] .track i:nth-child(3) { transition-delay: .19s; }
.flip[aria-checked=true] .track i:nth-child(4) { transition-delay: .26s; }
.flip[aria-checked=true] .track i:nth-child(5) { transition-delay: .33s; }
.flip:focus-visible { outline-offset: 4px; border-radius: 999px; }
.flip.nudge .knob { animation: nudge 1.3s cubic-bezier(.5, 0, .3, 1); }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateX(14px); } 55% { transform: translateX(-2px); } 75% { transform: translateX(5px); } }

.name { display: grid; justify-items: center; gap: 4px; margin-top: 18px; min-height: 92px; opacity: 0; transform: translateY(8px); transition: opacity .8s, transform .9s cubic-bezier(.2, .8, .2, 1); }
.name .mark { font: clamp(40px, 4.2vw, 58px)/1 var(--serif); letter-spacing: -.01em; }
.name .sub { font-size: 15px; color: var(--ink-3); }
.stage.is-one .name, html:not(.js) .name { opacity: 1; transform: none; }

/* ── sections ──────────────────────────────────────────────────────────── */
.sec { padding: clamp(76px, 9.5vw, 132px) 0; }
.tour { margin-top: clamp(44px, 5vw, 64px); padding-top: 26px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; font-size: 17px; color: var(--ink-2); }
.sec h2 { font-size: clamp(32px, 3.6vw, 50px); line-height: 1.1; letter-spacing: -.012em; max-width: 18em; }
.sec .head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 64px; align-items: end; margin-bottom: clamp(44px, 6vw, 72px); }
.sec .lede { font-size: 19px; color: var(--ink-2); max-width: 30em; }
.sec h3 { font-size: 24px; line-height: 1.2; }
.say p { margin-top: 20px; font-size: 19px; color: var(--ink-2); max-width: 31em; }
.say .more { display: inline-block; margin-top: 26px; }

/* the same morning twice */
.twice { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.twice h3 { margin-bottom: 22px; }
.says { list-style: none; margin: 0; padding: 0; }
.says li { display: grid; grid-template-columns: 11.5em 1fr; gap: 16px; padding: 15px 0; border-top: 1px solid var(--rule); transition: background .25s; }
.says li:last-child { border-bottom: 1px solid var(--rule); }
.who { display: inline-flex; align-items: baseline; gap: 9px; color: var(--ink-2); font-size: 16px; }
.who::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; transform: translateY(-1px); }
.says .what { font-family: var(--serif); font-size: 19px; line-height: 1.35; }
.says li.lit { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 70%); }
.after { margin-top: 22px; font-size: 17px; color: var(--ink-2); }

.card { background: var(--sheet); border-radius: 22px; box-shadow: var(--shadow); padding: clamp(22px, 2.6vw, 34px); }
.today .meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }
.today .ask { font: clamp(24px, 2.3vw, 30px)/1.2 var(--serif); margin-top: 14px; letter-spacing: -.005em; }
.why { list-style: none; margin: 22px 0 0; padding: 0; }
.why li { display: grid; grid-template-columns: 11.5em 1fr; gap: 14px; padding: 11px 0; border-top: 1px solid var(--rule); font-size: 16px; cursor: default; }
.why li span:last-child { color: var(--ink); }
.choose { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.choose .btn { min-height: 46px; font-size: 16px; padding: 0 20px; }
.choose .btn[aria-pressed=true] { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--green); }
.result { min-height: 1.5em; margin-top: 14px; font-size: 16px; color: var(--green); }
[data-ground=night] .result { color: var(--ink); }

/* measured for you */
.yours .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.range, .months { margin: 0; }
.range { padding-top: 6px; }
.months { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--rule); }
.range .row + .row { margin-top: 22px; }
.range .row p { display: flex; justify-content: space-between; font-size: 15px; color: var(--ink-2); margin-bottom: 9px; }
.range .row p span:last-child { font-variant-numeric: tabular-nums; }
.bar { position: relative; display: block; height: 12px; border-radius: 6px; background: var(--well); }
.yours .bar { background: var(--rule); }
.band { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.band.all { left: 0; right: 0; background: #C7C9BD; }
[data-ground=night] .band.all { background: #3A4D47; }
.band.you { background: var(--green); }
.pin { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.pin.today b { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); padding: 3px 8px; white-space: nowrap; font: 15px/1 var(--sans); color: var(--ink); background: var(--ground); }
.axis { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.range figcaption { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); font: 20px/1.35 var(--serif); }
.months .cap { font-size: 15px; color: var(--ink-2); margin-bottom: 14px; }
.m { display: grid; grid-template-columns: 5.5em 1fr 5.5em; gap: 14px; align-items: center; font-size: 15px; padding: 7px 0; }
.m span:first-child { color: var(--ink-2); }
.m b { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }
.m .bar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--band); }
.m:last-child .bar i { background: var(--green); }

/* how it works: three steps, each with a real screen from the app */
.how { background: var(--sheet); }
[data-ground=night] .how { background: #13231F; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3.4vw, 56px); }
.screen { aspect-ratio: 927 / 1240; overflow: hidden; border-radius: 26px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--rule); margin-bottom: 26px; }
.screen img { width: 100%; height: auto; }
.steps h3 { font-size: 23px; display: flex; gap: 12px; align-items: baseline; }
.steps .n { color: var(--green); font-size: 23px; }
.steps p { margin-top: 12px; font-size: 17px; color: var(--ink-2); }

/* the coaches */
.coaches .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.table { margin: 0; border-left: 2px solid var(--green); padding: 4px 0 4px clamp(20px, 3vw, 40px); }
.table .q { font: clamp(22px, 2.1vw, 27px)/1.3 var(--serif); }
.table .a { margin-top: 26px; }
.table .who { display: block; font-size: 15px; color: var(--green); }
.table .who::before { display: none; }
.table .a p:last-child { margin-top: 6px; font-size: 17px; color: var(--ink-2); max-width: 34em; }
.table figcaption { margin-top: 28px; font-size: 16px; color: var(--ink-3); }

/* waiting list (switched off on the preview) */
.join { background: var(--deep); color: #EEF4F1; }
[data-ground=night] .join { background: #13231F; color: var(--ink); }
.join .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.join .mission { font: 20px/1.3 var(--serif); color: #A9CFC4; margin: 0 0 22px; }
[data-ground=night] .join .mission { color: var(--green); }
.join .say p { color: inherit; opacity: .86; }
.join ul { margin: 26px 0 0; padding: 0; list-style: none; font-size: 16px; opacity: .86; }
.join li { padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.wl { display: grid; gap: 12px; align-content: start; padding-top: 6px; }
.wl label { font-size: 15px; }
.wl input[type=email] { height: 54px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: inherit; font: 17px var(--sans); padding: 0 16px; }
.wl .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; opacity: .86; }
.wl .btn { background: #EEF4F1; color: var(--ink); margin-top: 6px; }
[data-ground=night] .wl .btn { background: #E9EEE9; color: #0F1C19; }
.wl .off { font-size: 14px; opacity: .78; }

/* footer */
.foot { padding: 56px 0 64px; font-size: 15px; color: var(--ink-2); }
.foot .wrap { display: grid; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { color: var(--ink-2); }
.foot .fine { color: var(--ink-3); font-size: 14px; }

/* ── narrow screens ────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .top nav a:not(.btn) { display: none; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; gap: 8px; padding-top: 22px; }
  .hero .copy { padding-bottom: 0; }
  .stage .view { height: clamp(420px, 118vw, 560px); }
  .sec .head, .twice, .yours .wrap, .coaches .wrap, .join .wrap { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 56px; }
  .screen { max-width: 420px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .top .wrap { height: 62px; }
  .wordmark { font-size: 23px; }
  .btn.small { min-height: 40px; padding: 0 14px; font-size: 14.5px; }
  .hero h1 { font-size: clamp(36px, 10vw, 44px); }
  .hero h1 .l2 { font-size: .62em; }
  .hero .lede { font-size: 17.5px; margin-top: 20px; }
  .hero .acts { margin-top: 26px; }
  .says li, .why li { grid-template-columns: 1fr; gap: 4px; }
  .place { width: 150px; margin-left: -75px; font-size: 13.5px; }
  .place b { font-size: 17px; }
  .flip { --w: 140px; --h: 52px; --k: 42px; }
  .beat { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
