/* The home page's hero: "Clearly.", night to dawn (Hari's pick, 5 Oct 2026; from design/web-hero/mock.html).
   Kaanu sits in the giant word: on wide screens in a gap after the second l (that l in front of his left ear, his
   right ear in front of the y); on phones on top of the word, on its "ear". Scrolling holds the hero while the day
   passes, Day 1 to Day 21, and he wakes (the app's own waking frames). Every text block takes ink or paper from the
   light behind it.

   Three ways it shows, so nobody waits on JavaScript and the first paint is already right:
   - Live (scripting on, motion allowed): the hero is held for a scroll of 300vh; night at first paint; hero.js
     drives the light with opacity only (five sky layers and four glow layers cross-fade), flips each block's ink
     only when its background crosses the line, and draws the waking frames on a canvas.
   - Still (reduced motion, no JavaScript, crawlers): the morning, at rest, not held: the same hero as one screen.
   The layout (word size, where Kaanu sits) is CSS only, in units of the word's own size, measured from Hanken
   Grotesk 300 (at 1000 px, the second l ends at 2.321 em, "ear" is centred at 1.479 em without the gap, the baseline
   sits 0.858 em down, the x-height is 0.493 em). hero.js only checks and corrects it after the fonts load.
   Kaanu is kept small (Hari, 5 Oct, late: credible first): 0.78 of the word's size tall on wide screens, in a gap of
   0.46 em (the l still passes in front of his left ear, his right ear in front of the y), and 1.45 of it on phones
   (about 160 px tall on a 390 px phone, inside the 84 to 210 px rule).

   The slot for a later walk-in clip: #hero-kaanu. Keep its layering (the back word, then Kaanu, then the front l) and
   its box; put a <video> or a canvas in it beside .k-still.

   The title as the demo (Hari's v2, 6 Oct 2026): a real reading's waveform runs under the word (.hero-wave, drawn by
   hero.js from the test reading's envelope), the second l slips (.l-red, a red wave, and the verdict in the eyebrow),
   then lands (.l-glow, the dawn underline). The marks sit inside the l's own span, in em of the word's size, so they
   need no measuring: on wide screens in the front copy of the l (in front of Kaanu), on phones in the word itself.
   The still hero shows the l landed. */

.hero-track { position: relative; }
.hero { position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; isolation: isolate;
  --gutter-h: clamp(20px, 5.2vw, 80px); --fs: min(24.6vw, 45vh); --fs: min(24.6vw, 45svh);
  --fg: #000000; --fg2: #3A3631; --fg3: #5E5952; --pill-bg: #000000; --pill-fg: #FDFCFB;
  background: #FDFCFB; color: var(--fg); font-family: var(--sans); }

/* the light: five sky keys and four glow colours, cross-faded with opacity only */
.sky, .glow, .stars, .grain { position: absolute; inset: 0; pointer-events: none; }
.sky { z-index: -4; }
.sky i, .glow i { position: absolute; inset: 0; opacity: 0; }
.sky i:nth-child(1) { background: linear-gradient(180deg, #0B0A0D 0%, #100D14 52%, #1B1424 100%); }
.sky i:nth-child(2) { background: linear-gradient(180deg, #0F0C15 0%, #1E1530 52%, #46297A 100%); }
.sky i:nth-child(3) { background: linear-gradient(180deg, #2B1838 0%, #7A3577 52%, #E0569B 100%); }
.sky i:nth-child(4) { background: linear-gradient(180deg, #EBCFC6 0%, #FFB797 52%, #FF8257 100%); }
.sky i:nth-child(5) { background: linear-gradient(180deg, #FDFCFB 0%, #FDF7F1 52%, #FFE2C8 100%); opacity: 1; }
.stars { z-index: -3; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.glow { z-index: -2; }
.glow i:nth-child(1) { background: radial-gradient(60% 46% at 62% 74%, rgb(132 75 219), transparent 70%); }
.glow i:nth-child(2) { background: radial-gradient(60% 46% at 62% 74%, rgb(224 86 155), transparent 70%); }
.glow i:nth-child(3) { background: radial-gradient(60% 46% at 62% 74%, rgb(255 122 82), transparent 70%); }
.glow i:nth-child(4) { background: radial-gradient(60% 46% at 62% 74%, rgb(255 192 138), transparent 70%); opacity: .2; }
/* the sky's grain: over the light layers, under everything else (Hari, 6 Oct 2026: at z-index 6 it lay on top of Kaanu
   and speckled his skin, so he looked dotty; now it is on the sky only, never on him or the words) */
.grain { z-index: -1; opacity: .06; background-size: 220px 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* every block carries its own ink; .ink means the light behind it is bright */
.tone { color: var(--fg); }

/* the visible frame: the dynamic viewport, so nothing sits under the browser's bars */
.hero-view { position: absolute; left: 0; right: 0; top: 0; height: 100%; }

.hero-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: calc(env(safe-area-inset-top) + 16px) var(--gutter-h) 0; }
.hero-nav .wordmark { color: var(--fg); font-size: 21px; }
.hero-links { display: flex; gap: clamp(20px, 2.6vw, 36px); }
.hero-links a { display: inline-flex; align-items: center; min-height: 44px; font: 500 12px/1 var(--mono);
  letter-spacing: .08em; text-transform: uppercase; color: var(--fg2); text-decoration: none; }
.hero-links a:hover { color: var(--fg); }
.hero .pill { background: var(--pill-bg); color: var(--pill-fg); min-height: 44px; padding: 0 20px; font-size: 15px; }
.hero .pill.big { min-height: 54px; padding: 0 28px; font-size: 16.5px; }

.stage { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter-h); }
.eyebrow { margin: 0 0 .1em .4em; font: 500 12px/16px var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg3); }
.wordwrap { position: relative; line-height: 1; }
.word { margin: 0; font-family: var(--sans); font-weight: 300; font-size: var(--fs); line-height: 1.02;
  letter-spacing: -.055em; white-space: nowrap; color: var(--fg); }
.word .g { margin-right: .46em; }
.word .base { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.word.front { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; }
.word.front .hide { color: transparent; }

/* Kaanu in the word: 0.78 of the word's size tall (wide), sprite aspect 858:732, standing on the baseline, centred
   in the gap after the second l */
.kaanu { position: absolute; z-index: 2; pointer-events: none; height: calc(var(--fs) * .78);
  width: calc(var(--fs) * .78 * 858 / 732); left: calc(var(--fs) * var(--k-left, 2.0939));
  top: calc(var(--fs) * var(--k-top, .1014)); }
.kaanu img, .kaanu canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.kaanu canvas { visibility: hidden; }
.kaanu.framed canvas { visibility: visible; }
.kaanu.framed .k-still { visibility: hidden; }
.kaanu .shadow { position: absolute; left: 18%; right: 18%; bottom: 0; height: 7%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / .16), transparent); filter: blur(5px); }
.kaanu.night .shadow { background: radial-gradient(closest-side, rgb(0 0 0 / .5), transparent); }

.below { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 90px);
  align-items: end; margin-top: clamp(20px, 3.6vh, 44px); }
.lede-h { margin: 0; max-width: 33em; font-family: var(--serif); font-weight: 380; font-size: clamp(18px, 1.55vw, 23.5px);
  line-height: 1.42; color: var(--fg2); text-wrap: pretty; }
.lede-h b { font-weight: 520; color: var(--fg); }
.lede-col { display: grid; gap: clamp(10px, 1.6vh, 18px); }
/* the hook (Hari, 8 Oct 2026): the demo's slip in one line, the heard word's r marked */
.hook { margin: 0; max-width: 18em; font-weight: 300; font-size: clamp(26px, 2.9vw, 44px); line-height: 1.08;
  letter-spacing: -.03em; color: var(--fg); text-wrap: balance; }
.hook .slips { position: relative; display: inline-block; font-weight: inherit; color: inherit; }
.hook .slips-mark { left: -.08em; right: -.08em; bottom: -.1em; height: .2em; }
.cta .keep { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--fg); }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; justify-self: end; }
.cta .row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta .price { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--fg2); text-wrap: pretty; }
.cta .price b { color: var(--fg); font-weight: 500; }
.soon { font: 500 11.5px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg3); }

.days { position: absolute; left: var(--gutter-h); right: var(--gutter-h); bottom: calc(env(safe-area-inset-bottom) + 24px);
  z-index: 5; display: flex; align-items: center; gap: 16px; font: 500 11.5px/16px var(--mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--fg3); }
.days .bar { position: relative; flex: 1; height: 1px; background: color-mix(in srgb, var(--fg3) 60%, transparent); }
.days .fill { position: absolute; left: 0; top: -1px; width: 100%; height: 3px; border-radius: 2px; transform-origin: 0 50%;
  background: linear-gradient(90deg, #844BDB, #E0569B 36%, #FF7A52 70%, #FFC08A); }
.days .bead { position: absolute; left: calc(100% - 4.5px); top: -4px; width: 9px; height: 9px; border-radius: 50%;
  background: #FFC08A; box-shadow: 0 0 14px currentColor; color: #FFC08A; }
.days .day { position: absolute; left: 0; bottom: 12px; white-space: nowrap; color: var(--fg2); opacity: 0;
  translate: -50% 0; }

/* the title as the demo: the waveform under the word, the l's marks, the verdict */
.hero-wave { position: absolute; left: 0; top: calc(var(--fs) * .958); height: calc(var(--fs) * .1); width: 100%;
  z-index: 1; pointer-events: none; display: none; }
.word .g { position: relative; }
.l-red, .l-glow { position: absolute; display: block; pointer-events: none; transform-origin: 0 50%; }
.l-red { left: -.01em; right: -.01em; top: .873em; height: .06em; transform: scaleX(0);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 4 Q4 0 8 4 T16 4' fill='none' stroke='%23E10600' stroke-width='1.9'/%3E%3C/svg%3E") repeat-x left center / auto 100%; }
.l-glow { left: 0; right: 0; top: .878em; height: .028em; border-radius: 2px;
  background: linear-gradient(90deg, #844BDB, #E0569B 36%, #FF7A52 70%, #FFC08A); }
.word.back .l-red, .word.back .l-glow { display: none; }            /* wide screens: the front l carries them */
.lede-h .slips { position: relative; display: inline-block; }
.slips-mark { position: absolute; left: 0; right: 0; bottom: -.08em; height: .14em; transform-origin: 0 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 4 Q4 0 8 4 T16 4' fill='none' stroke='%23E10600' stroke-width='1.8'/%3E%3C/svg%3E") repeat-x left center / auto 100%; }
.word .red { color: #FF2D20; }
.wordwrap.ink .red { color: #E10600; }
.eyebrow.slip { color: #FF2D20; }
.eyebrow.slip.ink { color: #E10600; }

/* the still hero (reduced motion, no JavaScript): the morning, whole, not held */
.dawn-fade { height: clamp(48px, 12vh, 140px); background: linear-gradient(#FFE2C8, var(--paper)); }

/* live: held over a long scroll, night at first paint */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .hero-track { height: calc(100vh + 300vh); height: calc(100svh + 300vh); }
  .hero { position: sticky; top: 0; background: #0B0A0D; }
  .hero-view { height: 100vh; height: 100dvh; }
  .sky i:nth-child(1) { opacity: 1; }
  .sky i:nth-child(5) { opacity: 0; }
  .stars { opacity: 1; }
  .glow i:nth-child(1) { opacity: .18; }
  .glow i:nth-child(4) { opacity: 0; }
  .days .fill { transform: scaleX(0); }
  .days .bead { left: -4.5px; }
  .days .bead { background: #844BDB; color: #844BDB; }
  .tone { --fg: #F3F0EC; --fg2: rgb(243 240 236 / .9); --fg3: rgb(243 240 236 / .68); --pill-bg: #F3F0EC; --pill-fg: #121110; }
  .tone.ink { --fg: #000000; --fg2: #3A3631; --fg3: #5E5952; --pill-bg: #000000; --pill-fg: #FDFCFB; }
  .tone, .tone .pill, .tone .wordmark, .tone a { transition: color .45s ease, background-color .45s ease; }
  .hero-wave { display: block; opacity: 0; }
  .l-glow, .slips-mark { transform: scaleX(0); }
  .eyebrow { opacity: 0; transition: color .45s ease, opacity .25s ease; }
  .eyebrow.on { opacity: 1; }
  .sky i, .glow i, .stars { will-change: opacity; }
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) and (max-width: 759px) {
  .hero-track { height: calc(100vh + 240vh); height: calc(100svh + 240vh); }
}

/* the top bar: the section links only where they fit on one line with the name and the button */
@media (max-width: 859px) { .hero-links { display: none; } }

/* phones: Kaanu on top of the word, on its "ear", in front of everything; the word without its gap */
@media (max-width: 759px) {
  .hero { --fs: min(28.5vw, 17vh); --fs: min(28.5vw, 17svh); min-height: 0; }
  .hero-links { display: none; }
  .hero-nav .pill { padding: 0 16px; font-size: 14px; }
  .stage { justify-content: flex-start; }
  .eyebrow { position: absolute; left: var(--gutter-h); right: var(--gutter-h); top: calc(env(safe-area-inset-top) + 84px); margin: 0;
    font-size: 12px; }
  .wordwrap { margin-top: calc(env(safe-area-inset-top) + 112px + var(--fs) * 1.0488); }
  .word .g { margin-right: 0; }
  .word.front { display: none; }
  .word.back .l-red, .word.back .l-glow { display: block; }
  .hero-wave { top: calc(var(--fs) * .93); height: calc(var(--fs) * .085); }
  .soon, .days { font-size: 12px; }
  .kaanu { z-index: 4; height: calc(var(--fs) * 1.45); width: calc(var(--fs) * 1.45 * 858 / 732);
    left: calc(var(--fs) * var(--k-left-p, .6292)); top: calc(var(--fs) * var(--k-top-p, -1.0488)); }
  .below { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 18px; }
  .cta { justify-self: start; }
  .lede-h { font-size: 16.5px; line-height: 1.4; }
  .hook { font-size: 26px; }
  .cta .price, .cta .keep { font-size: 14px; }
  .cta { gap: 10px; }
  .cta .price .more { display: none; }
}
/* short phones: a smaller word and Kaanu, a shorter lede, so the whole hero fits above the browser's bars */
@media (max-width: 759px) and (max-height: 760px) {
  .hero { --fs: min(26vw, 14.5vh); --fs: min(26vw, 14.5svh); }
  .eyebrow { top: calc(env(safe-area-inset-top) + 76px); }
  .wordwrap { margin-top: calc(env(safe-area-inset-top) + 100px + var(--fs) * 1.0488); }
  .lede-h { font-size: 15px; line-height: 1.36; }
  .hook { font-size: 23px; }
  .lede-col { gap: 8px; }
  .below { gap: 14px; margin-top: 12px; }
  .hero .pill.big { min-height: 50px; }
  .cta { gap: 10px; }
  .cta .price .more { display: none; }
}
@media (max-width: 759px) and (max-height: 620px) {
  .cta .keep { display: none; }
}
