/* RoutingIQ – routingiq.com
   Single-page site. No JavaScript, no third-party requests.
   Brand: black / #141414 surfaces / #CCFF00 accent / Inter 400+700 (self-hosted). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg: #000000;
  --surface: #141414;
  --surface-2: #1b1b1b;
  --line: #262626;
  --line-strong: #3a3a3a;
  --text: #ffffff;
  --text-2: #b3b3b3;
  --text-3: #8c8c8c;
  --accent: #ccff00;
  --accent-ink: #000000;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-s: 0.9rem;
  --fs-0: 1.0625rem;
  --fs-1: 1.2rem;
  --fs-2: clamp(1.5rem, 1.15rem + 1.5vw, 2.15rem);
  --fs-3: clamp(2.2rem, 1.4rem + 3.4vw, 3.6rem);

  --max: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 6vw + 2rem, 8rem);
  --radius: 8px;
  --header-h: 64px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-size: var(--fs-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--text); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-3); line-height: 1.08; letter-spacing: -0.025em; max-width: 14ch; }
h2 { font-size: var(--fs-2); line-height: 1.18; max-width: 26ch; }
h3 { font-size: var(--fs-1); line-height: 1.3; }
p { margin: 0; }
a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
img { display: block; max-width: 100%; height: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
section { padding-block: var(--section); scroll-margin-top: calc(var(--header-h) + 1rem); }
.lede { max-width: 60ch; }
.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.25rem;
  border-radius: 6px;
  font-weight: 700; font-size: var(--fs-s);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #d9ff33; }
.btn-secondary { border-color: var(--line-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--text-3); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  height: var(--header-h);
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo img { width: 148px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) { color: var(--text-2); text-decoration: none; font-size: var(--fs-s); }
.site-nav a:not(.btn):hover { color: var(--text); }
@media (max-width: 760px) {
  .site-nav a:not(.btn) { display: none; }
  .btn { padding: .7rem 1rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(5rem, 10vw, 9rem) clamp(4rem, 7vw, 6.5rem); }
.hero .wrap { position: relative; }
.hero-copy { max-width: 640px; position: relative; z-index: 1; }
.hero .sub { font-size: var(--fs-1); line-height: 1.5; margin-top: 1.5rem; max-width: 36em; }
.hero .claim { color: var(--accent); font-weight: 700; font-size: var(--fs-1); margin-top: 1.5rem; }
.hero .claim span { display: inline-block; margin-right: .6em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }
.hero .fit { margin-top: 2.5rem; font-size: var(--fs-s); color: var(--text-3); max-width: 44em; }
.hero .fit strong { color: var(--text-2); font-weight: 400; }
.hero-visual img { width: 100%; }
/* Two columns from tablet up: the key visual lives in its own column and bleeds off the top-right,
   so text and ring can never overlap, whatever the width. */
@media (min-width: 761px) {
  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 36%, 520px);
    column-gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
  }
  .hero-copy { grid-column: 1; grid-row: 1; }
  .hero-visual { grid-column: 2; grid-row: 1; position: relative; align-self: stretch; min-height: 320px; pointer-events: none; }
  .hero-visual img {
    position: absolute;
    width: 150%;
    right: -45%;
    top: 50%;
    transform: translateY(-60%);
  }
}
@media (min-width: 761px) and (max-width: 1000px) {
  h1 { font-size: clamp(2rem, 1.1rem + 3.2vw, 3rem); }
}
@media (max-width: 760px) {
  .hero { padding-top: 2rem; }
  .hero-visual { width: 160px; margin: 0 -1.5rem 1.5rem auto; }
}

/* ---------- problem ---------- */
.problem { border-top: 1px solid var(--line); }

/* timeline figure: issue curves (today vs with RoutingIQ) over the phases, cost per fix below */
.tl { margin: 3rem 0 0; }
.tl-legend { display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: var(--fs-s); margin-bottom: 1.25rem; }
.tl-legend span { display: inline-flex; align-items: center; gap: .6rem; color: var(--text-2); }
.tl-legend span.riq { color: var(--accent); }
.tl-legend i { width: 1.6rem; height: 2px; background: currentColor; border-radius: 1px; flex: 0 0 auto; }
.tl-legend span.today i { background: var(--text-3); }

.tl-plot { position: relative; }
.tl-plot svg { display: block; width: 100%; height: clamp(150px, 24vw, 230px); overflow: visible; }
.tl-plot .sep line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tl-plot .mark line { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.tl-plot .freeze { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.tl-plot .base { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tl-plot .c-today { fill: rgba(140, 140, 140, .22); stroke: var(--text-3); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.tl-plot .c-riq { fill: rgba(204, 255, 0, .16); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
/* marker labels are HTML so they stay readable at every width; x = same percentages as the SVG lines */
.tl-marks { position: absolute; inset: 0 0 auto 0; height: 100%; pointer-events: none; font-size: .72rem; color: var(--text-3); }
.tl-marks span { position: absolute; white-space: nowrap; line-height: 1; }
.tl-marks .m-mcad { right: 62.6%; top: 2.6rem; }
.tl-marks .m-ecad { right: 54.3%; top: 1rem; }
.tl-marks .m-freeze { left: 57.5%; top: 1rem; }

.tl-phases {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; grid-template-columns: 19fr 38fr 13fr 15fr 15fr; gap: 3px;
}
.tl-phases li { display: grid; gap: .5rem; }
.tl-phases b {
  position: relative; display: block; height: 52px;
  color: var(--text); font-size: clamp(.62rem, 1.5vw, .85rem); font-weight: 700; text-align: center;
}
.tl-phases b::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--h);
  background: var(--line-strong); border-radius: 2px 2px 0 0;
}
.tl-phases li:last-child b::after { background: var(--text-3); }
.tl-phases span {
  display: block; padding: .55rem .5rem; text-align: center;
  background: var(--surface); border-radius: 4px;
  font-size: clamp(.62rem, 1.5vw, .85rem); color: var(--text-2); line-height: 1.2;
}
.tl-phases span .short { display: none; }
.tl figcaption { margin-top: .9rem; font-size: var(--fs-s); color: var(--text-3); max-width: 70ch; }
@media (max-width: 760px) {
  .tl-legend { flex-direction: column; gap: .4rem; }
  .tl-marks { font-size: .62rem; }
  .tl-marks .m-freeze { top: .6rem; }
  .tl-marks .m-ecad { top: 1.9rem; }
  .tl-marks .m-mcad { top: 3.2rem; }
  .tl-phases span .long { display: none; }
  .tl-phases span .short { display: inline; }
  .tl-phases b { height: 42px; }
  .tl-phases b::after { height: calc(var(--h) * .65); }
}

.causes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 3rem; }
.causes > div { border-top: 2px solid var(--accent); padding-top: 1.25rem; }
.causes h3 { margin-bottom: .6rem; }
.pivot { margin-top: 3rem; max-width: 62ch; color: var(--text); }
@media (max-width: 760px) {
  .causes { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* ---------- how it fits ---------- */
.fits { border-top: 1px solid var(--line); }
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.4rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}
.flow li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  min-height: 7rem;
}
.flow li.riq { border-color: var(--accent); }
.flow li b { display: block; color: var(--text); font-size: var(--fs-0); margin-bottom: .25rem; }
.flow li.riq b { color: var(--accent); }
.flow li span { font-size: var(--fs-s); color: var(--text-2); }
/* arrow between nodes: a short line with a chevron, drawn in the gap */
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%; right: -1.95rem;
  width: 14px; height: 14px;
  border-top: 1.5px solid var(--text-3);
  border-right: 1.5px solid var(--text-3);
  transform: translateY(-50%) rotate(45deg);
}
.flow li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 50%; right: -2.1rem;
  width: 1.8rem; height: 1.5px;
  background: var(--text-3);
  transform: translateY(-50%);
}
.flow-note { margin-top: 1.25rem; font-size: var(--fs-s); color: var(--text-3); }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 1.9rem; }
  .flow li { min-height: 0; }
  .flow li:not(:last-child)::after {
    top: auto; bottom: -1.45rem; right: auto; left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }
  .flow li:not(:last-child)::before {
    top: auto; bottom: -1.75rem; right: auto; left: 50%;
    width: 1.5px; height: 1.6rem;
    transform: translateX(-50%);
  }
}

.promises {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.75rem 1.5rem;
  margin: 3.5rem 0 0;
}
.promises div { display: grid; gap: .6rem; align-content: start; }
.promises dd { font-size: var(--fs-s); }
@media (max-width: 1000px) {
  .promises { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 2.5rem; }
  .promises dd { font-size: var(--fs-0); }
  .promises dt { min-height: 0; }
}
.promises dt {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: .35rem .95rem;
  border: 1px solid var(--line-strong);
  border-radius: 1.5rem;
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-s);
  font-weight: 700;
  line-height: 1.2;
}
.promises dd { margin: 0; max-width: 46ch; }
@media (max-width: 760px) {
  .promises { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- who we are ---------- */
.who { border-top: 1px solid var(--line); }
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem 2rem; margin-top: 3rem; }
@media (max-width: 1000px) { .team { grid-template-columns: repeat(2, 1fr); } }
.team > div { border-top: 1px solid var(--line-strong); padding-top: 1.25rem; }
.team h3 { margin-bottom: .6rem; }
.team p + p { margin-top: .6rem; }
.partner {
  margin-top: 3rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: var(--fs-s);
}
.partner p { max-width: 70ch; }
.partner strong { color: var(--text); }
/* emblem slot (unused until the official file arrives): fixed aspect 41.2:20, min 165 px, clear space 24.3 % of its width */
.partner .emblem {
  flex: 0 0 auto;
  width: clamp(165px, 16vw, 206px); height: auto;
  margin: calc(clamp(165px, 16vw, 206px) * .243);
  margin-right: 0;
  filter: none; opacity: 1;
}
@media (max-width: 760px) {
  .team { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* ---------- next step ---------- */
.next { border-top: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 3rem; counter-reset: step; }
.steps li {
  list-style: none;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.75rem;
  counter-increment: step;
}
.steps { padding: 0; margin-left: 0; margin-right: 0; }
.steps h3 { display: flex; align-items: baseline; gap: .9rem; margin-bottom: 1rem; }
.steps h3::before {
  content: counter(step);
  color: var(--accent);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
}
.contact {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem 2rem;
  align-items: center;
}
.contact img { width: 96px; height: 96px; border-radius: 50%; }
.contact .name { color: var(--text); font-weight: 700; font-size: var(--fs-1); }
.contact .role { color: var(--text-2); }
.contact .lines { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.contact .lines a { text-decoration: none; color: var(--text); overflow-wrap: anywhere; }
.contact .lines a:hover { color: var(--accent); }
.contact .actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .contact { grid-template-columns: auto 1fr; }
  .contact .actions { grid-column: 1 / -1; }
}

/* ---------- questions (deliberately quiet) ---------- */
.faq { border-top: 1px solid var(--line); padding-block: calc(var(--section) * .7); }
.faq h2 { font-size: var(--fs-1); color: var(--text-2); max-width: none; }
.faq .list { margin-top: 1.5rem; max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.5rem 1rem 0;
  color: var(--text-2);
  font-size: var(--fs-0);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute; right: .4rem; top: 50%;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary { color: var(--text); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq summary:hover { color: var(--text); }
.faq .answer { padding: 0 0 1.25rem; max-width: 62ch; color: var(--text-2); }
.faq .answer p + p { margin-top: .6rem; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; font-size: var(--fs-s); color: var(--text-3); }
.site-footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .fine { margin-top: 1.5rem; max-width: 70ch; font-size: .8rem; }

/* ---------- legal pages ---------- */
.legal { padding-block: 3rem var(--section); }
.legal h1 { font-size: var(--fs-2); max-width: none; }
.legal h2 { font-size: var(--fs-1); margin-top: 2.5rem; }
.legal p, .legal li { max-width: 70ch; }
.legal p { margin-top: .75rem; }
.legal ul { padding-left: 1.2rem; margin: .75rem 0 0; }
.legal .todo { color: var(--accent); }
.legal .notice { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 1.5rem; font-size: var(--fs-s); }
