/* ============================================================
   ironapi.com — design system
   Light-primary, brand blue→purple, node-graph motif.
   Palette sampled from the ironapi logo.
   ============================================================ */

:root {
  /* brand */
  --ink:        #0c1b33;   /* navy wordmark */
  --ink-2:      #16233d;
  --muted:      #48546b;   /* AA on both light tones */
  --muted-2:    #616d84;
  --line:       #d8e0ec;
  --bg:         #eef2f9;   /* LIGHTER of the two page tones */
  --bg-soft:    #e3e9f5;   /* DARKER sibling — same palette, one step down */
  --card:       #fbfdff;   /* panels lift gently, no stark white */

  --blue:       #1878d8;   /* bright accent — gradients, graph, icons */
  --blue-ink:   #125aa6;   /* darker blue for TEXT/links on light (AA) */
  --blue-br:    #48a8f0;   /* bright blue for text on dark bands */
  --purple:     #5b3fa0;
  --purple-br:  #7a4fc0;

  --grad:       linear-gradient(120deg, #1878d8 0%, #3a63c8 45%, #6a3fb0 100%);
  --grad-soft:  linear-gradient(120deg, #1878d8 0%, #6a3fb0 100%);

  /* dark band */
  --dark:       #0a1428;
  --dark-2:     #0e1b36;
  --dark-line:  rgba(120, 160, 230, 0.16);
  --dark-ink:   #eaf0fb;
  --dark-muted: #9fb0cf;

  --maxw: 1120px;
  --radius: 16px;
  --radius-sm: 11px;

  --ff-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --shadow: 0 1px 2px rgba(10, 26, 51, 0.04), 0 10px 30px rgba(10, 26, 51, 0.06);
  --shadow-lg: 0 20px 60px rgba(10, 26, 51, 0.12);
}

/* ------------------------------ reset ------------------------------ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-ink); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--ff-display); line-height: 1.1; color: var(--ink); margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }
.mono { font-family: var(--ff-mono); font-size: 0.92em; white-space: nowrap; }
a.mono { text-decoration: underline; text-underline-offset: 3px; }
a.mono:hover { text-decoration-thickness: 2px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }

/* ------------------------------ accessibility ------------------------------ */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 10px;
  font-family: var(--ff-display); font-weight: 500; transition: top .18s ease;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 2px; }
a:focus-visible, .btn:focus-visible, button:focus-visible,
.nav-toggle:focus-visible, .gn-item:focus-visible {
  outline: 3px solid var(--blue-ink); outline-offset: 3px; border-radius: 6px;
}
.band.dark a:focus-visible, .band.dark .btn:focus-visible { outline-color: var(--blue-br); }
main:focus { outline: none; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.center .section-body, .center .hero-lead { margin-left: auto; margin-right: auto; }

/* ------------------------------ buttons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 500; font-size: 0.98rem;
  padding: 0.72em 1.5em; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .16s ease, box-shadow .16s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(46, 86, 190, 0.32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(46, 86, 190, 0.42); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-ink); color: var(--blue-ink); }
.btn-lg { font-size: 1.15rem; padding: 0.85em 1.9em; }

/* ------------------------------ header ------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(240, 244, 250, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(10, 26, 51, 0.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand-logo { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-family: var(--ff-display); font-weight: 500; font-size: 0.97rem; color: var(--ink-2); transition: color .18s ease; }
.nav a:hover { color: var(--blue-ink); }
.nav .nav-cta { color: var(--ink); }
.nav-toggle { display: none; }

/* ------------------------------ hero ------------------------------ */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(70px, 12vw, 130px) 0 clamp(60px, 9vw, 100px);
  background:
    radial-gradient(1200px 520px at 78% -8%, rgba(106, 63, 176, 0.10), transparent 60%),
    radial-gradient(1000px 480px at 6% 8%, rgba(24, 120, 216, 0.10), transparent 55%),
    var(--bg);
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; }
.eyebrow {
  font-family: var(--ff-mono); font-size: 0.82rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue-ink); margin: 0 0 1.1rem;
}
.hero-title { font-size: clamp(2.7rem, 7.2vw, 5rem); font-weight: 700; margin-bottom: 1.3rem; }
.hero-title .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--muted); max-width: 660px; margin-bottom: 2rem; line-height: 1.55; }
.hero-lead strong { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 3.2rem; }
.hero-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 40px; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats .stat-k {
  font-family: var(--ff-display); font-weight: 700; font-size: 1.5rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats .stat-v { font-size: 0.92rem; color: var(--muted-2); }

/* ------------------------------ bands / sections ------------------------------ */
.band { padding: clamp(64px, 9vw, 108px) 0; }
.band.tinted { background: var(--bg-soft); }
.section-kicker {
  font-family: var(--ff-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue-ink); margin: 0 0 0.9rem;
}
.section-kicker.sub { margin-top: 3.4rem; }
.section-title { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 600; margin-bottom: 1.1rem; max-width: 22ch; }
.center .section-title { max-width: none; }
.section-body { font-size: 1.12rem; color: var(--muted); max-width: 66ch; }
.section-body.wide { max-width: 74ch; }

/* ------------------------------ dark band ------------------------------ */
.band.dark {
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(106, 63, 176, 0.22), transparent 60%),
    radial-gradient(760px 480px at 5% 100%, rgba(24, 120, 216, 0.20), transparent 55%),
    var(--dark);
  color: var(--dark-ink);
  border-top: 1px solid var(--dark-line);
  border-bottom: 1px solid var(--dark-line);
}
.band.dark .section-title, .band.dark h3 { color: #fff; }
.band.dark .section-body, .band.dark p { color: var(--dark-muted); }
.band.dark .section-kicker { color: var(--blue-br); }

/* ------------------------------ axioms ------------------------------ */
.axiom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 2.6rem 0 2rem; }
.axiom {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--dark-line); border-radius: var(--radius);
  padding: 30px 28px 28px; position: relative; overflow: hidden;
}
.axiom::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad-soft);
}
.axiom-num {
  font-family: var(--ff-mono); font-size: 0.9rem; color: var(--blue-br); margin-bottom: 1rem; letter-spacing: 0.1em;
}
.axiom h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.axiom p { margin: 0; }
.axiom-foot { max-width: 70ch; font-size: 1.08rem; }
.axiom-foot strong { color: #fff; }

/* ------------------------------ cards (three projections) ------------------------------ */
.cards { display: grid; gap: 22px; margin-top: 2.6rem; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #d3ddef; }
.card-tag {
  display: inline-block; font-family: var(--ff-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--grad-soft); padding: 4px 11px; border-radius: 999px; margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.28rem; margin-bottom: 0.5rem; }
.card p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ------------------------------ feature grid ------------------------------ */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 34px; margin-top: 2.6rem; }
.feature {
  padding: 26px 26px 24px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.feature h3 { font-size: 1.22rem; margin-bottom: 0.55rem; display: flex; align-items: center; gap: 10px; }
.feature h3::before {
  content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--grad-soft); flex: none;
}
.feature p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ------------------------------ vocabulary + domain pills ------------------------------ */
.vocab-row, .domain-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4rem; }
.vocab-pill {
  font-family: var(--ff-mono); font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: #fff; background: var(--grad-soft); padding: 0.62em 1.2em; border-radius: 999px; font-weight: 500;
  box-shadow: 0 6px 18px rgba(46, 86, 190, 0.28);
}
.domain-pill {
  font-family: var(--ff-display); font-size: 1rem; font-weight: 450; color: var(--dark-ink);
  border: 1px solid var(--dark-line); background: rgba(255, 255, 255, 0.04);
  padding: 0.62em 1.2em; border-radius: 999px; transition: border-color .25s ease, background .25s ease;
}
.domain-pill:hover { border-color: rgba(120, 160, 230, 0.5); background: rgba(255, 255, 255, 0.08); }

/* ------------------------------ split (agents / susa) ------------------------------ */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; margin-top: 2.4rem; }
.split.reverse .split-lead { order: 0; }
.lead-quote {
  font-family: var(--ff-display); font-size: 1.5rem; font-weight: 500; line-height: 1.35;
  color: #fff; margin-bottom: 1.3rem;
}
.band:not(.dark) .lead-quote { color: var(--ink); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.checks li { position: relative; padding-left: 34px; font-size: 1.02rem; color: var(--muted); }
.band.dark .checks li { color: var(--dark-muted); }
.checks li strong { color: var(--ink); font-weight: 600; }
.band.dark .checks li strong { color: #fff; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 999px;
  background: var(--grad-soft);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center / 15px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center / 15px no-repeat;
}
.agents-foot { margin-top: 2.6rem; max-width: 70ch; font-size: 1.05rem; border-top: 1px solid var(--dark-line); padding-top: 1.6rem; }
.agents-foot em { color: var(--dark-ink); font-style: normal; }

/* ------------------------------ steps (approach) ------------------------------ */
.steps { list-style: none; margin: 2.6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.steps li {
  position: relative; padding: 30px 26px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.step-n {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 12px; background: var(--grad); color: #fff; font-family: var(--ff-display); font-weight: 700;
  font-size: 1.15rem; margin-bottom: 1rem;
}
.steps h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.steps p { margin: 0; color: var(--muted); font-size: 1.01rem; }
.steps-foot { margin-top: 2.2rem; font-size: 1.08rem; color: var(--muted); max-width: 72ch; }
.steps-foot em { color: var(--ink); font-style: normal; }

/* ------------------------------ contact ------------------------------ */
.contact { text-align: center; }
.contact-eyebrow {
  font-family: var(--ff-mono); font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--blue-br); margin: 0 0 1.1rem;
}
.contact-title { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 600; color: #fff; margin-bottom: 0.8rem; max-width: 20ch; margin-left: auto; margin-right: auto; }
.contact-sub { color: var(--dark-muted); font-size: 1.15rem; margin-bottom: 2rem; }
.contact-loc { margin-top: 1.4rem; font-family: var(--ff-mono); font-size: 0.85rem; letter-spacing: 0.1em; color: var(--dark-muted); text-transform: uppercase; }

/* ------------------------------ footer ------------------------------ */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 64px 0 30px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.footer-brand img { height: 34px; width: auto; margin-bottom: 1rem; }
.footer-tag { font-family: var(--ff-display); color: var(--muted); font-size: 0.98rem; }
.footer-legal h4 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.footer-legal p { color: var(--muted); font-size: 0.96rem; margin-bottom: 0.9rem; }
.fineprint { font-size: 0.86rem; color: var(--muted-2); line-height: 1.85; }
.fineprint.muted { color: var(--muted-2); opacity: 0.85; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted-2); }

/* ------------------------------ scroll progress ------------------------------ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 80;
  background: var(--grad); box-shadow: 0 0 10px rgba(106, 63, 176, 0.5);
  transition: width .12s linear;
}

/* ------------------------------ graph-rail navigator ------------------------------ */
.graphnav {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  width: 156px; height: min(82vh, 780px); z-index: 45; pointer-events: none;
  opacity: 0; transition: opacity .5s ease;
}
.graphnav.ready { opacity: 1; }
.graphnav svg { width: 100%; height: 100%; overflow: visible; }
.gn-edge {
  stroke: url(#gnGrad); stroke-width: 2.4; fill: none; opacity: 0.6;
  stroke-dasharray: 3 8; animation: gnflow 7s linear infinite;
  transition: opacity .35s ease, stroke-width .35s ease;
}
@keyframes gnflow { to { stroke-dashoffset: -55; } }
.gn-edge.lit { opacity: 1; stroke-width: 3.4; }
.gn-item { pointer-events: auto; cursor: pointer; }
.gn-item:focus { outline: none; }
.gn-node { fill: #8496b6; transition: fill .3s ease; }
.gn-item:hover .gn-node { fill: var(--purple); }
.gn-item.active .gn-node { fill: url(#gnGrad); }
.gn-item:focus-visible .gn-node { fill: var(--blue); }
.gn-halo { fill: none; stroke: url(#gnGrad); stroke-width: 2.2; opacity: 0; transform-origin: center; transition: opacity .35s ease; }
.gn-item.active .gn-halo { opacity: 0.75; animation: gnhalo 2.6s ease-in-out infinite; }
@keyframes gnhalo { 0%, 100% { opacity: 0.7; } 50% { opacity: 0.22; } }
.gn-label {
  font-family: var(--ff-display); font-size: 13.5px; font-weight: 500; fill: var(--muted);
  text-anchor: end; opacity: 0.7; transition: opacity .25s ease, fill .25s ease;
  paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round;
}
.gn-item:hover .gn-label { opacity: 1; fill: var(--purple); }
.gn-item.active .gn-label { opacity: 1; fill: var(--ink); font-weight: 600; }
.gn-traveler circle { fill: url(#gnGrad); filter: drop-shadow(0 0 8px rgba(106, 63, 176, 0.95)); }
/* motion is driven by the Web Animations API (main.js), not a CSS transition —
   a CSS transition here fights the WAAPI cancel and causes a one-node back-jump. */
@media (max-width: 1279px) { .graphnav { display: none; } }

/* ------------------------------ reveal on scroll (Apple-style settle) ------------------------------ */
.reveal { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 900px) {
  .axiom-grid, .cards.three, .feature-grid, .steps, .split { grid-template-columns: 1fr; }
  .split { gap: 30px; }
  .nav { gap: 22px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 0 16px;
    transform: translateY(-140%); transition: transform .28s ease; box-shadow: var(--shadow-lg);
  }
  .nav.open { transform: none; }
  .nav a { padding: 13px 26px; border-top: 1px solid var(--line); }
  .nav .nav-cta { margin: 12px 26px 0; justify-content: center; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; width: 18px; margin: 0 auto; background: var(--ink); transition: transform .25s ease, opacity .2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-stats { gap: 18px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .hero-graph .nodes circle { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gn-edge { animation: none; }
  .gn-item.active .gn-halo { animation: none; }
  .gn-traveler { transition: none; }
}
