/* style.css: the public website's look. Same identity as the app (lib/theme.dart):
   sky-blue background, navy accent, white cards, red-orange only for emergency things,
   and the Atkinson Hyperlegible font (made to be easy to read). Phone first. */

@font-face {
  font-family: "Atkinson";
  src: url("fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #E3EEF9;
  --card: #FFFFFF;
  --text: #1B2433;
  --muted: #5E6878;
  --border: #CFDDEE;
  --navy: #1E3A8A;
  --navy-soft: #DCE5F7;
  --red: #E23D28;
  --red-soft: #FBE3DF;
  --on-color: #FFFFFF;
  --max: 1040px;
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1726;
    --card: #1A2436;
    --text: #EEE9E0;
    --muted: #9AA3B2;
    --border: #2A3850;
    --navy: #9DB8F0;
    --navy-soft: #1D2A4A;
    --red: #FF5A43;
    --red-soft: #3A1F1C;
    --on-color: #0B1530;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--navy); outline-offset: 2px;
}

/* Only one language shows at a time (site.js sets data-lang on <html>). */
html:not([data-lang="es"]) [lang="es"] { display: none !important; }
html[data-lang="es"] [lang="en"] { display: none !important; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 22px; }
.brand svg { width: 42px; height: 42px; flex: none; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--text); padding: 8px 10px; border-radius: 10px; font-size: 16px; }
.nav a[aria-current="page"] { background: var(--navy-soft); color: var(--navy); font-weight: 700; }
.lang-switch { border: 2px solid var(--navy); color: var(--navy); background: none; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.menu-button { display: none; border: none; background: none; font: inherit; color: var(--navy); font-weight: 700; padding: 8px; cursor: pointer; }

@media (max-width: 760px) {
  .menu-button { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--card); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 18px; }
  .lang-switch { align-self: flex-start; margin-top: 8px; }
}

/* ---------- 911 banner ---------- */
.banner-911 { background: var(--red-soft); color: var(--text); border-bottom: 1px solid var(--border); font-size: 16px; }
.banner-911 .wrap { padding-top: 8px; padding-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.banner-911 strong { color: var(--red); }

/* ---------- Sections ---------- */
main { padding-bottom: 48px; }
.hero { padding: 48px 0 32px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(36px, 7vw, 60px); line-height: 1.05; margin: 0 0 12px; }
.hero .tagline { color: var(--navy); font-weight: 700; font-size: 20px; margin: 0 0 16px; }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 0 0 24px; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(320px, 70vw); height: auto; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 28px; text-align: left; }
  .hero-art { order: -1; }
  .hero-art svg { width: 140px; }
  .hero { gap: 12px; }
}

h1.page-title { font-size: clamp(32px, 6vw, 46px); line-height: 1.1; margin: 32px 0 8px; }
p.page-lead { color: var(--muted); font-size: 20px; margin: 0 0 24px; }
h2 { font-size: 28px; line-height: 1.2; margin: 40px 0 12px; }
h3 { font-size: 21px; margin: 0 0 6px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .grid.three, .grid.two { grid-template-columns: 1fr; } }

.step-num { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--on-color); align-items: center; justify-content: center; font-weight: 700; margin-bottom: 8px; }
.muted { color: var(--muted); }
.warn { background: var(--red-soft); border: 2px solid var(--red); border-radius: 14px; padding: 14px 16px; }
.warn strong { color: var(--red); }
.note { background: var(--navy-soft); border-radius: 14px; padding: 12px 16px; font-size: 16px; }

.signal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: center; }
.signal .card { padding: 16px; }
.signal img { width: 120px; background: var(--red-soft); border-radius: 22px; padding: 8px; }
.signal .num { font-size: 34px; font-weight: 700; color: var(--red); display: block; }
@media (max-width: 500px) { .signal { grid-template-columns: 1fr; } .signal .card { display: flex; gap: 14px; align-items: center; text-align: left; } .signal img { width: 84px; } }

ul.checks { padding-left: 0; list-style: none; }
ul.checks li { padding-left: 32px; position: relative; margin-bottom: 10px; }
ul.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--navy); font-weight: 700; }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 14px 22px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid var(--navy); min-height: 52px; }
.button.primary { background: var(--navy); color: var(--on-color); }
.button.secondary { background: none; color: var(--navy); }
.button.red { background: var(--red); border-color: var(--red); color: var(--on-color); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 190px; min-height: 58px; padding: 8px 18px; border-radius: 14px; background: var(--text); color: var(--bg); text-decoration: none; line-height: 1.2; }
.store small { font-size: 12px; opacity: .85; }
.store b { font-size: 19px; }
.store.soon { background: var(--card); color: var(--muted); border: 2px dashed var(--border); cursor: default; }

/* ---------- Launch list form ---------- */
.launch { margin-top: 24px; }
.launch form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.launch input[type=email] { flex: 1 1 240px; min-height: 52px; font: inherit; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--border); background: var(--card); color: var(--text); }
.launch .hp { position: absolute; left: -9999px; }
.form-msg { font-size: 16px; margin-top: 8px; min-height: 1.4em; }
.form-msg.ok { color: var(--navy); font-weight: 700; }
.form-msg.err { color: var(--red); font-weight: 700; }

/* ---------- FAQ and legal ---------- */
details { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 4px 16px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
details p { margin-top: 0; color: var(--muted); white-space: pre-line; }
.legal { white-space: pre-line; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; font-size: 17px; }
.draft { display: inline-block; background: var(--red-soft); color: var(--red); border-radius: 999px; padding: 2px 12px; font-weight: 700; font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--card); border-top: 1px solid var(--border); padding: 28px 0; font-size: 16px; }
.site-footer .wrap { display: grid; gap: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-footer a { color: var(--text); }

/* ---------- The app tour video, in a phone frame ---------- */
.demo { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; margin-top: 16px; }
.demo [data-demo] { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phone { width: 260px; border-radius: 40px; padding: 10px; background: #111827; box-shadow: 0 12px 40px rgba(27, 36, 51, .25); }
.phone video { display: block; width: 100%; aspect-ratio: 600 / 1304; border-radius: 30px; background: var(--bg); }
@media (max-width: 760px) { .demo { grid-template-columns: 1fr; } .phone { width: min(260px, 78vw); } }
