/* ============================================
   My Street Champion — Design Tokens
   Colors pulled from the app's app_theme.dart
   so the site and app feel like one product.
   ============================================ */

:root {
  --teal: #2D5F4F;
  --teal-dark: #1F4438;
  --blue: #1B4F72;
  --blue-vivid: #0450AF;
  --sky-bright: #4FD8E3;
  --gold: #B8860B;
  --gold-bright: #FFD700;
  --sky: #87CEEB;
  --sky-tint: #E3F4FB;
  --green: #4CAF50;
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #5B5B5B;
  --line: #E3E3E0;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

/* Subtle painted-texture grain — echoes the icon's weathered shield finish.
   Pure CSS/SVG, no image request. */
.grain {
  position: relative;
  isolation: isolate;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* Gold rivet-corner accent, mixed into card components directly
   below rather than as a standalone class (avoids cascade fights with
   each card's own border rules). See .step, .support-card, .split. */

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin: 0;
  color: #0A1A2E;
}

p { margin: 0 0 1em; max-width: 62ch; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 6px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.button:hover { transform: translateY(-1px); }

.button--primary {
  background: var(--blue);
  color: var(--white);
}
.button--primary:hover { background: #0A1A2E; }

.button--ghost {
  border-color: var(--white);
  color: var(--white);
}
.button--ghost:hover { background: rgba(255,255,255,0.12); }

.button--outline {
  border-color: var(--blue);
  color: var(--blue);
}
.button--outline:hover { background: var(--sky-tint); }

.button--gold {
  background: var(--gold-bright);
  color: #0A1A2E;
}
.button--gold:hover { background: #ffe23d; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0A1A2E;
}
.nav-brand img {
  height: 46px;
  width: auto;
  display: block;
}
.nav-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

/* Thin multicolor accent strip, echoes the shield's palette */
.flag-bar {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--teal) 0%, var(--teal) 25%,
    var(--blue) 25%, var(--blue) 50%,
    var(--green) 50%, var(--green) 75%,
    var(--gold-bright) 75%, var(--gold-bright) 100%
  );
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--blue); }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(to top left, #0a1a44, #00c4cc);
  color: var(--white);
  padding: 56px 0 76px;
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.hero-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 22%;
}
.hero-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: var(--white);
}
.hero-eyebrow {
  font-family: var(--font-display);
  color: var(--sky);
  font-size: 0.95rem;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.hero-eyebrow--dark { color: var(--blue-vivid); }
.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  margin-bottom: 28px;
  max-width: 20ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-bright);
}
.hero p.lead {
  color: rgba(255,255,255,0.88);
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero p.disclaimer {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  max-width: 46ch;
  margin-bottom: 24px;
}
.disclaimer--dark { color: var(--ink-soft); }
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.button--white {
  background: var(--white);
  color: #0a1a44;
}
.button--white:hover { background: #eef6ff; }

/* Road-marking divider: a literal dashed lane line */
.road-divider {
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold-bright) 0px, var(--gold-bright) 34px,
    transparent 34px, transparent 62px
  );
  opacity: 0.95;
}

/* Hero app icon — real chiclet-style icon art, with a soft multicolor glow */
.hero-logo-wrap {
  justify-self: end;
  position: relative;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.hero-icon-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-icon-frame::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(79,216,227,0.55) 0%,
    rgba(255,215,0,0.3) 45%,
    transparent 72%);
  filter: blur(30px);
  z-index: 0;
}
.hero-icon-frame img {
  position: relative;
  z-index: 1;
  width: 220px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.45));
}
.hero-store-badges {
  position: relative;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* White pitch section — the copy that used to live in the hero */
.pitch-section {
  background: var(--white);
  padding: 64px 0 56px;
}
.pitch-section h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 20px; max-width: 18ch; }
.pitch-section h2 em { font-style: normal; color: var(--gold); }
.pitch-section p.lead { color: var(--ink-soft); font-size: 1.05rem; max-width: 56ch; margin-bottom: 18px; }
.pitch-section p.disclaimer { font-size: 0.85rem; max-width: 56ch; margin: 0; }

/* Big centered body quote */
.body-quote { background: var(--white); padding: 56px 0; text-align: center; }
.body-quote p {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 500;
  color: var(--ink);
  max-width: 46ch;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---------- Sections ---------- */

section { padding: 80px 0; }
.section-tint { background: var(--sky-tint); }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* Steps ("how it works") */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step {
  position: relative;
  padding: 28px 22px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-vivid);
  color: var(--white);
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 16px;
}
.step:nth-child(2) .step-num { background: var(--blue-vivid); }
.step:nth-child(3) .step-num { background: var(--blue-vivid); }
.step h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--ink); }
.step p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

/* Dark navy steps band — echoes the Canva "01/02/03" reference layout */
.steps-band {
  background: #0A1A2E;
  padding: 76px 0;
}
.section-head--dark h2 { color: var(--white); }
.section-head--dark p { color: rgba(255,255,255,0.75); }
.step--dark {
  background: transparent;
  border: none;
  border-radius: 0;
  border-left: 1px solid rgba(255,255,255,0.15);
  padding: 8px 28px;
}
.step--dark:first-child { border-left: none; padding-left: 0; }
.step--dark::before, .step--dark::after { display: none; }
.step--dark .step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sky-bright);
  border: none;
  color: #0A1A2E;
  font-weight: 700;
}
.step--dark:nth-child(2) .step-num,
.step--dark:nth-child(3) .step-num { background: var(--sky-bright); }
.step--dark h3 { color: var(--white); }
.step--dark p { color: rgba(255,255,255,0.75); }
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.split-col { padding: 40px 36px; }
.split-col:first-child { background: var(--white); border-right: 1px solid var(--line); }
.split-col:last-child { background: var(--blue-vivid); color: var(--white); }
.split-col h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.split-col:last-child h3 { color: var(--white); }
.split-col .kicker {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 6px;
  display: block;
}
.split-col ul { list-style: none; margin: 20px 0 0; padding: 0; }
.split-col li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.96rem;
}
.split-col:last-child li { border-top-color: rgba(255,255,255,0.2); }
.split-col li:first-child { border-top: none; }

/* Role tabs (residents / community representatives toggle) */
.role-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}
.role-tab {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 22px;
  border-radius: 30px;
  border: 1.5px solid var(--blue-vivid);
  background: var(--white);
  color: var(--blue-vivid);
  cursor: pointer;
}
.role-tab.is-active {
  background: var(--blue-vivid);
  color: var(--white);
}

.role-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(25,118,210,0.1);
}
.role-panel[hidden] { display: none; }
.role-panel img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}
.role-panel-body { padding: 40px 36px; }
.role-panel-body .kicker {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 6px;
  display: block;
}
.role-panel-body h3 { font-size: 1.4rem; margin-bottom: 6px; color: var(--ink); }
.role-panel-body ul { list-style: none; margin: 20px 0 0; padding: 0; }
.role-panel-body li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.96rem;
  color: var(--ink-soft);
}
.role-panel-body li:first-child { border-top: none; }

/* Trust strip */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}
.trust-item .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.trust-item:nth-child(2) .dot { background: var(--blue); }
.trust-item:nth-child(3) .dot { background: var(--gold-bright); }
.trust-item:nth-child(4) .dot { background: var(--green); }

/* Download */
.download {
  background: linear-gradient(120deg, var(--blue-vivid) 0%, var(--teal) 100%);
  color: var(--white);
  text-align: center;
}
.download h2 { color: var(--white); margin-bottom: 12px; }
.download p { color: rgba(255,255,255,0.85); margin: 0 auto 32px; }
.download-white {
  background: var(--white);
  text-align: center;
}
.download-white h2 { color: var(--ink); margin-bottom: 12px; }
.download-white p { color: var(--ink-soft); margin: 0 auto 32px; }
.badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.15);
}
.store-badge.disabled { opacity: 0.5; pointer-events: none; }
.store-badge b { display: block; font-size: 1rem; font-family: var(--font-display); }

/* ---------- Footer ---------- */

footer {
  background: #0A1A2E;
  color: rgba(255,255,255,0.75);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-grid h4 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--sky); }
.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

/* ---------- Simple content pages (privacy/support) ---------- */

.content-hero {
  background: linear-gradient(to top left, #0a1a44, #00c4cc);
  color: var(--white);
  padding: 56px 0 40px;
}
.content-hero h1 { color: var(--white); font-size: clamp(1.9rem, 4vw, 2.6rem); }
.content-hero p { color: rgba(255,255,255,0.8); margin-top: 10px; }

.doc {
  padding: 56px 0 90px;
  max-width: 780px;
  margin: 0 auto;
}
.doc h2 {
  font-size: 1.3rem;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  color: #0A1A2E;
  border-top: 1px solid var(--line);
  padding-top: 1.1em;
}
.doc h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.doc h3 { font-size: 1.02rem; margin-top: 1.4em; margin-bottom: 0.4em; color: var(--blue); }
.doc p, .doc li { color: var(--ink-soft); font-size: 0.98rem; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc .meta {
  background: var(--sky-tint);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 2em;
}
.doc .meta strong { color: #0A1A2E; }
.doc .summary {
  border-left: 4px solid var(--gold);
  padding: 4px 0 4px 18px;
  font-style: normal;
  color: var(--ink);
  margin-bottom: 2em;
}

/* Support page */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 12px;
}
.support-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 26px;
  position: relative;
}
.support-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--ink); }
.support-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 14px; }

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq-item h3 { font-size: 1.02rem; margin-bottom: 8px; color: var(--ink); }
.faq-item p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

.footer-grid p.footer-desc {
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  max-width: 36ch;
}

.footer-bottom a.footer-link {
  color: inherit;
}

.doc.doc--wide { max-width: 900px; }

.doc .meta.meta--spaced { margin-top: 2.2em; }

.doc h2.h2--spaced { margin-top: 56px; }

/* ---------- Photo panel with text overlay ---------- */

.photo-panel {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.photo-panel-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-panel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(10,26,46,0.95) 0%,
    rgba(27,79,114,0.82) 42%,
    rgba(27,79,114,0.35) 75%,
    rgba(27,79,114,0.1) 100%);
}
.photo-panel-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  max-width: 560px;
  padding: 64px 0;
}
.photo-panel-content .hero-eyebrow { color: var(--sky-bright); }
.photo-panel-content h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 16px; }
.photo-panel-content p { color: rgba(255,255,255,0.9); margin: 0; }

/* ---------- Tracker timeline card ---------- */

.tracker-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold-bright);
  border-radius: 4px 4px 24px 24px;
  padding: 28px 30px 30px;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}
.tracker-card::before,
.tracker-card::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 2px var(--white), inset 0 1px 1px rgba(0,0,0,0.25);
}
.tracker-card::before { left: 16px; }
.tracker-card::after { right: 16px; }
.tracker-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-display);
  color: var(--teal-dark);
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.tracker-ref {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-vivid);
  background: var(--sky-tint);
  padding: 3px 10px;
  border-radius: 20px;
}
.tracker-example-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0 0 20px;
  font-style: italic;
}
.tracker-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tracker-timeline li {
  position: relative;
  display: flex;
  gap: 16px;
  padding-bottom: 22px;
  padding-left: 4px;
}
.tracker-timeline li:last-child { padding-bottom: 0; }
.tracker-timeline li::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.tracker-timeline li:last-child::before { display: none; }
.t-dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-top: 1px;
  border: 3px solid var(--line);
  background: var(--white);
  z-index: 1;
}
.t-done .t-dot { border-color: var(--green); background: var(--green); }
.t-active .t-dot { border-color: var(--blue-vivid); background: var(--blue-vivid); }
.tracker-timeline b { display: block; font-size: 0.98rem; color: var(--ink); }
.tracker-timeline span:not(.t-dot) { font-size: 0.88rem; color: var(--ink-soft); }
.t-pending b, .t-pending span:not(.t-dot) { color: var(--ink-soft); }

/* ---------- Gains grid (replaces flat trust strip) ---------- */

.gains-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.gain-card {
  text-align: center;
  padding: 24px 16px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold-bright);
  border-radius: 4px 4px 20px 20px;
}
.gain-icon { font-size: 1.6rem; margin-bottom: 10px; }
.gain-card h3 { font-size: 0.98rem; color: var(--ink); margin-bottom: 6px; }
.gain-card p { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-logo-wrap { justify-self: center; }
  .steps { grid-template-columns: 1fr; }
  .step--dark { border-left: none; border-top: 1px solid rgba(255,255,255,0.15); padding: 24px 0 0; }
  .step--dark:first-child { border-top: none; padding-top: 0; }
  .split { grid-template-columns: 1fr; }
  .split-col:first-child { border-right: none; border-bottom: 1px solid var(--line); }
  .role-panel { grid-template-columns: 1fr; }
  .role-panel img { min-height: 220px; }
  .footer-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .gains-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-panel-content { padding: 48px 0; max-width: 100%; }
  .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button:hover { transform: none; }
}
