/* CyberMarrow Infosec — design system */

:root {
  --bg: #070a14;
  --bg-alt: #0b1022;
  --surface: #101632;
  --surface-2: #161d3d;
  --border: #26305c;
  --text: #eef1fb;
  --muted: #96a0c8;
  --accent: #7c4dff;
  --accent-2: #1e7dff;
  --accent-ink: #ffffff;
  --danger: #ff6b7a;
  --success: #2fd6a0;
  --radius: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font);
  --shell: min(1180px, 100% - 2.5rem);
  --grad: linear-gradient(112deg, var(--accent) 0%, var(--accent-2) 100%);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--text); text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.shell { width: var(--shell); margin-inline: auto; }
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section--tight { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.muted { color: var(--muted); }
.lede { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--muted); max-width: 62ch; line-height: 1.75; }
.center { text-align: center; margin-inline: auto; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 0.7rem 1.1rem; background: var(--accent); color: #fff; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ eyebrow */

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 1.8rem; height: 1px; background: var(--grad); }

/* ------------------------------------------------------------- header */

.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.header.is-scrolled { border-bottom-color: var(--border); background: color-mix(in srgb, var(--bg) 94%, transparent); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }

.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand span em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 1.9rem; }
.nav a:not(.btn) {
  font-size: 0.92rem; font-weight: 500; color: var(--muted); text-decoration: none;
  position: relative; padding: 0.35rem 0; transition: color 0.15s ease;
}
.nav a:not(.btn):hover { color: var(--text); }
.nav a:not(.btn)[aria-current="page"] { color: var(--text); }
.nav a:not(.btn)[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--grad); border-radius: 2px;
}
.nav-cta { margin-left: 0.4rem; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 2.6rem; height: 2.6rem; padding: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); cursor: pointer;
}
.nav-toggle svg { margin-inline: auto; }

@media (max-width: 900px) {
  .nav {
    position: absolute; inset: 100% 0 auto; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 0.8rem 0; border-bottom: 1px solid var(--border); }
  .nav a:not(.btn)[aria-current="page"]::after { display: none; }
  .nav-cta { margin: 1rem 0 0; text-align: center; }
  .nav-toggle { display: block; }
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.78rem 1.4rem;
  font: inherit; font-family: var(--font-display); font-size: 0.93rem; font-weight: 600;
  border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -12px var(--accent); }
.btn--primary:hover { box-shadow: 0 14px 32px -12px var(--accent); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.btn--lg { padding: 0.95rem 1.7rem; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* --------------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; padding: clamp(4.5rem, 11vw, 8.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60rem 32rem at 78% -10%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%),
    radial-gradient(48rem 28rem at 8% 8%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 60%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 58px 58px;
  opacity: 0.22;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 78%);
}
.hero > * { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }
.hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.03em; }
.stat span { font-size: 0.83rem; color: var(--muted); }

/* ------------------------------------------------------- hero visual */

.hero-panel {
  position: relative;
  border: 1px solid var(--border); border-radius: 16px;
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  box-shadow: 0 40px 80px -50px #000;
  overflow: hidden;
}
.hero-panel-bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 45%, transparent); }
.hero-panel-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.hero-panel-bar b { margin-left: 0.5rem; font: 600 0.74rem var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hero-panel-body { padding: 1.2rem; display: grid; gap: 0.6rem; }
.pline { display: flex; align-items: center; gap: 0.75rem; padding: 0.72rem 0.85rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 0.86rem; }
.pline i {
  width: 1.6rem; height: 1.6rem; flex: none; border-radius: 6px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-style: normal; font-size: 0.8rem;
}
.pline span { color: var(--muted); }
.pline b { margin-left: auto; font: 600 0.7rem var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--success); }
.pline b.warn { color: #ffc46b; }

/* --------------------------------------------------------------- grid */

.grid { display: grid; gap: 1.15rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

.card {
  position: relative;
  padding: 1.7rem;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.card--link:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); transform: translateY(-3px); background: var(--surface-2); }
.card h3 { margin-bottom: 0.5rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.7; }
.card-icon {
  width: 2.6rem; height: 2.6rem; margin-bottom: 1.1rem;
  display: grid; place-items: center; border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
}
.card-link { margin-top: 1.1rem; display: inline-flex; align-items: center; gap: 0.4rem; font: 600 0.86rem var(--font-display); color: var(--accent); text-decoration: none; }
.card-link:hover { gap: 0.65rem; }
.card a.stretched::after { content: ""; position: absolute; inset: 0; }

.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.tick-list li { position: relative; padding-left: 1.75rem; color: var(--muted); font-size: 0.93rem; line-height: 1.65; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 0.5rem; height: 0.5rem; border-radius: 2px; background: var(--grad);
}
.tick-list strong { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------ process */

.steps { counter-reset: step; display: grid; gap: 1.15rem; }
.step { position: relative; padding: 1.6rem 1.6rem 1.6rem 4.4rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; left: 1.6rem; top: 1.55rem;
  font: 700 1.05rem var(--font-display);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { margin-bottom: 0.35rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* --------------------------------------------------------------- misc */

.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { padding: 0.35rem 0.8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 0.8rem; color: var(--muted); }

.split { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--aside { grid-template-columns: 1.25fr 0.75fr; } }

.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.faq-item + .faq-item { margin-top: 0.7rem; }
.faq-item button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.35rem; font: 600 0.98rem var(--font-display); text-align: left;
  color: var(--text); background: none; border: 0; cursor: pointer;
}
.faq-item button::after { content: "+"; font-size: 1.2rem; color: var(--accent); flex: none; }
.faq-item.is-open button::after { content: "\2212"; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-item.is-open .faq-answer { max-height: 22rem; }
.faq-answer p { margin: 0; padding: 0 1.35rem 1.3rem; color: var(--muted); font-size: 0.92rem; }

.cta-band {
  position: relative; overflow: hidden;
  padding: clamp(2.6rem, 6vw, 4rem);
  border-radius: 18px; border: 1px solid var(--border);
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 22%, var(--bg-alt)), var(--bg-alt) 62%);
}
.cta-band h2 { margin-bottom: 0.5rem; }
.cta-band p { max-width: 52ch; color: var(--muted); }

/* ------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); } }
.footer h4 { font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.footer a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  font-size: 0.84rem; color: var(--muted);
}
.social { display: flex; gap: 0.6rem; }
.social a { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid var(--border); border-radius: 8px; }
.social a:hover { border-color: var(--accent); color: var(--text); }

/* ------------------------------------------------------------- reveal */

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card--link:hover { transform: none; }
}

/* --------------------------------------------------------- contact bits */

.contact-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.contact-card + .contact-card { margin-top: 1rem; }
.contact-card h3 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.contact-card a { color: var(--text); font-size: 0.95rem; }
.contact-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.tabs { display: inline-flex; gap: 0.3rem; padding: 0.3rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); margin-bottom: 2rem; }
.tabs a {
  padding: 0.55rem 1.2rem; border-radius: 999px; font: 600 0.88rem var(--font-display);
  color: var(--muted); text-decoration: none;
}
.tabs a[aria-current="page"] { background: var(--grad); color: #fff; }

.panel { padding: clamp(1.5rem, 3vw, 2.2rem); border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }

/* Headings that wrap a link should read as headings, not as links. */
.card h3 a, .cell h3 a, .step h3 a { color: inherit; text-decoration: none; }

/* auto-fit packs as many columns as will fit, which leaves an orphaned card on
   the second row (5 cards became 4+1, 6 became 4+2). Three columns at desktop
   keeps the rows balanced. */
@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
