/* Iron Nitride — crusoe.ai-inspired dark-editorial system
 * Palette: pure black canvas + white text + electric yellow-green accent (#ceeb13)
 * Type: Inter body + JetBrains Mono for numerics, section counters, labels
 * Motion: minimal (fade-in on scroll, hairline underline, border glow) — no WebGL, no parallax
 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* surfaces */
  --bg: #000000;
  --bg-elev-1: #0a0a0a;
  --bg-elev-2: #111111;
  --panel: #0d0d0d;
  --panel-hover: #141414;

  /* text */
  --ink: #ffffff;
  --ink-2: #e8e8e8;
  --muted: #9ca3af;
  --muted-2: #6b7280;

  /* accent — electric yellow-green (crusoe accent) */
  --accent: #ceeb13;
  --accent-glow: rgba(206, 235, 19, 0.18);
  --accent-dim: rgba(206, 235, 19, 0.55);

  /* dividers */
  --rule: rgba(255, 255, 255, 0.08);
  --rule-strong: rgba(255, 255, 255, 0.14);

  /* typography */
  --font-body: 'Inter', 'Suisseintl', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* layout */
  --gutter: 24px;
  --gutter-lg: 40px;
  --container-max: 1280px;
  --container-hero: 1440px;
}

html { scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  font-weight: 400;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 900px) {
  .container { padding: 0 var(--gutter-lg); }
}

/* ─────────── NAV ─────────── */
nav.site-nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: var(--container-max);
  margin: 0 auto;
  gap: 24px;
}
@media (min-width: 900px) {
  .nav-inner { padding: 22px var(--gutter-lg); }
}
.brand {
  display: inline-flex; align-items: center;
  text-decoration: none; flex: 0 0 auto;
}
.brand-logo {
  display: block;
  height: 108px; width: auto;
  max-width: 100%;
  transition: opacity 0.15s ease;
}
.brand:hover .brand-logo { opacity: 0.85; }
@media (max-width: 900px) { .brand-logo { height: 100px; } }
@media (max-width: 640px) { .brand-logo { height: 96px; } }
@media (max-width: 420px) { .brand-logo { height: 92px; } }
/* Prevent the nav logo from crowding the viewport on small screens */
nav.site-nav .brand { max-width: 62%; overflow: hidden; }

.nav-links {
  display: flex; align-items: center; gap: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-links a {
  position: relative; padding: 4px 0;
  transition: color 0.18s ease;
  cursor: pointer;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { transform: scaleX(1); background: var(--accent); }

.nav-cta {
  padding: 10px 18px;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border-radius: 0;
}
.nav-cta::after { display: none; }
.nav-cta:hover {
  background: var(--accent); color: #000;
  border-color: var(--accent);
}

@media (max-width: 900px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ─────────── PAGE HERO (non-home) ─────────── */
.page-hero {
  padding: 120px 0 96px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.22em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 32px;
  display: inline-flex; align-items: center; gap: 12px;
}
.page-hero .eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--accent);
}
.page-hero h1 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  max-width: 1100px;
  color: var(--ink);
}
.page-hero h1 .accent { color: var(--accent); }
.page-hero .lede {
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  max-width: 720px;
  line-height: 1.55;
  font-weight: 400;
}
@media (max-width: 720px) {
  .page-hero { padding: 80px 0 64px; }
}
@media (max-width: 480px) {
  .page-hero { padding: 56px 0 48px; }
}

/* ─────────── GENERAL SECTIONS ─────────── */
section {
  padding: 120px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
@media (max-width: 900px) { section { padding: 80px 0; } }
@media (max-width: 480px) { section { padding: 56px 0; } }

.section-counter {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.24em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 12px;
}
.section-counter::before {
  content: ''; width: 24px; height: 1px; background: var(--accent);
}

section h2 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 28px;
  max-width: 960px;
  color: var(--ink);
}
section h2 .accent { color: var(--accent); }

section h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.005em;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--ink);
}
section p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 720px;
}
section p.wide { max-width: 900px; }
section ul, section ol {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 20px 20px;
  padding-left: 8px;
}
section li {
  margin-bottom: 8px;
  line-height: 1.6;
}
section strong {
  color: var(--ink);
  font-weight: 600;
}
section a {
  color: var(--accent);
  transition: opacity 0.15s ease;
  border-bottom: 1px solid transparent;
}
section a:hover {
  opacity: 0.75;
  border-bottom-color: var(--accent);
}

/* ─────────── BUTTONS ─────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0;
  text-decoration: none;
  white-space: nowrap;
}
.btn::after { display: none; }
.btn-primary {
  background: var(--accent); color: #000;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: transparent; color: var(--accent);
  transform: translateY(-1px);
}
.btn-ghost {
  border-color: var(--rule-strong); color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent); color: var(--accent);
}
.btn .arrow { font-family: var(--font-mono); display: inline-block; }
.btn-row {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 32px;
}

/* ─────────── CARDS + GRIDS ─────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--rule);
  padding: 32px 28px;
  background: var(--bg-elev-1);
  transition: border-color 0.25s ease, background 0.25s ease;
  border-radius: 0;
}
.card:hover {
  border-color: var(--rule-strong);
  background: var(--panel-hover);
}
.card .card-tag {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 16px;
}
.card h4 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 0;
  max-width: none;
}

/* ─────────── SPEC TABLE ─────────── */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.spec-table th, .spec-table td {
  padding: 18px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.spec-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
  font-weight: 500;
}
.spec-table td {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13px;
}
.spec-table td.metric-label {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}
.spec-table td.accent { color: var(--accent); font-weight: 500; }
.spec-table tr:last-child td { border-bottom: none; }

/* ─────────── FOOTER ─────────── */
footer.site-footer {
  padding: 72px 0 40px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 64px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
}
.footer-brand .brand-logo { height: 96px; margin-bottom: 16px; }
.footer-brand p {
  color: var(--muted); font-size: 14px; line-height: 1.6;
  max-width: 320px;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em;
  color: var(--ink); text-transform: uppercase;
  margin-bottom: 20px; font-weight: 500;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--muted); font-size: 14px;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--accent); }

.footer-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.footer-bar a {
  color: var(--muted); transition: color 0.15s ease;
}
.footer-bar a:hover { color: var(--accent); }
.footer-bar .powered { color: var(--muted); }
.footer-bar .powered strong { color: var(--accent); font-weight: 500; }

/* ─────────── SKIP + FOCUS ─────────── */
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: #000;
  padding: 10px 16px; z-index: 100;
  font-family: var(--font-mono); font-size: 12px;
  font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase;
}
.skip-link:focus { left: 8px; }
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ─────────── REVEAL (subtle fade-in on scroll) ─────────── */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.js-ready .reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.js-ready .reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-ready .reveal-stagger.in > *:nth-child(n) { transition-delay: calc(var(--i, 0) * 60ms); }
.js-ready .reveal-stagger.in > *:nth-child(1) { --i: 0; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.in > *:nth-child(2) { --i: 1; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.in > *:nth-child(3) { --i: 2; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.in > *:nth-child(4) { --i: 3; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.in > *:nth-child(5) { --i: 4; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.in > *:nth-child(6) { --i: 5; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.in > *:nth-child(7) { --i: 6; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.in > *:nth-child(8) { --i: 7; opacity: 1; transform: translateY(0); }
.js-ready .reveal-stagger.in > *:nth-child(9) { --i: 8; opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-ready .reveal, .js-ready .reveal-stagger > * {
    opacity: 1 !important; transform: none !important;
  }
  .nav-links a::after { transition: none; }
}
