/* Connecting Bridges: shared styles for the public pages (home and free check).
   Brand: Big Shoulders Display for headings, IBM Plex Sans for reading, IBM Plex Mono
   sparingly for labels; ink and water blues with international orange, the colour
   of painted suspension bridges. Light by default, dark when the device asks. */

:root {
  --ground: #f2f4f3;
  --paper: #ffffff;
  --ink: #16212b;
  --muted: #55626d;
  --line: #cfd6d9;
  --line-soft: #e2e7e9;
  --span: #c1440e;
  --span-strong: #9e370a;
  --on-span: #ffffff;
  --water: #2f5d73;
  --tint: #fbeee8;
  --ok: #2e6b3a;
  --bad: #a3281b;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  /* Spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 104px;
  --gutter: 20px;
  --radius: 6px;
  --head-h: 68px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0f161c; --paper: #16212b; --ink: #e8edef; --muted: #a3b0b9;
    --line: #2f3f4b; --line-soft: #22303a; --span: #f06a34; --span-strong: #ff8a57; --on-span: #0f161c;
    --water: #86b6cb; --tint: #2a1d17; --ok: #7fcb8d; --bad: #ff8f80; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0f161c; --paper: #16212b; --ink: #e8edef; --muted: #a3b0b9;
  --line: #2f3f4b; --line-soft: #22303a; --span: #f06a34; --span-strong: #ff8a57; --on-span: #0f161c;
  --water: #86b6cb; --tint: #2a1d17; --ok: #7fcb8d; --bad: #ff8f80; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: var(--gutter); }
a { color: var(--span); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--span-strong); }
:focus-visible { outline: 3px solid var(--span); outline-offset: 3px; border-radius: 2px; }
p { margin: 0; max-width: 66ch; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
.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; }

.skip { position: absolute; left: var(--s4); top: -100px; z-index: 100; background: var(--ink); color: var(--ground); padding: 10px 14px; border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.skip:focus { top: var(--s3); color: var(--ground); }

/* ───────── Header and navigation ───────── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); min-height: var(--head-h); }
.mark {
  display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font: 800 1.35rem/1 var(--display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.mark:hover { color: var(--ink); }
.mark svg { width: 34px; height: 20px; flex: none; }
.site-nav { display: flex; align-items: center; }
.nav-panel { display: flex; align-items: center; gap: var(--s6); }
.nav-panel ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s5); }
.nav-panel ul a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-panel ul a:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav-panel ul a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--span); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  :root { --head-h: 60px; }
  .mark { font-size: 1.2rem; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
    font: 600 .95rem/1 var(--body); color: var(--ink); background: var(--paper);
    border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle .bars { position: relative; width: 18px; height: 12px; }
  .nav-toggle .bars i { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 1px; transition: transform .2s ease, opacity .2s ease, top .2s ease; }
  .nav-toggle .bars i:nth-child(1) { top: 0; }
  .nav-toggle .bars i:nth-child(2) { top: 5px; }
  .nav-toggle .bars i:nth-child(3) { top: 10px; }
  .nav-toggle[aria-expanded="true"] .bars i:nth-child(1) { top: 5px; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .bars i:nth-child(3) { top: 5px; transform: rotate(-45deg); }
  .nav-panel {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; flex-direction: column; align-items: stretch; gap: var(--s4);
    background: var(--ground); border-bottom: 1px solid var(--line);
    padding: var(--s3) var(--gutter) var(--s5);
    box-shadow: 0 18px 30px -18px rgb(0 0 0 / .35);
    max-height: calc(100vh - var(--head-h)); overflow-y: auto;
  }
  .nav-panel.open { display: flex; }
  .nav-panel ul { flex-direction: column; gap: 0; }
  .nav-panel ul li + li { border-top: 1px solid var(--line-soft); }
  .nav-panel ul a { display: block; padding: 14px 0; font-size: 1.1rem; color: var(--ink); border-bottom: 0; }
  .nav-panel ul a[aria-current="page"] { color: var(--span); }
  .nav-panel .btn { width: 100%; }
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  font: 600 1rem/1.2 var(--body); letter-spacing: 0; text-transform: none; text-align: center; text-decoration: none;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--ink); color: var(--ground); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--span); border-color: var(--span); color: var(--on-span); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--span); border-color: var(--span); color: var(--on-span); }
.btn-primary:hover { background: var(--span-strong); border-color: var(--span-strong); color: var(--on-span); }
.btn-secondary, .btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover, .btn.ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn-quiet { background: var(--paper); color: var(--ink); border-color: var(--line); min-height: 42px; padding: 8px 16px; font-size: .95rem; }
.btn-quiet:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s3); }
.text-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.text-link:hover { text-decoration: underline; }

/* ───────── Type and sections ───────── */
.eyebrow { display: block; font: 500 .75rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--water); }
h1 { font: 800 clamp(2.9rem, 8.4vw, 6.25rem)/.93 var(--display); text-transform: uppercase; letter-spacing: .005em; text-wrap: balance; max-width: 14ch; }
h1 em, h2 em { font-style: normal; color: var(--span); }
h2 { font: 800 clamp(2.1rem, 4.4vw, 3.4rem)/1 var(--display); text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; max-width: 22ch; }
h3 { font: 600 1.15rem/1.3 var(--body); }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--muted); text-wrap: pretty; max-width: 40rem; }

main > section, .band { padding-block: 88px; border-top: 1px solid var(--line); scroll-margin-top: var(--head-h); }
.sec-head { display: grid; gap: var(--s4); margin-bottom: var(--s7); max-width: 46rem; }
.sec-head p { color: var(--muted); font-size: 1.125rem; }
.note { font-size: .85rem; color: var(--muted); line-height: 1.5; max-width: 70ch; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  font: 500 .72rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--span); background: var(--tint); border: 1px solid color-mix(in srgb, var(--span) 35%, transparent);
  padding: 5px 9px; border-radius: 999px;
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  main > section, .band { padding-block: var(--s8); }
  .sec-head { margin-bottom: var(--s6); }
}

/* ───────── Footer ───────── */
.site-foot { border-top: 1px solid var(--line); padding-block: var(--s6) var(--s7); color: var(--muted); font-size: .92rem; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s6); }
.foot-row .mark { font-size: 1.1rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); list-style: none; margin: 0; padding: 0; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
