/* ================= ApexAI — brand system ================= */
:root {
  --navy-0: #0b0e26;
  --navy-1: #0e1230;
  --navy-2: #161a3a;
  --navy-3: #1d2350;
  --ink: #eef0ff;
  --muted: #a9adcf;
  --faint: #7b7fa8;
  --line: rgba(150, 130, 255, 0.16);
  --card: rgba(24, 28, 62, 0.55);
  --grad-a: #6d4aff;
  --grad-b: #a24bd6;
  --grad-c: #e05be0;
  --cyan: #56e1e6;
  --gradient: linear-gradient(100deg, var(--grad-a), var(--grad-b) 55%, var(--grad-c));
  --glow: 0 0 40px rgba(140, 90, 230, 0.45);
  --maxw: 1180px;
  --r: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--navy-1);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(1000px 600px at 78% -5%, rgba(120, 70, 220, 0.28), transparent 60%),
    radial-gradient(900px 700px at 8% 12%, rgba(70, 60, 180, 0.22), transparent 60%),
    linear-gradient(180deg, var(--navy-1), var(--navy-0) 60%, var(--navy-1));
  z-index: -2;
}
body::after { /* grain */
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.03; z-index: -1; pointer-events: none;
}

h1, h2, h3, .brand__word { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
.grad {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem;
  font-weight: 600; color: var(--grad-c); margin-bottom: 0.8rem;
}

/* ================= buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.92rem; padding: 0.7rem 1.4rem;
  border-radius: 999px; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 30px rgba(140, 80, 220, 0.4); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(160, 90, 230, 0.6); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--grad-b); transform: translateY(-2px); }
.btn--demo { background: linear-gradient(100deg, rgba(160,120,255,0.9), rgba(220,120,220,0.9)); color: #fff; font-size: 0.8rem; padding: 0.55rem 1.2rem; letter-spacing: 0.04em; }
.btn--demo:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.btn--lg { padding: 0.95rem 2.2rem; font-size: 1.02rem; }

/* ================= nav ================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(12, 15, 40, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled { background: rgba(10, 13, 34, 0.9); border-color: var(--line); }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0.85rem 1.5rem;
  display: flex; align-items: center; gap: 2rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand__mark { filter: drop-shadow(0 0 10px rgba(160, 90, 230, 0.5)); }
.brand__word { font-size: 1.35rem; font-weight: 700; }
.brand__ai { color: var(--grad-c); }
.nav__links { display: flex; gap: 1.8rem; margin-left: auto; }
.nav__links a {
  font-size: 0.78rem; letter-spacing: 0.1em; font-weight: 600; color: var(--muted);
  position: relative; padding: 0.3rem 0; transition: color 0.2s;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--gradient); transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.3s; }

/* ================= hero ================= */
.hero { position: relative; overflow: hidden; padding: 4rem 1.5rem 3rem; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__glow {
  position: absolute; top: 20%; right: 8%; width: 480px; height: 480px; z-index: 0;
  background: radial-gradient(circle, rgba(120, 70, 220, 0.35), transparent 65%);
  filter: blur(30px); animation: breathe 6s var(--ease) infinite;
}
.hero__inner {
  position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto;
  min-height: 60vh; display: flex; align-items: center;
}
.hero__copy { max-width: 620px; }
.hero__title { font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02; font-weight: 700; margin-bottom: 1.4rem; }
.hero__sub { font-size: clamp(1rem, 1.4vw, 1.18rem); color: var(--muted); max-width: 560px; margin-bottom: 2rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__cards {
  position: relative; z-index: 2; max-width: var(--maxw); margin: 2.5rem auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.minicard {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  padding: 1.4rem 1rem; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line);
  text-align: center; font-weight: 500;
}
.minicard__ico {
  font-size: 1.4rem; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(140, 90, 230, 0.12); color: var(--grad-c);
}

/* ================= trust strip ================= */
.trust { max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.5rem 2rem; }
.trust__row { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.chip {
  font-size: 0.85rem; color: var(--muted); padding: 0.5rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(20, 24, 55, 0.5);
}
.chip b { color: var(--ink); font-family: 'Space Grotesk', sans-serif; }

/* ================= sections ================= */
.section { max-width: var(--maxw); margin: 0 auto; padding: 5.5rem 1.5rem; }
.section__head { max-width: 760px; margin-bottom: 3rem; }
.section__head h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; margin-bottom: 1rem; }
.lede { color: var(--muted); font-size: 1.05rem; }

/* flow */
.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: stretch; max-width: 900px; margin: 0 auto; }
.flow__node {
  padding: 1.6rem; border-radius: var(--r); background: var(--card);
  border: 1px solid var(--line); position: relative;
}
.flow__node h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.flow__node p { color: var(--muted); font-size: 0.9rem; }
.flow__meta { display: block; margin-top: 0.8rem; font-size: 0.75rem; color: var(--grad-c); letter-spacing: 0.03em; }
.flow__pipe {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.3rem; padding: 0 0.5rem; min-width: 130px; text-align: center;
}
.flow__pipe span {
  font-size: 0.78rem; font-weight: 600; color: var(--cyan);
  padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(86, 225, 230, 0.08);
}
.flow__pipe small { font-size: 0.66rem; color: var(--faint); }

/* grids & cards */
.grid { display: grid; gap: 1.2rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
.card {
  display: block; padding: 1.8rem; border-radius: var(--r); background: var(--card);
  border: 1px solid var(--line); position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.paper-card__read { display: inline-block; margin-top: 1rem; font-weight: 600; font-size: 0.9rem; }
.card::before {
  content: ''; position: absolute; inset: 0; padding: 1px; border-radius: var(--r);
  background: var(--gradient); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.3s;
}
.card:hover { transform: translateY(-4px); }
.card:hover::before { opacity: 0.7; }
.card__ico {
  font-size: 1.5rem; width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 13px; background: rgba(140, 90, 230, 0.12); border: 1px solid var(--line);
  margin-bottom: 1.1rem; color: var(--grad-c);
}
.card__ico svg { width: 26px; height: 26px; display: block; }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.92rem; }

/* redteam */
.redteam__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: center; }
.ticks { list-style: none; margin-top: 1.4rem; display: grid; gap: 0.7rem; }
.ticks li { position: relative; padding-left: 1.7rem; color: var(--muted); font-size: 0.95rem; }
.ticks li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: #fff; font-size: 0.7rem;
  width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%;
  background: var(--gradient);
}
.panel {
  border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  background: rgba(12, 15, 40, 0.85); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.panel__bar {
  display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 1rem;
  background: rgba(20, 24, 55, 0.9); border-bottom: 1px solid var(--line);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--r { background: #ff6b6b; } .dot--y { background: #ffd166; } .dot--g { background: #06d6a0; }
.panel__url { margin-left: 0.6rem; font-size: 0.72rem; color: var(--faint); }
.panel__body { padding: 1.4rem; }
.panel__tag { font-size: 0.74rem; letter-spacing: 0.1em; color: var(--grad-c); font-weight: 600; margin-bottom: 0.6rem; text-transform: uppercase; }
.attack { width: 100%; height: auto; }
.attack .edge { stroke: rgba(150, 130, 255, 0.3); stroke-width: 1.5; }
.attack .edge.lit { stroke: url(#redgrad); stroke-width: 2.5; filter: drop-shadow(0 0 6px rgba(224, 91, 224, 0.8)); }
.attack .node circle { fill: var(--navy-3); stroke: var(--grad-b); stroke-width: 1.5; transition: 0.3s; }
.attack .node.lit circle { fill: var(--grad-c); stroke: #fff; filter: drop-shadow(0 0 10px rgba(224, 91, 224, 0.9)); }
.attack .node--crown.lit circle { fill: #ffd166; stroke: #fff; filter: drop-shadow(0 0 14px rgba(255, 209, 102, 0.9)); }
.attack text { fill: var(--muted); font-size: 8px; text-anchor: middle; font-family: 'Inter', sans-serif; }
.attack .node--crown text { fill: #ffd166; }
.attack .pulse { fill: #fff; opacity: 0; filter: drop-shadow(0 0 8px #fff); }
.ranks { margin-top: 1.2rem; display: grid; gap: 0.6rem; }
.rank {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0.3rem 1rem;
  padding: 0.7rem 0.9rem; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(20, 24, 55, 0.5); font-size: 0.85rem;
}
.rank small { grid-column: 1 / -1; color: var(--faint); font-size: 0.72rem; }
.rank .score { color: var(--grad-c); font-weight: 700; font-family: 'Space Grotesk', sans-serif; }

/* vantage */
.vantage__grid { display: grid; grid-template-columns: 2.1fr 1fr; gap: 1.6rem; align-items: stretch; }
.specialists { display: grid; gap: 0.7rem; align-content: center; }

/* agent boxes (no connector lines) */
.orgchart { display: block; }
.org__top { display: flex; justify-content: center; margin-bottom: 1.1rem; }
.org__row { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.spec.node {
  display: flex; width: auto; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; padding: 1.5rem 0.9rem; min-width: 132px;
}
.spec.node--sup { min-width: 210px; padding: 1.7rem 1.3rem; }
.node__ico { line-height: 1; color: var(--grad-c); }
.node__ico svg { width: 30px; height: 30px; display: block; }
.node--sup .node__ico svg { width: 36px; height: 36px; }
.spec--active .node__ico { color: #fff; }
.node__label { font-size: 1.02rem; font-weight: 600; }
.node--sup .node__label { font-size: 1.2rem; }
.node__sub { font-size: 0.72rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.1em; }
.node.spec:hover { transform: translateY(-3px); }
.node.spec--active:hover { transform: none; }
.spec {
  display: block; width: 100%; text-align: left; font-family: inherit;
  padding: 0.9rem 1.2rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); font-size: 0.95rem; color: var(--ink); cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.spec:hover { border-color: var(--grad-b); transform: translateX(3px); }
.spec--active, .spec--active:hover {
  background: var(--gradient); color: #fff; font-weight: 600; border-color: transparent;
  box-shadow: var(--glow); transform: none;
}
.spec-detail__title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.spec-detail__desc { color: var(--muted); font-size: 0.95rem; }
.guardrails h3 + .spec-detail__desc { margin-top: 0.2rem; }
.guardrails { padding: 1.8rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); min-height: 340px; display: flex; flex-direction: column; justify-content: center; }
#spec-detail { transition: opacity 0.16s var(--ease), transform 0.16s var(--ease); }
#spec-detail.is-swapping { opacity: 0; transform: translateY(10px); }
@keyframes specIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#spec-detail .spec-detail__title { animation: specIn 0.5s var(--ease) both; }
#spec-detail .spec-detail__desc { animation: specIn 0.5s var(--ease) 0.09s both; }
#spec-detail .ticks li { animation: specIn 0.45s var(--ease) both; }
#spec-detail .note { animation: specIn 0.45s var(--ease) 0.16s both; }
.guardrails h3 { margin-bottom: 0.4rem; }
.guardrails .note { margin-top: 1.3rem; padding-top: 1.3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

/* aurora personas */
.persona {
  padding: 1.5rem; border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.persona:hover { transform: translateY(-4px); border-color: var(--grad-b); }
.persona__ico { font-size: 1.4rem; color: var(--grad-c); }
.persona h3 { font-size: 1.05rem; margin-top: 0.6rem; }
.persona__role { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--cyan); }
.persona p { color: var(--muted); font-size: 0.85rem; margin-top: 0.6rem; }
.built { margin-top: 1.2rem; }

/* final cta */
.cta { position: relative; overflow: hidden; padding: 6rem 1.5rem; text-align: center; }
.cta__glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 700px; height: 400px;
  background: radial-gradient(circle, rgba(140, 70, 220, 0.35), transparent 65%);
  filter: blur(40px); animation: breathe 7s var(--ease) infinite;
}
.cta__inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.cta__inner h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; margin-bottom: 1rem; }
.cta__inner > p { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }
.cta__mail { margin-top: 1.5rem; font-size: 0.95rem; }
.cta__mail a { color: var(--grad-c); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 2.5rem 1.5rem; }
.foot__inner {
  max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center;
  gap: 1.5rem; flex-wrap: wrap; justify-content: space-between;
}
.foot__tag { color: var(--faint); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.foot__legal { color: var(--faint); font-size: 0.8rem; }

/* ================= interior pages ================= */
.nav__links a.active { color: var(--ink); }
.nav__links a.active::after { width: 100%; }
.page-hero { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 4.5rem 1.5rem 1rem; text-align: center; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.08; margin: 0.6rem 0 0; }
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 1.1rem auto 0; }
.page-hero__glow {
  position: absolute; top: -10%; left: 50%; transform: translateX(-50%); width: 620px; height: 380px;
  background: radial-gradient(circle, rgba(120, 70, 220, 0.28), transparent 65%); filter: blur(40px);
  z-index: -1; animation: breathe 7s var(--ease) infinite;
}

/* sectors band */
.sectors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.sector {
  padding: 1.6rem; border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.sector:hover { transform: translateY(-4px); border-color: var(--grad-b); }
.sector .card__ico { margin-bottom: 0.9rem; }
.sector h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.sector p { color: var(--muted); font-size: 0.9rem; }

/* article / white paper */
.article { max-width: 780px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }
.article__meta { color: var(--faint); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 2rem; text-align: center; }
.toc { border: 1px solid var(--line); border-radius: var(--r); background: rgba(20, 24, 55, 0.4); padding: 1.3rem 1.6rem; margin-bottom: 2.5rem; }
.toc h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--grad-c); margin: 0 0 0.8rem; }
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; color: var(--muted); font-size: 0.95rem; }
.toc a { color: var(--muted); } .toc a:hover { color: var(--ink); }
.article h2 { font-size: 1.55rem; margin: 2.6rem 0 0.8rem; scroll-margin-top: 90px; }
.article h3 { font-size: 1.12rem; margin: 1.6rem 0 0.5rem; }
.article p { color: var(--muted); margin-bottom: 1rem; line-height: 1.75; }
.article ul { color: var(--muted); margin: 0 0 1.2rem 0; padding-left: 1.3rem; display: grid; gap: 0.5rem; line-height: 1.6; }
.article strong { color: var(--ink); font-weight: 600; }
.pullquote {
  border-left: 3px solid var(--grad-b); padding: 0.3rem 0 0.3rem 1.4rem; margin: 1.8rem 0;
  font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; line-height: 1.4; color: var(--ink);
}
.article__cta {
  margin-top: 3rem; padding: 2rem; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--card); text-align: center;
}
.article__cta h3 { font-size: 1.3rem; margin-bottom: 0.8rem; }
.article__cta p { margin-bottom: 1.4rem; }

/* resources */
.feature-paper {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: center;
  padding: 2.2rem; border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(40, 30, 90, 0.5), rgba(20, 24, 55, 0.5));
  position: relative; overflow: hidden;
}
.feature-paper__badge { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grad-c); font-weight: 600; }
.feature-paper h2 { font-size: 1.8rem; line-height: 1.15; margin: 0.6rem 0 0.8rem; }
.feature-paper p { color: var(--muted); margin-bottom: 1.4rem; }
.feature-paper__art {
  aspect-ratio: 4 / 3; border-radius: 14px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, rgba(140, 90, 230, 0.35), transparent 70%), var(--navy-0);
  display: grid; place-items: center;
}
.feature-paper__art svg { width: 90px; height: 90px; color: var(--grad-c); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 0.7rem; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 1.4rem; overflow: hidden; }
.faq summary {
  cursor: pointer; list-style: none; font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 1rem; padding: 1.1rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--grad-c); font-size: 1.4rem; font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { content: '−'; }
.faq p { color: var(--muted); font-size: 0.95rem; padding-bottom: 1.2rem; margin: 0; line-height: 1.7; }

@media (max-width: 820px) {
  .sectors { grid-template-columns: 1fr 1fr; }
  .feature-paper { grid-template-columns: 1fr; }
  .feature-paper__art { order: -1; }
}
@media (max-width: 560px) { .sectors { grid-template-columns: 1fr; } }

/* ================= demo modal ================= */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 1.2rem; }
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(6, 8, 22, 0.72); backdrop-filter: blur(6px); animation: fadeIn 0.25s var(--ease); }
.modal__dialog {
  position: relative; z-index: 1; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(24, 28, 62, 0.96), rgba(14, 18, 48, 0.98));
  border: 1px solid var(--line); border-radius: 20px; padding: 2rem;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6); animation: modalIn 0.35s var(--ease);
}
.modal__dialog::before {
  content: ''; position: absolute; inset: 0; padding: 1px; border-radius: 20px;
  background: var(--gradient); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.5; pointer-events: none;
}
.modal__close {
  position: absolute; top: 0.9rem; right: 1rem; background: none; border: 0; color: var(--muted);
  font-size: 1.6rem; line-height: 1; cursor: pointer; transition: color 0.2s;
}
.modal__close:hover { color: var(--ink); }
.modal__body h3, .modal__success h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.modal__sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.4rem; }
.demo-form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.field .opt { color: var(--faint); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 0.95rem; color: var(--ink);
  background: rgba(10, 13, 34, 0.6); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.7rem 0.85rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--grad-b); box-shadow: 0 0 0 3px rgba(140, 90, 230, 0.2);
}
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.demo-form__submit { margin-top: 0.4rem; width: 100%; }
.demo-form__submit:disabled { opacity: 0.7; cursor: default; }
.demo-form__alt { text-align: center; font-size: 0.85rem; color: var(--faint); }
.demo-form__alt a { color: var(--grad-c); }
.demo-form__error { color: #ff9d9d; font-size: 0.85rem; margin: 0; }
.demo-form__error a { color: #ffbcbc; text-decoration: underline; }
.hidden-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.modal__success { text-align: center; padding: 1.5rem 0.5rem; }
.success__ico {
  width: 60px; height: 60px; margin: 0 auto 1.2rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--gradient); color: #fff; font-size: 1.8rem; box-shadow: var(--glow);
}
.modal__success p { color: var(--muted); margin-bottom: 1.5rem; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ================= reveal animation ================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.hero__cards .minicard:nth-child(2) { transition-delay: 0.1s; }
.hero__cards .minicard:nth-child(3) { transition-delay: 0.2s; }

@keyframes breathe { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 0.9; transform: scale(1.08); } }
.hero__glow { transform-origin: center; }
.cta__glow { transform-origin: center; }

/* ================= responsive ================= */
@media (max-width: 900px) {
  .nav__links, .btn--demo { display: none; }
  .nav__toggle { display: flex; margin-left: auto; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10, 13, 34, 0.97); padding: 1.2rem 1.5rem; gap: 1rem; border-bottom: 1px solid var(--line);
  }
  .flow { grid-template-columns: 1fr; }
  .flow__pipe { flex-direction: row; gap: 0.6rem; padding: 0.4rem; }
  .grid--3, .grid--5 { grid-template-columns: 1fr 1fr; }
  .redteam__grid, .vantage__grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero__labels { display: none; }
}
@media (max-width: 560px) {
  .hero__cards, .grid--2, .grid--3, .grid--5 { grid-template-columns: 1fr; }
  .section { padding: 4rem 1.2rem; }
  .foot__inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
