/* Budgeture marketing site — main.css
   Plain CSS. System fonts only. No external assets.
   Palette anchored on the Budgeture app icon: deep navy + white serif. */

:root {
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(14, 26, 54, 0.05), 0 4px 14px rgba(14, 26, 54, 0.07);
  --shadow-lg: 0 8px 24px rgba(14, 26, 54, 0.10), 0 24px 60px rgba(14, 26, 54, 0.14);

  --font-serif: ui-serif, "New York", "Charter", "Georgia", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --max: 1080px;
  --gutter: clamp(20px, 5vw, 56px);
}

/* ---------- Palette gradient stops (palette-level, mode-agnostic) ---------- */
:root[data-palette="budgeture"]  { --g1: #1E293B; --g2: #334155; --g3: #94A3B8; }
:root[data-palette="ivory"]      { --g1: #78350F; --g2: #B58154; --g3: #E7D5B9; }
:root[data-palette="sage"]       { --g1: #1F3A2E; --g2: #6B8269; --g3: #D4DDBF; }
:root[data-palette="burgundy"]   { --g1: #2B1115; --g2: #7A2E3A; --g3: #D9A5A0; }
:root[data-palette="ember"]      { --g1: #5A1F15; --g2: #B4563A; --g3: #F0C896; }
:root[data-palette="monochrome"] { --g1: #000000; --g2: #2A2A2A; --g3: #9AA0A6; }

/* ---------- Palette tokens (12 combinations) ---------- */

/* Budgeture — accent #3D5A80, ink #1E293B, tint #EBF0F5 */
:root[data-palette="budgeture"][data-mode="light"] {
  --bg: #EBF0F5; --bg-2: #d8e1ec;
  --surface: rgba(255, 255, 255, 0.62); --surface-strong: rgba(255, 255, 255, 0.88);
  --border: rgba(30, 41, 59, 0.10);
  --ink: #1E293B; --ink-2: #3b465e; --ink-3: #6e7689;
  --accent: #3D5A80; --accent-ink: #ffffff; --accent-soft: rgba(61, 90, 128, 0.12);
}
:root[data-palette="budgeture"][data-mode="dark"] {
  --bg: #1E293B; --bg-2: #2a3852;
  --surface: rgba(40, 54, 80, 0.55); --surface-strong: rgba(40, 54, 80, 0.80);
  --border: rgba(235, 240, 245, 0.10);
  --ink: #EBF0F5; --ink-2: #c5cad2; --ink-3: #8e9499;
  --accent: #3D5A80; --accent-ink: #ffffff; --accent-soft: rgba(61, 90, 128, 0.18);
}

/* Ivory — accent #A87D4B, ink #2B1A0E, tint #F7EFE3 */
:root[data-palette="ivory"][data-mode="light"] {
  --bg: #F7EFE3; --bg-2: #ebdfca;
  --surface: rgba(255, 251, 244, 0.62); --surface-strong: rgba(255, 251, 244, 0.88);
  --border: rgba(43, 26, 14, 0.10);
  --ink: #2B1A0E; --ink-2: #483626; --ink-3: #7d6a55;
  --accent: #A87D4B; --accent-ink: #ffffff; --accent-soft: rgba(168, 125, 75, 0.12);
}
:root[data-palette="ivory"][data-mode="dark"] {
  --bg: #2B1A0E; --bg-2: #3d2a1c;
  --surface: rgba(61, 42, 28, 0.55); --surface-strong: rgba(61, 42, 28, 0.80);
  --border: rgba(247, 239, 227, 0.10);
  --ink: #F7EFE3; --ink-2: #d0c8be; --ink-3: #948c81;
  --accent: #A87D4B; --accent-ink: #ffffff; --accent-soft: rgba(168, 125, 75, 0.18);
}

/* Sage — accent #526D5A, ink #162822, tint #ECEFE4 */
:root[data-palette="sage"][data-mode="light"] {
  --bg: #ECEFE4; --bg-2: #d8dec9;
  --surface: rgba(252, 254, 246, 0.62); --surface-strong: rgba(252, 254, 246, 0.88);
  --border: rgba(22, 40, 34, 0.10);
  --ink: #162822; --ink-2: #324a40; --ink-3: #677d72;
  --accent: #526D5A; --accent-ink: #ffffff; --accent-soft: rgba(82, 109, 90, 0.12);
}
:root[data-palette="sage"][data-mode="dark"] {
  --bg: #162822; --bg-2: #233a32;
  --surface: rgba(35, 58, 50, 0.55); --surface-strong: rgba(35, 58, 50, 0.80);
  --border: rgba(236, 239, 228, 0.10);
  --ink: #ECEFE4; --ink-2: #c5c8be; --ink-3: #8a8d83;
  --accent: #526D5A; --accent-ink: #ffffff; --accent-soft: rgba(82, 109, 90, 0.18);
}

/* Burgundy — accent #7C2D3B, ink #1A0A0D, tint #F5E8E5 */
:root[data-palette="burgundy"][data-mode="light"] {
  --bg: #F5E8E5; --bg-2: #ebd6d2;
  --surface: rgba(255, 250, 249, 0.62); --surface-strong: rgba(255, 250, 249, 0.88);
  --border: rgba(26, 10, 13, 0.10);
  --ink: #1A0A0D; --ink-2: #3a2226; --ink-3: #74575b;
  --accent: #7C2D3B; --accent-ink: #ffffff; --accent-soft: rgba(124, 45, 59, 0.12);
}
:root[data-palette="burgundy"][data-mode="dark"] {
  --bg: #1A0A0D; --bg-2: #2c161a;
  --surface: rgba(44, 22, 26, 0.55); --surface-strong: rgba(44, 22, 26, 0.80);
  --border: rgba(245, 232, 229, 0.10);
  --ink: #F5E8E5; --ink-2: #d0bfbb; --ink-3: #948682;
  --accent: #7C2D3B; --accent-ink: #ffffff; --accent-soft: rgba(124, 45, 59, 0.20);
}

/* Ember — accent #B4563A, ink #2B1410, tint #F7E8DB */
:root[data-palette="ember"][data-mode="light"] {
  --bg: #F7E8DB; --bg-2: #ecd5be;
  --surface: rgba(255, 250, 244, 0.62); --surface-strong: rgba(255, 250, 244, 0.88);
  --border: rgba(43, 20, 16, 0.10);
  --ink: #2B1410; --ink-2: #4a2e29; --ink-3: #80645c;
  --accent: #B4563A; --accent-ink: #ffffff; --accent-soft: rgba(180, 86, 58, 0.12);
}
:root[data-palette="ember"][data-mode="dark"] {
  --bg: #2B1410; --bg-2: #3e201a;
  --surface: rgba(62, 32, 26, 0.55); --surface-strong: rgba(62, 32, 26, 0.80);
  --border: rgba(247, 232, 219, 0.10);
  --ink: #F7E8DB; --ink-2: #d0c2b6; --ink-3: #948980;
  --accent: #B4563A; --accent-ink: #ffffff; --accent-soft: rgba(180, 86, 58, 0.20);
}

/* Monochrome — accent #9AA0A6, ink #000000, tint #EAEAEA. Whiteout (light) / Blackout (dark) */
:root[data-palette="monochrome"][data-mode="light"] {
  --bg: #EAEAEA; --bg-2: #d6d6d6;
  --surface: rgba(255, 255, 255, 0.62); --surface-strong: rgba(255, 255, 255, 0.88);
  --border: rgba(0, 0, 0, 0.10);
  --ink: #000000; --ink-2: #2a2a2a; --ink-3: #6e6e6e;
  --accent: #9AA0A6; --accent-ink: #000000; --accent-soft: rgba(154, 160, 166, 0.18);
}
:root[data-palette="monochrome"][data-mode="dark"] {
  --bg: #000000; --bg-2: #0d0d0d;
  --surface: rgba(20, 20, 20, 0.55); --surface-strong: rgba(20, 20, 20, 0.80);
  --border: rgba(255, 255, 255, 0.10);
  --ink: #EAEAEA; --ink-2: #c0c0c0; --ink-3: #828282;
  --accent: #9AA0A6; --accent-ink: #000000; --accent-soft: rgba(154, 160, 166, 0.20);
}

* { box-sizing: border-box; }

/* Scroll-reveal entrance animations */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: none;
}
.reveal-stagger.is-visible > *:nth-child(1)  { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2)  { transition-delay: 60ms; }
.reveal-stagger.is-visible > *:nth-child(3)  { transition-delay: 120ms; }
.reveal-stagger.is-visible > *:nth-child(4)  { transition-delay: 180ms; }
.reveal-stagger.is-visible > *:nth-child(5)  { transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(6)  { transition-delay: 300ms; }
.reveal-stagger.is-visible > *:nth-child(7)  { transition-delay: 360ms; }
.reveal-stagger.is-visible > *:nth-child(8)  { transition-delay: 420ms; }
.reveal-stagger.is-visible > *:nth-child(9)  { transition-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 320ms ease, color 320ms ease;
}

/* Soft ambient backdrop — mirrors the app's AmbientBackground 3-stop gradient.
   In-app stops render at 0.22 / 0.16 / 0.12 over the ink bg; we keep the same
   ratios here, layered as soft radial blobs over the palette canvas. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 40% at 15% 10%, color-mix(in srgb, var(--g1) 22%, transparent), transparent 70%),
    radial-gradient(50% 40% at 85% 0%,  color-mix(in srgb, var(--g2) 18%, transparent), transparent 70%),
    radial-gradient(70% 50% at 50% 100%, color-mix(in srgb, var(--g3) 14%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  transition: background 320ms ease;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.4em;
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.1;
}

h3 {
  font-size: 1.18rem;
  font-family: var(--font-rounded);
  font-weight: 600;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-rounded);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.8em;
}

.lede, .section-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-2);
  max-width: 60ch;
}

.microcopy {
  font-size: 0.86rem;
  color: var(--ink-3);
}

.microcopy code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 6px;
}

.link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.link:hover { opacity: 0.8; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.94rem;
  font-family: var(--font-rounded);
}

.site-nav a:hover { color: var(--ink); background: var(--surface); }

.site-nav a.nav-cta {
  background: var(--ink);
  color: var(--bg);
}
.site-nav a.nav-cta:hover { background: var(--ink); color: var(--bg); opacity: 0.9; }

@media (max-width: 640px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.08s ease, opacity 0.15s ease;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { opacity: 0.92; }

.btn-ghost {
  color: var(--ink);
  border-color: var(--border);
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.btn-ghost:hover { background: var(--surface-strong); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
}
.cta-row-center { justify-content: center; }

/* Sections */
main > section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) var(--gutter);
}

.section-head { margin-bottom: 36px; max-width: 60ch; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-top: clamp(32px, 6vw, 64px) !important;
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
}

.hero-copy .lede { margin-bottom: 32px; }

/* Hero device mockup */
.hero-art {
  display: flex;
  justify-content: center;
}

.device-mock {
  width: min(360px, 100%);
  aspect-ratio: 9 / 19;
  border-radius: 44px;
  background: color-mix(in srgb, var(--ink) 12%, var(--bg));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: flex;
  align-items: stretch;
  --mock-pos: #1f8b4c;
  --mock-neg: #c2410c;
}

:root[data-mode="dark"] .device-mock {
  --mock-pos: #4ade80;
  --mock-neg: #f87171;
}

.device-screen {
  flex: 1;
  border-radius: 32px;
  background: color-mix(in srgb, var(--bg) 92%, var(--ink));
  color: var(--ink);
  padding: 18px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.mock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-rounded);
}
.mock-brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.mock-add {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
}

.mock-card {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-eyebrow {
  font-family: var(--font-rounded);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin: 0;
}
.mock-label {
  font-family: var(--font-rounded);
  font-size: 0.82rem;
  color: var(--ink-2);
  margin: 2px 0 0;
}
.mock-bignum {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4.6vw, 2rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 2px 0 10px;
}

.mock-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mock-pill {
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-rounded);
}
.mock-pill-name {
  font-size: 0.7rem;
  color: var(--ink-3);
}
.mock-pill-num {
  font-size: 0.92rem;
  font-weight: 600;
}
.mock-pill-pos {
  background: color-mix(in srgb, var(--mock-pos) 16%, transparent);
}
.mock-pill-pos .mock-pill-num { color: var(--mock-pos); }
.mock-pill-neg {
  background: color-mix(in srgb, var(--mock-neg) 16%, transparent);
}
.mock-pill-neg .mock-pill-num { color: var(--mock-neg); }

.mock-section {
  font-family: var(--font-rounded);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  margin: 4px 0 0;
}

.mock-tx {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mock-tx li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-rounded);
  font-size: 0.88rem;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.mock-tx li:last-child { border-bottom: 0; }
.mock-tx-amt { font-weight: 600; }
.mock-pos { color: var(--mock-pos); }
.mock-neg { color: var(--mock-neg); }

.mock-tabs {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
  font-family: var(--font-rounded);
  font-size: 0.7rem;
  color: var(--ink-3);
}
.mock-tabs span {
  flex: 1;
  text-align: center;
  padding: 6px 0;
}
.mock-tabs .is-active {
  color: var(--accent);
  font-weight: 600;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card h3 { margin-bottom: 6px; }
.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.5;
}

/* Palettes — interactive theme showcase */
.palette-mode-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.palette-mode {
  display: inline-flex;
  background: var(--surface);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.palette-mode-btn {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 8px 22px;
  font-family: var(--font-rounded);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease;
}

.palette-mode-btn:hover { color: var(--ink); }

.palette-mode-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.palette-mode-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.palette-row {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: var(--max);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

@media (max-width: 720px) {
  .palette-row { grid-template-columns: repeat(3, 1fr); }
}

.palette-swatch {
  appearance: none;
  background: var(--surface);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  font-family: var(--font-rounded);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 220ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease, color 220ms ease;
}

.palette-swatch:hover {
  transform: translateY(-2px);
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.palette-swatch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.palette-swatch.is-active {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.palette-chip {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: var(--chip-light);
  box-shadow: inset 0 0 0 1px rgba(20, 28, 50, 0.06);
  transition: background 280ms ease;
}

:root[data-mode="dark"] .palette-chip {
  background: var(--chip-dark);
}

.palette-name {
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  body, .ambient { transition: none; }
  .palette-swatch { transition: background 120ms ease, color 120ms ease, border-color 120ms ease; }
  .palette-swatch:hover { transform: none; }
  .palette-chip { transition: none; }
}

/* Screens — tabbed device switcher */
.screens-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 28px;
  max-width: var(--max);
}

.screens-tab {
  appearance: none;
  background: var(--surface);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 22px;
  font-family: var(--font-rounded);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.screens-tab:hover {
  color: var(--ink);
  border-color: var(--accent-soft);
  transform: translateY(-1px);
}

.screens-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.screens-tab.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.screens-stage {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  height: clamp(360px, 60vh, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-shell {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition: opacity 220ms ease, transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.device-shell.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.device-shell img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* macOS-style window chrome around the Mac screenshot */
.mac-window {
  display: inline-flex;
  flex-direction: column;
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--bg);
}
.mac-titlebar {
  flex-shrink: 0;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: color-mix(in srgb, var(--ink) 6%, var(--bg));
  border-bottom: 1px solid var(--border);
}
.mac-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}
.mac-dot-close { background: #ff5f57; }
.mac-dot-min   { background: #febc2e; }
.mac-dot-max   { background: #28c840; }
.mac-window > img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  min-height: 0;
}

/* Watch crop — original is 422x514; top ~89px is the watch face time. */
.watch-frame {
  position: relative;
  width: min(422px, 100%);
  aspect-ratio: 422 / 425;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: #000;
}
.watch-frame img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
  max-height: none;
}

@media (prefers-reduced-motion: reduce) {
  .device-shell { transition: opacity 120ms ease; transform: none; }
  .device-shell.is-active { transform: none; }
  .screens-tab { transition: background 120ms ease, color 120ms ease; }
  .screens-tab:hover { transform: none; }
}

/* Promise band */
.promise {
  position: relative;
}
.promise-inner {
  background: var(--surface-strong);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 64px);
  box-shadow: var(--shadow-lg);
}

/* Download + Support */
.download .section-head,
.support .section-head { margin-left: auto; margin-right: auto; text-align: center; }
.download .section-lede,
.support .section-lede { margin-left: auto; margin-right: auto; }
.download, .support { text-align: center; }
.download .section-head, .support .section-head { max-width: 60ch; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  background: transparent;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px var(--gutter) 56px;
  display: grid;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-family: var(--font-rounded);
  font-size: 0.94rem;
}
.site-footer nav a:hover { color: var(--ink); }

.footer-meta {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.84rem;
}

/* Long-form doc page (privacy, etc.) */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
}

.doc-head { margin-bottom: 32px; }
.doc-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.doc-meta {
  margin: 0;
  color: var(--ink-3);
  font-family: var(--font-rounded);
  font-size: 0.92rem;
}

.doc h2 {
  font-size: 1.4rem;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.doc p, .doc li {
  color: var(--ink-2);
  line-height: 1.6;
}

.doc ul {
  padding-left: 1.2em;
  margin: 0 0 1em;
}
.doc li { margin-bottom: 0.4em; }

.doc strong { color: var(--ink); font-weight: 600; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
