/* Front-page subset of trainbeats/frontend/src/styles.css */
:root {
  color-scheme: light;
  --brand-navy: #011a3e;
  --brand-lime: #a9de14;
  --brand-green: #3cc76b;
  --brand-teal: #02a6b9;
  --bg: #f3f6f9;
  --surface-1: #ffffff;
  --surface-2: #edf1f6;
  --border: #dfe5ec;
  --border-strong: #c3ccd7;
  --text-primary: #0c1729;
  --text-secondary: #3f4c60;
  --text-muted: #5f6c80;
  --accent: #087789;
  --primary: #011a3e;
  --primary-ink: #ffffff;
  --ink: #011a3e;
  --zone-1: #5598e7;
  --zone-2: #1baf7a;
  --zone-3: #eda100;
  --zone-4: #eb6834;
  --zone-5: #e34948;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08111f;
  --surface-1: #0f1a2c;
  --surface-2: #16233a;
  --border: #1f2e47;
  --border-strong: #34476a;
  --text-primary: #edf2f9;
  --text-secondary: #bcc7d8;
  --text-muted: #8f9db2;
  --accent: #2cc3d4;
  --primary: #a9de14;
  --primary-ink: #011a3e;
  --ink: #e8ecf5;
}
@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } }

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; }
a { color: var(--accent); text-decoration: none; }
p { margin: 0.4rem 0; }
section[id] { scroll-margin-top: 1rem; }

.btn {
  appearance: none; border: 1px solid var(--border-strong); background: var(--surface-1); color: var(--text-primary);
  padding: 0.55rem 0.95rem; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem; justify-content: center; min-height: 40px;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary); filter: brightness(1.12); }
.btn-lg { padding: 0.75rem 1.3rem; font-size: 1.02rem; min-height: 48px; }
@media (pointer: coarse) { .btn { min-height: 44px; } }

/* logo and theme switch */
.logo { display: inline-flex; line-height: 0; }
.logo img { height: 34px; width: auto; max-width: 100%; }
[data-theme="dark"] .logo-light, :root:not([data-theme="dark"]) .logo-dark { display: none; }
.theme-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-secondary); cursor: pointer; flex: 0 0 auto; }
.theme-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }
.theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .icon-moon, :root:not([data-theme="dark"]) .icon-sun { display: none; }

/* zone colours for borders */
.z1 { border-top-color: var(--zone-1) !important; }
.z2 { border-top-color: var(--zone-2) !important; }
.z3 { border-top-color: var(--zone-3) !important; }
.z4 { border-top-color: var(--zone-4) !important; }
.z5 { border-top-color: var(--zone-5) !important; }

/* landing */
.landing { min-height: 100vh; background: var(--surface-1); color: var(--ink); }
.landing-bar { display: flex; align-items: center; justify-content: space-between; padding: 1rem clamp(1rem, 4vw, 3rem); padding-top: max(1rem, env(safe-area-inset-top)); max-width: 1200px; margin: 0 auto; }
.brand { display: flex; align-items: center; }
.landing-links { display: flex; gap: 1.4rem; }
.landing-links a { color: var(--text-secondary); font-weight: 600; font-size: 0.95rem; }
.landing-links a:hover { color: var(--accent); }
@media (max-width: 760px) { .landing-links { display: none; } }
.landing-actions { display: flex; gap: 0.5rem; align-items: center; }

.hero { max-width: 1200px; margin: 0 auto; padding: clamp(2rem, 7vw, 5.5rem) clamp(1rem, 4vw, 3rem) 1rem; }
.hero-pill { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.85rem 0.35rem 0.6rem; margin: 0 0 1.2rem; border: 1px solid var(--border-strong); border-radius: 99px; background: var(--surface-2); color: var(--text-secondary); font-size: 0.88rem; font-weight: 600; }
.hero-pill svg, .hosting-card svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--brand-green); flex: 0 0 auto; }
.hero-pill svg { width: 18px; height: 18px; }
.hero-title { font-size: clamp(2.6rem, 8vw, 5.6rem); line-height: 0.98; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 1.2rem; max-width: 12ch; }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 56ch; color: var(--text-secondary); margin: 0 0 1.8rem; line-height: 1.55; }
.hero-cta { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; padding: 0; margin: 1.4rem 0 0; color: var(--text-secondary); font-size: 0.92rem; }
.hero-trust li::before { content: "✓"; color: var(--brand-green); font-weight: 800; margin-right: 0.4rem; }

.hero-trace-wrap { margin: clamp(1.5rem, 4vw, 3rem) 0 0; padding: 0 0 2.5rem; }
.hero-trace-box { width: 100%; min-height: 220px; overflow: hidden; }
.hero-trace { display: block; }
.hero-zone-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; }
.hero-trace-line { fill: none; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-trace 2.6s cubic-bezier(.6,.1,.3,1) 0.2s forwards; }
@keyframes draw-trace { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-trace-line { animation: none; stroke-dashoffset: 0; } }
.hero-zones { display: flex; max-width: 1200px; margin: 0.8rem auto 0; padding: 0 clamp(1rem, 4vw, 3rem); gap: 0.4rem; flex-wrap: wrap; }
.hero-zones span { flex: 1 1 120px; border-top: 4px solid; padding-top: 0.35rem; font-size: 0.85rem; color: var(--text-secondary); }

.features, .flow { max-width: 1200px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 3rem); }
.features h2, .flow h2, .privacy h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -0.02em; margin: 0 0 1.5rem; max-width: 24ch; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.feature-card { background: var(--surface-2); border: 1px solid var(--border); border-top: 3px solid; border-radius: 14px; padding: 1.1rem 1.2rem 1.3rem; }
.feature-card h3 { margin: 0 0 0.45rem; font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--text-secondary); line-height: 1.55; }

.flow-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.8rem 2rem; }
.flow-steps li { border-top: 3px solid; padding-top: 0.8rem; }
.flow-steps h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.flow-steps p { margin: 0; color: var(--text-secondary); line-height: 1.55; }

.privacy { max-width: 1200px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 3rem) 3rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: start; }
.privacy p { color: var(--text-secondary); line-height: 1.6; max-width: 60ch; }
.privacy-list { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.7rem; }
.privacy-list li { padding-left: 1.4rem; position: relative; }
.privacy-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--zone-2); }
@media (max-width: 760px) { .privacy { grid-template-columns: 1fr; } }
.hosting-card { display: inline-flex; align-items: center; gap: 0.8rem; margin-top: 1rem; padding: 0.8rem 1.1rem; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--bg); }
.hosting-card svg { width: 30px; height: 30px; }
.hosting-card div { display: flex; flex-direction: column; }
.hosting-card span { color: var(--text-secondary); font-size: 0.88rem; }

.cta-band { width: min(1200px, calc(100% - 2 * clamp(1rem, 4vw, 3rem))); margin: 0 auto 2.5rem; padding: 2.2rem clamp(1.2rem, 4vw, 3rem); border-radius: 20px; background: var(--brand-navy); border: 1px solid var(--border); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cta-band h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.02em; }
.cta-band .btn-primary { background: var(--brand-lime); border-color: var(--brand-lime); color: var(--brand-navy); }
.cta-note { color: var(--brand-lime); font-weight: 600; }

.landing-foot { max-width: 1200px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 3rem) 2.5rem; padding-bottom: max(2.5rem, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }
.landing-foot > span { max-width: 62ch; }
.landing-legal { display: flex; gap: 1.2rem; flex-wrap: wrap; }
