/* ==========================================================================
   Colorimetric — Marketing Site
   Design system: color tokens, type, layout primitives
   ========================================================================== */

@font-face {
  font-family: 'InterVar';
  src: local('Inter');
  font-weight: 100 900;
}

:root {
  color-scheme: light;

  /* Surfaces — cool, slightly blue-biased neutrals (not generic grey) */
  --bg: 210 30% 99%;
  --surface: 0 0% 100%;
  --surface-2: 212 32% 97%;
  --surface-sunken: 213 28% 95%;

  /* Text */
  --ink: 220 35% 12%;
  --ink-muted: 220 14% 40%;
  --ink-subtle: 220 10% 56%;
  --ink-on-accent: 0 0% 100%;

  /* Lines */
  --line: 214 24% 89%;
  --line-strong: 214 20% 80%;

  /* Brand — exact colors sampled from the real app (gradientStart/gradientEnd
     in app_colors.dart, and the ic_launcher mark). Do not approximate these. */
  --accent: 209 100% 48%;      /* #007EF3 — app gradientStart */
  --accent-2: 176 100% 29%;    /* #00958C — app gradientEnd */
  --accent-mark: 195 100% 39%; /* #0096C8 — app logo mark */
  --accent-ink: 209 90% 38%;
  --accent-soft: 209 90% 96%;
  --accent-soft-ink: 209 80% 34%;

  /* Semantic (measurement-science accents, used sparingly) */
  --lab-l: 220 10% 30%;
  --lab-a: 340 70% 50%;
  --lab-b: 45 85% 50%;

  --success: 152 55% 36%;
  --success-soft: 152 55% 94%;
  --warn: 33 90% 45%;
  --warn-soft: 40 90% 94%;

  --shadow-c: 220 45% 20%;

  --radius-card: 20px;
  --radius-control: 12px;
  --radius-pill: 999px;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: 222 30% 7%;
  --surface: 220 24% 10%;
  --surface-2: 220 20% 13%;
  --surface-sunken: 222 26% 6%;

  --ink: 214 32% 93%;
  --ink-muted: 216 14% 66%;
  --ink-subtle: 216 10% 48%;
  --ink-on-accent: 0 0% 100%;

  --line: 218 18% 20%;
  --line-strong: 218 16% 28%;

  --accent: 209 90% 65%;      /* lightened #007EF3 for dark backgrounds */
  --accent-2: 176 70% 45%;    /* lightened #00958C for dark backgrounds */
  --accent-mark: 195 85% 55%;
  --accent-ink: 209 92% 78%;
  --accent-soft: 209 50% 18%;
  --accent-soft-ink: 209 90% 82%;

  --lab-l: 220 10% 80%;
  --lab-a: 340 75% 68%;
  --lab-b: 45 88% 62%;

  --success: 152 50% 52%;
  --success-soft: 152 40% 14%;
  --warn: 33 88% 58%;
  --warn-soft: 33 46% 14%;

  --shadow-c: 222 60% 2%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: 222 30% 7%;
    --surface: 220 24% 10%;
    --surface-2: 220 20% 13%;
    --surface-sunken: 222 26% 6%;

    --ink: 214 32% 93%;
    --ink-muted: 216 14% 66%;
    --ink-subtle: 216 10% 48%;
    --ink-on-accent: 0 0% 100%;

    --line: 218 18% 20%;
    --line-strong: 218 16% 28%;

    --accent: 213 88% 66%;
    --accent-2: 187 70% 50%;
    --accent-ink: 213 90% 78%;
    --accent-soft: 217 45% 16%;
    --accent-soft-ink: 213 85% 80%;

    --lab-l: 220 10% 80%;
    --lab-a: 340 75% 68%;
    --lab-b: 45 88% 62%;

    --success: 152 50% 52%;
    --success-soft: 152 40% 14%;
    --warn: 33 88% 58%;
    --warn-soft: 33 46% 14%;

    --shadow-c: 222 60% 2%;
  }
}

/* ---------------------------------------------------------------------- */
/* Reset + base */
/* ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: hsl(var(--bg));
  color: hsl(var(--ink));
  font-family: 'InterVar', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; top: -100px; left: 12px; z-index: 100;
  background: hsl(var(--accent)); color: #fff;
  padding: 10px 18px; border-radius: 0 0 10px 10px;
  font-weight: 650; font-size: 14px; transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
.tnum { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid hsl(var(--accent)); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------------- */
/* Layout primitives */
/* ---------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(56px, 9vw, 108px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.stack { display: flex; flex-direction: column; }
.center-col { display: flex; flex-direction: column; align-items: center; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: hsl(var(--accent-soft-ink));
  background: hsl(var(--accent-soft));
  padding: 6px 14px 6px 12px;
  border-radius: var(--radius-pill);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--accent)); }

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; text-wrap: balance; font-weight: 800; }
h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.06; }
h2 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.14; }
h3 { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.28; }
h4 { font-size: 16px; font-weight: 700; }

p { margin: 0; color: hsl(var(--ink)); }
p.lede { font-size: clamp(16px, 1.6vw, 19px); color: hsl(var(--ink-muted)); line-height: 1.6; text-wrap: pretty; max-width: 56ch; }
.muted { color: hsl(var(--ink-muted)); }
.subtle { color: hsl(var(--ink-subtle)); }

/* ---------------------------------------------------------------------- */
/* Buttons */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 650; font-size: 15px; white-space: nowrap;
  padding: 13px 22px; border-radius: var(--radius-control);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color .15s ease;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, hsl(var(--accent)), hsl(var(--accent-2)));
  color: #fff;
  box-shadow: 0 8px 20px -8px hsl(var(--accent) / 0.55);
}
.btn-primary:hover { box-shadow: 0 10px 26px -8px hsl(var(--accent) / 0.65); }
.btn-secondary {
  background: hsl(var(--surface));
  border-color: hsl(var(--line-strong));
  color: hsl(var(--ink));
}
.btn-secondary:hover { background: hsl(var(--surface-2)); }
.btn-ghost { color: hsl(var(--ink-muted)); padding: 10px 14px; }
.btn-ghost:hover { color: hsl(var(--ink)); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* Google Play badge (official-style, self-drawn to spec proportions) */
.play-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #000; color: #fff;
  border-radius: 10px; padding: 9px 18px 9px 14px;
  border: 1px solid rgba(255,255,255,0.14);
  transition: transform 0.15s ease, box-shadow .15s ease;
}
.play-badge:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(0,0,0,0.5); }
.play-badge svg { width: 24px; height: 24px; flex: none; }
.play-badge .txt { display: flex; flex-direction: column; line-height: 1.1; }
.play-badge .txt small { font-size: 10.5px; opacity: 0.85; letter-spacing: 0.02em; }
.play-badge .txt strong { font-size: 17px; font-weight: 600; font-family: 'InterVar', sans-serif; }

/* ---------------------------------------------------------------------- */
/* Cards */
/* ---------------------------------------------------------------------- */
.card {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--line));
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px -1px hsl(var(--shadow-c) / 0.10), 0 6px 20px -10px hsl(var(--shadow-c) / 0.14);
}

/* ---------------------------------------------------------------------- */
/* Header / Nav */
/* ---------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: hsl(var(--bg) / 0.96);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid hsl(var(--line));
}
.nav {
  display: flex; align-items: center; gap: 28px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.brand-mark {
  width: 56px; height: 56px; flex: none;
  display: grid; place-items: center;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: 8px; }
.nav-links a {
  padding: 9px 13px; border-radius: var(--radius-control); font-size: 14.5px; font-weight: 550;
  color: hsl(var(--ink-muted)); transition: color .15s ease, background-color .15s ease;
}
.nav-links a:hover { color: hsl(var(--ink)); background: hsl(var(--surface-2)); }
.nav-links a.active { color: hsl(var(--ink)); }
.nav-right { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: var(--radius-control);
  align-items: center; justify-content: center; border: 1px solid hsl(var(--line-strong));
}
.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--radius-control);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid hsl(var(--line-strong)); color: hsl(var(--ink-muted));
  transition: color .15s ease, background-color .15s ease;
}
.theme-toggle:hover { color: hsl(var(--ink)); background: hsl(var(--surface-2)); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
  .nav { gap: 6px; }
  .nav-right { gap: 6px; }
  .brand { font-size: 14px; gap: 6px; }
  .brand-mark { width: 32px; height: 32px; }
  .theme-toggle, .nav-toggle { width: 32px; height: 32px; }
  .theme-toggle svg { width: 16px; height: 16px; }
  /* The header CTA duplicates the "Get the app" link already in the mobile
     menu sheet — drop it here so brand + theme toggle + hamburger always
     fit without horizontal overflow on narrow phones. */
  .nav-right .btn-primary.btn-sm { display: none; }
}

/* Mobile menu sheet */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: hsl(var(--bg));
  display: none; flex-direction: column;
  padding: 20px var(--gutter) 32px;
}
.mobile-menu.open { display: flex; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.mobile-menu a {
  padding: 16px 4px; font-size: 20px; font-weight: 700;
  border-bottom: 1px solid hsl(var(--line));
}

/* ---------------------------------------------------------------------- */
/* Footer */
/* ---------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid hsl(var(--line));
  background: hsl(var(--surface-sunken));
  padding-block: 56px 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { color: hsl(var(--ink)); margin-bottom: 14px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-col a, .footer-col p { color: hsl(var(--ink-muted)); font-size: 14.5px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a:hover { color: hsl(var(--ink)); }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid hsl(var(--line));
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: hsl(var(--ink-subtle));
}

/* ---------------------------------------------------------------------- */
/* Utility: phone frame + swatch chips used across pages */
/* ---------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; padding: 6px 12px 6px 8px;
  border-radius: var(--radius-pill); background: hsl(var(--surface-2));
  border: 1px solid hsl(var(--line));
}
.chip .swatch { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px hsl(var(--shadow-c) / 0.18); }

.grad-text {
  background: linear-gradient(100deg, hsl(var(--accent)), hsl(var(--accent-2)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
