/* BioRoad public site — DESIGN.md: ink background, fog text, sodium and
   çini accents, Archivo (served from here: no font CDN). Mobile first. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff") format("woff");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink950: #060b12;
  --ink900: #0a131d;
  --ink850: #0c1826;
  --ink800: #0f1c29;
  --ink700: #152536;
  --ink600: #22364a;
  --hairline: rgba(255, 255, 255, 0.08);
  --highlight: rgba(255, 255, 255, 0.16);
  --fog100: #eaf2f8;
  --fog300: #9db0c2;
  --fog500: #7e93a7;
  --sodium: #ffa630;
  --sodium-glow: #ff8a00;
  --sodium-light: #ffc266;
  --cini: #1fd1c1;
  --cini-bright: #3df5e8;
  --periwinkle: #7c83ff;
  --ferry: #f2f7ff;
  --ferry-glow: #9cc8ff;
  --rail: #f06292;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo,
    Consolas, monospace;
  --gutter: 16px;
  --radius: 16px;
  --wide: 72rem;
  --measure: 44rem;
  --surface: linear-gradient(180deg, var(--ink700) 0%, var(--ink800) 70%);
  --lit: inset 0 1px 0 var(--highlight), 0 0 0 1px var(--hairline);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 120px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--fog100);
  background-color: var(--ink900);
  background-image:
    radial-gradient(110% 38rem at 50% -14rem, rgba(31, 209, 193, 0.07), transparent 70%),
    linear-gradient(180deg, var(--ink850) 0, var(--ink900) 42%, var(--ink950) 100%);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

::selection {
  background: rgba(255, 166, 48, 0.35);
  color: #fff;
}

a {
  color: var(--cini);
  text-decoration: underline;
  text-decoration-color: rgba(31, 209, 193, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--cini-bright);
  text-decoration-color: currentColor;
}

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

main:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--sodium);
  color: var(--ink900);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* --- Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 28, 41, 0.84);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 1px 0 var(--hairline);
}

.bar {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 10px var(--gutter) 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  padding: 4px 6px 4px 2px;
  color: var(--fog100);
  text-decoration: none;
  border-radius: 10px;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  flex: none;
  width: 30px;
  height: 30px;
  overflow: visible;
}

.wordmark {
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  font-size: 1.125rem;
  line-height: 1;
}

.nav {
  order: 3;
  width: 100%;
  display: flex;
  gap: 2px;
  margin: 0 -4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: none;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--fog300);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--fog100);
  background: rgba(255, 255, 255, 0.04);
}

.nav a[aria-current="page"] {
  color: var(--fog100);
  background: var(--surface);
  box-shadow: var(--lit);
}

.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(6, 11, 18, 0.6);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.lang a,
.lang .current {
  min-width: 40px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.lang a {
  color: var(--fog300);
}

.lang a:hover {
  color: var(--fog100);
}

.lang .current {
  color: var(--ink900);
  background: var(--cini);
}

@media (min-width: 760px) {
  .bar {
    flex-wrap: nowrap;
    padding-block: 12px;
  }

  .nav {
    order: 0;
    width: auto;
    margin: 0;
  }

  html {
    scroll-padding-top: 96px;
  }
}

/* --- Layout ------------------------------------------------------------ */

main {
  flex: 1;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 32px var(--gutter) 72px;
}

.doc-layout {
  display: block;
}

.doc-layout.single .doc-col,
.doc-col {
  min-width: 0;
  max-width: var(--measure);
}

.doc-layout.single .doc-col {
  margin: 0 auto;
}

@media (min-width: 1024px) {
  main {
    padding-top: 56px;
  }

  .doc-layout:not(.single) {
    display: grid;
    grid-template-columns: 15rem minmax(0, var(--measure));
    justify-content: center;
    gap: 64px;
  }
}

/* --- Document ---------------------------------------------------------- */

.doc-head {
  margin-bottom: 28px;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 1.35rem + 3vw, 3rem);
  line-height: 1.08;
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.meta {
  margin: 0;
  color: var(--fog500);
  font-size: 0.8125rem;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.06em;
}

.meta time {
  color: var(--fog300);
}

.doc h2 {
  margin: 44px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.4375rem);
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.doc-head + h2,
.doc-head + p + h2 {
  border-top: 0;
  padding-top: 0;
}

.num {
  display: inline-block;
  min-width: 2.1em;
  color: var(--sodium);
  font-weight: 700;
  font-stretch: 125%;
  font-variant-numeric: tabular-nums;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 1.125rem;
  font-weight: 650;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0 0 16px;
}

.doc ul,
.doc ol {
  padding-left: 1.35rem;
}

.doc li {
  margin: 8px 0;
  padding-left: 4px;
}

.doc ul li::marker {
  color: var(--cini);
}

.doc ol li::marker {
  color: var(--sodium);
  font-weight: 700;
}

strong {
  font-weight: 650;
  color: #f5f9fc;
}

code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--ink700);
  box-shadow: 0 0 0 1px var(--hairline);
  font-family: var(--mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

/* Tables: a lit surface; on a phone every row becomes a card. */
.table {
  margin: 22px 0 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--lit);
  overflow: hidden;
}

.table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.table th,
.table td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
}

.table thead th {
  color: var(--fog300);
  font-size: 0.75rem;
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  box-shadow: inset 0 -1px 0 var(--hairline);
}

.table tbody tr + tr > * {
  border-top: 1px solid var(--hairline);
}

.table tbody th {
  font-weight: 650;
}

@media (max-width: 719px) {
  .table table,
  .table tbody,
  .table tr,
  .table th,
  .table td {
    display: block;
  }

  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .table tbody tr {
    padding: 16px 18px;
  }

  .table tbody tr + tr {
    border-top: 1px solid var(--hairline);
  }

  .table tbody tr + tr > * {
    border-top: 0;
  }

  .table th,
  .table td {
    padding: 0;
  }

  .table tbody th {
    font-size: 1rem;
  }

  .table td {
    margin-top: 10px;
  }

  .table td::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    display: block;
    margin-bottom: 2px;
    color: var(--fog500);
    font-size: 0.75rem;
    font-weight: 650;
    font-stretch: 112%;
    letter-spacing: 0.06em;
  }
}

/* --- Contents ---------------------------------------------------------- */

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: flex;
  align-items: baseline;
  padding: 7px 12px;
  border-left: 2px solid var(--hairline);
  color: var(--fog300);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}

.toc a:hover {
  color: var(--fog100);
  border-left-color: var(--cini);
}

.toc .num {
  flex: none;
  min-width: 2em;
  font-size: 0.875em;
}

.toc-title {
  margin: 4px 0 10px 14px;
  color: var(--fog500);
  font-size: 0.75rem;
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: 0.06em;
}

.toc-side {
  display: none;
}

.toc-mobile {
  margin: 0 0 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--lit);
}

.toc-mobile summary {
  padding: 13px 18px;
  color: var(--fog300);
  font-size: 0.875rem;
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  cursor: pointer;
  list-style-position: inside;
}

.toc-mobile summary::marker {
  color: var(--cini);
}

.toc-mobile nav {
  padding: 0 14px 14px;
}

@media (min-width: 1024px) {
  .toc-mobile {
    display: none;
  }

  .toc-side {
    display: block;
    position: sticky;
    top: 104px;
    align-self: start;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
  }
}

/* --- Home -------------------------------------------------------------- */

.home {
  max-width: 60rem;
  margin: 0 auto;
}

.hero {
  display: grid;
  justify-items: center;
  padding: 8px 0 4px;
  text-align: center;
}

.hero-mark {
  width: clamp(168px, 46vw, 236px);
  height: auto;
  margin: -12px 0 -8px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--fog500);
  font-size: 0.8125rem;
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: 0.06em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 1.6rem + 6vw, 4.75rem);
  font-stretch: 125%;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 26ch;
  margin: 14px 0 12px;
  font-size: clamp(1.25rem, 1rem + 1.3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

.sub {
  max-width: 56ch;
  margin: 0 0 22px;
  color: var(--fog300);
}

.promise {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--lit);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}

.promise .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cini-bright);
  box-shadow: 0 0 10px var(--cini);
}

.home h2 {
  margin: 0 0 14px;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 650;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 12px;
  margin: 48px 0 52px;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  margin: 0;
  padding: 24px 20px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--lit);
}

/* A short stretch of painted road in the card's mode colour. */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 44px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--lane);
  box-shadow: 0 0 14px var(--lane-glow, var(--lane));
}

.card h3 {
  margin: 4px 0 6px;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
}

.card p {
  margin: 0;
  color: var(--fog300);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.mode-drive {
  --lane: var(--sodium);
  --lane-glow: var(--sodium-glow);
}

.mode-walk {
  --lane: var(--cini-bright);
  --lane-glow: var(--cini);
}

.mode-bike {
  --lane: var(--periwinkle);
}

.mode-ferry {
  --lane: var(--ferry);
  --lane-glow: var(--ferry-glow);
}

.mode-rail {
  --lane: var(--rail);
}

.offer {
  margin: 0 0 52px;
  padding: 26px 22px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 166, 48, 0.1), transparent 60%),
    var(--surface);
  box-shadow: var(--lit);
}

.offer p {
  max-width: 60ch;
  margin: 0;
  color: var(--fog300);
}

.offer h2 {
  margin-bottom: 8px;
}

.doc-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--lit);
  color: inherit;
  text-decoration: none;
}

.doc-link:hover {
  color: inherit;
  box-shadow: inset 0 1px 0 var(--highlight), 0 0 0 1px rgba(31, 209, 193, 0.45);
}

.doc-link .t {
  color: var(--fog100);
  font-size: 1.0625rem;
  font-weight: 650;
}

.doc-link .d {
  grid-column: 1;
  color: var(--fog300);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.doc-link .arrow {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--sodium);
  font-size: 1.25rem;
}

@media (prefers-reduced-motion: no-preference) {
  .doc-link,
  .nav a,
  .lang a {
    transition: box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  }
}

/* --- Footer ------------------------------------------------------------ */

.site-footer {
  background: rgba(6, 11, 18, 0.55);
  box-shadow: 0 -1px 0 var(--hairline);
}

.site-footer .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  color: var(--fog500);
  font-size: 0.875rem;
  line-height: 1.6;
}

.site-footer p {
  margin: 4px 0 0;
}

.site-footer a {
  color: var(--fog300);
  text-decoration-color: rgba(157, 176, 194, 0.4);
}

.site-footer a:hover {
  color: var(--fog100);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 12px;
}

.footer-nav a {
  font-weight: 600;
  text-decoration: none;
}

/* --- Print: the policy on paper ---------------------------------------- */

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .site-header,
  .toc,
  .skip,
  .footer-nav {
    display: none !important;
  }

  main {
    padding: 0;
  }

  .doc-layout:not(.single) {
    display: block;
  }

  a,
  strong,
  .num,
  .meta,
  .meta time,
  .site-footer,
  .site-footer a {
    color: #000;
  }

  .table,
  .card,
  .offer,
  .doc-link,
  .promise {
    background: none;
    box-shadow: none;
    border: 1px solid #bbb;
  }

  code {
    background: none;
    box-shadow: none;
  }

  .doc h2 {
    break-after: avoid;
  }
}
