/* Breadth Analytics landing site
   Monochrome, monospace-accented, matching the Breadth wordmark.
   Dark is the brand default; a light theme follows the OS setting. */

:root {
  --bg: #121212;
  --bg-raised: #1a1a1a;
  --bg-sunken: #0c0c0c;
  --line: #2a2a2a;
  --line-strong: #3a3a3a;
  --text: #f4f4f4;
  --text-muted: #a3a3a3;
  --text-faint: #858585;
  --accent: #8fd4c1;
  --accent-ink: #0c0c0c;

  --mono: "Courier New", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --code: Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafafa;
    --bg-raised: #ffffff;
    --bg-sunken: #f0f0f0;
    --line: #e2e2e2;
    --line-strong: #cfcfcf;
    --text: #141414;
    --text-muted: #555555;
    --text-faint: #6b6b6b;
    --accent: #1f7a66;
    --accent-ink: #ffffff;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a { color: inherit; text-underline-offset: 0.2em; }
::selection { background: var(--accent); color: var(--accent-ink); }
img, svg { display: block; max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.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: -999px; top: 8px;
  background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--radius);
}
.skip:focus { left: 8px; z-index: 100; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Wordmark ---------- */
.wordmark { color: var(--text); width: 150px; height: auto; }
.wordmark text { fill: currentColor; }
.wordmark path { stroke: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.nav { display: flex; gap: clamp(4px, 2vw, 20px); font-family: var(--code); font-size: 14px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; text-decoration: none; color: var(--text-muted); }
.nav a:hover { color: var(--text); }
.nav a[aria-current] { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
@media (max-width: 900px) { .nav .nav-optional { display: none; } }

/* ---------- Shared section bits ---------- */
section { padding: clamp(64px, 10vw, 112px) 0; border-bottom: 1px solid var(--line); }
/* Rhythm by priority: hero and "what it is" read as one intro; capabilities and goals are reference, so tighter */
.hero-joined { border-bottom: 0; padding-bottom: 0; }
.intro-follow { padding-top: clamp(56px, 8vw, 88px); }
.reference { padding: clamp(56px, 7vw, 88px) 0; }

h1, h2, h3 { font-family: var(--mono); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(36px, 6vw, 64px); }
h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
h3 { font-size: 20px; margin-bottom: 8px; }

.lede { font-size: clamp(18px, 2vw, 21px); color: var(--text-muted); max-width: 62ch; margin: 20px 0 0; }
.section-intro { color: var(--text-muted); max-width: 64ch; margin: 0 0 40px; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--code); font-size: 15px; text-decoration: none;
  padding: 12px 20px; border-radius: var(--radius); border: 1px solid var(--line-strong);
}
.btn-icon { flex: none; width: 1.1em; height: 1.1em; fill: currentColor; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost:hover { border-color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(72px, 12vw, 140px); }
.hero h1 { max-width: 18ch; }
/* Product name with the bracket underline from the Breadth logo */
.bracket-word { position: relative; display: inline-block; padding: 0 0.2em 0.15em; color: var(--text); }
.bracket-word::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.1em; height: 0.6em;
  border: 1.5px solid var(--accent); border-top: 0;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 48px; padding: 0; list-style: none;
  font-family: var(--code); font-size: 14px; color: var(--text-faint);
}
/* Small bracket from the logo as the list marker; drawn, so screen readers skip it */
.hero-meta li { display: flex; align-items: center; gap: 0.6em; }
.hero-meta li::before {
  content: ""; flex: none; width: 0.9em; height: 0.5em; margin-top: 0.1em;
  border: 1.5px solid var(--accent); border-top: 0;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
}

/* ---------- Capabilities ---------- */
/* Two groups: what runs today (a ruled list) and what is designed (dashed, like planned chips) */
.cap-group { margin-top: 48px; }
.cap-group > h3 {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
  font-family: var(--code); font-size: 15px; letter-spacing: 0; color: var(--text);
}
/* Status capsule: the same solid/dashed mark as the architecture chips */
.cap-group > h3::before {
  content: ""; flex: none; width: 28px; height: 14px;
  border: 1px solid var(--accent); border-radius: 12px;
}
.cap-group-next > h3::before { border: 1px dashed var(--line-strong); }
.cap-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; column-gap: 48px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.cap { padding: 20px 0; border-top: 1px solid var(--line); }
.cap h4 { font-family: var(--mono); font-weight: 400; font-size: 22px; line-height: 1.15; margin: 0 0 6px; }
.cap p { margin: 0; color: var(--text-muted); font-size: 15.5px; max-width: 60ch; }
.cap-list-next { gap: 12px; margin-top: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.cap-list-next .cap { padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- Architecture ---------- */
.arch {
  display: grid; gap: 16px;
  grid-template-columns: 1fr minmax(160px, 260px);
}
@media (max-width: 760px) { .arch { grid-template-columns: 1fr; } }
.layers { display: flex; flex-direction: column; gap: 8px; }
/* Stretch the layers like the rail's groups, so both columns end at the same line */
.layers .layer { flex: 1; }
.layer {
  display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center;
  padding: 16px 20px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
}
@media (max-width: 520px) { .layer { grid-template-columns: 1fr; gap: 6px; } }
.layer .name { font-family: var(--code); font-size: 13px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--code); font-size: 14px; padding: 4px 10px;
  border: 1px solid var(--line-strong); border-radius: 12px; max-width: 100%;
}
.chip.planned { border-style: dashed; color: var(--text-muted); }
.rail {
  display: flex; flex-direction: column; gap: 8px;
}
.rail .layer { grid-template-columns: 1fr; flex: 1; align-content: center; gap: 10px; }
.legend { margin: 0 0 16px; font-family: var(--code); font-size: 13px; color: var(--text-faint); display: flex; gap: 20px; flex-wrap: wrap; }
.legend .chip { font-size: 12px; }

/* ---------- Lab ---------- */
.lab {
  display: grid; gap: 40px 64px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "intro reqs" "term term" "result aside";
}
.lab-intro { grid-area: intro; }
.lab-reqs { grid-area: reqs; }
.lab .terminal { grid-area: term; }
.lab-result { grid-area: result; }
.lab-aside { grid-area: aside; }
@media (max-width: 960px) {
  .lab { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "reqs" "term" "result" "aside"; gap: 32px; }
}
.lab .section-intro { margin-bottom: 0; }
.lab-reqs dl { margin: 0; display: grid; gap: 0; }
/* 17ch fits the longest label, "Recommended Host", on one line */
.lab-reqs dl > div { display: grid; grid-template-columns: 17ch 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.lab-reqs dl > div:last-child { border-bottom: 1px solid var(--line); }
.lab-reqs dt { font-family: var(--code); font-size: 14px; color: var(--text-faint); padding-top: 1px; }
.lab-reqs dd { margin: 0; }

.terminal { background: var(--bg-sunken); border: 1px solid var(--line); border-radius: var(--radius); }
.terminal-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 8px 6px 20px; border-bottom: 1px solid var(--line);
}
.terminal-title { font-family: var(--code); font-size: 13px; color: var(--text-faint); }
.copy {
  font-family: var(--code); font-size: 13px; color: var(--text-muted); background: none; cursor: pointer;
  min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.copy:hover { color: var(--text); border-color: var(--text); }
.terminal pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--code); font-size: 14px; line-height: 1.75; color: var(--text); }
.terminal .prompt { color: var(--accent); user-select: none; }
.terminal .comment { color: var(--text-faint); }

.lab-reqs h3, .lab-result h3, .lab-note h3 { font-family: var(--code); font-size: 15px; margin-bottom: 10px; }
.lab-result ul { list-style: none; margin: 0; padding: 0; }
.lab-result li { display: grid; grid-template-columns: 24ch 1fr; gap: 4px 16px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 15.5px; }
@media (max-width: 1120px) { .lab-result li { grid-template-columns: 1fr; } }
.lab-result code { font-family: var(--code); font-size: 14px; color: var(--text); }
.lab-note { padding: 20px 24px; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.lab-note p { margin: 0; color: var(--text-muted); font-size: 15.5px; }
.lab-note p + p { margin-top: 8px; }
.lab-platform { margin-top: 24px; }
.lab-more { margin: 24px 0 0; font-family: var(--code); font-size: 14px; }
.lab-more a { color: var(--accent); }

/* ---------- About ---------- */
.about { display: grid; gap: 32px 64px; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.prose p { color: var(--text-muted); margin: 0 0 18px; font-size: 18px; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Goals ---------- */
.goals { list-style: none; margin: 32px 0 0; padding: 0; }
.goal { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.goal:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 520px) { .goal { grid-template-columns: 36px 1fr; gap: 12px; } }
.goal-num { font-family: var(--code); color: var(--accent); font-size: 14px; padding-top: 4px; }
.goal h3 { font-size: 22px; margin-bottom: 6px; }
.goal p { margin: 0; color: var(--text-muted); max-width: 70ch; }


/* ---------- Email reveal ---------- */
.contact-reveal { margin-top: 20px; }
.contact-help { margin: 0 0 12px; color: var(--text-muted); font-size: 15.5px; }
.contact-widget { min-height: 65px; }
.contact-status { margin: 12px 0 0; font-family: var(--code); font-size: 14px; color: var(--text-muted); }
.contact-status:empty { display: none; }
.contact-status a { color: var(--text); text-decoration-color: var(--accent); }
.contact-address { font-size: 15px; }
.link-button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  font: inherit; color: var(--text-muted); background: none; border: 0;
  text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer;
}
.link-button:hover { color: var(--text); }

/* ---------- Facts ---------- */
.facts {
  margin: 48px 0 0; display: grid; gap: 0 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.facts div { padding: 14px 0; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--code); font-size: 13px; color: var(--text-faint); margin-bottom: 4px; }
.facts dd { margin: 0; font-family: var(--code); font-size: 15px; }
.facts a { color: var(--text); text-decoration-color: var(--accent); }
.facts a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0; color: var(--text-faint); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer .wordmark { width: 120px; color: var(--text-muted); }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; font-family: var(--code); font-size: 14px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
