/* Buoy-Bot site — shared styles. Two pages use this: index.html and design.html. */

:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --ink: #12212e;
  --ink-2: #51657a;
  --ink-3: #7d8fa0;
  --accent: #1c6ea4;
  --hair: #e3e9ee;
  --shadow: 0 1px 2px rgba(18,33,46,.06), 0 10px 32px rgba(18,33,46,.07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1419;
    --surface: #131d25;
    --surface-2: #18242e;
    --ink: #e8eef3;
    --ink-2: #9db0c0;
    --ink-3: #7b8d9c;
    --accent: #5aa9d6;
    --hair: #1f2d38;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 32px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  --bg:#0d1419; --surface:#131d25; --surface-2:#18242e; --ink:#e8eef3;
  --ink-2:#9db0c0; --ink-3:#7b8d9c; --accent:#5aa9d6; --hair:#1f2d38;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 32px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }

/* ---------- header ---------- */
header { padding: 30px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand svg .s { stroke: var(--accent); fill: none; stroke-linecap: round; }
.brand b { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
nav.top { display: flex; gap: 20px; font-size: 14.5px; font-weight: 500; }
nav.top a { text-decoration: none; color: var(--ink-2); }
nav.top a:hover, nav.top a[aria-current="page"] { color: var(--accent); }

/* ---------- type ---------- */
h1 { margin: 0 0 18px; font-size: clamp(32px, 5.4vw, 50px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
.lead { margin: 0 0 20px; font-size: clamp(17px, 2.3vw, 20px); color: var(--ink-2); max-width: 52ch; }
h2 { margin: 0 0 20px; font-size: 13px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
section { padding: 0 0 56px; }
p { max-width: 68ch; }

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border: 1px solid var(--hair); border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); background: var(--surface);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; text-decoration: none;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
}
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: var(--surface); color: var(--accent); border-color: var(--hair); }

/* ---------- blocks ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; padding: 22px 20px; }
.card p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

.panel-wide { background: var(--surface-2); border: 1px solid var(--hair); border-radius: 16px; padding: 28px 26px; }
.panel-wide p { margin: 0; color: var(--ink-2); }
.panel-wide p + p { margin-top: 14px; }

.note {
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
}
.note p { margin: 0; color: var(--ink-2); font-size: 15px; }
.note strong { color: var(--ink); }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table caption { text-align: left; color: var(--ink-3); font-size: 13px; padding-bottom: 10px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--hair); vertical-align: top; }
th { font-weight: 600; color: var(--ink-3); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
td.n { font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
.tablewrap { background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; padding: 6px 8px; overflow-x: auto; }


ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
ol.steps li {
  counter-increment: s; position: relative; padding: 0 0 0 44px; margin-bottom: 16px;
}
ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--hair);
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
ol.steps b { display: block; font-size: 15.5px; font-weight: 600; }
ol.steps span { color: var(--ink-2); font-size: 14.5px; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--hair); padding: 24px 0 40px;
  font-size: 13.5px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between;
}
/* Full width, so the notice wraps onto its own row rather than joining the
   space-between line above it. */
footer .copyright { flex-basis: 100%; }

@media (max-width: 820px) {
  .cards { grid-template-columns: 1fr; }
  td:first-child { white-space: normal; }
}

/* ---------- home page hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 52px; align-items: center; padding: 54px 0 60px; }
figure.render { margin: 0; }
figure.render .panel {
  background: var(--surface); border: 1px solid var(--hair); border-radius: 16px;
  box-shadow: var(--shadow); padding: 20px; display: grid; place-items: center;
}
figure.render img { width: 100%; height: auto; max-width: 240px; display: block; }
figure.render figcaption { margin-top: 12px; font-size: 13px; color: var(--ink-3); text-align: center; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding: 34px 0 44px; }
  figure.render { order: -1; }
  figure.render img { max-width: 200px; }
}

/* ---------- generated document page (build guide) ---------- */
article.doc { padding: 40px 0 60px; max-width: 760px; }
article.doc h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 14px; }
.docnote {
  font-size: 14.5px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--hair); border-radius: 12px; padding: 16px 18px; margin: 0 0 40px;
  max-width: none;
}
/* doc headings are real headings, not the small-caps section labels used elsewhere */
article.doc h2 {
  font-size: 25px; font-weight: 700; letter-spacing: -0.02em; text-transform: none;
  color: var(--ink); margin: 52px 0 14px; padding-top: 18px; border-top: 1px solid var(--hair);
}
article.doc h3 {
  font-size: 17.5px; font-weight: 600; letter-spacing: -0.01em; text-transform: none;
  color: var(--ink); margin: 32px 0 10px;
}
article.doc p { margin: 0 0 16px; max-width: none; }
article.doc > hr { display: none; }           /* h2 already carries a rule */
article.doc ul, article.doc ol { margin: 0 0 18px; padding-left: 24px; }
article.doc li { margin-bottom: 7px; }
article.doc li > ul, article.doc li > ol { margin: 7px 0 0; }
article.doc blockquote {
  margin: 34px 0 22px; padding: 14px 20px;
  background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
}
article.doc blockquote p { margin: 0; color: var(--ink-2); }
article.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .89em; background: var(--surface-2); border: 1px solid var(--hair);
  border-radius: 5px; padding: 1px 5px;
}
article.doc .tablewrap { margin: 0 0 22px; }
article.doc table { font-size: 14px; }
article.doc td:first-child { white-space: normal; }

/* task-list checkboxes — it is a checklist, so make it one */
ul.checks, ol.checks { list-style: none; padding-left: 0; }
li.check { margin-bottom: 4px; }
li.check label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
li.check input[type="checkbox"] {
  margin: 4px 0 0; flex: none; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer;
}
li.check input:checked + span { color: var(--ink-3); text-decoration: line-through; }

/* references to documents that are not published */
.unpub { color: var(--ink-3); border-bottom: 1px dotted var(--ink-3); cursor: help; }
.unpub::after { content: " (not published)"; font-size: .85em; color: var(--ink-3); }

/* drawings and stage renders */
figure.shot { margin: 26px 0; }
figure.shot img {
  display: block; width: 100%; height: auto; max-width: 100%;
  background: var(--surface); border: 1px solid var(--hair); border-radius: 12px;
}
figure.shot figcaption { margin-top: 9px; font-size: 13px; color: var(--ink-3); }
.shots { display: grid; gap: 4px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 26px 0; }
.shots figure.shot { margin: 0; }
.shots.modules { gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.shots.modules figure.shot img { background: var(--surface-2); padding: 10px; }

@media (max-width: 820px) {
  article.doc h2 { font-size: 22px; margin-top: 40px; }
  .shots { grid-template-columns: 1fr; }
}

/* ---------- annotated general arrangement (design page) ---------- */
figure.ga {
  margin: 0; display: grid; gap: 30px; align-items: start;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
}
.ga-art {
  background: var(--surface); border: 1px solid var(--hair); border-radius: 16px;
  box-shadow: var(--shadow); padding: 14px;
}
.ga-svg { display: block; width: 100%; height: auto; }
/* leader lines: a light halo under an accent stroke keeps them legible over the render */
.ga-halo line, .ga-halo circle { stroke: var(--surface); stroke-width: 7; fill: none; stroke-linecap: round; }
.ga-ink  line, .ga-ink  circle { stroke: var(--accent); stroke-width: 3; fill: none; stroke-linecap: round; }
.ga-ink  circle { fill: var(--accent); stroke: none; }
.ga-balloons circle { fill: var(--accent); stroke: var(--surface); stroke-width: 5; }
.ga-balloons text {
  fill: #fff; font-family: inherit; font-size: 32px; font-weight: 700;
  text-anchor: middle; dominant-baseline: central;
}

ol.ga-key { margin: 0; padding: 0; list-style: none; counter-reset: ga; }
ol.ga-key li {
  counter-increment: ga; position: relative; padding: 0 0 0 40px; margin-bottom: 15px;
  color: var(--ink-2); line-height: 1.55;
}
ol.ga-key li:last-child { margin-bottom: 0; }
ol.ga-key li b { color: var(--ink); font-weight: 600; }
ol.ga-key li::before {
  content: counter(ga); position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 26px; text-align: center;
}
.ga-note { margin: 22px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.ga-note b { color: var(--ink-2); font-weight: 600; }

@media (max-width: 820px) {
  figure.ga { grid-template-columns: 1fr; gap: 24px; }
  .ga-art { max-width: 360px; margin: 0 auto; }
}
