/* ============================================================
   Bluefin.AI — Design System
   Typefaces: Archivo (display) + IBM Plex Sans (body & labels)
   ============================================================ */

:root {
  /* "navy/graphite" tokens now hold Bluefin's lighter, clean-energy palette —
     pale sky-blue and sage tints rather than dark backgrounds. Kept the same
     names so every component below repaints automatically. */
  --navy-950: #eef4fc;
  --navy-900: #ffffff;
  --navy-800: #e1ecf9;
  --graphite-700: #eaf5ee;
  --graphite-600: #dcefe2;
  --line-dark: #d7e3f0;
  --line-dark-soft: #e7eff8;
  --ink-on-dark: #102341;
  --ink-on-dark-muted: #45566f;
  --ink-on-dark-faint: #5c6e88;

  --paper: #f5f6f8;
  --paper-raised: #ffffff;
  --paper-sunken: #eceef2;
  --line-light: #d9dce3;
  --ink-on-light: #131a26;
  --ink-on-light-muted: #4c5567;
  --ink-on-light-faint: #7c8598;

  /* Bluefin ESI brand blue, sampled from the logo (#0061E4) */
  --accent: #0061e4;
  --accent-strong: #0050c2;
  --accent-soft: rgba(0, 97, 228, 0.1);
  --accent-line: rgba(0, 97, 228, 0.38);
  --signal-blue: #4c7ef3;
  --leaf: #3fa66b;
  --amber: #c98a3c;

  /* Deliberately dark footer band — the one grounding anchor on an otherwise light page */
  --footer-bg: #0b1e3d;
  --footer-ink: #e9f1fc;
  --footer-ink-muted: #93a9c7;
  --footer-line: rgba(255, 255, 255, 0.12);

  --font-display: "Archivo", "Arial Narrow", Helvetica, Arial, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1180px;
  --gutter: 24px;
  --radius-s: 3px;
  --radius-m: 6px;

  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink-on-light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow-xl { font-size: 1.4rem; gap: 14px; }
.eyebrow-xl::before { width: 36px; height: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost-dark {
  background: transparent;
  border-color: var(--line-dark);
  color: var(--ink-on-dark);
}
.btn-ghost-dark:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-ghost-light {
  background: transparent;
  border-color: var(--line-light);
  color: var(--ink-on-light);
}
.btn-ghost-light:hover { border-color: var(--accent-strong); color: var(--accent-strong); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-light);
  box-shadow: 0 1px 0 rgba(16, 35, 65, 0.03);
  transition: background-color 200ms ease;
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink-on-dark);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 1px;
  flex: none;
}
.brand-logo { height: 28px; width: auto; display: block; flex: none; }
.footer-logo-badge {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  padding: 7px 11px;
  border-radius: var(--radius-s);
  flex: none;
}
.footer-logo-badge .brand-logo { height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand small {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--ink-on-dark-faint);
  font-weight: 500;
  display: block;
  margin-top: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-on-dark-muted);
  position: relative;
  padding: 6px 0;
  transition: color 160ms ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink-on-dark); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-s);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--ink-on-dark);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    background: var(--navy-950);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--gutter) 32px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    overflow-y: auto;
  }
  .nav-links a {
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-dark-soft);
    font-size: 1.05rem;
  }
  body.nav-open .nav-links { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-cta .btn-primary { display: none; }
  body.nav-open .nav-links::after {
    content: "";
    display: block;
    margin-top: 20px;
  }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Sections ---------- */
section { position: relative; }
.section-dark {
  background: var(--navy-950);
  color: var(--ink-on-dark);
}
.section-graphite { background: var(--graphite-700); color: var(--ink-on-dark); }
.section-light { background: var(--paper); color: var(--ink-on-light); }
.section-raised { background: var(--paper-raised); color: var(--ink-on-light); }
.section-pad { padding-block: 96px; }
.section-pad-s { padding-block: 64px; }
@media (max-width: 700px) {
  .section-pad { padding-block: 64px; }
  .section-pad-s { padding-block: 44px; }
}

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 14px; }
.section-head p { margin-top: 16px; font-size: 1.05rem; color: var(--ink-on-dark-muted); }
.section-light .section-head p, .section-raised .section-head p { color: var(--ink-on-light-muted); }

hr.rule { border: none; border-top: 1px solid var(--line-dark-soft); margin: 0; }
.section-light hr.rule, .section-raised hr.rule { border-top: 1px solid var(--line-light); }

/* ---------- Hero ---------- */
.hero {
  background: var(--navy-950);
  color: var(--ink-on-dark);
  padding-top: 76px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: stretch;
  padding-block: 56px 40px;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .hero-visual-photo { aspect-ratio: 4 / 3; }
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.35rem);
  margin-top: 18px;
}
.hero-lede {
  font-size: 1.15rem;
  color: var(--ink-on-dark-muted);
  max-width: 46ch;
  margin-top: 22px;
}
.hero-cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.hero-stat { min-width: 130px; }
.hero-stat .num { font-family: var(--font-body); font-size: 1.5rem; color: var(--accent); }
.hero-stat .label { font-size: 0.82rem; color: var(--ink-on-dark-faint); margin-top: 4px; }

.hero-visual-wrap { position: relative; height: 100%; }
.hero-visual {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: linear-gradient(180deg, #dcebfb 0%, #cfe3f7 55%, #c3dbf5 100%);
}
.hero-visual-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 980px) {
  .hero-visual { height: auto; min-height: 0; }
}
.banner-photo {
  width: 100%;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line-light);
  position: relative;
}
.banner-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.render-tag {
  position: absolute;
  bottom: 8px; left: 10px;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 1px 1px rgba(0, 0, 0, 0.4);
  padding: 0;
  opacity: 0.65;
  transition: opacity 140ms ease;
  line-height: 1.3;
  pointer-events: none;
}
.banner-photo:hover .render-tag { opacity: 1; pointer-events: auto; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-dark-soft);
  border: 1px solid var(--line-dark-soft);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.section-light .card-grid, .section-raised .card-grid {
  background: var(--line-light);
  border-color: var(--line-light);
}
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--navy-900);
  padding: 34px 30px;
}
.section-light .card, .section-raised .card { background: var(--paper-raised); }
.card .idx { font-family: var(--font-body); font-size: 0.78rem; color: var(--accent); }
.card h3 { font-size: 1.18rem; margin-top: 14px; }
.card p { margin-top: 12px; color: var(--ink-on-dark-muted); font-size: 0.96rem; }
.section-light .card p, .section-raised .card p { color: var(--ink-on-light-muted); }
.card a.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px; font-size: 0.88rem; font-weight: 600; color: var(--accent);
}

/* ---------- Audience pathway cards ---------- */
.pathway-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .pathway-grid { grid-template-columns: 1fr; } }
.pathway-card {
  border: 1px solid var(--line-light);
  border-radius: var(--radius-m);
  padding: 32px 28px;
  background: var(--paper-raised);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 160ms ease, transform 160ms ease;
}
.pathway-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.pathway-card h3 { font-size: 1.25rem; }
.pathway-card p { color: var(--ink-on-light-muted); font-size: 0.95rem; flex: 1; }
.pathway-tag {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-on-light-faint);
}

/* ---------- Operating states diagram ---------- */
.states-wrap {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-m);
  background: var(--navy-900);
  padding: 30px;
}
.state-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.state-tab {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 10px 16px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--ink-on-dark-muted);
  cursor: pointer;
  transition: all 160ms ease;
  text-align: left;
}
.state-tab .n { color: var(--accent); margin-right: 8px; }
.state-tab[aria-selected="true"] {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--ink-on-dark);
}
.state-diagram { min-height: 220px; }
.state-diagram svg { width: 100%; height: auto; }
.state-caption {
  margin-top: 18px;
  font-size: 0.94rem;
  color: var(--ink-on-dark-muted);
  max-width: 62ch;
}
.flow-line { stroke: var(--ink-on-dark-faint); stroke-width: 2; fill: none; stroke-dasharray: 6 5; }
.flow-line.active { stroke: var(--accent); animation: dash 1.1s linear infinite; }
.flow-line.dim { stroke: var(--line-dark); }
@keyframes dash { to { stroke-dashoffset: -22; } }
@media (prefers-reduced-motion: reduce) { .flow-line.active { animation: none; } }

.dg-box { fill: var(--navy-800); stroke: var(--line-dark); stroke-width: 1; }
.dg-title { fill: var(--ink-on-dark-muted); font-size: 11px; letter-spacing: 0.04em; }
.dg-sub { fill: var(--ink-on-dark); font-size: 12px; }
.dg-badge { fill: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; }
.dg-x { stroke: #d17454; stroke-width: 2; }
.dg-group { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: 0.55; }

/* ---------- Specs component ---------- */
.specs-panel {
  border: 1px solid var(--line-light);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--paper-raised);
}
.specs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line-light);
}
.specs-row:first-child { border-top: none; }
.specs-row .k {
  padding: 16px 22px;
  font-size: 0.92rem;
  color: var(--ink-on-light-muted);
  background: var(--paper-sunken);
}
.specs-row .v {
  padding: 16px 22px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-on-light);
}
.specs-row .v.pending { color: var(--ink-on-light-faint); font-style: italic; }
@media (max-width: 620px) { .specs-row { grid-template-columns: 1fr; } .specs-row .k { padding-bottom: 8px; } }
.specs-note {
  padding: 18px 22px;
  background: var(--paper-sunken);
  border-top: 1px solid var(--line-light);
  font-size: 0.86rem;
  color: var(--ink-on-light-muted);
}

/* ---------- Process steps ---------- */
.process-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .process-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process-row { grid-template-columns: 1fr; } }
.process-step {
  border-top: 2px solid var(--accent);
  padding-top: 18px;
}
.process-step .n { font-family: var(--font-body); color: var(--ink-on-dark-faint); font-size: 0.82rem; }
.process-step h4 { font-size: 1.05rem; margin-top: 8px; font-family: var(--font-body); font-weight: 700; }
.process-step p { margin-top: 8px; font-size: 0.9rem; color: var(--ink-on-light-muted); }
.process-arrow { display: none; }

/* ---------- Definition list / detail rows ---------- */
.detail-list { display: flex; flex-direction: column; gap: 28px; }
.detail-row { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line-light); }
.detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.detail-row h4 { font-size: 1.05rem; }
.detail-row p, .detail-row ul { color: var(--ink-on-light-muted); font-size: 0.95rem; margin-top: 4px; }
.detail-row ul { padding-left: 18px; margin-top: 10px; }
.detail-row li { margin-bottom: 6px; }
@media (max-width: 760px) { .detail-row { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- Callout / notice ---------- */
.callout {
  border: 1px solid var(--line-light);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-s);
  padding: 20px 24px;
  background: var(--paper-sunken);
  font-size: 0.92rem;
  color: var(--ink-on-light-muted);
}
.section-dark .callout, .section-graphite .callout {
  background: var(--navy-900);
  border-color: var(--line-dark);
  border-left-color: var(--accent);
  color: var(--ink-on-dark-muted);
}

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-on-light);
}
.field .opt { font-weight: 400; color: var(--ink-on-light-faint); }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-s);
  background: var(--paper-raised);
  color: var(--ink-on-light);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field .err {
  font-size: 0.8rem;
  color: #b8482f;
  min-height: 1em;
}
.field[data-invalid="true"] input, .field[data-invalid="true"] select, .field[data-invalid="true"] textarea {
  border-color: #b8482f;
}
.form-status {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: var(--radius-s);
  font-size: 0.92rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.info { background: var(--paper-sunken); color: var(--ink-on-light-muted); border: 1px solid var(--line-light); }
.form-status.success { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--accent-line); }

/* ---------- Footer ---------- */
/* Deliberately the one dark section left on the site — a grounding band
   under an otherwise light, clean-energy palette. Uses its own --footer-*
   tokens rather than the (now light) navy/ink-on-dark tokens above. */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink-muted);
  padding-block: 64px 36px;
}
.site-footer .brand { color: var(--footer-ink); }
.site-footer .brand small { color: var(--footer-ink-muted); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h5 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6f88ab;
  margin: 0 0 16px;
  font-weight: 500;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { font-size: 0.92rem; color: var(--footer-ink-muted); transition: color 140ms ease; }
.footer-grid a:hover { color: var(--footer-ink); }
.footer-brand p { font-size: 0.92rem; max-width: 34ch; margin-top: 14px; color: var(--footer-ink-muted); }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--footer-line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #6f88ab;
}
.footer-bottom .disclaimer { max-width: 62ch; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 36px; } }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font-family: var(--font-body);
  font-size: 0.74rem;
  padding: 6px 12px;
  border: 1px solid var(--line-light);
  border-radius: 20px;
  color: var(--ink-on-light-muted);
}
.section-dark .tag, .section-graphite .tag { border-color: var(--line-dark); color: var(--ink-on-dark-muted); }

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 560ms ease, transform 560ms ease;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #ffffff;
  padding: 12px 18px;
  z-index: 1000;
  border-radius: var(--radius-s);
}
.skip-link:focus { left: 12px; top: 12px; }

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