/* DueDee marketing site — "Clear Future" design system (docs/DESIGN.md).
   Tokens mirror web/src/styles/theme.css. Dark-first midnight glass; light theme by OS or toggle. */

:root {
  --bg: #070b14;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: #0f1626;
  --border: rgba(148, 163, 184, 0.18);
  --border-glow: rgba(34, 211, 238, 0.45);
  --text: #e6edf7;
  --muted: #94a3b8;
  --primary: #22d3ee;
  --primary-strong: #06b6d4;
  --accent: #a78bfa;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --on-primary: #06202a;

  --radius-card: 20px;
  --radius-button: 14px;
  --radius-chip: 999px;

  --shadow-card: 0 0 0 1px var(--border), 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 24px rgba(34, 211, 238, 0.35);
  --shadow-glow-strong: 0 0 32px rgba(34, 211, 238, 0.55);

  --font: "Inter", "Noto Sans Thai", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 150ms;
  --base: 200ms;

  --tap: 48px;
  --content: 1200px;
  --gutter: 16px;

  --glow-a: rgba(34, 211, 238, 0.12);
  --glow-b: rgba(167, 139, 250, 0.12);
  --field-bg: rgba(15, 22, 38, 0.6);

  /* Photo sections (hero + scrollytelling chapters). Dark: night photos under a dark scrim, white copy.
     The light theme swaps the photos (-light files, see index.html <source>) and overrides these. */
  --photo-text: #e6edf7;
  --photo-eyebrow: var(--primary);
  --photo-text-soft: #cbd5e1;
  --photo-shadow-h1: 0 2px 24px rgba(7, 11, 20, 0.6);
  --photo-shadow-h2: 0 2px 20px rgba(7, 11, 20, 0.6);
  --hero-shade:
    linear-gradient(to top, #070b14 0%, rgba(7, 11, 20, 0.78) 34%, rgba(7, 11, 20, 0.3) 68%, rgba(7, 11, 20, 0.12) 100%),
    linear-gradient(to right, rgba(7, 11, 20, 0.45), transparent 60%);
  --shade:
    linear-gradient(to top, rgba(7, 11, 20, 0.96) 0%, rgba(7, 11, 20, 0.72) 45%, rgba(7, 11, 20, 0.42) 100%),
    linear-gradient(to right, rgba(7, 11, 20, 0.5), transparent 65%);
  --shade-solo: var(--shade); /* chapters with .stage-grid.solo (centred copy, no phone) */
  --shade-step: #070b14;
  --photo-chip-bg: rgba(7, 11, 20, 0.45);
  --photo-chip-border: rgba(255, 255, 255, 0.18);
  --photo-btn-bg: rgba(255, 255, 255, 0.08);
  --photo-btn-border: rgba(255, 255, 255, 0.24);
  --phone-frame-shadow: 0 0 0 1px rgba(148, 163, 184, 0.3), 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f8ff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-glow: rgba(6, 182, 212, 0.45);
  --text: #0b1220;
  --muted: #475569;
  --primary-strong: #0891b2;
  --shadow-card: 0 0 0 1px var(--border), 0 10px 40px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 24px rgba(6, 182, 212, 0.3);
  --shadow-glow-strong: 0 0 32px rgba(6, 182, 212, 0.45);
  --glow-a: rgba(34, 211, 238, 0.18);
  --glow-b: rgba(167, 139, 250, 0.16);
  --field-bg: rgba(255, 255, 255, 0.85);
  /* Daytime photos under a light scrim (page --bg), dark copy, no text shadow. The scrim is strongest on the
     text side: top on mobile (copy above the phone), left on desktop (copy beside the phone), bottom-left in the hero. */
  --photo-text: #0b1220;
  --photo-eyebrow: var(--primary-strong);
  --photo-text-soft: #334155;
  --photo-shadow-h1: none;
  --photo-shadow-h2: none;
  --hero-shade:
    linear-gradient(to top, rgba(245, 248, 255, 0.94) 0%, rgba(245, 248, 255, 0.86) 34%, rgba(245, 248, 255, 0.45) 68%, rgba(245, 248, 255, 0) 100%),
    linear-gradient(to right, rgba(245, 248, 255, 0.6), transparent 60%);
  --shade:
    linear-gradient(to bottom, rgba(245, 248, 255, 0.88) 0%, rgba(245, 248, 255, 0.62) 55%, rgba(245, 248, 255, 0.3) 100%),
    linear-gradient(to right, rgba(245, 248, 255, 0.6), transparent 65%);
  --shade-solo:
    linear-gradient(to bottom, rgba(245, 248, 255, 0.84) 0%, rgba(245, 248, 255, 0.7) 50%, rgba(245, 248, 255, 0.4) 100%),
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(245, 248, 255, 0.75), transparent 70%);
  --shade-step: #f5f8ff;
  --photo-chip-bg: rgba(255, 255, 255, 0.62);
  --photo-chip-border: rgba(15, 23, 42, 0.14);
  --photo-btn-bg: rgba(255, 255, 255, 0.58);
  --photo-btn-border: rgba(15, 23, 42, 0.2);
  --phone-frame-shadow: 0 0 0 1px rgba(15, 23, 42, 0.3), 0 30px 80px rgba(15, 23, 42, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  color-scheme: light;
}

/* Before JS resolves the stored theme, follow the OS. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f5f8ff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: #ffffff;
    --border: rgba(15, 23, 42, 0.1);
    --border-glow: rgba(6, 182, 212, 0.45);
    --text: #0b1220;
    --muted: #475569;
    --primary-strong: #0891b2;
    --shadow-card: 0 0 0 1px var(--border), 0 10px 40px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 24px rgba(6, 182, 212, 0.3);
    --shadow-glow-strong: 0 0 32px rgba(6, 182, 212, 0.45);
    --glow-a: rgba(34, 211, 238, 0.18);
    --glow-b: rgba(167, 139, 250, 0.16);
    --field-bg: rgba(255, 255, 255, 0.85);
    /* Daytime photos under a light scrim (page --bg), dark copy, no text shadow. The scrim is strongest on the
       text side: top on mobile (copy above the phone), left on desktop (copy beside the phone), bottom-left in the hero. */
    --photo-text: #0b1220;
    --photo-eyebrow: var(--primary-strong);
    --photo-text-soft: #334155;
    --photo-shadow-h1: none;
    --photo-shadow-h2: none;
    --hero-shade:
      linear-gradient(to top, rgba(245, 248, 255, 0.94) 0%, rgba(245, 248, 255, 0.86) 34%, rgba(245, 248, 255, 0.45) 68%, rgba(245, 248, 255, 0) 100%),
      linear-gradient(to right, rgba(245, 248, 255, 0.6), transparent 60%);
    --shade:
      linear-gradient(to bottom, rgba(245, 248, 255, 0.88) 0%, rgba(245, 248, 255, 0.62) 55%, rgba(245, 248, 255, 0.3) 100%),
      linear-gradient(to right, rgba(245, 248, 255, 0.6), transparent 65%);
    --shade-solo:
      linear-gradient(to bottom, rgba(245, 248, 255, 0.84) 0%, rgba(245, 248, 255, 0.7) 50%, rgba(245, 248, 255, 0.4) 100%),
      radial-gradient(ellipse 60% 50% at 50% 45%, rgba(245, 248, 255, 0.75), transparent 70%);
    --shade-step: #f5f8ff;
    --photo-chip-bg: rgba(255, 255, 255, 0.62);
    --photo-chip-border: rgba(15, 23, 42, 0.14);
    --photo-btn-bg: rgba(255, 255, 255, 0.58);
    --photo-btn-border: rgba(15, 23, 42, 0.2);
    --phone-frame-shadow: 0 0 0 1px rgba(15, 23, 42, 0.3), 0 30px 80px rgba(15, 23, 42, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
    color-scheme: light;
  }
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}
html[lang="en"] {
  line-height: 1.5;
}

/* Bilingual content: every block exists twice, the inactive language is hidden. */
html[lang="th"] [lang="en"],
html[lang="en"] [lang="th"] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  background-image:
    radial-gradient(900px 500px at 10% -10%, var(--glow-a), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, var(--glow-b), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure, dl, dd {
  margin: 0;
}
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
}
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
}
p { text-wrap: pretty; }
a {
  color: var(--primary);
  text-underline-offset: 3px;
}
a:hover { color: var(--primary-strong); }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.xs { font-size: 13px; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}
::selection { background: rgba(34, 211, 238, 0.35); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

.section {
  padding-block: 56px;
}
@media (min-width: 768px) {
  .section { padding-block: 88px; }
}
.section-head {
  max-width: 680px;
  margin-bottom: 32px;
}
.section-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-head p {
  color: var(--muted);
  margin-top: 12px;
  font-size: 17px;
}

/* ---------- glass + gradient ---------- */
.glass {
  background: var(--surface);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
}
.text-gradient {
  background-image: linear-gradient(135deg, #22d3ee 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-gradient {
  background-image: linear-gradient(135deg, #22d3ee 0%, #a78bfa 100%);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 22px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--fast) var(--ease), box-shadow var(--base) var(--ease), background-color var(--fast), border-color var(--fast), color var(--fast);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  background: #67e8f9;
  color: var(--on-primary);
  box-shadow: var(--shadow-glow-strong);
}
.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--border-glow);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  padding-inline: 14px;
}
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-lg { min-height: 56px; font-size: 18px; padding-inline: 28px; }
.btn-full { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.btn svg { flex: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  min-height: var(--tap);
}
.brand:hover { color: var(--text); }
.brand .mark { width: 36px; height: 36px; display: block; }
.nav-links {
  display: none;
  gap: 4px;
  margin-right: 8px;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: var(--radius-button);
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface); }
@media (min-width: 900px) {
  .nav-links { display: flex; }
}
.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 10px;
  border-radius: var(--radius-button);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.toggle:hover { border-color: var(--border-glow); color: var(--text); }
.toggle .on { color: var(--text); }
.toggle .sep { opacity: 0.5; }
.toggle svg { width: 20px; height: 20px; }
.icon-sun { display: none; }
:root[data-theme="light"] .icon-sun { display: block; }
:root[data-theme="light"] .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .icon-sun { display: block; }
  :root:not([data-theme]) .icon-moon { display: none; }
}
.nav .btn-primary { display: none; }
@media (min-width: 540px) {
  .nav .btn-primary { display: inline-flex; }
}

/* ---------- phone mockup (pure CSS/SVG) ---------- */
.phone-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px 0;
}
.phone-wrap::before {
  content: "";
  position: absolute;
  inset: 10% 15%;
  background: radial-gradient(closest-side, rgba(34, 211, 238, 0.28), transparent 70%),
    radial-gradient(closest-side at 70% 70%, rgba(167, 139, 250, 0.28), transparent 70%);
  filter: blur(30px);
  z-index: 0;
}
.phone {
  position: relative;
  z-index: 1;
  width: min(340px, 86vw);
  aspect-ratio: 9 / 19;
  border-radius: 44px;
  padding: 12px;
  background: linear-gradient(160deg, #1b2335, #0b1020);
  box-shadow: var(--phone-frame-shadow); /* the screen itself stays midnight in both themes: it is a product screenshot */
}
.phone .screen {
  position: relative;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #070b14;
  color: #e6edf7;
  background-image:
    radial-gradient(400px 220px at 0% -10%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(360px 220px at 100% 0%, rgba(167, 139, 250, 0.16), transparent 60%);
  padding: 44px 14px 14px;
  font-size: 13px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phone .notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 24px;
  border-radius: 999px;
  background: #05080f;
}
.phone .greet { font-size: 16px; font-weight: 700; }
.phone .greet small { display: block; font-size: 11px; color: #94a3b8; font-weight: 400; }
.phone .tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.phone .tile {
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18);
}
.phone .tile .n { font-size: 18px; font-weight: 700; line-height: 1.1; }
.phone .tile .l { font-size: 10px; color: #94a3b8; }
.phone .tile.red .n { color: #fb7185; }
.phone .tile.amber .n { color: #fbbf24; }
.phone .tile.cyan .n { color: #22d3ee; }
.phone .group { font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.phone .card {
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18);
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px 10px;
  align-items: center;
}
.phone .card .ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.phone .card .ico svg { width: 20px; height: 20px; }
.phone .card.overdue .ico { background: rgba(251, 113, 133, 0.15); color: #fb7185; }
.phone .card.soon .ico { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.phone .card .t { font-weight: 600; font-size: 13px; }
.phone .card .s { font-size: 11px; color: #94a3b8; }
.phone .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid;
  margin-top: 2px;
}
.phone .badge svg { width: 11px; height: 11px; }
.phone .card.overdue .badge { color: #fb7185; border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.12); }
.phone .card.soon .badge { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.12); }
.phone .card .acts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.phone .card .acts span {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.phone .card .acts .p { background: #22d3ee; color: #06202a; box-shadow: 0 0 14px rgba(34, 211, 238, 0.35); }
.phone .card .acts .g { background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18); }
.phone .tabbar {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 4px 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 9px;
  color: #94a3b8;
  text-align: center;
}
.phone .tabbar span { display: grid; gap: 2px; justify-items: center; }
.phone .tabbar svg { width: 18px; height: 18px; }
.phone .tabbar .on { color: #22d3ee; }
.phone .fab {
  position: absolute;
  right: 16px;
  bottom: 58px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  color: #06202a;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
}
.phone .fab svg { width: 22px; height: 22px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details {
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 0 20px;
  transition: box-shadow var(--base) var(--ease);
}
.faq details[open] { box-shadow: 0 0 0 1px var(--border-glow), 0 10px 40px rgba(0, 0, 0, 0.35); }
.faq summary {
  list-style: none;
  cursor: pointer;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  padding-block: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--base) var(--ease);
  margin-right: 4px;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .answer { padding-bottom: 20px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
  margin-top: 40px;
  color: var(--muted);
  font-size: 15px;
}
.site-footer .cols {
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) { .site-footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.site-footer a:hover { color: var(--text); }
.site-footer .legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 13px; }
.site-footer .contact { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; color: var(--text); }

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  padding-block: 48px 24px;
  max-width: 760px;
}
@media (min-width: 768px) { .page-hero { padding-block: 72px 32px; } }
.page-hero .lead { margin-top: 14px; font-size: 18px; color: var(--muted); }

/* ---------- value props ---------- */
.props { display: grid; gap: 14px; }
@media (min-width: 640px) { .props { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .props { grid-template-columns: repeat(4, 1fr); } }
.prop { padding: 22px; }
.prop .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(34, 211, 238, 0.12); color: var(--primary); margin-bottom: 14px; }
.prop .ico svg { width: 22px; height: 22px; }
.prop h3 { font-size: 18px; margin-bottom: 6px; }
.prop p { color: var(--muted); font-size: 15px; }

/* ---------- pricing ---------- */
.pricing { display: grid; gap: 16px; max-width: 900px; }
@media (min-width: 768px) { .pricing { grid-template-columns: 1fr 1fr; } }
.plan { padding: 28px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.plan.pro { box-shadow: 0 0 0 1px var(--border-glow), 0 10px 40px rgba(0, 0, 0, 0.35); }
.plan .name { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan .name h3 { font-size: 22px; }
.plan .pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-chip); border: 1px solid; }
.plan .pill.free { color: var(--success); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.12); }
.plan .pill.soon { color: var(--accent); border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.12); }
.plan .price { font-size: 32px; font-weight: 700; line-height: 1.1; }
.plan .price small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.plan ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { width: 20px; height: 20px; flex: none; color: var(--success); margin-top: 3px; }
.plan.pro li svg { color: var(--accent); }
.plan .btn { margin-top: auto; }

/* ---------- forms ---------- */
.form-wrap { max-width: 720px; }
.form-card { padding: 24px; }
@media (min-width: 768px) { .form-card { padding: 36px; } }
.grid-2 { display: grid; gap: 18px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field .label { font-size: 15px; font-weight: 500; color: var(--muted); }
.field .req { color: var(--danger); }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select, .field textarea {
  width: 100%;
  min-height: var(--tap);
  border-radius: var(--radius-button);
  border: 1px solid var(--border);
  background: var(--field-bg);
  padding: 10px 16px;
  font-size: 17px;
  color: var(--text);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-glow); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field .select-wrap { position: relative; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 44px; }
.field .select-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.field .error { color: var(--danger); font-size: 15px; min-height: 0; }
.field .error:empty { display: none; }
.field .hint { color: var(--muted); font-size: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-weight: 500;
  transition: border-color var(--fast), box-shadow var(--fast), background-color var(--fast);
}
.check:has(input:checked) { border-color: var(--primary); background: rgba(34, 211, 238, 0.12); box-shadow: var(--shadow-glow); }
.check input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); cursor: pointer; min-height: var(--tap); }
.consent input { width: 22px; height: 22px; accent-color: var(--primary); margin: 2px 0 0; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.alert {
  border-radius: var(--radius-card);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.alert svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.alert.error { background: rgba(251, 113, 133, 0.12); box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.4); color: var(--text); }
.alert.error svg { color: var(--danger); }
.alert .btn { margin-top: 10px; }
.alert[hidden] { display: none; }

.success {
  text-align: center;
  padding: 40px 24px;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.success .ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(52, 211, 153, 0.14);
  color: var(--success);
  box-shadow: 0 0 32px rgba(52, 211, 153, 0.35);
}
.success .ring svg { width: 36px; height: 36px; }
.success p { color: var(--muted); max-width: 460px; }
.success[hidden] { display: none; }
[hidden] { display: none !important; }

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- prose (privacy) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; margin-top: 36px; margin-bottom: 10px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 22px; display: grid; gap: 6px; margin-top: 8px; }
.prose .draft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-chip);
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- legal pages (terms.html, shop-terms.html) ---------- */
.prose h3 { font-size: 17px; margin-top: 20px; margin-bottom: 6px; }
.prose ol { padding-left: 22px; display: grid; gap: 6px; margin-top: 8px; }
.prose p + p { margin-top: 8px; }
.prose .summary {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.prose .summary h2 { margin-top: 0; font-size: 19px; }
.prose .summary li { color: var(--text); }
.prose .toc { margin-top: 20px; font-size: 15px; }
.prose .toc ol { columns: 2 220px; column-gap: 24px; display: block; }
.prose .toc li { margin-bottom: 4px; break-inside: avoid; }
.prose .toc a { color: var(--muted); text-decoration: none; }
.prose .toc a:hover { color: var(--text); text-decoration: underline; }
.prose h2[id] { scroll-margin-top: 88px; }
/* "to confirm with counsel" marker on clauses the owner's lawyer must check */
.prose .tbc {
  display: inline-block;
  margin-left: 4px;
  padding: 0 8px;
  border-radius: var(--radius-chip);
  border: 1px dashed rgba(251, 191, 36, 0.6);
  color: var(--warning);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  vertical-align: 1px;
}
:root[data-theme="light"] .prose .tbc { color: #b45309; border-color: rgba(180, 83, 9, 0.5); }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .prose .tbc { color: #b45309; border-color: rgba(180, 83, 9, 0.5); } }

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ======================================================================
   Scrollytelling landing (index.html). Chapters are photo-dark in both
   themes by design. `html.scrolly` (set before paint when JS + IO exist
   and motion is allowed) enables pinning + step switching; without it the
   same markup renders as plain stacked sections.
   ====================================================================== */

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: calc(100svh - 64px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg);
  color: var(--photo-text);
}
@media (max-height: 600px) { .hero { height: auto; min-height: 480px; } }
.hero-bg, .photo, .photos, .shade, .hero-shade { position: absolute; inset: 0; }
.hero-bg img, .photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-bg img {
  object-position: 50% 38%;
  transform-origin: 50% 45%;
  animation: kenburns 20s linear forwards;
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero-shade { background: var(--hero-shade); }
.hero-body { position: relative; padding-block: 24px 72px; }
.hero-copy { max-width: 720px; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--photo-chip-border);
  background: var(--photo-chip-bg);
  color: var(--photo-text-soft);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 18px;
  animation: rise 700ms var(--ease) both;
}
.hero .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }
.hero h1 { font-size: 34px; text-shadow: var(--photo-shadow-h1); }
@media (min-width: 768px) { .hero h1 { font-size: 46px; } }
@media (min-width: 1024px) { .hero h1 { font-size: 58px; } }
.hero .line { display: block; animation: rise 800ms var(--ease) 120ms both; }
.hero .line + .line { animation-delay: 320ms; }
.hero .lead { margin-top: 16px; font-size: 17px; color: var(--photo-text-soft); max-width: 560px; animation: rise 800ms var(--ease) 520ms both; }
@media (min-width: 768px) { .hero .lead { font-size: 20px; } }
.hero .cta, .closing .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; animation: rise 800ms var(--ease) 680ms both; }
.hero .cta .btn { flex: 1 1 200px; }
@media (min-width: 540px) { .hero .cta .btn { flex: 0 0 auto; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.hero .btn-secondary, .chapter .btn-secondary {
  background: var(--photo-btn-bg);
  border-color: var(--photo-btn-border);
  color: var(--photo-text);
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--photo-text);
  opacity: 0.75;
  animation: cue 2.2s ease-in-out 1.2s infinite;
}
.scroll-cue svg { width: 28px; height: 28px; }
@keyframes cue { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- chapters ---------- */
.chapter { position: relative; background: var(--bg); color: var(--photo-text); }
.track { position: relative; }
.sentinels { margin-top: -52vh; padding-bottom: 52vh; }
.sentinel { height: 70vh; }
.stage { position: relative; margin: 0; overflow: hidden; }
.scrolly .stage { position: sticky; top: 0; height: 100svh; }
.photos { overflow: hidden; }
.photo { inset: -4% 0; transition: opacity 600ms var(--ease); }
.photo img { transform-origin: 50% 50%; transition: transform 1400ms var(--ease); }
.photo-alt { opacity: 0; }
.chapter[data-step="1"] .photo img { transform: scale(1.02) translateY(-0.6%); }
.chapter[data-step="2"] .photo img { transform: scale(1.04) translateY(-1.2%); }
.chapter[data-step="3"] .photo img { transform: scale(1.06) translateY(-1.8%); }
.chapter[data-step="2"] .photo-alt, .chapter[data-step="3"] .photo-alt { opacity: 1; }
.shade { background: var(--shade); }
.chapter:has(.stage-grid.solo) .shade { background: var(--shade-solo); } /* centred copy: scrim from the middle (same as --shade in dark) */
.shade::after { content: ""; position: absolute; inset: 0; background: var(--shade-step); opacity: 0; transition: opacity 700ms var(--ease); }
.chapter[data-step="1"] .shade::after { opacity: 0.08; }
.chapter[data-step="2"] .shade::after { opacity: 0.16; }
.chapter[data-step="3"] .shade::after { opacity: 0.24; }

@supports (animation-timeline: view()) {
  .scrolly .chapter { view-timeline: --chapter block; }
  .scrolly .photo { animation: drift linear both; animation-timeline: --chapter; animation-range: cover 0% cover 100%; }
}
@keyframes drift { from { transform: translateY(-3%); } to { transform: translateY(3%); } }

.stage-grid {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 84px;
  padding-bottom: 0;
}
.stage-grid.solo { justify-content: center; padding-bottom: 72px; }
.chapter .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--photo-eyebrow);
  margin-bottom: 16px;
}
.chapter .eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.copy { max-width: 720px; }
.steps { display: grid; gap: 28px; }
.scrolly .steps { gap: 0; }
.scrolly .step {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 350ms var(--ease), transform 350ms var(--ease);
}
.scrolly .chapter[data-step="1"] .step[data-step="1"],
.scrolly .chapter[data-step="2"] .step[data-step="2"],
.scrolly .chapter[data-step="3"] .step[data-step="3"] { opacity: 1; transform: none; pointer-events: auto; }
.step h2 { font-size: 26px; text-shadow: var(--photo-shadow-h2); }
.step .big { font-size: 28px; line-height: 1.3; }
.step p { margin-top: 12px; font-size: 17px; color: var(--photo-text-soft); max-width: 520px; }
@media (min-width: 768px) {
  .step h2 { font-size: 34px; }
  .step .big { font-size: 38px; }
  .step p { font-size: 19px; }
}
@media (min-width: 1024px) {
  .step h2 { font-size: 40px; }
  .step .big { font-size: 46px; }
}
.chapter .cta { margin-top: 28px; display: grid; gap: 10px; justify-items: start; }
.chapter .cta .note { color: var(--photo-text-soft); font-size: 15px; }

.device { --pw: clamp(190px, calc((100svh - 360px) * 0.474), 236px); position: relative; z-index: 1; display: grid; justify-items: center; margin-top: auto; height: calc(var(--pw) * 2.1112); }
/* Mobile: lay the phone out at desktop size and scale it down, so the screen type scales with it. */
.device .phone { width: calc(var(--pw) / 0.8); transform: scale(0.8); transform-origin: top center; }
@media (min-width: 900px) {
  .stage-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); column-gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 0; }
  .stage-grid.solo { display: flex; }
  .device { margin-top: 0; height: auto; }
  .device .phone { width: min(320px, calc((100svh - 128px) * 0.47)); transform: none; }
  .stage-grid.solo .copy { margin-inline: auto; text-align: center; }
  .stage-grid.solo .eyebrow { justify-content: center; }
  .stage-grid.solo .step p { margin-inline: auto; }
  .stage-grid.solo .cta { justify-items: center; }
}
.phone-wrap::before { display: none; }
.device::before {
  content: "";
  position: absolute;
  inset: 8% 10%;
  background: radial-gradient(closest-side, rgba(34, 211, 238, 0.28), transparent 70%), radial-gradient(closest-side at 70% 70%, rgba(167, 139, 250, 0.28), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}

/* phone build-up */
.scrolly .chapter [data-show] { opacity: 0; transform: translateY(10px); transition: opacity 320ms var(--ease), transform 320ms var(--ease); }
.scrolly .chapter .notif[data-show] { transform: translateY(-24px); }
.scrolly .chapter[data-step="1"] [data-show="1"],
.scrolly .chapter[data-step="2"] :is([data-show="1"], [data-show="2"]),
.scrolly .chapter[data-step="3"] :is([data-show="1"], [data-show="2"], [data-show="3"]) { opacity: 1; transform: none; }
.scrolly .chapter[data-step="2"] [data-hide="2"],
.scrolly .chapter[data-step="3"] :is([data-hide="2"], [data-hide="3"]) { opacity: 0; transform: translateY(12px); }
html:not(.scrolly) [data-hide] { display: none; }

/* extra phone pieces (same look as the app) */
.phone .bar { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 700; }
.phone .bar small { font-size: 11px; color: #94a3b8; font-weight: 500; }
.phone .asset { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18); }
.phone .asset .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(34, 211, 238, 0.14); color: #22d3ee; }
.phone .asset .ico svg { width: 24px; height: 24px; }
.phone .asset .t { font-weight: 700; font-size: 14px; }
.phone .asset .s { font-size: 11px; color: #94a3b8; }
.phone .row { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18); }
.phone .row .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(167, 139, 250, 0.16); color: #a78bfa; }
.phone .row .ico svg { width: 17px; height: 17px; }
.phone .row.ok .ico { background: rgba(52, 211, 153, 0.14); color: #34d399; }
.phone .row.soon .ico { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.phone .row .t { font-weight: 600; font-size: 12px; }
.phone .row .s { font-size: 10px; color: #94a3b8; }
.phone .row .d { font-size: 10px; font-weight: 600; text-align: right; color: #cbd5e1; white-space: nowrap; }
.phone .row.soon .d { color: #fbbf24; }
.phone .notif { position: absolute; left: 10px; right: 10px; top: 14px; z-index: 2; padding: 10px 12px; border-radius: 16px; background: rgba(15, 22, 38, 0.92); box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.45), 0 10px 30px rgba(0, 0, 0, 0.5); display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.phone .notif .app { width: 28px; height: 28px; border-radius: 8px; }
.phone .notif .h { display: flex; justify-content: space-between; font-size: 10px; color: #94a3b8; }
.phone .notif .t { font-weight: 600; font-size: 12px; margin-top: 2px; }
.phone .notif .s { font-size: 11px; color: #cbd5e1; }
.phone .sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 12px 14px 16px; border-radius: 24px 24px 34px 34px; background: #0f1626; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(148, 163, 184, 0.18); display: grid; gap: 8px; }
.phone .sheet .grip { width: 36px; height: 4px; border-radius: 2px; background: rgba(148, 163, 184, 0.4); margin: 0 auto 4px; }
.phone .sheet .h { font-weight: 700; font-size: 13px; }
.phone .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.phone .chips span { font-size: 10px; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.25); color: #94a3b8; }
.phone .chips .on { border-color: #22d3ee; color: #22d3ee; background: rgba(34, 211, 238, 0.12); }
.phone .field { display: flex; justify-content: space-between; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18); font-size: 11px; }
.phone .field span:last-child { font-weight: 600; }
.phone .save { display: grid; place-items: center; min-height: 38px; border-radius: 12px; background: #22d3ee; color: #06202a; font-weight: 700; font-size: 13px; box-shadow: 0 0 24px rgba(34, 211, 238, 0.55); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 36px rgba(34, 211, 238, 0.85); } }
.phone .prov { padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.45); display: grid; gap: 6px; }
.phone .prov .t { font-weight: 700; font-size: 13px; }
.phone .prov .s { font-size: 10px; color: #94a3b8; }
.phone .stars { color: #fbbf24; letter-spacing: 1px; font-size: 11px; }
.phone .offer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); font-size: 11px; }
.phone .offer s { color: #94a3b8; margin-right: 4px; }
.phone .offer b { font-size: 14px; color: #22d3ee; }
.phone .promo { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 999px; background: rgba(251, 113, 133, 0.15); color: #fb7185; border: 1px solid rgba(251, 113, 133, 0.4); }
.phone .book { display: grid; place-items: center; min-height: 32px; border-radius: 10px; background: #22d3ee; color: #06202a; font-weight: 700; font-size: 12px; }

/* ---------- closing ---------- */
.closing { padding-block: 80px 40px; text-align: center; }
.closing h2 { font-size: 40px; }
@media (min-width: 768px) { .closing h2 { font-size: 56px; } }
.closing .lead { margin-top: 12px; color: var(--muted); font-size: 18px; }
.closing .cta { justify-content: center; margin-top: 32px; animation: none; }
.logo-draw { width: 112px; height: 112px; margin: 0 auto 28px; display: block; }
.logo-draw .ring, .logo-draw .tick { stroke-dasharray: 1; stroke-dashoffset: 1; }
.logo-draw .dot { opacity: 0; }
.logo-draw.drawn .ring { animation: draw 1.1s var(--ease) forwards; }
.logo-draw.drawn .tick { animation: draw 0.6s var(--ease) 0.9s forwards; }
.logo-draw.drawn .dot { animation: pop 0.4s var(--ease) 1.4s forwards; }
html:not(.scrolly) .logo-draw :is(.ring, .tick) { stroke-dashoffset: 0; }
html:not(.scrolly) .logo-draw .dot { opacity: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
.reassure { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: var(--radius-chip); border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 15px; font-weight: 500; }
.chip svg { width: 18px; height: 18px; color: var(--success); flex: none; }
#faq, #map, .closing { scroll-margin-top: 72px; }
.site-footer .legal .credit { width: 100%; }

/* ---------- stacked fallback (no JS, no IO, or reduced motion) ---------- */
html:not(.scrolly) .sentinels { display: none; }
html:not(.scrolly) .photos { position: relative; height: min(56vw, 60vh); min-height: 240px; }
html:not(.scrolly) .photo-alt { display: none; }
html:not(.scrolly) .stage-grid { height: auto; padding-block: 32px 48px; gap: 32px; }
html:not(.scrolly) .device { margin-top: 0; height: auto; }
html:not(.scrolly) .device .phone { width: min(300px, 86vw); transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-bg img, .scroll-cue, .phone .save { animation: none; }
}

/* ======================================================================
   Shop map (index.html #map) — Leaflet from /vendor/leaflet/, restyled in
   brand terms for both themes. Mirrors the .dd-* rules in web/src/styles/theme.css.
   ====================================================================== */
.shopmap-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.shopmap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.shopmap .chip {
  cursor: pointer;
  min-height: var(--tap);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  transition: border-color var(--fast), background-color var(--fast), color var(--fast), box-shadow var(--base) var(--ease);
}
.shopmap .chip svg { color: currentColor; }
.shopmap .chip:hover { border-color: var(--border-glow); color: var(--text); }
.shopmap .chip.on { border-color: var(--primary); background: rgba(34, 211, 238, 0.15); color: var(--text); box-shadow: var(--shadow-glow); }
.shopmap-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 240px;
  min-width: 0;
}
.shopmap-search svg {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}
.shopmap-search input {
  width: 100%;
  min-height: var(--tap);
  border-radius: var(--radius-button);
  border: 1px solid var(--border);
  background: var(--field-bg);
  padding: 10px 16px 10px 44px;
  font-size: 17px;
  color: var(--text);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.shopmap-search input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.shopmap-search input:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-glow); }
.shopmap-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shopmap-brand {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 220px;
  min-width: 160px;
}
.shopmap-brand select {
  width: 100%;
  min-height: var(--tap);
  border-radius: var(--radius-button);
  border: 1px solid var(--border);
  background: var(--field-bg);
  padding: 10px 40px 10px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.shopmap-brand select:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-glow); }
.shopmap-brand select:disabled { opacity: 0.6; cursor: default; }
.shopmap-brand svg {
  position: absolute;
  right: 12px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}
.shopmap-brand select option, .shopmap-brand select optgroup { color: #0f172a; background: #fff; }
#map-near[disabled] { opacity: 0.7; cursor: progress; }
.shopmap-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.shopmap-canvas {
  height: 70vh;
  max-height: 640px;
  min-height: 320px;
  width: 100%;
  background: var(--surface-strong);
  isolation: isolate;
  font-family: var(--font);
  font-size: 15px;
}
.shopmap-note {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: none;
  place-items: center;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}
.shopmap-note[data-state="loading"],
.shopmap-note[data-state="error"],
.shopmap-note[data-state="empty"] { display: grid; }
.shopmap-note > p { display: none; }
.shopmap-note[data-state="loading"] .n-loading,
.shopmap-note[data-state="error"] .n-error,
.shopmap-note[data-state="empty"] .n-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 20px 22px;
  border-radius: var(--radius-card);
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-card);
  pointer-events: auto;
}
.shopmap-note .n-loading { color: var(--muted); }
.shopmap-note .n-loading .spinner { color: var(--primary); }
.shopmap-note .n-error svg { width: 28px; height: 28px; color: var(--warning); }
.shopmap-note .n-error .btn { margin-top: 4px; }
.shopmap-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; min-height: 1.5em; }
.shopmap-foot [hidden] { display: none; }

/* Leaflet overrides (prefixed to out-rank leaflet.css) */
:root:not([data-theme="light"]) .shopmap-canvas .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.6);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .shopmap-canvas .leaflet-tile-pane { filter: none; }
}
.shopmap-canvas .leaflet-bar {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.shopmap-canvas .leaflet-bar a {
  width: 40px;
  height: 40px;
  line-height: 40px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 20px;
}
.shopmap-canvas .leaflet-bar a:last-child { border-bottom: 0; }
.shopmap-canvas .leaflet-bar a:hover { background: color-mix(in srgb, var(--primary) 15%, var(--surface-strong)); color: var(--text); }
.shopmap-canvas .leaflet-bar a.leaflet-disabled { opacity: 0.4; }
.shopmap-canvas .leaflet-control-attribution {
  background: color-mix(in srgb, var(--surface-strong) 85%, transparent);
  color: var(--muted);
  font-size: 11px;
  border-top-left-radius: 8px;
}
.shopmap-canvas .leaflet-control-attribution a { color: var(--primary); }
.shopmap-canvas .dd-pin-wrap, .shopmap-canvas .dd-me-wrap { background: none; border: 0; }
.dd-pin {
  --pin: var(--primary);
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--on-primary);
  background: color-mix(in srgb, var(--pin) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 14px color-mix(in srgb, var(--pin) 50%, transparent);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast);
  cursor: pointer;
}
.dd-pin-home { --pin: var(--accent); }
.dd-pin-both { background: linear-gradient(135deg, #22d3ee 0%, #a78bfa 100%); }
.dd-pin-promo::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--warning);
  border: 2px solid var(--bg);
}
/* imported, unclaimed listing (OpenStreetMap): muted grey with a dashed ring */
.dd-pin-unclaimed, .dd-pin-both.dd-pin-unclaimed {
  --pin: var(--muted);
  background: color-mix(in srgb, var(--surface-strong) 85%, var(--muted));
  color: var(--muted);
  border: 2px dashed color-mix(in srgb, var(--muted) 70%, transparent);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.dd-pop-unclaimed { display: inline-flex; align-items: center; width: fit-content; padding: 1px 8px; border-radius: 999px; border: 1px dashed var(--border); color: var(--muted); font-size: 12px; font-weight: 600; }
.shopmap-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.shopmap-canvas .leaflet-marker-icon:hover .dd-pin {
  transform: scale(1.18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 24px color-mix(in srgb, var(--pin) 80%, transparent);
}
.dd-me {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.25), 0 2px 8px rgba(0, 0, 0, 0.4);
  animation: dd-me-pulse 2s ease-out infinite;
}
@keyframes dd-me-pulse {
  0% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35), 0 2px 8px rgba(0, 0, 0, 0.4); }
  100% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0), 0 2px 8px rgba(0, 0, 0, 0.4); }
}
.shopmap-canvas .leaflet-popup-content-wrapper {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.shopmap-canvas .leaflet-popup-tip { background: var(--surface-strong); box-shadow: 0 0 0 1px var(--border); }
.shopmap-canvas .leaflet-popup-content { margin: 12px 14px; line-height: 1.45; font-size: 15px; }
.shopmap-canvas .leaflet-popup-close-button { color: var(--muted); width: 32px; height: 32px; font-size: 20px; padding: 0; top: 2px; right: 2px; }
.shopmap-canvas .leaflet-popup-close-button:hover { color: var(--text); }
.dd-pop { display: grid; gap: 4px; }
.dd-pop-h { display: flex; align-items: center; gap: 6px; padding-right: 20px; font-size: 16px; }
.dd-pop-verified { display: inline-flex; color: var(--primary); }
.dd-pop-stars { display: inline-flex; align-items: center; gap: 1px; color: color-mix(in srgb, var(--muted) 50%, transparent); }
.dd-pop-stars span { display: inline-flex; }
.dd-pop-stars svg { fill: currentColor; }
.dd-pop-stars .on { color: var(--warning); }
.dd-pop-stars .half { color: var(--warning); clip-path: inset(0 50% 0 0); }
.dd-pop-n { margin-left: 6px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.dd-pop-sub { color: var(--muted); font-size: 14px; }
.dd-pop-brands { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.dd-pop-brand { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.dd-pop-mark { display: inline-block; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.dd-pop-mono { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; background: linear-gradient(135deg, color-mix(in srgb, var(--text) 22%, transparent), color-mix(in srgb, var(--text) 6%, transparent)); font-size: 8px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; -webkit-mask-image: none; mask-image: none; }
.dd-pop-price { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.dd-pop-promo { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-size: 12px; font-weight: 600; }
.shopmap-canvas a.dd-pop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin-top: 6px;
  border-radius: var(--radius-button);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-glow);
}
.shopmap-canvas a.dd-pop-btn:hover { background: #67e8f9; color: var(--on-primary); }
@media (prefers-reduced-motion: reduce) {
  .dd-me { animation: none; }
}

/* ---------- invite a shop (landing page) + invite note (provider page) ---------- */
.invite-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 20px; padding: 12px 14px; border-radius: 14px; background: rgba(34, 211, 238, 0.1); box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35); font-size: 15px; }
.invite-note svg { width: 22px; height: 22px; flex: none; color: var(--primary); margin-top: 1px; }
.invite-note[hidden] { display: none; }
.invite-success { text-align: left; align-items: stretch; }
.invite-success h3, .invite-success > p { text-align: center; }
.invite-success .ring { align-self: center; }
.invite-success .invite-text { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 15px; line-height: 1.6; margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--surface-strong, rgba(255,255,255,0.06)); box-shadow: 0 0 0 1px var(--border); color: var(--text); user-select: all; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.invite-url { text-align: center; word-break: break-all; margin: 0; }
.invite-existing { text-align: center; color: var(--warning, #fbbf24) !important; }
.btn-line { background: rgba(6, 199, 85, 0.15); color: #06C755; box-shadow: 0 0 0 1px rgba(6, 199, 85, 0.5); }
.btn-line:hover { background: rgba(6, 199, 85, 0.25); }
