/* OchoaLabs: one stylesheet for the whole site.
 *
 * The colours are the tool's colours (tools/bench/theme.py), which are the
 * logo's colours: ink #0b1220, OchoaLabs blue #2f6fc0, white. Orange means
 * one thing here as it does there, the nose of the aircraft, and is used
 * nowhere else. Someone who has seen the configurator should recognise the
 * site, and someone who has seen the site should recognise the configurator.
 *
 * No web fonts, no frameworks, no trackers: the whole site is three HTML
 * files, this stylesheet and one script. It loads on a phone tethered at a
 * flying field.
 */

:root {
  --bg: #0b1220;
  --surface: #101a2c;
  --card: #152036;
  --card2: #1c2a45;
  --border: #27395c;
  --text: #e9eef8;
  --muted: #8b9bb8;
  --accent: #2f6fc0;
  --accent-hover: #3d80d6;
  --forward: #ff6a2b;
  --good: #3ddc84;
  --warn: #ffb02e;
  --bad: #ff5c5c;

  --sans: Inter, "Segoe UI", Ubuntu, "DejaVu Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", Menlo, "DejaVu Sans Mono", Consolas, monospace;
  --wide: 1180px;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 0; }

/* --- the strip at the very top ------------------------------------------- */

.strip {
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 8px 16px;
}
.strip a { color: #fff; text-decoration: underline; }

/* --- header -------------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 26, 44, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand-name b { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.brand-name i { display: block; font-style: normal; font-size: 11px; color: var(--muted);
                letter-spacing: 0.14em; text-transform: uppercase; margin-top: -2px; }

nav.main { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav.main a {
  color: var(--muted); padding: 8px 12px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500;
}
nav.main a:hover { background: var(--card); color: var(--text); text-decoration: none; }
nav.main a[aria-current="page"] { color: var(--text); background: var(--card2); }

/* --- headings ------------------------------------------------------------ */

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(34px, 5.6vw, 62px); font-weight: 800; text-transform: uppercase; }
h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; text-transform: uppercase; }
h3 { font-size: 19px; font-weight: 700; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--accent); }

.lead { color: var(--muted); font-size: 18px; max-width: 62ch; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

section { padding: 76px 0; }
/* The header floats over the page, so an anchored jump must stop short of it
   or the heading lands underneath. */
[id] { scroll-margin-top: 96px; }
section + section { border-top: 1px solid var(--border); }
.section-head { margin-bottom: 40px; }

/* --- hero ---------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden; padding: 88px 0 76px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 460px at 78% 22%, rgba(47, 111, 192, 0.20), transparent 70%),
    linear-gradient(180deg, #0d1626 0%, var(--bg) 100%);
}
/* A faint bench grid behind everything, the way graph paper sits under a
   drawing. Pointer-events off so it never eats a click. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(47, 111, 192, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 111, 192, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
}
.hero .wrap { position: relative; display: grid; gap: 48px; align-items: center;
              grid-template-columns: 1.05fr 0.95fr; }
.hero p.lead { margin: 20px 0 30px; font-size: 19px; }
.hero-art { justify-self: center; width: min(420px, 100%); }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--border); background: var(--card2); color: var(--text);
  cursor: pointer;
}
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn small { font-weight: 400; color: rgba(255,255,255,0.75); }

/* --- chips --------------------------------------------------------------- */

.chip {
  display: inline-block; padding: 3px 11px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--card2);
  color: var(--muted); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.chip.good { color: var(--good); border-color: var(--good); }
.chip.warn { color: var(--warn); border-color: var(--warn); }
.chip.bad  { color: var(--bad);  border-color: var(--bad); }

/* --- cards --------------------------------------------------------------- */

.grid { display: grid; gap: 20px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.card h3 { margin-bottom: 2px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card .foot { margin-top: auto; padding-top: 6px; font-size: 14px; }
a.card:hover { border-color: var(--accent); text-decoration: none; }

.card-art {
  height: 132px; margin: -6px -6px 4px; border-radius: 8px;
  background: linear-gradient(160deg, #16233c, #0f1a2c);
  border: 1px solid var(--border);
  display: grid; place-items: center;
}
.card-art svg { width: 84px; height: 84px; }

/* --- numbered steps ------------------------------------------------------ */

.steps { counter-reset: step; display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding-top: 22px; border-top: 3px solid var(--border); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font: 700 13px/1 var(--mono); color: var(--accent);
  position: absolute; top: -3px; left: 0; padding: 0 0 8px;
  border-top: 3px solid var(--accent); margin-top: -3px;
}
.step h3 { margin: 26px 0 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* --- tables -------------------------------------------------------------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
th { background: var(--surface); color: var(--muted); font-size: 12px;
     letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.mono, .mono { font-family: var(--mono); font-size: 13.5px; }
td.hash { color: var(--muted); word-break: break-all; }

/* --- notes and code ------------------------------------------------------ */

.note {
  border-left: 3px solid var(--accent); background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px;
}
.note.warn { border-left-color: var(--warn); }
pre {
  background: #0a1120; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; overflow-x: auto; font: 400 13.5px/1.6 var(--mono);
  color: var(--text); margin: 0 0 16px;
}
code { font-family: var(--mono); font-size: 0.92em; color: #cfe0ff; }
pre code { color: inherit; }

/* --- downloads ----------------------------------------------------------- */

.dl-main {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
  background: var(--card); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 26px;
}
.dl-main .meta { color: var(--muted); font-size: 14px; }
.dl-list { display: grid; gap: 12px; }
.dl-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
}
.dl-row .name { font-weight: 600; }
.dl-row .meta { color: var(--muted); font-size: 13.5px; }
.dl-row .spacer { margin-left: auto; }

/* --- footer -------------------------------------------------------------- */

footer.site-foot { background: var(--surface); border-top: 1px solid var(--border); padding: 54px 0 34px; }
footer.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
footer.site-foot h4 { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
                      color: var(--muted); margin: 0 0 14px; }
footer.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
footer.site-foot a { color: var(--text); font-size: 15px; }
footer.site-foot p { color: var(--muted); font-size: 14px; }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border);
               display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
               color: var(--muted); font-size: 13.5px; }

/* --- narrow screens ------------------------------------------------------ */

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; width: min(320px, 80%); }
  .grid.c4, .steps { grid-template-columns: repeat(2, 1fr); }
  footer.site-foot .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  section { padding: 56px 0; }
  .site-head .wrap { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  nav.main { margin-left: 0; width: 100%; }
  nav.main a { padding: 8px 10px; }
  .grid.c2, .grid.c3, .grid.c4, .steps { grid-template-columns: 1fr; }
  footer.site-foot .cols { grid-template-columns: 1fr; }
}
