/* Day to Day: landing page. Values come from brand/BRAND.md and the app's Theme.swift. */

@font-face { font-family: "Jakarta"; src: url("assets/fonts/PlusJakartaSans-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("assets/fonts/PlusJakartaSans-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("assets/fonts/PlusJakartaSans-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("assets/fonts/PlusJakartaSans-MediumItalic.woff") format("woff"); font-weight: 500; font-style: italic; font-display: swap; }

:root {
  --paper: #FBF7F0;
  --ink: #1F1B16;
  --lead: rgb(31 27 22 / .52);
  --meta: rgb(31 27 22 / .66);
  --ghost: rgb(31 27 22 / .32);
  --rule: rgb(31 27 22 / .20);
  --quiet: rgb(31 27 22 / .16);
  --pill: rgb(31 27 22 / .07);
  --quiet-fill: #ECE7DF;
  --strike: #4B4742;
  --warm-shadow: 0 1px 1px rgb(31 27 22 / .06), 0 10px 24px rgb(150 80 20 / .14);
  --out: cubic-bezier(.23, 1, .32, 1);
  --in-out: cubic-bezier(.77, 0, .175, 1);
  --gutter: clamp(20px, 5.2vw, 76px);
  --max: 1280px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 17px/1.5 "Jakarta", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern";
  overflow-x: clip;
}
a { color: inherit; }
img, svg, canvas { display: block; }
::selection { background: #FFE596; color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Shared type ---------- */

.meta { font: 500 13px/16px "Jakarta"; color: var(--meta); font-variant-numeric: tabular-nums; margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px; font: 600 14px/1 "Jakarta"; color: var(--meta); letter-spacing: 0;
}
.eyebrow::before {
  content: ""; width: 9px; height: 9px; border-radius: 3px;
  background: linear-gradient(155deg, #FFD766, #FFAE7A);
  box-shadow: 0 0 0 3px rgb(255 215 102 / .22);
}
.display {
  margin: 0;
  font: 600 clamp(34px, 4.7vw, 66px)/1.06 "Jakarta";
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.display .lead, h3 .lead { color: var(--lead); }
.body-lg { font: 500 clamp(17px, 1.35vw, 20px)/1.55 "Jakarta"; color: var(--meta); margin: 22px 0 0; max-width: 34em; text-wrap: pretty; }
.section-head { max-width: 860px; }

/* ---------- Buttons ---------- */

.capsule {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  background: #fff; color: var(--ink); text-decoration: none;
  font: 700 15px/1 "Jakarta"; letter-spacing: -0.005em;
  box-shadow: var(--warm-shadow), inset 0 0 0 1px rgb(31 27 22 / .08);
  transition: transform .32s cubic-bezier(.34, 1.4, .64, 1), box-shadow .3s var(--out);
  -webkit-tap-highlight-color: transparent;
}
.capsule:hover { box-shadow: 0 1px 1px rgb(31 27 22 / .06), 0 14px 30px rgb(150 80 20 / .18), inset 0 0 0 1px rgb(31 27 22 / .08); }
.capsule:active { transform: scale(.96); transition-duration: .12s; transition-timing-function: var(--out); }
.capsule-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.capsule-quiet { background: var(--quiet-fill); box-shadow: inset 0 0 0 1px rgb(31 27 22 / .05); cursor: default; }
.capsule-quiet:hover { box-shadow: inset 0 0 0 1px rgb(31 27 22 / .05); }
.text-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font: 700 15px/1 "Jakarta"; text-decoration: none; color: var(--ink);
}
.text-link [data-glyph] svg { width: 16px; height: 16px; transition: transform .4s var(--out); }
@media (hover: hover) and (pointer: fine) { .text-link:hover [data-glyph] svg { transform: translateY(3px); } }

/* ---------- Nav ---------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  height: 68px; padding: 0 var(--gutter);
  transition: background .4s var(--out), box-shadow .4s var(--out), transform .5s var(--out);
}
.nav.is-scrolled {
  background: rgb(251 247 240 / .78);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  box-shadow: 0 1px 0 rgb(31 27 22 / .06);
}
.nav.is-hidden { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 17px/1 "Jakarta"; letter-spacing: -0.02em; }
.brand-mark { width: 26px; height: 27px; overflow: visible; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  font: 600 14px/1 "Jakarta"; color: var(--meta); text-decoration: none; padding: 10px 12px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--pill); }
@media (max-width: 760px) { .nav-links { display: none; } .nav .capsule { margin-left: auto; } }

/* Mark intro: the horizon draws, the sun rises, the day before settles. */
.brand-mark .mark-sun { transform-box: view-box; animation: sunrise 1s .15s var(--out) both; clip-path: inset(0 0 calc(100% - 312px) 0); }
.brand-mark .mark-settled { animation: settle .8s .5s var(--out) both; transform-origin: 312px 334px; }
.brand-mark .mark-horizon { animation: horizon .6s var(--out) both; transform-origin: 312px 323px; }
@keyframes sunrise { from { transform: translateY(312px); } }
@keyframes settle { from { opacity: 0; transform: scaleY(.55); } }
@keyframes horizon { from { opacity: 0; transform: scaleX(0); } }

/* ---------- The sentence ---------- */

.sentence { margin: 0; letter-spacing: -0.0133em; font-weight: 600; font-family: "Jakarta"; }
.sentence-flow { position: relative; }
.sentence .w { display: inline-block; white-space: nowrap; position: relative; color: var(--ink); }
.sentence .w.leaving { position: absolute; pointer-events: none; }
.sentence .w.lead, .sentence .punct { color: var(--lead); }
.sentence .w.muted .t { color: var(--lead); transition: color .35s var(--out); }
.sentence .t { position: relative; transition: color .35s var(--out) .1s; }
.sentence .strike {
  position: absolute; left: -0.03em; right: -0.03em; top: 56%;
  height: calc(2.6em / 30); margin-top: calc(-1.3em / 30);
  border-radius: 99px; background: var(--strike);
  transform: scaleX(0); transform-origin: left center;
  transition-property: transform; transition-timing-function: ease-out;
}
.sentence .strike.cont { right: -0.29em; }
.sentence .is-done .strike { transform: scaleX(1); }
.mark-slot { display: inline-block; width: .92em; height: .92em; margin-right: .18em; vertical-align: -0.1em; }
.mark-slot.plain, .mark-slot.letgo { width: .74em; height: .74em; vertical-align: -0.02em; margin-right: .16em; }
.mark-slot.letgo { color: var(--lead); }
.mark-slot svg { width: 100%; height: 100%; overflow: visible; }
.stk {
  transform: rotate(var(--tilt));
  filter: drop-shadow(0 .02em .01em rgb(23 21 15 / .14)) drop-shadow(0 .12em .07em rgb(23 21 15 / .14));
}
.mark-slot.pop svg { animation: pop .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop { 0% { transform: rotate(var(--tilt)) scale(.4); } 60% { transform: rotate(calc(var(--tilt) + 14deg)) scale(1.18); } 100% { transform: rotate(var(--tilt)) scale(1); } }

.pill {
  display: inline-block; font: inherit; letter-spacing: inherit; color: inherit;
  margin: 0; border: 0; padding: .03em .24em .07em .24em; border-radius: 999px;
  background: var(--pill); line-height: inherit;
  -webkit-tap-highlight-color: transparent;
}
.has-pill > .punct { margin-left: -.1em; }
/* Gaps and height are set from the ink by fitPill() in sentence.js; these are the fallback. */
.pill:focus-visible { border-radius: 999px; }
/* The weather glyph before the word. The chevron's svg also has class gly, so it's reset below. */
.pill > .gly { display: inline-block; width: .74em; height: .74em; vertical-align: -0.04em; margin-right: .16em; }
.pill .chev { display: inline-block; color: var(--lead); margin-left: .14em; }
.pill .chev svg { width: .42em; height: .42em; display: inline-block; margin: 0; vertical-align: .14em; }
.pill.is-interactive { cursor: pointer; transition: background .25s var(--out), transform .3s cubic-bezier(.34, 1.4, .64, 1); }
.pill.is-interactive:hover { background: rgb(31 27 22 / .11); }
.pill.is-interactive:active { transform: scale(.96); transition-duration: .12s; transition-timing-function: var(--out); }
/* Once fitted, the shape is a layer behind the word, sized from the ink (fitPill), so it can be taller than the line. */
.pill.is-fit { padding-top: 0; padding-bottom: 0; position: relative; isolation: isolate; background: transparent; }
.pill.is-fit.is-interactive:hover { background: transparent; }
.pill.is-fit::before {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: var(--pill-top, 0); bottom: var(--pill-bottom, 0);
  border-radius: 999px; background: var(--pill); transition: background .25s var(--out);
}
.pill.is-fit.is-interactive:hover::before { background: rgb(31 27 22 / .11); }
.sentence .w.tok .gly, .sentence .w .mark-slot.plain svg { color: var(--ink); }

/* ---------- 1. Hero ---------- */

/* The hero stays pinned for one screen while the story slides over it, the way
   Before slides over the story. main.js sets its top when it's taller than the screen. */
.hero-pin { position: relative; padding-bottom: 100vh; }
.hero {
  position: sticky; top: 0; min-height: 100svh; display: flex; flex-direction: column;
  padding: 0 var(--gutter); transform-origin: 50% 0;
}
.hero-sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner {
  position: relative; z-index: 1; flex: 1; width: 100%; max-width: var(--max); margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center;
  padding: 128px 0 56px;
}
.hero-date { font-size: 15px; line-height: 1; margin-bottom: clamp(20px, 2.4vw, 30px); opacity: 0; animation: fadeUp .8s .2s var(--out) forwards; }
.sentence-hero {
  font-size: clamp(40px, 7.1vw, 108px);
  line-height: 1.12;
  letter-spacing: -0.032em;
  max-width: 13.2em;
  min-height: 3.36em;
}
.sentence-hero .mark-slot { margin-right: .14em; }
.hero-hint {
  display: inline-flex; align-items: center; gap: 6px; margin: 18px 0 0; height: 20px;
  font: 600 14px/1 "Jakarta"; color: var(--meta);
  opacity: 0; transform: translateY(6px); transition: opacity .5s var(--out), transform .5s var(--out);
}
.hero-hint svg { width: 16px; height: 16px; transform: rotate(-90deg); }
.hero-hint.is-shown { opacity: 1; transform: none; }
.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 48px; flex-wrap: wrap;
  margin-top: clamp(36px, 7vh, 88px);
}
.lede { margin: 0; max-width: 30em; font: 500 clamp(17px, 1.4vw, 20px)/1.55 "Jakarta"; color: var(--meta); text-wrap: pretty; }
.lede b { color: var(--ink); font-weight: 700; }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-foot > * { opacity: 0; animation: fadeUp .9s var(--out) forwards; }
.hero-foot > :first-child { animation-delay: 1.25s; }
.hero-foot > :last-child { animation-delay: 1.35s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* The weather picker (hero, closing) */
.popover {
  position: absolute; z-index: 40; width: min(420px, calc(100vw - 32px));
  padding: 18px 16px 16px; border-radius: 28px;
  background: rgb(255 255 255 / .86);
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 1px 1px rgb(31 27 22 / .06), 0 24px 60px rgb(150 80 20 / .2), inset 0 0 0 1px rgb(31 27 22 / .07);
  transform-origin: var(--ox, 20%) top;
  animation: popIn .22s var(--out);
}
.popover.is-leaving { animation: popOut .15s var(--out) forwards; }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@keyframes popOut { to { opacity: 0; transform: scale(.97) translateY(-3px); } }
.popover-title { margin: 0 6px 14px; font: 600 22px/1.2 "Jakarta"; letter-spacing: -0.015em; }
.grid7 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.wx {
  display: flex; align-items: center; gap: 13px; min-height: 58px; padding: 0 0 0 5px;
  background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 16px;
  -webkit-tap-highlight-color: transparent;
}
.wx-sw { position: relative; flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; }
.wx-sw svg { width: 21px; height: 21px; }
.wx-sw::after { content: ""; position: absolute; inset: -5px; border-radius: 19px; box-shadow: inset 0 0 0 2px var(--ink); opacity: 0; transform: scale(.9); transition: opacity .25s var(--out), transform .4s cubic-bezier(.34, 1.4, .64, 1); }
.wx.is-on .wx-sw::after { opacity: 1; transform: none; }
.wx.is-on .wx-sw svg { animation: glyphPop .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes glyphPop { 35% { transform: scale(1.28) rotate(24deg); } }
.wx-word { display: block; font: 700 18px/1.2 "Jakarta"; letter-spacing: -0.012em; }
.wx-mean { display: block; font: 500 13px/1.3 "Jakarta"; color: var(--meta); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .wx:hover .wx-sw { transform: scale(1.04); } }
.wx-sw { transition: transform .3s cubic-bezier(.34, 1.4, .64, 1); }
.wx:active .wx-sw { transform: scale(.94); }
.dimmed .wx:not(.is-on) .wx-word { color: var(--lead); }

/* ---------- 2. The story ---------- */

.story { position: relative; z-index: 4; margin-top: -100vh; background: var(--paper); height: calc(var(--beats, 12) * 52vh + 240vh); }
.story-stage {
  /* As tall as the screen with the browser's bars hidden (lvh), so the clip edge never shows above the
     screen's bottom and cuts the phone's shadow. The phone itself is sized to fit 100svh (fitPhone). */
  position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(32px, 6vw, 110px);
  padding: 76px var(--gutter) 24px; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  transform-origin: 50% 0;
}
.story-copy { position: relative; display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 3.5vw, 56px); align-items: center; }
.clock { list-style: none; margin: 0; padding: 0 0 0 14px; position: relative; display: grid; gap: 18px; }
.clock::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: repeating-linear-gradient(to bottom, var(--rule) 0 3px, transparent 3px 6px); }
.clock li { font: 600 13px/1 "Jakarta"; color: var(--ghost); font-variant-numeric: tabular-nums; transition: color .4s var(--out); position: relative; white-space: nowrap; }
.clock li::before { content: ""; position: absolute; left: -17.5px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 3px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--rule); transition: background .4s var(--out), box-shadow .4s var(--out), transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.clock li.is-on { color: var(--ink); }
.clock li.is-on::before { background: var(--dot, #FFC94D); box-shadow: inset 0 0 0 1.5px var(--ink); transform: scale(1.2); }
.clock li.is-past::before { background: var(--quiet-fill); }
.steps { position: relative; min-height: 300px; }
.step { position: absolute; inset: 0 auto auto 0; max-width: 470px; pointer-events: none; }
.step h2 { margin: 0; font: 600 clamp(32px, 3.7vw, 52px)/1.08 "Jakarta"; letter-spacing: -0.03em; text-wrap: balance; }
.step p:not(.eyebrow) { margin: 20px 0 0; font: 500 clamp(17px, 1.3vw, 19px)/1.58 "Jakarta"; color: var(--meta); text-wrap: pretty; }
.step > * { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--out), transform .7s var(--out); }
.step.is-on > * { opacity: 1; transform: none; }
.step.is-on > :nth-child(2) { transition-delay: .05s; }
.step.is-on > :nth-child(3) { transition-delay: .1s; }
.step.is-gone > * { opacity: 0; transform: translateY(-14px); transition-duration: .3s; transition-delay: 0s; }

/* The phone */
.phone-wrap { position: relative; width: calc(421px * var(--s, 1)); height: calc(880px * var(--s, 1)); }
.phone {
  position: absolute; left: 0; top: 0; width: 421px; height: 880px; padding: 14px;
  border-radius: 68px; background: #1c1a17;
  transform: scale(var(--s, 1)); transform-origin: 0 0;
  box-shadow:
    inset 0 0 0 1.5px #3a3631, inset 0 0 0 5px #121110,
    0 2px 2px rgb(31 27 22 / .1), 0 30px 60px -10px rgb(150 80 20 / .28), 0 60px 120px -30px rgb(90 50 20 / .3);
}
.phone::before { content: ""; position: absolute; right: -3px; top: 220px; width: 3px; height: 96px; border-radius: 0 2px 2px 0; background: #2a2723; }
.phone::after { content: ""; position: absolute; left: -3px; top: 180px; width: 3px; height: 60px; border-radius: 2px 0 0 2px; background: #2a2723; box-shadow: 0 80px 0 #2a2723; }
.screen { position: relative; width: 393px; height: 852px; border-radius: 55px; overflow: hidden; background: var(--paper); isolation: isolate; }
.phone-sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.island { position: absolute; left: 50%; top: 11px; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; background: #000; z-index: 3; }
.status { position: absolute; inset: 0 0 auto; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 4px 34px 0 52px; font: 600 16px/1 "Jakarta"; letter-spacing: -0.01em; z-index: 2; font-variant-numeric: tabular-nums; }
.status-icons { display: flex; gap: 7px; align-items: center; }
.status-icons svg:first-child { width: 18px; height: 12px; }
.status-icons svg:last-child { width: 27px; height: 13px; }
.app-chrome { position: absolute; top: 54px; left: 18px; right: 18px; height: 44px; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.app-chrome [data-glyph] { width: 44px; height: 44px; display: grid; place-items: center; }
.app-chrome svg { width: 24px; height: 24px; }
.app-body { position: absolute; top: 114px; left: 28px; right: 28px; z-index: 2; }
.app-date { transition: opacity .3s; }
.sentence-phone { margin-top: 14px; font-size: 30px; line-height: 38px; letter-spacing: -0.4px; }
.app-meta { margin-top: 18px; min-height: 16px; transition: opacity .4s var(--out); }
.app-rule { height: 1px; margin: 18px 0 16px; background: linear-gradient(to right, var(--rule) 3px, transparent 3px) 0 0 / 6px 1px repeat-x; transition: opacity .4s var(--out), transform .6s var(--out); transform-origin: left; }
.app-evening { transition: opacity .45s var(--out), transform .6s var(--out); }
.app-evening.is-hidden, .app-rule.is-hidden, .app-meta.is-hidden { opacity: 0; }
.app-evening.is-hidden { transform: translateY(8px); }
.reflection { margin: 0; font: italic 500 20px/27px "Jakarta"; letter-spacing: -0.01em; color: var(--ink); min-height: 27px; }
.reflection .placeholder { color: var(--ghost); }
.reflection.has-text .placeholder { display: none; }
.reflection .typed:not(:empty)::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.12em; background: var(--ink); animation: caret 1s steps(1) infinite; }
.reflection.is-settled .typed::after { display: none; }
@keyframes caret { 50% { opacity: 0; } }
.ending { margin: 16px 0 0; font: 600 19px/27px "Jakarta"; letter-spacing: -0.01em; color: var(--lead); }
.ending .pill { color: var(--ink); }
.ending .chev svg { display: inline-block; width: 9px; height: 9px; vertical-align: 2px; }
.ending > .chev { display: inline-block; margin-left: 2px; }
.add {
  position: absolute; left: 50%; bottom: 34px; width: 56px; height: 56px; margin-left: -28px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; z-index: 3;
  box-shadow: var(--warm-shadow), inset 0 0 0 1px rgb(31 27 22 / .08);
  transition: transform .5s cubic-bezier(.34, 1.4, .64, 1), opacity .3s;
}
.add svg { width: 24px; height: 24px; }
.add.is-hidden { transform: translateY(120px); }
.home-bar { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: var(--ink); z-index: 4; }

/* The compose sheet: how does today feel? */
.picker {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3;
  padding: 22px 16px 26px; border-radius: 44px 44px 46px 46px;
  background: rgb(255 255 255 / .94);
  box-shadow: 0 1px 1px rgb(31 27 22 / .05), 0 -10px 40px rgb(150 80 20 / .1), inset 0 0 0 1px rgb(31 27 22 / .06);
  transform: translateY(105%); transition: transform .6s var(--out);
}
.picker.is-up { transform: none; }
.picker .grid7 { gap: 14px 10px; }

/* ---------- The band between Today and Before ---------- */

.band { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 20; pointer-events: none; opacity: 0; }

/* ---------- 3. Before ---------- */

.before {
  position: relative; z-index: 5; margin-top: -100vh;
  background: var(--paper);
  padding: clamp(110px, 16vh, 180px) var(--gutter) clamp(80px, 12vh, 140px);
}
.before > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.before-head { margin-bottom: clamp(44px, 7vh, 72px); }
.before-head .body-lg { max-width: 38em; }
.before-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(32px, 5vw, 88px); align-items: start; }
.calendar { display: grid; gap: 44px; }
.month h3 { margin: 0; font: 700 26px/30px "Jakarta"; letter-spacing: -0.02em; }
.month .meta { margin-top: 6px; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(6px, .9vw, 12px); margin-top: 18px; max-width: 560px; }
.wd { font: 600 11px/16px "Jakarta"; color: var(--meta); text-align: center; padding-bottom: 2px; }
.cell {
  position: relative; aspect-ratio: 1; border: 0; padding: 0; margin: 0; cursor: pointer;
  border-radius: 31%; background: transparent; font: 700 12px/1 "Jakarta"; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  transition: transform .4s cubic-bezier(.34, 1.4, .64, 1), box-shadow .3s var(--out);
}
.cell .n { position: absolute; left: 22%; top: 20%; font-variant-numeric: tabular-nums; }
.cell.dark .n { color: #fff; }
.cell.quiet { box-shadow: inset 0 0 0 1.5px var(--quiet); cursor: default; }
.cell.quiet .n { color: var(--meta); }
.cell.blank { visibility: hidden; }
.cell.written::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: .18; mix-blend-mode: soft-light; pointer-events: none; }
.cell.is-sel { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.cell.today { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.cell.today.is-sel { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink), 0 8px 20px rgb(150 80 20 / .25); }
.calendar .cell { opacity: 0; transform: scale(.7); }
.calendar.is-in .cell { opacity: 1; transform: none; transition: opacity .5s var(--out) var(--d, 0s), transform .7s cubic-bezier(.34, 1.4, .64, 1) var(--d, 0s), box-shadow .3s; }
.calendar.is-settled .cell { transition: transform .22s var(--out), box-shadow .3s var(--out); }
@media (hover: hover) and (pointer: fine) { .calendar.is-settled .cell.written:hover { transform: scale(1.08); z-index: 1; } }
.month-end { margin-top: 14px; font: 600 13px/1 "Jakarta"; color: var(--meta); display: flex; align-items: center; gap: 6px; }

.dayview {
  position: sticky; top: 104px; overflow: hidden; border-radius: 32px; min-height: 520px;
  background: #fff;
  box-shadow: 0 1px 1px rgb(31 27 22 / .05), 0 24px 60px -16px rgb(150 80 20 / .22), inset 0 0 0 1px rgb(31 27 22 / .06);
}
.dayview-sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.dayview-inner { position: relative; padding: 30px 30px 150px; }
.sentence-day { margin-top: 12px; font-size: 26px; line-height: 34px; letter-spacing: -0.35px; }
.reflection-past { margin-top: 22px; color: var(--ink); font-size: 19px; line-height: 26px; }
.reflection-past:empty { display: none; }
.reflection-past::before { content: "“"; }
.reflection-past::after { content: "”"; }
.lookback { margin-top: 24px; }
.lookback:empty { display: none; }
.lookback h4 { margin: 0 0 6px; font: 700 13px/16px "Jakarta"; color: var(--ink); }
.lookback p { margin: 0; font: 500 16px/1.45 "Jakarta"; color: var(--ink); }
.lookback p i { font-style: normal; color: var(--meta); margin-right: 6px; }
.dayview-inner > * { transition: opacity .3s var(--out), transform .5s var(--out); }
.dayview.is-swapping .dayview-inner > :not(.sentence-day) { opacity: 0; transform: translateY(6px); }

.legend { list-style: none; padding: 0; margin-top: 40px !important; display: flex; gap: 28px; flex-wrap: wrap; }
.legend li { display: flex; align-items: center; gap: 10px; font: 500 15px/1.3 "Jakarta"; color: var(--meta); }
.legend b { color: var(--ink); font-weight: 700; }
.cell-mini { display: inline-block; width: 22px; height: 22px; border-radius: 7px; flex: none; }
.cell-mini.quiet { box-shadow: inset 0 0 0 1.5px var(--quiet); }
.cell-mini.today { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }

/* ---------- 4. Seven weathers ---------- */

.weathers { padding: clamp(80px, 12vh, 140px) var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.weather-row { display: flex; gap: 10px; height: clamp(320px, 52vh, 520px); margin-top: clamp(40px, 6vh, 64px); }
.wcard {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: 30px; border: 0; padding: 0; cursor: pointer;
  font: inherit; text-align: left; color: var(--ink);
  transition: flex-grow .7s var(--out), transform .5s var(--out);
  -webkit-tap-highlight-color: transparent;
  opacity: 0; transform: translateY(40px);
}
.weather-row.is-in .wcard { opacity: 1; transform: none; transition: flex-grow .7s var(--out), transform .9s var(--out) var(--d), opacity .6s var(--out) var(--d); }
.wcard.is-open { flex-grow: 3.2; }
.wcard.dark { color: #fff; }
.wcard .wbg { position: absolute; inset: 0; transition: transform 1.2s var(--out); }
@media (hover: hover) and (pointer: fine) { .wcard:hover .wbg { transform: scale(1.04); } }
.wcard .grain { position: absolute; inset: 0; opacity: .22; mix-blend-mode: soft-light; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
.wcard .winner { position: absolute; left: 22px; bottom: 22px; width: 300px; max-width: calc(100% - 44px); }
.wcard:not(.is-open) .winner { max-width: none; }
.wcard .wglyph svg { width: 30px; height: 30px; }
.wcard .wname { display: block; margin-top: 14px; font: 700 22px/1.1 "Jakarta"; letter-spacing: -0.02em; white-space: nowrap; }
.wcard .wmean { display: block; margin-top: 6px; font: 500 15px/1.35 "Jakarta"; opacity: .72; white-space: nowrap; transition: opacity .4s var(--out); }
.wcard .wline { display: block; margin-top: 14px; max-height: 0; overflow: hidden; font: 600 17px/1.35 "Jakarta"; letter-spacing: -0.01em; max-width: 18em; opacity: 0; transform: translateY(8px); transition: opacity .4s var(--out), transform .6s var(--out); white-space: normal; }
.wcard .wline .lead { opacity: .62; }
.wcard.is-open .wline { opacity: 1; transform: none; max-height: 5em; transition-delay: .18s; }
.wcard:not(.is-open) .wmean { opacity: 0; }
@media (min-width: 900px) { .wcard:not(.is-open) .wname { font-size: 18px; } }

/* ---------- 5. Widgets and nudges ---------- */

.glance { padding: clamp(80px, 12vh, 140px) var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.glance-stage {
  position: relative; margin-top: clamp(40px, 6vh, 64px); height: clamp(560px, 78vh, 720px);
  border-radius: 40px; overflow: hidden; background: #F4EEE4;
  box-shadow: inset 0 0 0 1px rgb(31 27 22 / .05);
}
.glance-sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.glance-stage > :not(canvas) { position: absolute; will-change: transform; }
.lock { left: 7%; top: 9%; color: var(--ink); }
.lock-date { margin: 0 0 0 6px; font: 600 19px/1 "Jakarta"; color: var(--meta); }
.lock-time { margin: 2px 0 0; font: 700 clamp(84px, 9vw, 128px)/1 "Jakarta"; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.lock-widget {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 18px 12px 14px; border-radius: 22px;
  background: rgb(255 255 255 / .42); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  font: 600 15px/1.3 "Jakarta"; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .5);
}
.lock-widget .dim { color: var(--meta); font-weight: 500; }
.lock-glyph svg { width: 26px; height: 26px; }
.widget {
  right: 6%; top: 10%; width: min(400px, 44%); min-height: 188px; padding: 20px 22px 22px; border-radius: 30px; overflow: hidden;
  background: #FFFDF8; box-shadow: 0 2px 4px rgb(31 27 22 / .05), 0 30px 60px -20px rgb(150 80 20 / .35);
}
.widget-sky { position: absolute; inset: 0; border-radius: inherit; }
.widget > :not(.widget-sky) { position: relative; }
.sentence-widget { margin-top: 8px; font-size: 21px; line-height: 27px; letter-spacing: -0.3px; }
.sentence-widget .w.tok { cursor: pointer; }
.widget-tip { margin: 14px 0 0; font: 600 12px/1 "Jakarta"; color: var(--meta); }
.note {
  width: min(380px, 42%); padding: 14px 16px 16px; border-radius: 26px;
  background: rgb(255 255 255 / .72); -webkit-backdrop-filter: blur(26px) saturate(1.5); backdrop-filter: blur(26px) saturate(1.5);
  box-shadow: 0 1px 1px rgb(31 27 22 / .05), 0 24px 50px -18px rgb(90 50 20 / .35), inset 0 0 0 1px rgb(255 255 255 / .5);
  font: 500 15px/1.35 "Jakarta";
}
.note p { margin: 0; }
.note .dim { color: var(--meta); }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 600 13px/1 "Jakarta"; color: var(--meta); }
.note-head b { color: var(--ink); font-weight: 600; text-transform: none; }
.note-head span { margin-left: auto; }
.note-icon { width: 22px; height: 22px; padding: 3px; border-radius: 6px; background: var(--paper); box-shadow: inset 0 0 0 .5px rgb(31 27 22 / .1); overflow: visible; }
.note-title { font-weight: 700; }
.note-morning { left: 8%; bottom: 9%; }
.note-timed { right: 8%; bottom: 13%; width: min(340px, 36%); }
.note-weathers { display: flex; gap: 6px; margin-top: 12px; }
.note-weathers span { flex: 1; aspect-ratio: 1; border-radius: 30%; display: grid; place-items: center; }
.note-weathers svg { width: 46%; height: 46%; }

/* ---------- 6. Small on purpose ---------- */

.small { padding: clamp(80px, 12vh, 140px) var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.tenets { list-style: none; margin: clamp(40px, 6vh, 64px) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 5vw, 80px); }
.tenet { position: relative; padding: 34px 0 40px 68px; background: linear-gradient(to right, var(--rule) 3px, transparent 3px) 0 0 / 6px 1px repeat-x; }
.tenet h3 { margin: 0; font: 600 clamp(24px, 2.3vw, 32px)/1.18 "Jakarta"; letter-spacing: -0.025em; text-wrap: balance; }
.tenet p { margin: 12px 0 0; color: var(--meta); font: 500 17px/1.55 "Jakarta"; max-width: 30em; }
.tenet-glyph { position: absolute; left: 0; top: 34px; width: 44px; height: 44px; }
.tenet-glyph svg { width: 100%; height: 100%; overflow: visible; }
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--out), transform 1s var(--out); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal] .tenet-glyph svg { transform: rotate(var(--tilt)) scale(.3); opacity: 0; transition: transform .7s cubic-bezier(.34, 1.56, .64, 1) .25s, opacity .3s .25s; }
[data-reveal].is-in .tenet-glyph svg { transform: rotate(var(--tilt)); opacity: 1; }

/* ---------- 7. Closing ---------- */

.closing { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px var(--gutter) 16vh; }
.closing-sky { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + var(--foot-h, 0px)); }
.closing-inner { position: relative; width: 100%; max-width: var(--max); margin: 0 auto; }
.sentence-closing { font-size: clamp(44px, 8vw, 120px); line-height: 1.1; letter-spacing: -0.034em; }
.closing .body-lg { max-width: 28em; }
.closing .hero-actions { margin-top: 34px; }

/* The beta form: one white pill holding the field and the button. */
.join { margin-top: 34px; max-width: 480px; }
.join-field {
  position: relative; display: flex; align-items: center; gap: 6px;
  height: 60px; padding: 6px 6px 6px 22px; border-radius: 999px;
  background: #fff; box-shadow: var(--warm-shadow), inset 0 0 0 1px rgb(31 27 22 / .08);
  transition: box-shadow .3s var(--out);
}
.join-field:focus-within { box-shadow: var(--warm-shadow), inset 0 0 0 2px var(--ink); }
.join-field input {
  flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: none; outline: none;
  font: 500 17px/1 "Jakarta"; color: var(--ink);
}
.join-field input::placeholder { color: var(--ghost); }
.join-field .capsule { height: 48px; padding: 0 22px; background: var(--ink); color: #fff; box-shadow: none; cursor: pointer; border: 0; flex: none; }
.join-field .capsule:hover { box-shadow: 0 8px 20px rgb(31 27 22 / .22); }
.join-field .capsule:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.join.is-sending .capsule { opacity: .6; pointer-events: none; }
.join-done {
  position: absolute; inset: 0; margin: 0; display: flex; align-items: center; padding: 0 24px;
  font: 700 17px/1 "Jakarta"; opacity: 0; pointer-events: none;
  transition: opacity .3s var(--out) .12s;
}
.join-field input, .join-field .capsule { transition: opacity .2s var(--out), transform .32s cubic-bezier(.34, 1.4, .64, 1), box-shadow .3s var(--out); }
.join.is-done .join-field input, .join.is-done .join-field .capsule { opacity: 0; pointer-events: none; }
.join.is-done .join-done { opacity: 1; }
.join.is-done .join-field { box-shadow: var(--warm-shadow), inset 0 0 0 1px rgb(31 27 22 / .08); }
.join-done:focus { outline: none; }
.join-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.join-note { margin: 14px 0 0 22px; font: 500 14px/1.45 "Jakarta"; color: var(--meta); text-wrap: pretty; }
.join-note.is-error { color: var(--ink); font-weight: 700; }
@media (max-width: 480px) {
  .join-field { height: 56px; padding-left: 18px; }
  .join-field .capsule { height: 44px; padding: 0 16px; font-size: 14px; }
  .join-note { margin-left: 18px; }
}

/* ---------- Footer ---------- */

.footer {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 28px;
  padding: 36px var(--gutter) 44px; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  position: relative; z-index: 1;
}
/* The footer sits on the closing sky, which can be any of the seven weathers, so every line stays
   near full ink (or near white on rainy and stormy) to keep at least 4.5:1 on the sky behind it. */
.footer-line { margin: 0; color: rgb(31 27 22 / .84); font-weight: 500; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.footer-links a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ink); font-weight: 600; font-size: 15px;
  text-decoration: underline; text-decoration-color: rgb(31 27 22 / .3); text-decoration-thickness: 1.5px; text-underline-offset: .25em;
  transition: text-decoration-color .2s var(--out);
}
.footer-links a:hover { text-decoration-color: currentColor; }
.footer-small { grid-column: 1 / -1; margin: 2px 0 0; font-size: 14px; color: rgb(31 27 22 / .8); }
.footer-small a { color: inherit; text-underline-offset: .2em; padding: 12px 0; }
/* Rainy and stormy skies run from deep blue to light teal under the footer, too light in places for
   white text. A soft wash, faded in from the top, keeps white at 4.5:1 or more. */
.footer::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: linear-gradient(180deg, rgb(12 16 34 / 0) 0%, rgb(12 16 34 / .34) 32%, rgb(12 16 34 / .38) 100%);
  opacity: 0; transition: opacity .6s var(--out); pointer-events: none;
}
.footer.on-dark::before { opacity: 1; }
.footer.on-dark { color: #fff; }
.footer.on-dark .footer-line, .footer.on-dark .footer-small { color: rgb(255 255 255 / .9); }
.footer.on-dark .footer-links a { color: #fff; text-decoration-color: rgb(255 255 255 / .45); }
.footer.on-dark .footer-links a:hover { text-decoration-color: #fff; }
.footer.on-dark :focus-visible { outline-color: #fff; }

/* ---------- Smaller screens ---------- */

@media (max-width: 980px) {
  .story-stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; justify-items: center; padding-top: 80px; gap: 14px; }
  .story-copy { grid-template-columns: 1fr; width: 100%; max-width: 560px; }
  .clock { display: flex; gap: 6px; padding: 0; }
  .clock::before { display: none; }
  .clock li { font-size: 12px; padding: 7px 10px; border-radius: 999px; background: transparent; transition: color .4s, background .4s; }
  .clock li::before { display: none; }
  .clock li.is-on { background: var(--pill); }
  .steps { min-height: 0; }
  .step h2 { font-size: clamp(26px, 6vw, 34px); }
  .step p:not(.eyebrow) { margin-top: 10px; font-size: 16px; line-height: 1.5; }
  .step .eyebrow { display: none; }
  .phone-wrap { align-self: start; }
  .before-grid { grid-template-columns: 1fr; }
  .dayview { position: relative; top: 0; min-height: 0; }
  .glance-stage { height: auto; padding: 28px 18px; display: grid; gap: 16px; justify-items: center; }
  .glance-stage > :not(canvas) { position: relative; inset: auto; width: 100%; max-width: 420px; }
  .lock { text-align: center; padding: 10px 0 6px; }
  .tenets { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; justify-items: start; }
}
@media (max-width: 640px) {
  .clock li:not(.is-on) { display: none; }
  .weather-row { flex-direction: column; height: auto; }
  .wcard { flex: none; height: 76px; transition: height .6s var(--out); }
  .wcard.is-open { height: 230px; }
  .wcard .winner { bottom: 18px; }
  .wcard:not(.is-open) .winner { display: flex; align-items: center; gap: 12px; bottom: 50%; transform: translateY(50%); }
  .wcard:not(.is-open) .wname { margin: 0; }
  .wcard:not(.is-open) .wmean { opacity: .72; margin: 0 0 0 auto; }
  .tenet { padding-left: 0; padding-top: 86px; }
  .hero-inner { padding-top: 108px; }
  .sentence-hero { min-height: 4.5em; }
  .popover { left: 16px !important; }
}

/* ---------- Text pages: privacy and support ---------- */

.doc-nav { position: static; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.doc {
  max-width: calc(680px + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(40px, 9vw, 96px) var(--gutter) 72px;
}
.doc h1 { margin: 0; font: 700 clamp(40px, 7vw, 64px)/1.05 "Jakarta"; letter-spacing: -0.035em; text-wrap: balance; }
.doc-meta { margin: 14px 0 0; font-size: 15px; color: var(--meta); }
.doc-lead { margin: 32px 0 0; font: 600 clamp(20px, 2.6vw, 24px)/1.45 "Jakarta"; letter-spacing: -0.015em; text-wrap: pretty; }
.doc h2 { margin: 56px 0 0; font: 700 24px/1.25 "Jakarta"; letter-spacing: -0.02em; text-wrap: balance; }
.doc h3 { margin: 32px 0 0; font: 700 18px/1.35 "Jakarta"; letter-spacing: -0.01em; }
.doc p, .doc ul { margin: 12px 0 0; text-wrap: pretty; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 8px; }
.doc li::marker { color: var(--ghost); }
.doc strong { font-weight: 700; }
.doc a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: rgb(31 27 22 / .3); text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
.doc a:hover { text-decoration-color: currentColor; }
.doc-path { font-weight: 600; white-space: nowrap; }
.doc-mail {
  display: inline-flex; align-items: center; min-height: 52px; margin-top: 20px; padding: 0 26px; border-radius: 999px;
  background: var(--ink); color: var(--paper) !important; text-decoration: none !important; font: 700 16px/1 "Jakarta";
}
.doc-rule { border: 0; border-top: 1.5px dashed var(--rule); margin: 56px 0 0; }
.doc + .footer { border-top: 1px solid rgb(31 27 22 / .06); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .2s !important; transition-delay: 0s !important; }
  .band { display: none; }
  .step > *, .step.is-gone > *, [data-reveal], .calendar .cell, .calendar.is-settled .cell.written:hover,
  .wcard, .wcard .wline, .hero-hint, .app-evening.is-hidden, .add.is-hidden, .wcard:hover .wbg, .wx:hover .wx-sw { transform: none !important; }
  [data-reveal] .tenet-glyph svg { transform: rotate(var(--tilt)) !important; }
  .add.is-hidden { opacity: 0; }
  .picker { transform: none; opacity: 0; transition: opacity .2s; }
  .picker.is-up { opacity: 1; }
}
