:root {
  --paper: #f6f7f3;
  --white: #ffffff;
  --ink: #1f2619;
  --muted: #5b6352;
  --rule: #d8dccf;
  --olive: #6b8e23;
  --olive-text: #4f6a17;
  --red: #cd3700;
  --red-dark: #a82d00;

  --font-display: "Bahnschrift", "DIN Alternate", "DIN Next", "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img, svg { max-width: 100%; }

a { color: var(--olive-text); }
a:hover { color: var(--red-dark); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: .5rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: .01em;
}
.brand svg { width: 2.2rem; height: 2.2rem; flex: none; }
.brand:hover { color: var(--ink); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: .98rem;
}
.nav a:hover { color: var(--red-dark); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  border: 2px solid transparent;
  line-height: 1.2;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-secondary { border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }
.nav .btn-primary { color: var(--white); font-size: .98rem; padding: .5rem 1.05rem; }
.nav .btn-primary:hover { color: var(--white); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { padding: 4rem 0 3rem; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  letter-spacing: -.01em;
  max-width: 14ch;
}
.hero p.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 1.25rem 0 2rem;
}
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.netmap { width: 100%; height: auto; display: block; }
.netmap .line { fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.netmap .line-olive { stroke: var(--olive); }
.netmap .line-red { stroke: var(--red); }
.netmap .stop { fill: var(--white); stroke: var(--ink); stroke-width: 3; }
.netmap .hub { fill: var(--white); stroke: var(--ink); stroke-width: 4; }
.netmap text {
  font-family: var(--font-display);
  font-size: 15px;
  fill: var(--ink);
}
.netmap .hub-label { font-weight: 700; font-size: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .netmap .line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.6s cubic-bezier(.6, 0, .3, 1) forwards;
  }
  .netmap .line-red { animation-delay: .35s; }
  .netmap .map-stops, .netmap .map-labels {
    opacity: 0;
    animation: appear .5s ease-out 1.5s forwards;
  }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* ---------- Sections ---------- */
section { scroll-margin-top: 1rem; }
.section { padding: 4.5rem 0; border-top: 1px solid var(--rule); }
.section-head { max-width: 40rem; margin-bottom: 2.75rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.section-head p { color: var(--muted); margin: .75rem 0 0; }

/* ---------- Services as transit lines ---------- */
.lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}
.line-badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--white);
  padding: .35rem 1rem .35rem .45rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.line-badge .code {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--white);
  font-size: .95rem;
}
.line-olive .line-badge { background: var(--olive-text); }
.line-olive .line-badge .code { color: var(--olive-text); }
.line-red .line-badge { background: var(--red); }
.line-red .line-badge .code { color: var(--red); }

.stops {
  list-style: none;
  margin: 0 0 0 .55rem;
  padding: 0;
  border-left: 7px solid;
}
.line-olive .stops { border-color: var(--olive); }
.line-red .stops { border-color: var(--red); }

.stops li {
  position: relative;
  padding: 0 0 1.6rem 1.75rem;
}
.stops li:last-child { padding-bottom: .25rem; }
.stops li::before {
  content: "";
  position: absolute;
  left: -14px;
  top: .3rem;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--ink);
}
.stops h3 { font-size: 1.3rem; }
.stops p { margin: .3rem 0 0; color: var(--muted); max-width: 32rem; }

/* ---------- Process ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}
.steps h3 { font-size: 1.25rem; }
.steps p { margin: .4rem 0 0; color: var(--muted); }

/* ---------- About ---------- */
.about .wrap {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 3rem;
  align-items: start;
}
.about .section-head { margin-bottom: 1.25rem; }
.about p { max-width: 38rem; }
.facts { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.facts li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.facts strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}
.facts span { color: var(--muted); }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--paper); border-top: 0; }
.contact .section-head p { color: #c9cfbf; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.contact-grid h3 {
  font-size: 1rem;
  font-weight: 500;
  color: #c9cfbf;
  margin-bottom: .35rem;
}
.contact-grid a, .contact-grid p {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--paper);
  margin: 0;
  overflow-wrap: anywhere;
}
.contact-grid a:hover { color: #ff8a5c; }
.contact .btn-secondary { border-color: var(--paper); color: var(--paper); }
.contact .btn-secondary:hover { background: var(--paper); color: var(--ink); }
.contact :focus-visible { outline-color: #ff8a5c; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 1.75rem 0;
  font-size: .95rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer a { color: var(--muted); }

/* ---------- Legal pages ---------- */
.legal { padding: 3.5rem 0 4.5rem; }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1.5rem; }
.legal h2 { font-size: 1.4rem; margin: 2rem 0 .5rem; }
.legal p { margin: .5rem 0; }
.placeholder {
  background: #fff1ea;
  border-left: 4px solid var(--red);
  padding: .9rem 1.1rem;
  margin: 1.5rem 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .about .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 2.5rem; }
  .lines { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 560px) {
  .nav { gap: 1rem; }
  .nav .nav-link { display: none; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
}

/* ---------- Legal page details ---------- */
.legal .back {
  display: inline-block;
  font-size: .95rem;
  margin-bottom: 1.25rem;
  text-underline-offset: 3px;
}
.legal p { color: var(--muted); }
.legal mark {
  background: #fff1ea;
  color: var(--ink);
  padding: 0 .3rem;
  border-radius: 3px;
  box-shadow: inset 0 -2px 0 var(--red);
}

/* ---------- Remote support ---------- */
.remote .wrap {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 3rem;
  align-items: center;
}
.remote .section-head { margin-bottom: 0; }
.remote-box {
  background: var(--white);
  border: 1px solid var(--rule);
  border-left: 7px solid var(--olive);
  border-radius: 6px;
  padding: 1.5rem;
}
.remote-note {
  margin: 1rem 0 0;
  font-size: .95rem;
  color: var(--muted);
}
.remote-note strong { color: var(--ink); }
@media (max-width: 900px) {
  .remote .wrap { grid-template-columns: 1fr; gap: 1.5rem; }
}
