/*
  Vylos website: one shared stylesheet for every page.
  Dark-first navy/teal identity, matching the app's tokens (src/theme/tokens.ts).
  Light variant only via prefers-color-scheme: light. System font, no web fonts,
  nothing loaded from third parties.
*/

/* Dark (default) — app dark tokens */
:root {
  color-scheme: dark light;
  --bg: #101D2D;          /* navy900, bg.canvas */
  --surface: #203145;     /* navy800, bg.surface */
  --sunken: #2A3C51;      /* bg.sunken */
  --border: #2C3F55;      /* navy700, border.subtle */
  --text: #F7F7F2;        /* ivory, text.primary */
  --text-2: #9AA8B8;      /* slate300, text.secondary (>= 4.5:1 on bg and surface) */
  --accent: #32C5B0;      /* teal400, interactive.text / fill */
  --on-accent: #101D2D;   /* interactive.label */
  --accent-soft: rgba(50, 197, 176, 0.14);
  --btn: #32C5B0;
  --focus: #7FE3D3;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --radius: 20px;
}

/* Light — app light tokens */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F7F7F2;
    --surface: #FFFFFF;
    --sunken: #F2F4F5;
    --border: #E3E6E8;
    --text: #101D2D;
    --text-2: #556575;    /* slate600 (>= 4.5:1 on ivory and white) */
    --accent: #127066;    /* teal700, interactive.text */
    --on-accent: #FFFFFF;
    --accent-soft: rgba(22, 132, 119, 0.10);
    --focus: #127066;
    --shadow: 0 24px 60px rgba(16, 29, 45, 0.16);
    --btn: #168477;       /* teal600, interactive.fill (white label 4.6:1) */
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.muted { color: var(--text-2); }
.small { font-size: 15px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); color: var(--text); padding: 12px 16px; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 21px; letter-spacing: -0.01em; min-height: 44px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text); text-decoration: none; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 10px; font-size: 16px; }
.nav a:hover { background: var(--accent-soft); }
.nav .btn { margin-left: 8px; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; font-size: 16px; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-panel { display: flex; }
.menu-panel { display: none; flex-direction: column; position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.menu-panel a { color: var(--text); text-decoration: none; padding: 12px; min-height: 44px; border-radius: 10px; }
.menu-panel a:hover { background: var(--accent-soft); }
@media (max-width: 760px) {
  .nav .nav-link { display: none; }
  .nav .btn { display: none; }
  .menu { display: block; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--btn); color: var(--on-accent);
  font-weight: 700; font-size: 18px; text-decoration: none; border: 0;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.nav .btn { min-height: 44px; font-size: 16px; padding: 0 18px; }
.cta-sub { margin-top: 12px; color: var(--text-2); font-size: 15px; }

/* Hero */
.hero { padding: 40px 0 64px; overflow: hidden; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-size: clamp(40px, 9vw, 76px); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 18px; }
.hero .lede { font-size: clamp(18px, 2.4vw, 22px); color: var(--text-2); max-width: 34ch; margin-bottom: 24px; }
@media (min-width: 900px) {
  .hero { padding: 80px 0 100px; }
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; }
}

/* Phone screenshot frame */
.phone {
  margin: 0 auto; width: min(300px, 78vw);
  border-radius: 40px; padding: 10px;
  background: #0A131F; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.phone img { border-radius: 30px; width: 100%; }
.phone.lg { width: min(340px, 82vw); }
.shot { margin: 0 auto; width: min(420px, 100%); border-radius: 24px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* Sections */
.section { padding: 72px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: clamp(32px, 6vw, 52px); font-weight: 800; letter-spacing: -0.03em; }
.section .lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-2); max-width: 40ch; }
.feature .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .section { padding: 112px 0; }
  .feature .wrap { grid-template-columns: 1fr 1fr; gap: 72px; }
  .feature.flip .copy { order: 2; }
}
.fine { font-size: 15px; color: var(--text-2); max-width: 46ch; }
/* Short safety note in the score section (Joe 10-07) */
.good-to-know { margin-top: 24px; padding: 16px 20px; max-width: 46ch; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 14px; font-size: 15px; color: var(--text-2); }
.good-to-know p { margin: 0; }
.good-to-know .gtk-title { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.big-line { font-size: clamp(26px, 4.4vw, 38px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }

/* Lock / privacy illustration */
.badge-ill { width: min(260px, 70vw); margin: 0 auto; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 22px 70px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; }
.steps strong { display: block; font-size: 19px; margin-bottom: 2px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Founder */
.founder .wrap { display: grid; gap: 40px; align-items: start; }
.founder img { border-radius: var(--radius); width: min(360px, 100%); border: 1px solid var(--border); }
.founder .name { font-weight: 700; font-size: 19px; margin-bottom: 2px; }
.founder .role { color: var(--text-2); margin-bottom: 20px; }
@media (min-width: 900px) { .founder .wrap { grid-template-columns: 0.8fr 1.2fr; gap: 72px; } }

/* Join card */
.join { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 32px 24px; }
@media (min-width: 900px) { .join { padding: 56px; } }
.checks { list-style: none; padding: 0; margin: 0 0 28px; }
.checks li { padding: 10px 0 10px 36px; position: relative; border-bottom: 1px solid var(--border); }
.checks li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 14px; height: 8px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 18px 0; min-height: 44px; font-weight: 700; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-2); }

/* Long-form pages (privacy, terms, support, testing page) */
.doc { padding: 48px 0 80px; }
.doc h1 { font-size: clamp(34px, 7vw, 52px); font-weight: 800; }
.doc h2 { font-size: 24px; margin-top: 2em; }
.doc h3 { font-size: 19px; margin-top: 1.5em; }
.doc ul, .doc ol { padding-left: 1.25em; }
.doc li { margin-bottom: 0.4em; }
.doc .note { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; margin: 1.5em 0; }
.doc .note p:last-child { margin-bottom: 0; }
.doc .caps { text-transform: uppercase; font-size: 15px; }
.doc section[id] { scroll-margin-top: 80px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 56px; color: var(--text-2); font-size: 15px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 16px -12px; }
.site-footer .links a { color: var(--text); text-decoration: none; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 10px; }
.site-footer .links a:hover { background: var(--accent-soft); }
.site-footer p { max-width: 80ch; }
.site-footer .contact a { display: inline-flex; min-height: 44px; align-items: center; }

/* Home landing page (2026-10-06 brief) */
.beta-note { display: flex; gap: 10px; align-items: baseline; margin-top: 14px; font-size: 15px; color: var(--text-2); max-width: 40ch; }
.beta-note span { flex: none; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 9px; }
.parts { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.parts li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; font-weight: 700; font-size: 18px; }
.steps-line { padding-left: 1.3em; margin: 0 0 20px; }
.steps-line li { margin-bottom: 6px; }
.hero .beta-note { margin-top: 10px; }
