/* ==========================================================================
   Besheer — Operational design for the AI era
   Type: Geist (SIL OFL, self-hosted)   Meridian: Voltage (#0E7490 → #84CC16)
   ========================================================================== */

@font-face {
  font-family: 'Geist';
  src: url('assets/geist-var.woff2') format('woff2-variations'),
       url('assets/geist-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ground */
  --white: #FFFFFF;
  --surface: #FAFBFA;
  --surface-2: #F4F7F5;
  --ink: #0B0F0E;
  --ink-soft: #2A322F;
  /* Headings are a true mid-gray, not near-black. Reads clearly grey at
     display sizes while holding ~7:1 contrast on white. */
  --heading: #525C58;
  --muted: #5E6B66;
  --muted-2: #8A9691;
  --line: #E6EBE8;
  --line-soft: #F0F4F2;

  /* meridian — voltage */
  --petrol: #0E7490;
  --lime: #84CC16;
  --deep: #0F766E;
  --meridian: linear-gradient(90deg, #0E7490 0%, #84CC16 100%);

  /* dark register */
  --night: #0B0F0E;
  --night-2: #121816;
  --night-line: #1E2724;
  --night-ink: #F2F5F3;
  --night-muted: #93A099;

  /* scale */
  --wrap: 1120px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
@media (max-width: 600px) { .wrap { padding: 0 20px; } }

/* Visually hidden until focused. Uses clip rather than a large negative offset
   so it can never extend the document's scrollable width. */
.skip {
  position: absolute; top: 0; left: 0; z-index: 100;
  width: 1px; height: 1px; overflow: hidden; white-space: nowrap;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--r-sm) 0;
  font-size: 14px; font-weight: 600;
}
.skip:focus {
  width: auto; height: auto; overflow: visible;
  clip: auto; clip-path: none;
}

/* ---------- type ---------- */
.mono {
  font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow { color: var(--petrol); margin: 0 0 18px; }
.eyebrow-muted { color: var(--muted-2); margin: 0 0 18px; }

h1, h2, h3, h4 { margin: 0; color: var(--heading); font-weight: 800; letter-spacing: -0.035em; line-height: 1.06; text-wrap: balance; }
h1 { font-size: clamp(38px, 6.2vw, 76px); letter-spacing: -0.042em; }
h2 { font-size: clamp(28px, 4vw, 46px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.028em; }
h4 { font-size: 17px; letter-spacing: -0.02em; line-height: 1.3; }

p { margin: 0; }
.lead { font-size: clamp(17px, 1.9vw, 20px); color: var(--muted); font-weight: 500; line-height: 1.55; }
.body { font-size: 16px; color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }
.measure { max-width: 62ch; }
.measure-sm { max-width: 52ch; }

/* ---------- meridian ---------- */
.meridian { height: 3px; border-radius: 3px; background: var(--meridian); }
.meridian-sm { height: 2px; border-radius: 2px; background: var(--meridian); }

.underline-mark { position: relative; white-space: nowrap; }
.underline-mark::after {
  content: ''; position: absolute; left: -1.5%; right: -1.5%; bottom: 0.02em;
  height: 0.075em; border-radius: 4px; background: var(--meridian);
}

/* ---------- header ---------- */
/* Opaque on purpose: a translucent header let the dark sections show
   through as they scrolled underneath, reading as a black bar on top. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-block: 15px; flex-wrap: wrap;
}
.brand {
  font-size: 20px; font-weight: 800; letter-spacing: -0.045em; color: var(--ink);
  display: inline-flex; flex-direction: column; gap: 5px;
}
.brand .meridian-sm { width: 100%; }
.nav-links { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

@media (max-width: 620px) {
  .nav { gap: 10px; padding-block: 12px; }
  .brand { font-size: 18px; }
  .nav-links { width: 100%; gap: 14px; justify-content: space-between; }
  .nav-links a { font-size: 14px; }
  /* The long CTA forces a third header row on narrow screens; every page
     carries a contact callout and a footer address, so drop it here. */
  .nav-links .btn-sm { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  padding: 13px 22px; border-radius: var(--r-sm); border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: var(--white); }
.btn-ghost:hover { border-color: var(--muted-2); transform: translateY(-1px); }
.btn-text { color: var(--petrol); font-weight: 600; font-size: 15px; display: inline-flex; gap: 7px; align-items: center; }
.btn-text:hover { gap: 11px; }
.btn-sm { font-size: 13.5px; padding: 9px 16px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line-soft); }
@media (max-width: 700px) { .section { padding: 68px 0; } }

.section-head { max-width: 60ch; margin-bottom: 44px; }
.section-head h2 { margin-bottom: 16px; }

/* ---------- hero ---------- */
.hero { padding: 104px 0 84px; text-align: center; }
@media (max-width: 700px) { .hero { padding: 68px 0 56px; } }
.hero h1 { max-width: 17ch; margin: 0 auto; }
.hero .meridian { max-width: 460px; margin: 34px auto 0; }
.hero .lead { max-width: 56ch; margin: 30px auto 0; }
.hero .cta-row { justify-content: center; margin-top: 34px; }

.factband {
  display: flex; flex-wrap: wrap; gap: 0;
  border-top: 1px solid var(--line); margin-top: 72px;
}
.fact { flex: 1 1 200px; padding: 24px 26px 0 0; }
.fact + .fact { padding-left: 26px; border-left: 1px solid var(--line); }
.fact .n { font-size: 30px; color: var(--heading); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fact .l { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
@media (max-width: 700px) {
  .fact { flex: 1 1 100%; padding: 20px 0 0; }
  .fact + .fact { padding-left: 0; border-left: none; border-top: 1px solid var(--line-soft); }
}

/* ---------- sphere ---------- */
.sphere {
  width: 176px; height: 176px; border-radius: 50%; position: relative; margin: 0 auto;
  background: radial-gradient(circle at 34% 26%, #3A4340, #121716 60%, #0A0D0C);
  box-shadow: 0 40px 72px -32px rgba(11, 15, 14, 0.5);
}
.sphere::before {
  content: ''; position: absolute; left: -9%; right: -9%; top: 50%;
  height: 3px; transform: translateY(-50%); border-radius: 3px; background: var(--meridian);
}
.sphere-sm { width: 108px; height: 108px; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 660px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 28px 26px; display: flex; flex-direction: column; gap: 10px;
}
.card-alt { background: var(--surface); }
.card h4 { margin-bottom: 2px; }
.card .body { font-size: 14.5px; }
.card .foot {
  margin-top: auto; padding-top: 16px; font-size: 13px; font-weight: 600; color: var(--ink);
}
.card .foot span { color: var(--muted-2); font-weight: 500; }
.card .rungnum { font-size: 12px; font-weight: 700; color: var(--petrol); font-variant-numeric: tabular-nums; }

/* ---------- steps ---------- */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 92px 1fr; gap: 28px;
  padding: 30px 0; border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .step { grid-template-columns: 1fr; gap: 10px; } }
.step .idx { font-size: 12px; font-weight: 700; color: var(--petrol); padding-top: 5px; }
.step h3 { margin-bottom: 10px; }
.step .body { max-width: 58ch; }
.step ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.step ul li { margin-bottom: 5px; }

/* ---------- dark register ---------- */
.night {
  background: var(--night); color: var(--night-ink);
  padding: 92px 0; position: relative; overflow: hidden;
}
.night::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(760px 420px at 82% 6%, rgba(14, 116, 144, 0.20), transparent 62%),
    radial-gradient(620px 400px at 10% 96%, rgba(132, 204, 22, 0.10), transparent 60%);
}
.night > .wrap { position: relative; z-index: 2; }
.night h1, .night h2, .night h3, .night h4 { color: var(--night-ink); }
.night .lead, .night .body { color: var(--night-muted); }
.night .eyebrow { color: var(--lime); }
.night .card {
  background: rgba(255, 255, 255, 0.045); border-color: var(--night-line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.night .card h4 { color: var(--night-ink); }
.night .card .body { color: var(--night-muted); }
.night .btn-ghost { background: transparent; color: var(--night-ink); border-color: rgba(255,255,255,0.24); }
.night .btn-primary { background: var(--night-ink); color: var(--night); }

.linelist { display: flex; flex-direction: column; gap: 0; }
.lineitem {
  display: grid; grid-template-columns: 132px 1fr; gap: 24px; align-items: baseline;
  padding: 18px 0; border-top: 1px solid var(--night-line);
}
.lineitem:last-child { border-bottom: 1px solid var(--night-line); }
@media (max-width: 700px) { .lineitem { grid-template-columns: 1fr; gap: 6px; } }
.lineitem .k { font-size: 13px; font-weight: 700; color: var(--lime); }
.lineitem .v { font-size: 15px; color: var(--night-muted); }

/* ---------- prose ---------- */
.prose { max-width: 66ch; }
.prose p { margin-bottom: 22px; font-size: 17px; line-height: 1.68; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose p.first { font-size: 19px; color: var(--ink); font-weight: 500; }

/* ---------- deliverables ---------- */
.checklist { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 660px) { .checklist { grid-template-columns: 1fr; } }
.check {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
}
.check .dot { width: 14px; height: 2px; border-radius: 2px; background: var(--meridian); margin-top: 11px; flex: none; }
.check .t { font-size: 14.5px; font-weight: 600; }
.check .d { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- callout ---------- */
.callout {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px 32px;
  background: var(--surface); display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
}
.callout .txt { flex: 1 1 320px; }
.callout h3 { margin-bottom: 8px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 52px 0 40px; }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-brand { font-size: 19px; font-weight: 800; letter-spacing: -0.045em; }
.foot-brand + .small { margin-top: 8px; max-width: 34ch; }
.foot-links { display: flex; gap: 44px; flex-wrap: wrap; }
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-col .mono { color: var(--muted-2); margin-bottom: 3px; }
.foot-col a, .foot-col span { font-size: 14.5px; color: var(--muted); }
.foot-col a:hover { color: var(--ink); }
.foot-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted-2);
}
