/* ArpaCorp OPSEC — design tokens */
:root {
  --ink-900: #0e141b;
  --ink-800: #172230;
  --ink-700: #1f2c3d;
  --paper-100: #edefec;
  --paper-200: #dfe3dd;
  --paper-300: #ccd1c8;
  --charcoal: #1d2420;
  --gold-500: #c9a227;
  --gold-400: #dab949;
  --gold-700: #8f7419;
  --brick-600: #b23a2e;
  --line-dark: rgba(237, 239, 236, 0.14);
  --line-light: rgba(29, 36, 32, 0.14);
  --max: 1180px;
}

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

body {
  margin: 0;
  background: var(--paper-100);
  color: var(--charcoal);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Big Shoulders Display", "Arial Narrow", sans-serif;
  font-weight: 800;
  letter-spacing: 0.002em;
  margin: 0 0 0.4em;
  color: var(--charcoal);
}
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4,
.on-panel h1, .on-panel h2, .on-panel h3, .on-panel h4 { color: var(--paper-100); }

h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 0.98; text-transform: uppercase; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.02; text-transform: uppercase; }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.55rem); line-height: 1.1; }
h4 { font-size: 1.05rem; }

p { max-width: 62ch; }
p.lede { font-size: 1.2rem; max-width: 46ch; }
a { color: inherit; }

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink-900);
  border-bottom: 1px solid var(--line-dark);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  text-decoration: none;
  color: var(--paper-100);
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.brand .dot { color: var(--gold-500); }
nav.main-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
nav.main-nav a.navlink {
  color: var(--paper-100);
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a.navlink:hover { border-bottom-color: var(--gold-500); }
nav.main-nav a.navlink[aria-current="page"] { border-bottom-color: var(--gold-500); color: var(--gold-400); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 12px 22px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--gold-500); color: var(--ink-900); }
.btn-primary:hover { background: var(--gold-400); }
.btn-ghost { border-color: var(--line-dark); color: var(--paper-100); background: transparent; }
.btn-ghost:hover { border-color: var(--gold-500); color: var(--gold-400); }
.on-light .btn-ghost { border-color: var(--line-light); color: var(--charcoal); }
.on-light .btn-ghost:hover { border-color: var(--gold-700); color: var(--gold-700); }

.nav-toggle { display: none; }

/* ---------- sections ---------- */
section { padding: clamp(56px, 9vw, 108px) 0; }
.on-dark { background: var(--ink-900); color: var(--paper-100); }
.on-panel { background: var(--ink-800); color: var(--paper-100); }
.on-light { background: var(--paper-100); color: var(--charcoal); }
.on-light.alt { background: var(--paper-200); }

.hr {
  border: none;
  border-top: 1px solid var(--line-light);
  margin: 0;
}
.on-dark .hr, .on-panel .hr { border-top-color: var(--line-dark); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(64px, 10vw, 120px); }
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  align-items: end;
}
.hero-copy .kicker {
  color: var(--gold-400);
  font-size: 0.95rem;
  margin-bottom: 1em;
  max-width: 42ch;
}
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.constellation { position: absolute; inset: 0; z-index: 1; opacity: 0.9; }
.constellation line { stroke: var(--gold-500); stroke-width: 1; opacity: 0.35; }
.constellation circle { fill: var(--gold-400); }
.constellation circle.dim { fill: var(--paper-100); opacity: 0.4; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-dark);
  margin-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line-dark);
}
.stat-row .stat { background: var(--ink-900); padding: 26px clamp(16px, 2vw, 28px); }
.stat .num { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 2.6rem; color: var(--gold-400); line-height: 1; }
.stat .label { margin-top: 6px; font-size: 0.92rem; color: var(--paper-300, #ccd1c8); }

/* ---------- ledger / list rows ---------- */
.ledger { border-top: 1px solid var(--line-light); }
.on-dark .ledger, .on-panel .ledger { border-top-color: var(--line-dark); }
.ledger-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-light);
}
.on-dark .ledger-row, .on-panel .ledger-row { border-bottom-color: var(--line-dark); }
.ledger-row .idx { font-family: "IBM Plex Mono", monospace; color: var(--gold-700); font-size: 0.9rem; padding-top: 4px; }
.on-dark .ledger-row .idx, .on-panel .ledger-row .idx { color: var(--gold-500); }
.ledger-row h4 { margin-bottom: 0.3em; }
.ledger-row p { margin: 0; }

/* two column layout */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.split.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.reverse > :first-child { order: 2; }
.split.reverse > :last-child { order: 1; }

/* ---------- tier preview cards on home ---------- */
.tier-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
  margin-top: 44px;
}
.tier-strip .tier {
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 28px 24px;
}
.tier-strip .tier .tag { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; color: var(--gold-400); text-transform: uppercase; letter-spacing: 0.06em; }
.tier-strip .tier h3 { margin: 0.3em 0 0.5em; }
.tier-strip .tier .price { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 1.7rem; color: var(--gold-400); }
.tier-strip .tier .price small { font-family: "IBM Plex Sans", sans-serif; font-weight: 500; font-size: 0.9rem; color: var(--paper-300, #ccd1c8); }

/* ---------- rate card table (services page) ---------- */
.ratecard { width: 100%; border-collapse: collapse; margin-top: 34px; }
.ratecard caption { text-align: left; caption-side: top; margin-bottom: 10px; font-size: 0.9rem; color: var(--gold-700); }
.ratecard th, .ratecard td {
  border: 1px solid var(--line-light);
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
}
.ratecard thead th {
  font-family: "Big Shoulders Display", sans-serif;
  text-transform: uppercase;
  font-size: 1.15rem;
  background: var(--paper-200);
}
.ratecard thead th.featured { background: var(--gold-500); color: var(--ink-900); }
.ratecard td.rowlabel { font-weight: 600; background: var(--paper-200); white-space: nowrap; }
.ratecard td.num, .ratecard th.num { font-family: "IBM Plex Mono", monospace; }
.ratecard td.featured { background: rgba(201, 162, 39, 0.1); }
.ratecard td.note { font-size: 0.86rem; color: var(--charcoal); opacity: 0.85; }
.ratecard-scroll { overflow-x: auto; }

/* pill / severity tag */
.tag-sev {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid var(--brick-600);
  color: var(--brick-600);
}

/* cluster cards for methodology */
.cluster {
  border-top: 2px solid var(--charcoal);
  padding-top: 20px;
}
.on-dark .cluster, .on-panel .cluster { border-top-color: var(--gold-500); }
.cluster h3 { margin-bottom: 14px; }
.cluster ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cluster li {
  padding: 12px 14px;
  border: 1px solid var(--line-light);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.on-dark .cluster li, .on-panel .cluster li { border-color: var(--line-dark); }
.cluster li .fid { font-family: "IBM Plex Mono", monospace; font-size: 0.76rem; color: var(--gold-700); }
.on-dark .cluster li .fid, .on-panel .cluster li .fid { color: var(--gold-500); }

.cluster-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 56px); margin-top: 40px; }

/* comparison table */
.compare { width: 100%; border-collapse: collapse; margin-top: 30px; }
.compare th, .compare td { border: 1px solid var(--line-dark); padding: 14px 16px; font-size: 0.92rem; text-align: left; }
.compare thead th { font-family: "Big Shoulders Display", sans-serif; text-transform: uppercase; font-size: 1.05rem; }
.compare td.yes { color: var(--gold-400); }
.compare td.no { opacity: 0.5; }
.compare th.hiraya, .compare td.hiraya { background: rgba(201, 162, 39, 0.08); }

footer.site-footer { background: var(--ink-900); color: var(--paper-100); padding: 54px 0 36px; }
footer.site-footer .foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
footer.site-footer .fine { margin-top: 40px; font-size: 0.82rem; color: var(--paper-300, #ccd1c8); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer.site-footer a { text-decoration: none; }
footer.site-footer .col h4 { color: var(--gold-400); font-family: "IBM Plex Sans", sans-serif; text-transform: none; font-size: 0.95rem; font-weight: 600; }
footer.site-footer .col p, footer.site-footer .col a { display: block; margin: 6px 0; color: var(--paper-100); opacity: 0.85; font-size: 0.92rem; }

.cta-band { background: var(--gold-500); color: var(--ink-900); }
.cta-band h2 { color: var(--ink-900); }
.cta-band .split { align-items: center; }
.cta-band .btn-primary { background: var(--ink-900); color: var(--paper-100); }
.cta-band .btn-primary:hover { background: var(--ink-700); }

/* use-case cards (hiraya page) */
.usecase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.usecase { border: 1px solid var(--line-dark); padding: 26px 22px; }
.usecase .num { font-family: "Big Shoulders Display", sans-serif; font-size: 2.2rem; font-weight: 800; color: var(--gold-500); }
.usecase ul { padding-left: 18px; margin: 14px 0 0; font-size: 0.92rem; }
.usecase li { margin-bottom: 6px; }

/* pillar row */
.pillar-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-dark); margin-top: 40px; border: 1px solid var(--line-dark); }
.pillar { background: var(--ink-900); padding: 28px 24px; }
.pillar h4 { color: var(--gold-400); margin-bottom: 10px; }
.pillar p { margin: 0; font-size: 0.94rem; }

/* responsive */
@media (max-width: 880px) {
  nav.main-nav { position: fixed; inset: 76px 0 0 0; background: var(--ink-900); flex-direction: column; align-items: flex-start; padding: 28px clamp(20px,4vw,48px); gap: 22px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
  nav.main-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-toggle {
    display: inline-flex;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--line-dark);
    color: var(--paper-100);
    font-size: 1.3rem;
    cursor: pointer;
  }
  .hero-grid, .split, .split.reverse, .cluster-grid { grid-template-columns: 1fr; }
  .split.reverse > :first-child, .split.reverse > :last-child { order: initial; }
  .stat-row, .tier-strip, .usecase-grid, .pillar-row { grid-template-columns: 1fr; }
  .tier-strip .tier, .stat-row .stat { border-right: 1px solid var(--line-dark); }
}
