/* fester — Almanac Luminous, for the web. Tokens follow the app spec
   (App/docs/superpowers/specs/2026-09-26-almanac-luminous-redesign-design.md, section 3). */

:root {
  --paper: #F3EBDD;
  --ivory: #FAF6EE;
  --ink: #1C1712;
  --ink2: #4A4036;
  --ink3: #6F6457;
  --hair: rgba(28, 23, 18, 0.12);
  --accent: #B3261E;          /* sindoor: the one action colour */
  --accent-ink: #FAF6EE;      /* text on the accent */
  --accent-text: #B3261E;     /* accent used as text */
  --gold: #A8843C;
  --gold-leaf: #D8B45E;
  --gold-text: #8C6A2C;     /* gold as large text by day: 4.21:1 on paper */
  --shade: #1A2140;           /* the unlit side of the Moon */
  --halo: rgba(216, 180, 94, 0.28);
  --grain: url("assets/grain-day.png");
  --shadow: 0 8px 24px rgba(28, 23, 18, 0.06), 0 1px 2px rgba(28, 23, 18, 0.05);

  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --f-deva: "Tiro Devanagari Sanskrit", "Kohinoor Devanagari", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

:root[data-theme="night"] .bar.is-solid { background-color: rgb(22 28 51 / 0.92); }
:root[data-theme="night"] {
  --paper: #161C33;
  --ivory: #1E2542;
  --ink: #E6E0D3;
  --ink2: #B9B3A6;
  --ink3: #9A8D7C;
  --hair: rgba(230, 224, 211, 0.14);
  --accent: #B3261E;
  --accent-ink: #F4EFE4;
  --accent-text: #E48A67;     /* ember: sindoor is never text at night */
  --gold: #C9A85C;
  --gold-leaf: #C9A85C;
  --gold-text: #C9A85C;
  --shade: #10152A;
  --halo: rgba(201, 168, 92, 0.10);
  --grain: url("assets/grain-night.png");
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.2);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain);
  background-size: 256px 256px;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

/* ---------- Type ---------- */
.deva { font-family: var(--f-deva); font-weight: 400; line-height: 1.45; padding-top: 0.12em; }
.deva-xl { font-size: clamp(48px, min(6.4vw, 7.4vh), 100px); line-height: 1.2; letter-spacing: 0; }
.deva-l { font-size: clamp(40px, 5.2vw, 72px); line-height: 1.35; }
.deva-head { font-size: clamp(30px, 3.2vw, 44px); color: var(--gold-text); line-height: 1.3; margin-bottom: 10px; }

.latin-l {
  font-family: var(--f-display); font-variation-settings: "opsz" 72, "SOFT" 50;
  font-weight: 400; font-size: clamp(26px, 2.8vw, 38px); line-height: 1.2; letter-spacing: -0.01em;
}
.latin-m {
  font-family: var(--f-display); font-variation-settings: "opsz" 48, "SOFT" 50;
  font-weight: 400; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.25;
}

.h2 {
  font-family: var(--f-display); font-variation-settings: "opsz" 144, "SOFT" 30;
  font-weight: 360; font-size: clamp(38px, 5.4vw, 80px); line-height: 1.04; letter-spacing: -0.022em;
  text-wrap: balance; max-width: 16ch;
}
.h3 {
  font-family: var(--f-display); font-variation-settings: "opsz" 60, "SOFT" 40;
  font-weight: 420; font-size: clamp(28px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -0.01em;
}
.body { color: var(--ink2); max-width: 36em; font-size: clamp(17px, 1.3vw, 19px); text-wrap: pretty; }
.fine { color: var(--ink3); font-size: 15px; line-height: 1.5; max-width: 60em; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.bar.is-solid {
  background-color: rgb(243 235 221 / 0.92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--hair);
}

.wordmark {
  font-family: var(--f-display); font-variation-settings: "opsz" 144, "SOFT" 100;
  font-weight: 380; font-size: 30px; letter-spacing: -0.03em; line-height: 1; text-decoration: none;
  padding: 6px 0; display: inline-flex; align-items: center; gap: 10px;
}
.nav { display: flex; justify-content: center; gap: clamp(16px, 2.4vw, 36px); }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink2);
  padding: 12px 2px; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
.nav a[aria-current="true"] { color: var(--ink); }

.toggle {
  display: inline-flex; padding: 3px; border-radius: 999px; gap: 2px;
  background: var(--ivory); box-shadow: inset 0 0 0 1px var(--hair);
}
.toggle-btn {
  width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--ink2); transition: background-color 0.3s, color 0.3s;
}
.toggle-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
:root[data-theme="day"] .toggle-btn[data-set="day"],
:root[data-theme="night"] .toggle-btn[data-set="night"] { background: var(--ink); color: var(--paper); }

/* ---------- The Moon ---------- */
.moon-wrap { position: relative; display: grid; place-items: center; }
.moon { width: 100%; height: auto; overflow: visible; }
.moon .ring-seg { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: butt; }
.moon .ring-seg.is-future { stroke-opacity: 0.35; }
.moon .ring-seg.is-today { stroke: var(--accent); stroke-width: 9; stroke-opacity: 1; }
.moon .shade { opacity: 0.95; }
.moon .rim { fill: none; stroke: var(--gold); stroke-opacity: 0.6; stroke-width: 1; }
.moon .halo-stop-0 { stop-color: var(--halo); }
.moon .halo-stop-1 { stop-color: var(--halo); stop-opacity: 0; }
:root[data-theme="night"] .moon .rim { stroke: #E6E0D3; stroke-opacity: 0.45; }

.moon.nav-ring { width: 28px; height: 28px; flex: none; }
.moon.nav-ring .ring-seg { stroke-width: 24; }
.moon.nav-ring .ring-seg.is-today { stroke-width: 36; }

/* ---------- Hero ---------- */
.hero {
  display: grid; justify-items: center; text-align: center;
  padding: clamp(92px, 12vh, 124px) var(--gutter) 72px;
  gap: 0;
}
.hero-date {
  display: grid; gap: 2px; font-family: var(--f-display); font-variation-settings: "opsz" 36;
  font-size: 19px; font-weight: 450; color: var(--ink);
}
.hero-star { font-family: var(--f-body); font-size: 15px; font-weight: 400; color: var(--ink3); }
.hero-moon { width: clamp(230px, min(32vw, 33vh), 400px); margin-top: clamp(8px, 1.5vh, 24px); }
.hero-reading { margin-top: clamp(4px, 1vh, 12px); display: grid; justify-items: center; }
.hero-facts { margin-top: 10px; color: var(--ink2); font-size: 17px; }
.hero-title {
  margin-top: clamp(22px, 3.4vh, 56px);
  font-family: var(--f-display); font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 60;
  font-weight: 320; font-size: clamp(40px, min(5.8vw, 6.4vh), 92px); line-height: 1.02; letter-spacing: -0.028em;
  max-width: 14ch; text-wrap: balance;
}
.hero-lede { margin-top: 18px; max-width: 34em; color: var(--ink2); font-size: clamp(17px, 1.4vw, 20px); text-wrap: pretty; }
.cta-row { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-note { margin-top: 18px; color: var(--ink3); font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 0 26px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform 0.25s var(--ease), background-color 0.25s, box-shadow 0.25s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(179, 38, 30, 0.22); }
.btn-primary:hover { transform: translateY(-1px); background: #9F1F18; }
.btn-quiet { color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair); background: color-mix(in srgb, var(--ivory) 60%, transparent); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.btn-static { cursor: default; }
.btn-static:hover { transform: none; background: var(--accent); }

/* ---------- Month (pinned scrub) ---------- */
.month { position: relative; }
.month-pin {
  width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(24px, 5vw, 80px);
  padding-block: 24px;
}
.month-copy .body { margin-top: 22px; }
.month-today { color: var(--ink); }
.month-today strong { color: var(--accent-text); font-weight: 600; }
.month-stage { display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 8px; }
.month-moon { width: clamp(260px, 38vw, 500px); }
.month-readout { display: grid; justify-items: center; min-height: 11.5em; }
.month-count { margin-top: 6px; color: var(--ink2); font-size: 17px; }
.month-half { display: block; margin-top: 2px; }
.month-count .num { color: var(--ink); }
.month-half { color: var(--ink3); font-size: 15px; }

/* ---------- Sections ---------- */
.day, .sky, .intent, .calendar, .plus { padding-block: clamp(72px, 9vh, 120px); }
.day { padding-top: 56px; }
.sec-head { display: grid; gap: 0; margin-bottom: clamp(48px, 7vh, 88px); }
.sec-head .body { margin-top: 22px; }

.facts { margin-top: 24px; display: grid; gap: 12px; color: var(--ink2); }
.facts li { padding-left: 26px; position: relative; max-width: 34em; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid var(--gold);
}

.device-screen {
  width: 100%; border-radius: clamp(26px, 3vw, 40px); background: var(--ivory);
  box-shadow: 0 24px 60px rgba(28, 23, 18, 0.10), 0 0 0 1px rgba(28, 23, 18, 0.12);
}


/* ---------- Motion ---------- */
.moon .comet { fill: none; stroke: #D8B45E; stroke-width: 12; stroke-linecap: round; opacity: 0;
  filter: drop-shadow(0 0 6px rgba(216, 180, 94, 0.85)); }
.wipe { -webkit-mask-image: linear-gradient(90deg, #000 var(--wipe, 112%), transparent calc(var(--wipe, 112%) + 12%));
  mask-image: linear-gradient(90deg, #000 var(--wipe, 112%), transparent calc(var(--wipe, 112%) + 12%)); }
.month-today { color: var(--ink3); transition: color 0.4s ease; }
.month-today.is-held { color: var(--ink); }
.nav a { transition: opacity 0.2s linear; }
.moon.nav-ring .comet { display: none; }
.hero-moon { position: relative; z-index: 30; will-change: transform; }
.split-line { padding-bottom: 0.06em; }
.month-pin { position: relative; isolation: isolate; }
.month-pin::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -12vh 0; background: radial-gradient(42% 48% at 74% 52%, var(--month-sky, transparent), transparent 72%);
}
:root[data-theme="night"] .month-pin::before { opacity: 0.45; }
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color 1s ease, color 1s ease, border-color 1s ease, fill 1s ease, stroke 1s ease, box-shadow 1s ease !important;
}

/* Sky */
.sky-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.sky-ring-wrap { text-align: center; }
.sky-ring-note { color: var(--ink3); font-size: 15px; margin-top: 4px; text-align: left; max-width: 22em; }
.sky-text .body { margin-top: 22px; }
.sky-live { color: var(--ink); }

.nak-ring { width: 100%; height: auto; overflow: visible; }
.nak-ring .nk-tick { stroke: var(--gold); stroke-width: 1; }
.nak-ring .nk-circle { fill: none; stroke: var(--gold); stroke-width: 1; stroke-opacity: 0.6; }
.nak-ring .nk-label { font-family: var(--f-deva); font-size: 15px; fill: var(--ink2); }
.sky-ring-wrap { position: relative; }
.nowrap { white-space: nowrap; }
.nak-ring .nk-latin { font-family: var(--f-body); font-size: 12px; fill: var(--accent-text); font-weight: 600; }
.nak-ring .nk-today .nk-label { fill: var(--accent-text); }
.nak-ring .nk-today .nk-latin { fill: var(--accent-text); }
.nak-ring .nk-marker { fill: var(--accent); }
.nak-ring .nk-center-deva { font-family: var(--f-deva); font-size: 44px; fill: var(--ink); text-anchor: middle; }
.nak-ring .nk-center-latin { font-family: var(--f-display); font-size: 20px; fill: var(--ink2); text-anchor: middle; }
.nak-ring .nk-center-note { font-family: var(--f-body); font-size: 13px; fill: var(--ink3); text-anchor: middle; }

/* Intentions */
.intent-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px);
  grid-template-areas: "text shot" "phases shot"; align-items: start;
}
.intent-text { grid-area: text; }
.intent-text .body { margin-top: 22px; }
.phases { grid-area: phases; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 8px; counter-reset: ph; }
.phases li { display: grid; gap: 6px; align-content: start; padding-top: 18px; border-top: 1px solid var(--hair); }
.phase-moon { width: 44px; height: 44px; display: block; }
.phase-moon svg { width: 100%; height: 100%; }
.phase-name { font-family: var(--f-display); font-size: 24px; font-variation-settings: "opsz" 48; margin-top: 6px; }
.phase-line { color: var(--ink2); font-size: 16px; line-height: 1.45; }

/* Calendar */
.cal { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-month { font-family: var(--f-display); font-variation-settings: "opsz" 60; font-size: 28px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ivory); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--hair); display: grid; place-items: center;
}
.icon-btn:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-week span { text-align: center; font-size: 13px; color: var(--ink3); padding-bottom: 8px; }
.cal-cell {
  position: relative; aspect-ratio: 1 / 1.08; border: 0; border-radius: 14px; background: var(--ivory);
  box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; padding: 8px; text-align: left;
  display: grid; grid-template-rows: auto 1fr auto; transition: box-shadow 0.2s, transform 0.2s var(--ease);
}
.cal-cell:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.cal-cell[aria-selected="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-cell.is-today .cal-num { background: var(--accent); color: var(--accent-ink); }
.cal-cell.is-empty { background: transparent; box-shadow: none; cursor: default; }
.cal-num {
  font-family: var(--f-mono); font-size: 13px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
}
.cal-glyph { width: 46%; max-width: 30px; justify-self: center; align-self: center; }
.cal-glyph svg { width: 100%; height: auto; display: block; }
.cal-glyph .g-disc { fill: #EDE3CF; }
.cal-glyph .g-shade { fill: #3A4270; }
:root[data-theme="night"] .cal-glyph .g-shade { fill: #0E1326; }
.cal-glyph .g-rim { fill: none; stroke: var(--gold); stroke-width: 1.2; }
.cal-cell.is-full .cal-glyph .g-rim { stroke: var(--gold); stroke-width: 3; }
.cal-cell.is-new .cal-glyph .g-rim { stroke: var(--gold); stroke-width: 2; }
.cal-mark { display: flex; gap: 4px; justify-content: center; min-height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-ek { background: var(--accent); }
.dot-fest { background: var(--gold); }
.cal-key { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 20px; color: var(--ink3); font-size: 14px; }
.cal-key li { display: inline-flex; align-items: center; gap: 8px; }
.key { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.key-full { background: #EDE3CF; box-shadow: 0 0 0 2px var(--gold); }
.key-new { background: var(--shade); box-shadow: 0 0 0 1px var(--gold); }
.key-ek { width: 6px; height: 6px; background: var(--accent); margin-inline: 3px; }
.key-fest { width: 6px; height: 6px; background: var(--gold); margin-inline: 3px; }

.cal-detail {
  position: sticky; top: 104px; background: var(--ivory); border-radius: 20px; padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--hair); min-height: 360px;
}
.cal-d-date { font-size: 15px; color: var(--ink3); }
.cal-d-n { margin-top: 6px; color: var(--ink2); font-size: 16px; }
.cal-d-glyph { margin-top: 24px; width: 88px; }
.cal-d-glyph .g-shade { fill: #3A4270; }
:root[data-theme="night"] .cal-d-glyph .g-shade { fill: #0E1326; }
.cal-d-next { margin-top: 14px; color: var(--ink2); font-size: 16px; }
.cal-d-fest { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hair); }
.cal-d-fest-name { font-family: var(--f-display); font-size: 24px; font-variation-settings: "opsz" 48; }
.cal-d-fest-name .deva { font-size: 26px; color: var(--gold-text); padding: 0; margin-right: 6px; }
.cal-d-ritual { margin-top: 10px; color: var(--ink2); font-family: var(--f-display); font-style: italic; font-size: 20px; line-height: 1.45; font-variation-settings: "opsz" 24; }
.calendar .fine { margin-top: 32px; }
.calendar { padding-top: 72px; }
.cal-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(28px, 4vw, 64px); align-items: end; }
.cal-head .body { margin-top: 0; }

/* Promise */
.promise { padding-block: clamp(88px, 11vh, 140px); border-block: 1px solid var(--hair); }
.promise-line {
  font-family: var(--f-display); font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 60;
  font-weight: 300; font-size: clamp(40px, 6.2vw, 96px); line-height: 1.04; letter-spacing: -0.025em;
  max-width: 17ch; text-wrap: balance;
}
.promise-list { margin-top: clamp(48px, 7vh, 80px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.promise-list li { color: var(--ink2); padding-top: 18px; border-top: 1px solid var(--gold); }
.promise-list strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 6px; }

/* Plus */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); border-top: 1px solid var(--gold); padding-top: clamp(24px, 3vw, 40px); }
.plan .facts { margin-top: 16px; }
.prices { margin-top: clamp(32px, 4vw, 48px); color: var(--ink2); max-width: 44em; }
.prices .num { color: var(--ink); font-family: inherit; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Begin */
.begin { display: grid; justify-items: center; text-align: center; padding: clamp(96px, 14vh, 180px) var(--gutter) clamp(80px, 12vh, 140px); }
.begin-ring { width: clamp(220px, 24vw, 300px); position: relative; scroll-margin-top: 120px; }
.begin-ring .moon { width: 100%; }
.begin-ring-text { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; }
.begin-ring-text .deva { font-size: clamp(26px, 2.6vw, 34px); padding: 0; }
.begin-ring-text .num { font-size: 14px; color: var(--ink3); }
.begin-title { max-width: 18ch; }
.begin-title { margin-top: 36px; }
.begin-body { margin-top: 18px; }
.begin-tomorrow { margin-top: 14px; color: var(--ink); font-size: clamp(17px, 1.3vw, 19px); }
.begin .btn { margin-top: 32px; }
.begin-fine { margin-top: 14px; }

/* Footer */
.foot { border-top: 1px solid var(--hair); padding-block: 36px max(36px, env(safe-area-inset-bottom)); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.wordmark-foot { font-size: 26px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-links a { color: var(--ink2); text-decoration: none; font-size: 15px; display: inline-block; padding: 12px 0; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.foot-legal { color: var(--ink3); font-size: 14px; }

/* ---------- The evening wash (View Transitions) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

/* ---------- Load sequence start state (only when motion is allowed and JS ran) ---------- */
.js-motion .hero-moon .disc, .js-motion .hero-moon .ring-seg, .js-motion .hero-moon .rim,
.js-motion .hero-reading, .js-motion .hero-title, .js-motion .hero-lede, .js-motion .cta-row,
.js-motion .hero-note, .js-motion .hero-date { opacity: 0; }
/* Failsafe: if main.js never runs (a script fails or the CDN hangs), show the hero after 2.5 s. */
@keyframes fester-reveal { to { opacity: 1; } }
.js-motion:not(.motion-ready) .hero-moon .disc, .js-motion:not(.motion-ready) .hero-moon .ring-seg,
.js-motion:not(.motion-ready) .hero-moon .rim, .js-motion:not(.motion-ready) .hero-reading,
.js-motion:not(.motion-ready) .hero-title, .js-motion:not(.motion-ready) .hero-lede,
.js-motion:not(.motion-ready) .cta-row, .js-motion:not(.motion-ready) .hero-note,
.js-motion:not(.motion-ready) .hero-date { animation: fester-reveal 0.6s ease 2.5s forwards; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .bar { grid-template-columns: auto 1fr; }
  .bar-end { justify-self: end; }
  .month-pin { grid-template-columns: 1fr; text-align: left; padding-top: 16px; align-content: start; gap: 12px; }
  .month-copy .body:not(.month-today) { display: none; }
  .month-moon { width: min(64vw, 300px); }
  .month-readout { min-height: 10em; }
  .chapter, .sky-grid, .cal, .plans { grid-template-columns: 1fr; }
  .sky-grid .sky-text { order: -1; }
  .cal-head { grid-template-columns: 1fr; }
  .intent-grid { grid-template-columns: 1fr; grid-template-areas: "text" "phases" "shot"; }
  .phases { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .promise-list { grid-template-columns: 1fr; }
  .cal-detail { position: static; min-height: 0; }
  .sky-ring-wrap { max-width: 520px; width: 100%; justify-self: center; }
}
@media (max-width: 600px) {
  .cal-key { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .hero { padding-top: 84px; }
  .hero-moon { width: 200px; }
  .hero-star { display: none; }
  .deva-xl { font-size: 44px; }
  .hero-facts { font-size: 15px; }
  .hero-title { font-size: 38px; margin-top: 22px; }
  .hero-lede { font-size: 16px; margin-top: 14px; }
  .cta-row { margin-top: 20px; }
  .nak-ring .nk-item:not(.nk-today) .nk-label { display: none; }
  .nak-ring .nk-today .nk-label { font-size: 26px; }
  .nak-ring .nk-latin { font-size: 17px; }
  .wordmark { font-size: 27px; }
  .cta-row { flex-direction: column; align-items: stretch; width: 100%; }
  .cal-week, .cal-grid { gap: 4px; }
  .cal-cell { padding: 4px; border-radius: 10px; }
  .cal-num { width: 22px; height: 22px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- App screens: one pinned phone for a day, and detail windows ---------- */
.device-screen { display: block; }
:root[data-theme="night"] .device-screen {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.30), 0 0 0 1px rgba(230, 224, 211, 0.20);
}

/* A day. With motion on a wide screen: one pinned phone, four steps. Otherwise: the strip. */
.day-pin {
  width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center;
}
.day-steps { position: relative; margin-top: 40px; min-height: 11em; }
.day-step { position: absolute; inset: 0 0 auto 0; }
.day-step .body { margin-top: 12px; max-width: 26em; }
.day-step + .day-step { opacity: 0; }
.day-dots { display: flex; gap: 10px; margin-top: 8px; }
.day-dots li { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--gold); transition: background-color 0.3s ease; }
.day-dots li.is-on { background: var(--gold); }
.day-stage {
  --stage-bg: #F3EBDD; --stage-hair: rgba(28, 23, 18, 0.12); --stage-shadow: rgba(28, 23, 18, 0.10); --night: 0;
  position: relative; border-radius: 44px; padding: 48px; display: grid; place-items: center; overflow: hidden;
  background: var(--stage-bg) url("assets/grain-day.png"); background-size: 256px;
  box-shadow: 0 0 0 1px var(--stage-hair);
}
.day-night { position: absolute; inset: 0; z-index: 0; background: #161C33 url("assets/grain-night.png"); background-size: 256px; clip-path: circle(0% at 50% 50%); }
.day-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--night);
  background: url("assets/grain-night.png"); background-size: 256px;
}
.day-phone { position: relative; height: min(76vh, 760px); aspect-ratio: 603 / 1311; z-index: 1; }
.day-phone .device-screen {
  position: absolute; inset: 0; height: 100%; object-fit: cover; border-radius: 40px;
  box-shadow: 0 24px 60px var(--stage-shadow), 0 0 0 1px var(--stage-hair);
}
.day-phone .device-screen + .device-screen { opacity: 0; }
.day-strip { display: none; }

/* Without running motion (main.js not ready, Reduce Motion) or on a short screen: the four screens
   side by side, scrolled on a phone. The pinned stage needs main.js and 720 px of height. */
:root:not(.motion-ready) .day-steps, :root:not(.motion-ready) .day-dots, :root:not(.motion-ready) .day-stage { display: none; }
:root:not(.motion-ready) .day-pin { grid-template-columns: 1fr; }
:root:not(.motion-ready) .day-strip { display: grid; }
@media (max-height: 719.98px) {
  .day-steps, .day-dots, .day-stage { display: none; }
  .day-pin { grid-template-columns: 1fr; }
  .day > .day-strip { display: grid; }
}
.day-strip {
  width: min(100% - 2 * var(--gutter), var(--maxw)); margin: 32px auto 0;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
.day-card { margin: 0; padding: 20px; border-radius: 28px; background: #F3EBDD url("assets/grain-day.png"); background-size: 256px; box-shadow: 0 0 0 1px rgba(28, 23, 18, 0.12); color: #4A4036; }
.day-card.is-night { background: #161C33 url("assets/grain-night.png"); background-size: 256px; box-shadow: 0 0 0 1px rgba(230, 224, 211, 0.20); color: #B9B3A6; }
.day-card .device-screen { border-radius: 24px; }
.day-card figcaption { margin-top: 14px; font-size: 15px; line-height: 1.45; }
.day-card figcaption strong { color: #1C1712; font-weight: 600; }
.day-card.is-night figcaption strong { color: #E6E0D3; }

/* Your star: a window that pans from the birth ring down to the star's name. */
.shot-window { position: relative; overflow: hidden; border-radius: 28px; box-shadow: 0 24px 60px rgba(28, 23, 18, 0.10), 0 0 0 1px var(--hair); background: var(--ivory); }
.shot-window .device-screen { position: absolute; box-shadow: none; border-radius: 0; max-width: none; }
.sky-window { aspect-ratio: 4 / 5; width: 100%; max-width: 440px; margin-top: 36px; }
.sky-window .device-screen { width: 104%; left: -2%; top: 0; transform: translateY(-8%); }
/* Intentions: one card, close up, beside the four phases. */
.intent-window { grid-area: shot; aspect-ratio: 1 / 1.02; width: 100%; max-width: 420px; justify-self: end; }
.intent-window .device-screen { width: 112%; left: -6%; top: 0; transform: translateY(-19.5%); }
/* The close: the welcome screen's Moon, fading into the page. */
.begin-echo { width: 220px; margin-top: 44px; aspect-ratio: 603 / 700; overflow: hidden; border-radius: 28px 28px 0 0;
  -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.begin-echo .device-screen { border-radius: 0; box-shadow: none; max-width: none; transform: translateY(-9.5%); }

@media (max-width: 960px) {
  .intent-window { justify-self: start; }
}
@media (max-width: 600px) {
  .day-steps, .day-dots, .day-stage { display: none; }
  .day-pin { grid-template-columns: 1fr; }
  .day > .day-strip.day-strip {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; width: 100%;
    padding: 4px var(--gutter) 16px; scrollbar-width: none;
  }
  .day-strip::-webkit-scrollbar { display: none; }
  .day-card { flex: none; width: 264px; padding: 16px; scroll-snap-align: center; }
  .sky-window { max-width: none; }
  .intent-window { aspect-ratio: 1 / 1; }
  .intent-window .device-screen { width: 108%; left: -4%; transform: translateY(-19.5%); }
  .begin-echo { width: 180px; }
}
