/* Zane Security — site styles. Brand: Ink / Bone / Steel, Archivo + IBM Plex Mono (self-hosted). */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #0B0D10;
  --graphite: #12151A;
  --line: #232932;
  --bone: #ECEAE4;
  --bone-dim: #C9CBC9;
  --muted: #8A919C;
  --steel: #6E93C0;
  --steel-deep: #4F76A4;
  --steel-text-light: #3A5D86;
  --ink-soft: #4A5058;
  --danger: #D9826B;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 8.5vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: clamp(17px, 1.1vw + 12px, 19px);
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--steel); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--bone); }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; }
::selection { background: var(--steel); color: var(--ink); }

h1, h2, h3 { margin: 0; font-weight: 800; font-stretch: 125%; line-height: 1.02; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 18ch; }
h3 { font-size: 1.15rem; line-height: 1.2; letter-spacing: 0; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--bone); color: var(--ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--bone); color: var(--ink);
  font-family: var(--sans); font-weight: 700; font-size: 1rem; font-stretch: 112%;
  text-decoration: none; border: 1px solid var(--bone); border-radius: 0;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--steel); border-color: var(--steel); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.btn-ghost:hover { background: transparent; color: var(--bone); border-color: var(--bone); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn-full { width: 100%; }

/* ---------- Brand lockup ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--bone); text-decoration: none; }
.brand:hover { color: var(--bone); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark .accent { fill: var(--steel); }
.brand-word { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-zane { font-weight: 800; font-stretch: 125%; font-size: 21px; letter-spacing: .01em; line-height: .82; }
.brand-sec { font-family: var(--mono); font-weight: 500; font-size: 8.4px; letter-spacing: .52em; margin-top: 5px; margin-right: -.52em; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 16, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--bone-dim); text-decoration: none; font-size: .92rem; }
.nav-links a:hover { color: var(--bone); }
@media (max-width: 960px) {
  .nav nav { display: none; }
  .nav .btn-small { margin-left: auto; }
}
@media (max-width: 420px) {
  .nav .btn-small { padding: 0 12px; font-size: .82rem; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(24px, 3vw, 40px); position: relative; overflow: hidden; }
.hero::before {
  /* faint survey grid, fading out */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 75% 35%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 75% 35%, #000 0%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.kicker { color: var(--steel); font-weight: 600; font-size: .95rem; margin-bottom: 24px; }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.9rem); line-height: .98; letter-spacing: -0.02em; max-width: 15ch; }
.lede { margin-top: 28px; max-width: 54ch; color: var(--bone-dim); font-size: clamp(1.05rem, 1.2vw + .6rem, 1.3rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-art { color: var(--bone); }
.hero-mark { width: 100%; max-width: 320px; margin-left: auto; overflow: visible; }
.hm-frame { stroke-dasharray: 1; stroke-dashoffset: 0; }
.hm-breach { fill: var(--steel); transform-box: fill-box; transform-origin: center; }
.hero-caption { margin: 22px 0 0 auto; max-width: 320px; font-family: var(--mono); font-size: .8rem; color: var(--muted); line-height: 1.5; }

.built-for { position: relative; margin: clamp(56px, 7vw, 96px) 0 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); max-width: 70ch; }

/* load sequence: frame draws, Z settles, corner breaks out (disabled for reduced motion below) */
.hm-frame { animation: draw 1.5s cubic-bezier(.6,.05,.25,1) .2s both; }
.hm-z { animation: fadein .7s ease 1.1s both; }
.hm-breach { animation: breach .7s cubic-bezier(.2,1.6,.4,1) 1.6s both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes breach { 0% { opacity: 0; transform: translate(-14px, 14px) scale(.6); } 100% { opacity: 1; transform: none; } }

@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-lede { color: var(--bone-dim); max-width: 50ch; margin: 0; }
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; } }
.section-head-solo { grid-template-columns: 1fr; }
.section-head-solo h2 { max-width: 20ch; }

/* The "open perimeter" frame: a bordered panel whose top-right corner breaks out in Steel */
.perimeter { position: relative; border: 1px solid var(--line); }
.perimeter::after {
  content: ""; position: absolute; top: -9px; right: -9px; width: 18px; height: 18px;
  background: var(--steel); box-shadow: 0 0 0 6px var(--ink);
}
.perimeter-light::after { background: var(--steel-deep); box-shadow: 0 0 0 6px var(--bone); }

/* ---------- Attack chain ---------- */
.chain-panel { padding: clamp(24px, 4vw, 56px); background: var(--graphite); }
.panel-label { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 32px; }
.chain { list-style: none; margin: 0; padding: 0; position: relative; }
.chain::before {
  /* the track */
  content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1px; background: var(--line);
}
.chain::after {
  /* progress fill, driven by --progress from main.js */
  content: ""; position: absolute; left: 15px; top: 8px; width: 1px;
  height: calc((100% - 16px) * var(--progress, 1)); background: var(--steel);
  transition: height .5s ease;
}
.hop {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) minmax(0, 13rem);
  gap: 12px 40px; padding: 26px 0 26px 56px;
  border-top: 1px solid var(--line);
}
.hop:first-child { border-top: 0; padding-top: 4px; }
.hop::before {
  /* node on the track */
  content: ""; position: absolute; left: 10px; top: 32px; width: 11px; height: 11px;
  background: var(--graphite); border: 1px solid var(--muted); transition: background .4s, border-color .4s;
}
.hop:first-child::before { top: 10px; }
.hop.reached::before { background: var(--steel); border-color: var(--steel); }
.hop-phase { display: flex; align-items: baseline; gap: 12px; }
.hop-n { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.hop-phase h3 { font-size: 1.05rem; }
.hop-attacker { margin: 0; color: var(--bone); }
.hop-scanner { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.scanner-label { font-family: var(--mono); font-size: .72rem; color: var(--muted); white-space: nowrap; }
.verdict { font-family: var(--mono); font-size: .88rem; color: var(--bone-dim); }
.verdict-ok::before { content: "✓ "; color: #7FB38A; }
.hop-final .hop-phase h3 { color: var(--danger); }
.endings { display: grid; gap: 18px; }
.ending { border-left: 2px solid var(--danger); padding-left: 16px; }
.ending h4 { margin: 0 0 5px; font-size: .95rem; font-weight: 700; font-stretch: 112%; line-height: 1.25; color: var(--danger); }
.ending p { margin: 0; }
.hop-final.reached::before { background: var(--danger); border-color: var(--danger); }
.chain-close {
  margin: 32px 0 0; padding-top: 28px; border-top: 1px solid var(--line);
  font-weight: 700; font-stretch: 112%; font-size: clamp(1.1rem, 1.5vw + .5rem, 1.45rem); line-height: 1.35; max-width: 46ch;
}
@media (max-width: 600px) {
  .chain-panel { padding: 24px 18px; }
  .hop { padding-left: 40px; }
  .chain::before, .chain::after { left: 5px; }
  .hop::before { left: 0; }
}
@media (max-width: 900px) {
  .hop { grid-template-columns: 1fr; gap: 8px; }
  .hop-scanner { flex-direction: row; gap: 10px; align-items: baseline; }
}

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px clamp(24px, 3.2vw, 48px); }
.service { padding: 26px 0 28px; border-top: 1px solid var(--bone); }
.service h3 { font-size: clamp(1.2rem, 1.1vw + .55rem, 1.45rem); min-height: 2.4em; }
.service-pitch { color: var(--bone-dim); margin: 16px 0 24px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 10px 0 10px 22px; border-top: 1px solid var(--line); font-size: .95rem; line-height: 1.45; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 18px; width: 8px; height: 8px; background: var(--steel); }
@media (max-width: 1000px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .services { grid-template-columns: 1fr; }
  .service { padding: 26px 0 20px; }
  .service h3 { min-height: 0; }
}

/* ---------- Origin ---------- */
.origin { background: var(--graphite); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.origin-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 100px); }
.origin-copy h2 { margin-bottom: 36px; max-width: 14ch; }
.origin-copy p { color: var(--bone-dim); max-width: 56ch; }
.origin-promise { margin-top: 28px; padding-left: 18px; border-left: 3px solid var(--steel); color: var(--bone) !important; font-weight: 600; }
.creds { margin: 0; align-self: end; }
.cred { padding: 22px 0; border-top: 1px solid var(--line); }
.cred:last-child { border-bottom: 1px solid var(--line); }
.cred dt { font-weight: 700; font-stretch: 112%; margin-bottom: 6px; }
.cred dd { margin: 0; color: var(--bone-dim); font-size: .95rem; line-height: 1.5; }
@media (max-width: 900px) { .origin-grid { grid-template-columns: 1fr; } }

/* ---------- Clients ---------- */
.clients { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3.5vw, 52px) clamp(32px, 5vw, 80px); }
.client { padding-top: 22px; border-top: 3px solid var(--steel); }
.client h3 { font-size: 1.3rem; margin-bottom: 16px; }
.client p { color: var(--bone-dim); margin: 0; max-width: 54ch; }
@media (max-width: 900px) { .clients { grid-template-columns: 1fr; } }

/* ---------- Process (light section) ---------- */
.light { background: var(--bone); color: var(--ink); }
.light a { color: var(--steel-text-light); }
.process-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 96px); align-items: start; }
.process-grid h2 { margin-bottom: 48px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { counter-increment: step; display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); column-gap: 16px; padding: 22px 0; border-top: 1px solid #CFCCC4; }
.step::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-family: var(--mono); font-weight: 500; font-size: .9rem; color: var(--steel-text-light); padding-top: 2px; }
.step h3 { font-size: 1.15rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-soft); }
.report { padding: clamp(28px, 3.5vw, 44px); border-color: #CFCCC4; position: sticky; top: 100px; }
.report h3 { font-size: 1.35rem; margin-bottom: 20px; }
.report .ticks li { border-top-color: #CFCCC4; }
.report .ticks li::before { background: var(--steel-deep); }
@media (max-width: 900px) { .process-grid { grid-template-columns: 1fr; } .report { position: relative; top: 0; } }

/* ---------- Discretion ---------- */
.discretion-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px clamp(40px, 7vw, 96px); align-items: start; }
.discretion-copy p { color: var(--bone-dim); font-size: clamp(1.05rem, .6vw + .8rem, 1.2rem); }
.discretion-copy p:last-child { color: var(--bone); }
@media (max-width: 900px) { .discretion-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
#faq { padding-top: 0; }
.faq-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px clamp(40px, 7vw, 96px); padding-top: var(--section);
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-weight: 700; font-stretch: 112%; font-size: 1.05rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background:
    linear-gradient(var(--steel), var(--steel)) center / 12px 2px no-repeat,
    linear-gradient(var(--steel), var(--steel)) center / 2px 12px no-repeat;
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--bone-dim); padding: 0 40px 22px 0; margin: 0; max-width: 60ch; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { background: var(--graphite); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px clamp(40px, 7vw, 96px); align-items: start; }
.contact-copy h2 { font-size: clamp(2.6rem, 6vw, 4.8rem); margin-bottom: 28px; }
.contact-copy p { color: var(--bone-dim); max-width: 42ch; }
.contact-alt { margin-top: 28px; font-size: .95rem; }

.form { padding: clamp(24px, 3.5vw, 44px); background: var(--ink); }
.form .perimeter::after, .form.perimeter::after { box-shadow: 0 0 0 6px var(--graphite); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 8px; color: var(--bone-dim); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; min-height: 50px;
  background: var(--graphite); color: var(--bone);
  border: 1px solid var(--line); border-radius: 0;
  font: inherit; font-size: 1rem; line-height: 1.4;
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field input::placeholder, .field textarea::placeholder { color: #6B727C; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #3A424E; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--steel); }
.field input:user-invalid, .field select:user-invalid { border-color: var(--danger); }
.form-note { margin: 16px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.form-note a { color: var(--bone-dim); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.footer-meta { margin: 0; color: var(--muted); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: .88rem; }
.footer-links a { color: var(--bone-dim); text-decoration: none; }
.footer-links a:hover { color: var(--bone); }
@media (max-width: 700px) { .footer-links { margin-left: 0; } }

/* ---------- Simple pages (thanks, privacy, 404) ---------- */
.page { min-height: 70vh; padding: clamp(64px, 10vw, 140px) 0; }
.page h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); max-width: 16ch; margin-bottom: 32px; }
.page h2 { font-size: 1.4rem; max-width: none; margin: 40px 0 12px; }
.page p, .page li { color: var(--bone-dim); max-width: 64ch; }
.page .btn { margin-top: 24px; }

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

/* Simple pages: push the lone nav button to the right */
.nav-inner .brand + .btn { margin-left: auto; }
