/* TrainAtlas - styles.css
   Brand: Atlas Blue #1F3A5F | Track Steel #5A6D80 | Map Amber #E8A33D
   Surface: #F5F4F0 | Dark: #0F1419
   Mobile-first, no framework, WCAG 2.1 AA
*/

/* ─── Custom properties ─── */
:root {
  --blue:        #1F3A5F;
  --blue-mid:    #2a4d7a;
  --blue-light:  #3a6199;
  --steel:       #5A6D80;
  --amber:       #E8A33D;
  --amber-dark:  #c8872a;
  --surface:     #F5F4F0;
  --surface-2:   #eceae4;
  --text:        #1a1a1a;
  --text-muted:  #4a4a4a;
  --border:      #d4d0c8;
  --white:       #ffffff;
  --dark-bg:     #0F1419;
  --dark-surface:#171e26;
  --dark-border: #2a3340;
  --dark-text:   #e8e6e0;
  --dark-muted:  #9aa5b0;

  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:      0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.07);
  --shadow-lg:   0 12px 32px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.08);

  --font-sans:   -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  --font-mono:   ui-monospace, "SF Mono", "Cascadia Code", "Fira Code", monospace;

  --max-w:       1100px;
  --section-gap: 5rem;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

/* ─── Skip link ─── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 999;
  background: var(--blue);
  color: var(--white);
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
}
.skip-link:focus { left: 1rem; }

/* ─── Site header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 244, 240, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--blue);
  letter-spacing: -.01em;
}
.wordmark svg { width: 28px; height: 28px; flex-shrink: 0; }
.header-nav { display: none; gap: 1.75rem; }
.header-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s;
}
.header-nav a:hover { color: var(--blue); }
@media (min-width: 640px) { .header-nav { display: flex; } }
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--blue);
  color: var(--white);
  font-size: .8125rem;
  font-weight: 600;
  padding: .45rem .9rem;
  border-radius: 999px;
  transition: background .15s;
  white-space: nowrap;
}
.header-cta:hover { background: var(--blue-mid); }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(160deg, var(--blue) 0%, #0d2240 100%);
  color: var(--white);
  padding: 5rem 0 3.5rem;
  overflow: hidden;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-bottom: 1rem;
  }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero-badge span { color: var(--amber); }
.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--amber);
}
.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(255,255,255,.75);
  max-width: 46ch;
  margin-bottom: 2rem;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--white);
  color: var(--blue);
  font-weight: 700;
  font-size: .9375rem;
  padding: .75rem 1.4rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: transform .15s, box-shadow .15s;
}
.btn-appstore:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.btn-appstore svg { width: 20px; height: 20px; }
.hero-coming-soon {
  font-size: .8125rem;
  color: rgba(255,255,255,.55);
  letter-spacing: .02em;
}
.hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-illustration svg {
  width: 100%;
  max-width: 480px;
  opacity: .9;
}

/* ─── Section headings ─── */
.section-label {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: .5rem;
}
.section-heading {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.15;
  color: var(--blue);
  margin-bottom: .75rem;
}
.section-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.6;
}

/* ─── Features ─── */
.features {
  padding: var(--section-gap) 0;
}
.features-header { margin-bottom: 2.75rem; }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(31, 58, 95, .08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.feature-icon svg { width: 24px; height: 24px; color: var(--blue); }
.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .4rem;
  letter-spacing: -.01em;
}
.feature-card p {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Privacy section ─── */
.privacy-strip {
  background: var(--blue);
  color: var(--white);
  padding: 4rem 0;
}
.privacy-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 768px) { .privacy-inner { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.privacy-label {
  color: var(--amber);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.privacy-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.privacy-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
}
.privacy-bullets {
  display: flex;
  flex-direction: column;
  gap: .875rem;
}
.privacy-bullet {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .9375rem;
  color: rgba(255,255,255,.88);
  line-height: 1.5;
}
.privacy-bullet svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: .1rem;
  color: var(--amber);
}

/* ─── Pricing ─── */
.pricing {
  padding: var(--section-gap) 0;
}
.pricing-header { margin-bottom: 2.75rem; }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 780px;
}
@media (min-width: 640px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }
.pricing-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.pricing-card.featured {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, .15), var(--shadow);
}
.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: var(--blue);
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 999px;
  white-space: nowrap;
}
.pricing-tier {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: .5rem;
}
.pricing-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: .2rem;
}
.pricing-period {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.pricing-features {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.pricing-feature {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--text);
}
.pricing-feature svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--amber); }
.pricing-free-note {
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--text-muted);
  max-width: 50ch;
}

/* ─── Trust strip ─── */
.trust-strip {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.trust-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2.5rem;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--steel);
  letter-spacing: .01em;
}
.trust-item svg { width: 15px; height: 15px; color: var(--amber); flex-shrink: 0; }

/* ─── Footer ─── */
.site-footer {
  background: var(--dark-bg);
  color: var(--dark-text);
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) { .footer-inner { grid-template-columns: 1fr auto; align-items: start; } }
.footer-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: .5rem;
}
.footer-brand svg { width: 24px; height: 24px; }
.footer-tagline {
  font-size: .875rem;
  color: var(--dark-muted);
  margin-bottom: 1.25rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-bottom: 1.25rem;
}
.footer-links a {
  font-size: .8125rem;
  color: var(--dark-muted);
  transition: color .15s;
}
.footer-links a:hover { color: var(--white); }
.footer-copy {
  font-size: .75rem;
  color: rgba(255,255,255,.3);
}
.footer-social {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-muted);
  transition: background .15s, color .15s;
}
.footer-social a:hover { background: rgba(255,255,255,.14); color: var(--white); }
.footer-social svg { width: 17px; height: 17px; }

/* ─── Inner pages (privacy, support) ─── */
.page-hero {
  background: linear-gradient(160deg, var(--blue) 0%, #0d2240 100%);
  color: var(--white);
  padding: 3.5rem 0 2.5rem;
}
.page-hero .breadcrumb {
  font-size: .8125rem;
  color: rgba(255,255,255,.5);
  margin-bottom: .75rem;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,.6); }
.page-hero .breadcrumb a:hover { color: var(--white); }
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin-bottom: .5rem;
}
.page-hero .subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,.65);
}
.page-content {
  padding: 3.5rem 0 5rem;
}
.prose {
  max-width: 68ch;
}
.prose h2 {
  font-size: 1.3125rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -.015em;
  margin: 2.25rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--surface-2);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5rem 0 .5rem;
}
.prose p {
  font-size: .9875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.prose li {
  font-size: .9875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: .25rem;
}
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--blue-mid); }
.prose .effective-date {
  display: inline-block;
  font-size: .8125rem;
  font-family: var(--font-mono);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: .25rem .6rem;
  border-radius: var(--radius-sm);
  color: var(--steel);
  margin-bottom: 1.5rem;
}
.not-collected-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(31,58,95,.07);
  border: 1.5px solid rgba(31,58,95,.15);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin: 1rem 0 1.5rem;
}
.not-collected-badge svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; }
.not-collected-badge strong { font-size: .9rem; color: var(--blue); }
.not-collected-badge span { font-size: .8125rem; color: var(--text-muted); }

/* ─── FAQ ─── */
.faq-list {
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  cursor: pointer;
  transition: background .15s;
}
.faq-question:hover { background: rgba(31,58,95,.04); }
.faq-question svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--steel);
  transition: transform .2s;
}
.faq-answer {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding: 0 1.25rem 1rem;
}

/* ─── Contact section ─── */
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 480px;
  box-shadow: var(--shadow-sm);
}
.contact-card h2 {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .5rem;
}
.contact-card p {
  font-size: .9375rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}
.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--blue);
  color: var(--white);
  font-size: .9375rem;
  font-weight: 600;
  padding: .7rem 1.4rem;
  border-radius: var(--radius);
  transition: background .15s;
}
.btn-contact:hover { background: var(--blue-mid); }
.btn-contact svg { width: 18px; height: 18px; }
.contact-sla {
  margin-top: .75rem;
  font-size: .8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.contact-sla svg { width: 14px; height: 14px; color: var(--amber); }

/* ─── 404 ─── */
.not-found {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.25rem;
}
.not-found-code {
  font-family: var(--font-mono);
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 800;
  color: var(--surface-2);
  line-height: 1;
  letter-spacing: -.04em;
  margin-bottom: .5rem;
  user-select: none;
}
.not-found h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -.02em;
  margin-bottom: .75rem;
}
.not-found p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 38ch;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.btn-home {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--blue);
  color: var(--white);
  font-size: .9375rem;
  font-weight: 600;
  padding: .7rem 1.5rem;
  border-radius: var(--radius);
  transition: background .15s;
}
.btn-home:hover { background: var(--blue-mid); }

/* ─── Dark mode ─── */
@media (prefers-color-scheme: dark) {
  :root {
    --surface:     var(--dark-bg);
    --surface-2:   var(--dark-surface);
    --text:        var(--dark-text);
    --text-muted:  var(--dark-muted);
    --border:      var(--dark-border);
    --white:       #1e2835;
  }
  body { background: var(--dark-bg); }
  .site-header {
    background: rgba(15, 20, 25, .92);
    border-bottom-color: var(--dark-border);
  }
  .header-nav a { color: var(--dark-muted); }
  .feature-card,
  .contact-card,
  .faq-item,
  .pricing-card {
    background: var(--dark-surface);
    border-color: var(--dark-border);
  }
  .section-heading { color: #c8d8ea; }
  .feature-card h3 { color: #c8d8ea; }
  .pricing-price { color: #c8d8ea; }
  .feature-icon { background: rgba(58, 97, 153, .2); }
  .trust-strip { background: var(--dark-surface); border-color: var(--dark-border); }
  .prose h2 { border-bottom-color: var(--dark-border); color: #c8d8ea; }
  .prose h3 { color: var(--dark-text); }
  .not-collected-badge { background: rgba(58,97,153,.2); border-color: rgba(58,97,153,.35); }
  .not-collected-badge strong { color: #9fc5e8; }
  .faq-question { color: #c8d8ea; }
  .contact-card h2 { color: #c8d8ea; }
  .not-found-code { color: var(--dark-surface); }
  .not-found h1 { color: #c8d8ea; }
  .prose .effective-date { background: var(--dark-surface); border-color: var(--dark-border); }
}

/* ─── Utilities ─── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.mt-section { margin-top: var(--section-gap); }
