/* Battleplan website (WEB-1, WEB-5). Plain CSS, no build step.
   Colors follow the app: lib/core/design/tokens.dart (brand #2F5BEA) and
   app_theme.dart / app_colors.dart for the dark surfaces. */

:root {
  color-scheme: light dark;
  --brand: #2f5bea;
  --brand-hover: #2549c4;
  --on-brand: #ffffff;
  --bg: #ffffff;
  --surface: #f4f6fb;
  --surface-2: #e9edf7;
  --border: #d9deea;
  --text: #1a1c22;
  --muted: #4a5163;
  --link: #2549c4;
  --accent-soft: #e6ecff;
  --going: #16803c;
  --focus: #2f5bea;
  --shadow: 0 10px 30px rgba(26, 28, 34, 0.12), 0 2px 6px rgba(26, 28, 34, 0.06);
  --radius: 16px;
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #3d67f0;
    --brand-hover: #5a7ff5;
    --bg: #121317;
    --surface: #1b1d22;
    --surface-2: #22242a;
    --border: #2f323a;
    --text: #e6e8ef;
    --muted: #b0b6c4;
    --link: #9db5ff;
    --accent-soft: #1f2a4d;
    --going: #4ade80;
    --focus: #9db5ff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

[id] { scroll-margin-top: 80px; }

a { color: var(--link); text-underline-offset: 0.15em; }
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.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1em; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem;
}
.brand img { width: 32px; height: 32px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav a:not(.btn) {
  color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 500;
}
.site-nav a:not(.btn):hover { background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--link); }
@media (max-width: 560px) {
  .site-nav .hide-sm { display: none; }
  .brand span { font-size: 1.05rem; }
}
@media (max-width: 440px) {
  .site-nav .hide-xs { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; transition: background-color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1.075rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Store badges: kept in a <template> until the apps are listed (ROADMAP tasks 130, 179). */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.store-badges img { height: 48px; width: auto; }

/* Hero */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block; background: var(--accent-soft); color: var(--link);
  font-weight: 600; font-size: 0.9rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.hero-shots { position: relative; display: flex; justify-content: center; gap: 0; }
.hero-shots .phone:nth-child(2) { display: none; }
@media (min-width: 900px) {
  .hero { padding: 80px 0 64px; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; }
  .hero-shots .phone { width: 270px; }
  .hero-shots .phone:nth-child(2) { display: block; width: 236px; margin: 56px 0 0 -12px; }
}

/* Phone frames around screenshots */
.phone {
  width: min(300px, 78vw);
  flex: none;
  border-radius: 34px;
  padding: 9px;
  background: #0d0e11;
  box-shadow: 0 0 0 1px var(--border), var(--shadow);
}
.phone img, .phone picture { border-radius: 26px; overflow: hidden; width: 100%; }
.phone.sm { width: min(260px, 72vw); }

/* Sections */
section { padding: 56px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 64px; }
.feature { display: grid; gap: 28px; align-items: center; }
.feature .phone { margin: 0 auto; }
.feature h3 { font-size: 1.6rem; }
.feature p { color: var(--muted); font-size: 1.075rem; }
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--link); margin-bottom: 14px;
}
.feature .icon svg { width: 24px; height: 24px; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 30px; margin: 0 0 8px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: 0.42em; width: 16px; height: 16px;
  background: var(--going);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (min-width: 900px) {
  section { padding: 88px 0; }
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature:nth-child(even) .feature-media { order: -1; }
  .feature-list { gap: 96px; }
}
.feature-media { display: flex; justify-content: center; gap: 16px; }
.feature-media .phone + .phone { display: none; }
@media (min-width: 1100px) {
  .feature-media .phone + .phone { display: block; margin-top: 40px; }
  .feature-media.pair .phone { width: 250px; }
}

/* Cards */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
}
.section-alt .card { background: var(--bg); }
.card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg); padding: 0 18px;
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 16px 28px 16px 0; position: relative; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--muted);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > :not(summary) { color: var(--muted); }
.faq details > p:last-child { padding-bottom: 6px; }

/* CTA band */
.cta {
  text-align: center; background: #2549c4; color: var(--on-brand);
  border-radius: 24px; padding: 48px 24px; margin: 0 auto;
}
.cta h2 { color: var(--on-brand); }
.cta p { color: var(--on-brand); font-size: 1.1rem; }
.cta .btn-primary { background: #ffffff; color: #1f45c2; }
.cta .btn-primary:hover { background: #e6ecff; }
.cta .actions { justify-content: center; }

/* Text pages (support, legal) */
.page { padding: 48px 0 72px; }
.page h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.page h2 { font-size: 1.5rem; margin-top: 1.8em; }
.page h3 { margin-top: 1.4em; }
.page .lead { margin-bottom: 1.5em; }
.page li { margin-bottom: 0.4em; }
.note {
  border: 1px solid var(--border); border-left: 4px solid var(--brand);
  background: var(--surface); border-radius: 10px; padding: 14px 18px; margin: 0 0 24px;
}
.note.draft { border-left-color: #b45309; }
.note p:last-child { margin-bottom: 0; }
.steps { padding-left: 1.4em; }
.steps li { padding-left: 4px; }
.toc { background: var(--surface); border-radius: 12px; padding: 16px 20px 6px; margin-bottom: 28px; }
.toc h2 { font-size: 1rem; margin: 0 0 8px; }
.email { font-weight: 600; font-size: 1.15rem; }
.placeholder { color: var(--muted); font-style: italic; }
kbd, .ui {
  font: inherit; font-weight: 600; background: var(--surface-2);
  padding: 1px 7px; border-radius: 6px; white-space: nowrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); padding: 36px 0 44px; color: var(--muted); font-size: 0.95rem;
}
.site-footer .wrap { display: grid; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.site-footer p { margin: 0; }
@media (min-width: 760px) {
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; }
}
