/* Spanbridge Robotics — spanbridge.ca
   One page. System fonts, no scripts, no trackers. */

:root {
  --bg: #ffffff;
  --bg-soft: #f3f6f9;
  --card: #ffffff;
  --ink: #17202b;
  --muted: #566170;
  --rule: #dfe5ec;
  --accent: #24507a;
  --accent-hover: #1a3c5d;
  --on-accent: #ffffff;
  --radius: 16px;
  --wrap: 70rem;
  --gutter: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1218;
    --bg-soft: #131a22;
    --card: #111820;
    --ink: #e6ebf1;
    --muted: #9fabb9;
    --rule: #243040;
    --accent: #8fbbe8;
    --accent-hover: #b3d2f2;
    --on-accent: #0d1218;
  }
}

@media (min-width: 640px)  { :root { --gutter: 28px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 640px) { body { font-size: 1.0625rem; } }

svg { display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
p, li { text-wrap: pretty; }
ul { padding: 0; list-style: none; }
.nowrap { white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -200px;
  z-index: 20;
  padding: .6rem 1rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
@supports (background: color-mix(in srgb, red 50%, blue)) and ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: saturate(1.5) blur(12px);
    backdrop-filter: saturate(1.5) blur(12px);
  }
}
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 64px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand-name span { font-weight: 500; color: var(--muted); }
.mark { width: 30px; height: 30px; flex: none; }
.mark rect { fill: var(--accent); }
.mark path { fill: none; stroke: var(--on-accent); stroke-linecap: round; }
.nav { display: none; gap: 1.75rem; }
.nav a { color: var(--muted); font-size: .9375rem; font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--ink); }
@media (min-width: 860px) { .nav { display: flex; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .7rem 1.4rem;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: transparent; border-color: var(--rule); color: var(--ink); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--muted); color: var(--ink); }
.btn-small { min-height: 40px; padding: .45rem 1.05rem; font-size: .9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Hero */
.hero { padding-top: clamp(2.75rem, 1.5rem + 5vw, 6rem); }
.eyebrow, .kicker, .stage {
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  text-wrap: balance;
}
.hero h1 {
  margin-top: 1rem;
  max-width: 10em;
  font-size: clamp(2.4rem, 1rem + 6vw, 5rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.lead {
  margin-top: 1.5rem;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.65rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.lead span { display: block; text-wrap: balance; }
.intro { margin-top: 1.5rem; max-width: 40rem; font-size: 1.0625em; }
.aside { margin-top: 1rem; max-width: 40rem; color: var(--muted); }
.hero .actions { margin-top: 2rem; }

.span-art {
  width: 100%;
  height: clamp(64px, 13vw, 170px);
  margin-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  color: var(--accent);
  overflow: visible;
}
.span-art path { fill: none; stroke: currentColor; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.span-art .arch { stroke-width: 2.5; }
.span-art .deck { stroke-width: 2; opacity: .6; }
.span-art .hangers { stroke-width: 1.25; opacity: .4; }
.span-art .piers { stroke-width: 7; opacity: .6; stroke-linecap: butt; }

/* Sections */
.section { padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
.section.tight-top { padding-top: 0; }
.ruled { border-top: 1px solid var(--rule); }
.band { background: var(--bg-soft); border-block: 1px solid var(--rule); }
.section-title { font-size: clamp(1.75rem, 1.3rem + 1.7vw, 2.5rem); }
.kicker + .section-title { margin-top: .6rem; }
.body { margin-top: 1rem; max-width: 32rem; color: var(--muted); font-size: 1.0625em; }

.ticks li { position: relative; padding-left: 1.3rem; }
.ticks li + li { margin-top: .65rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .66em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.ticks-lg { font-size: 1.0625em; }
.ticks-lg li + li { margin-top: .9rem; }

/* What I do */
.cards { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.card {
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
}
@media (min-width: 640px) { .card { padding: 1.85rem; } }
.card h3 { margin-top: .55rem; font-size: 1.375rem; }
.card-lead { margin-top: .6rem; color: var(--muted); }
.card .ticks { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }

/* Partners, About */
.split { display: grid; gap: 2rem; }
@media (min-width: 880px) { .split { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; } }

/* Ground rules */
.rules { display: grid; gap: 1.75rem; margin-top: 2rem; }
@media (min-width: 760px) { .rules { grid-template-columns: 1fr 1fr; gap: 2.5rem 3.5rem; } }
.rule { padding-top: 1.1rem; border-top: 2px solid var(--accent); }
.rule h3 { font-size: 1.15rem; }
.rule p { margin-top: .5rem; color: var(--muted); }

/* About */
.person {
  margin-top: .6rem;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.facts li { padding-block: 1.1rem; border-top: 1px solid var(--rule); }
.facts li:last-child { border-bottom: 1px solid var(--rule); }

/* Contact */
.contact-card {
  padding: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) + 6px);
  background: var(--bg-soft);
}
.contact-card h2 { font-size: clamp(1.75rem, 1.3rem + 1.7vw, 2.5rem); }
.contact-card > p:not([class]) { margin-top: 1rem; max-width: 38rem; font-size: 1.0625em; }
.contact-card .actions { margin-top: 1.75rem; }
.where { margin-top: 1.5rem; color: var(--muted); font-size: .9375rem; }
.ko { margin-top: .35rem; color: var(--muted); font-size: .9375rem; word-break: keep-all; }

/* Footer */
.site-footer {
  padding-block: 1.75rem 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .875rem;
}

/* 404 */
.nf { padding-block: clamp(4rem, 3rem + 6vw, 8rem); }
.nf h1 { margin-top: .75rem; font-size: clamp(2rem, 1.2rem + 3.5vw, 3.25rem); letter-spacing: -0.03em; }
.nf p + p { margin-top: 1.25rem; }
