/* ============================================================
   KVULN LLC stylesheet
   Monochrome, sharp, geometric. Matched to the ">|" brand mark:
   white-on-pure-black, chevron (< >) motif, no rounded corners.
   ============================================================ */

:root {
  /* Palette: monochrome-first */
  --bg:        #000000;
  --bg-alt:    #0a0a0a;   /* alternating section background */
  --surface:   #0e0e0e;   /* cards / inputs */
  --line:      #222222;   /* hairline borders */
  --line-soft: #161616;
  --fg:        #ffffff;   /* primary text */
  --fg-muted:  #9a9a9a;   /* secondary text */
  --fg-dim:    #666666;   /* tertiary / legal */
  /* Restrained accent, near-white. Swap this one var for a bold accent later. */
  --accent:    #ffffff;
  --accent-bg: #ffffff;
  --accent-fg: #000000;

  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 48px);

  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

img { max-width: 100%; display: block; }
a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--fg-muted); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

.muted { color: var(--fg-muted); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--fg); color: var(--bg); padding: 10px 16px; z-index: 100;
  font-family: var(--font-mono); font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,0.85);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.nav__brand { display: flex; align-items: center; gap: 13px; color: var(--fg); }
.brand-mark { height: 30px; width: auto; color: var(--fg); display: block; }
.nav__wordmark {
  font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.2em;
  font-size: 20px; color: var(--fg);
}

/* Blinking terminal cursor on the logo's prompt bar */
.brand-cursor { animation: cursor-blink 1.15s steps(1, end) infinite; transform-origin: center; }
@keyframes cursor-blink { 0%, 55% { opacity: 1; } 55.01%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .brand-cursor { animation: none; } }

.nav__menu { display: flex; align-items: center; gap: 28px; }
.nav__menu a {
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.02em; color: var(--fg-muted);
}
.nav__menu a:hover { color: var(--fg); }
.nav__cta {
  border: 1px solid var(--accent-bg); padding: 8px 16px;
  background: var(--accent-bg); color: var(--accent-fg) !important; font-weight: 600;
}
.nav__cta:hover { background: transparent; color: var(--fg) !important; border-color: var(--fg); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--fg); display: block; transition: transform .2s, opacity .2s; }
.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); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block; font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.02em;
  padding: 13px 24px; border: 1px solid var(--fg); cursor: pointer; transition: background .15s, color .15s;
}
.btn--primary { background: var(--accent-bg); color: var(--accent-fg); border-color: var(--accent-bg); }
.btn--primary:hover { background: transparent; color: var(--fg); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--fg); color: var(--fg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: clamp(72px, 14vw, 160px) 0 clamp(56px, 9vw, 110px); border-bottom: 1px solid var(--line); }
.eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; color: var(--fg-muted);
  margin: 0 0 22px;
}
.hero__title {
  font-size: clamp(2.1rem, 6vw, 4rem); font-weight: 600; max-width: 16ch;
}
.hero__sub {
  margin: 26px 0 0; max-width: 60ch; font-size: clamp(1rem, 2.2vw, 1.2rem); color: var(--fg-muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section { padding: clamp(64px, 11vw, 120px) 0; border-bottom: 1px solid var(--line); }
.section--alt { background: var(--bg-alt); }

.section__label {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; color: var(--fg-muted);
  margin: 0 0 16px;
}

/* Blinking block cursor after the prompt-style labels (terminal motif).
   Intentionally forced on even under prefers-reduced-motion (owner request),
   so it carries !important to override the global reduce-motion animation reset. */
.eyebrow::after,
.section__label::after {
  content: "";
  display: inline-block;
  width: 0.5em; height: 1em;
  margin-left: 0.4em;
  vertical-align: -0.12em;
  background: var(--fg);
  animation: cursor-blink 1.15s steps(1, end) infinite !important;
}
.section__title { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 600; max-width: 20ch; }
.section__lead { margin: 20px 0 0; max-width: 64ch; color: var(--fg-muted); font-size: 1.05rem; }
/* Closing CTA at the end of a section, so sections don't dead-end. */
.section__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(32px, 5vw, 48px); }
.lead { font-size: 1.1rem; color: var(--fg); }

/* ============================================================
   GRIDS
   ============================================================ */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 48px; }
.grid--cards { grid-template-columns: repeat(3, 1fr); }
.grid--facts { grid-template-columns: repeat(4, 1fr); margin-top: 40px; }

/* Cards share hairline borders by sitting on the grid's background color */
.card { background: var(--bg); padding: 30px 26px; }
.section--alt .card { background: var(--bg-alt); }
.card__title { font-size: 1.12rem; font-weight: 600; margin-bottom: 12px; }
.card p { margin: 0; color: var(--fg-muted); font-size: 0.96rem; }
.card { transition: background .15s; }
.card:hover { background: var(--surface); }

/* Facts (federal) */
.fact { background: var(--bg); padding: 24px 22px; display: flex; flex-direction: column; gap: 6px; }
.fact__key { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--fg-dim); text-transform: uppercase; }
.fact__val { font-family: var(--font-mono); font-size: 1.02rem; color: var(--fg); }

/* ============================================================
   SPLIT (about)
   ============================================================ */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 72px); margin-top: 44px; align-items: start; }
.split__col > p { color: var(--fg-muted); }
.split__col > p.lead { color: var(--fg); }
.split__col + .split__col .creds:first-child { margin-top: 0; }


/* ============================================================
   CHIPS / BADGES
   ============================================================ */
.chips, .badges { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--font-mono); font-size: 12.5px; border: 1px solid var(--line); padding: 6px 11px; color: var(--fg-muted); }
.chips li:has(a) { padding: 0; }
.chips li a { display: block; padding: 6px 11px; color: inherit; }
.chips li:has(a):hover { background: var(--fg); border-color: var(--fg); }
.chips li:has(a):hover a { color: var(--accent-fg); }
.badges li {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; font-weight: 700;
  border: 1px solid var(--fg); color: var(--fg);
}
.badges li a { display: block; padding: 8px 14px; color: inherit; }
.badges li:hover { background: var(--fg); }
.badges li:hover a { color: var(--accent-fg); }

.creds { margin-top: 30px; }
.creds__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--fg-dim); text-transform: uppercase; margin: 0; }

/* ============================================================
   FEDERAL extras
   ============================================================ */
.federal__naics { margin-top: 36px; }
.federal__naics-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--fg-dim); text-transform: uppercase; margin: 0 0 4px; }
.federal__note { font-size: 0.82rem; color: var(--fg-dim); margin: 12px 0 0; }
.federal__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* ============================================================
   STEPS (process)
   ============================================================ */
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step { background: var(--bg-alt); padding: 28px 24px; }
.step__num { font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim); letter-spacing: 0.1em; }
.step__title { font-size: 1.05rem; font-weight: 600; margin: 14px 0 10px; }
.step p { margin: 0; color: var(--fg-muted); font-size: 0.94rem; }

/* ============================================================
   FORM
   ============================================================ */
.form { max-width: 640px; margin-top: 44px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.03em; color: var(--fg); }
.field__optional { color: var(--fg-dim); text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  background: var(--surface); border: 1px solid var(--line); color: var(--fg);
  font-family: var(--font-sans); font-size: 15px; padding: 12px 14px; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--fg); }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-dim); }

.cf-turnstile { margin: 6px 0 20px; min-height: 65px; line-height: 0; }
/* Turnstile injects an <iframe>; inline iframes sit on the text baseline and can
   clip a few px at the bottom. Force block flow + reserve the widget's height. */
.cf-turnstile iframe { display: block; }
/* The widget is a fixed ~300px box. On very narrow phones the content column is
   under 300px, so its right edge overflows and clips - scale it down to fit. */
@media (max-width: 360px) {
  .cf-turnstile { transform: scale(0.9); transform-origin: left top; }
}

.form__hint { font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); margin: 8px 0 0; min-height: 1.1em; }
.form__status { font-family: var(--font-mono); font-size: 14px; margin: 16px 0 0; min-height: 1.2em; }
.form__status.is-error { color: #ff6b6b; }
.form__status.is-ok { color: var(--fg); }
.form__fallback { font-size: 0.9rem; color: var(--fg-muted); margin-top: 18px; }
.form__fallback a { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: 56px 0; }
.footer__inner { display: grid; gap: 22px; }
.footer__brand { display: flex; flex-direction: column; gap: 10px; }
.footer__lockup { display: inline-flex; align-items: center; gap: 11px; }
.footer__lockup .brand-mark { height: 24px; }
.footer__brand .nav__wordmark { font-size: 17px; }
.footer__meta { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__meta a { font-family: var(--font-mono); font-size: 13px; color: var(--fg-muted); }
.footer__meta a:hover { color: var(--fg); }
.footer__legal { font-size: 0.82rem; color: var(--fg-dim); margin: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .grid--cards { grid-template-columns: repeat(2, 1fr); }
  .grid--facts { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav__menu.is-open { max-height: 380px; }
  .nav__menu a { width: 100%; padding: 16px var(--pad); border-top: 1px solid var(--line-soft); }
  .nav__cta { border: 0; background: transparent; color: var(--fg) !important; font-weight: inherit; }
  .nav__cta:hover { background: transparent; color: var(--fg) !important; }
}

@media (max-width: 560px) {
  .grid--cards { grid-template-columns: 1fr; }
  .grid--facts { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}

/* ============================================================
   ASM BACKDROP  (decorative disassembly texture)
   Entire feature is gated behind  <body data-bg="asm">.
   Remove that attribute to disable everything below; delete
   this block + the .asm-bg markup in index.html to remove fully.
   ============================================================ */
[data-bg="asm"] .asm-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  opacity: 0.05;
  background: url("/assets/asm-tile.svg") repeat;
  background-size: 600px 252px;
}

/* Content sits above the texture. NOTE: do NOT include .nav here; it already has
   position: sticky + z-index:50 (above the backdrop); a position:relative override
   would break the sticky nav. */
[data-bg="asm"] main,
[data-bg="asm"] .footer { position: relative; z-index: 1; }

/* Uniform coverage: let the texture whisper through the alt bands too,
   instead of the solid --bg-alt. Cards/inputs/steps stay opaque (readable). */
[data-bg="asm"] .section--alt { background: rgba(255, 255, 255, 0.022); }

/* Fixed, static backdrop (no motion). Hidden under prefers-reduced-data. */
@media (prefers-reduced-data: reduce) {
  [data-bg="asm"] .asm-bg { display: none; }
}
