/* ==========================================================================
   Killbox — WitFoo OEM partner site
   Palette derived from /brand (slate #3a3e46, steel #363e46, cube #73818e)
   ========================================================================== */

:root {
  --bg: #151a21;
  --bg-deep: #0f1318;
  --surface: #1c222b;
  --surface-2: #232a34;
  --line: #2e3742;
  --line-strong: #3d4854;
  --slate: #3a3e46;
  --steel: #73818e;
  --steel-light: #a6b5c6;
  --ice: #edeff2;
  --text: #dfe4ea;
  --muted: #95a2b0;
  --accent: #e5484d;          /* the ninja's eyes */
  --accent-hover: #f2555a;
  --accent-soft: rgba(229, 72, 77, 0.12);
  --ok: #4cc38a;

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

  --radius: 10px;
  --radius-lg: 16px;
  --container: 1180px;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--steel-light); text-decoration: none; }
a:hover { color: var(--ice); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ice);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-light);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; background: var(--accent);
}

.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s, color .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--ice); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--steel); color: #fff; }
.btn-sm { padding: 10px 18px; font-size: 0.92rem; }
.btn svg { width: 18px; height: 18px; }

/* Nav -------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .25s, border-color .25s, backdrop-filter .25s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(15, 19, 24, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 34px; height: 34px; }
.brand .wordmark { height: 20px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--ice); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong); border-radius: 8px;
  width: 42px; height: 42px; color: var(--ice); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(15, 19, 24, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 12px 16px 24px;
    display: none;
  }
  .nav-menu.open { display: block; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links li a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links li:last-child a { border: 0; margin-top: 16px; }
  .nav.menu-open { background: rgba(15, 19, 24, 0.97); }
}

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 80px) 0 96px;
  background:
    linear-gradient(180deg, rgba(15,19,24,0.35) 0%, rgba(21,26,33,0.85) 70%, var(--bg) 100%),
    url("../assets/img/dark-material-bg.jpg") center / cover no-repeat;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 .hl { color: var(--steel-light); }
.hero .lead { margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note {
  margin-top: 28px; display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--muted);
}
.hero-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(76,195,138,.15); }

.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; }

@media (max-width: 920px) {
  .hero { padding: calc(var(--nav-h) + 48px) 0 64px; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
}

/* Flow animation in hero diagram */
.flow { stroke-dasharray: 4 8; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .flow { animation: none; } }

/* Stats strip ------------------------------------------------------------ */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
}
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .num { font-family: var(--font-display); font-size: 2.3rem; font-weight: 600; color: var(--ice); letter-spacing: -0.03em; line-height: 1; }
.stat .num small { font-size: 1.1rem; color: var(--steel-light); margin-left: 2px; }
.stat .num small.pre { margin: 0 6px 0 0; letter-spacing: -0.01em; }
.stat .label { margin-top: 10px; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 820px) {
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 26px 16px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Sections --------------------------------------------------------------- */
section { position: relative; }
.section { padding: 112px 0; }
.section-alt { background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
@media (max-width: 720px) { .section { padding: 76px 0; } .section-head { margin-bottom: 40px; } }

/* Model: three columns -------------------------------------------------- */
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.model-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}
.model-card .who {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--steel); margin-bottom: 18px;
}
.model-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.model-card p { color: var(--muted); font-size: 0.98rem; }
.model-card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.model-card li { position: relative; padding-left: 22px; margin: 8px 0; font-size: 0.95rem; color: var(--text); }
.model-card li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 9px;
  border: 2px solid var(--steel); transform: rotate(45deg);
}
.model-card.featured { border-color: var(--line-strong); background: linear-gradient(180deg, #232b36 0%, var(--surface) 100%); }
.model-card.featured::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent);
}
@media (max-width: 900px) { .model-grid { grid-template-columns: 1fr; } }

/* Architecture ----------------------------------------------------------- */
.arch {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  margin-top: 56px;
}
.arch svg { width: 100%; height: auto; }
.arch-caption { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.arch-caption span { display: inline-flex; align-items: center; gap: 10px; }
.arch-caption i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.arch-mobile { display: none; }
@media (max-width: 720px) {
  .arch { padding: 24px 16px; }
  .arch-desktop { display: none; }
  .arch-mobile { display: block; }
}

/* Steps ------------------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; position: relative; }
.step { padding: 0 28px 0 0; position: relative; }
.step .n {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-weight: 600; color: var(--ice);
  margin-bottom: 22px; position: relative; z-index: 1;
}
.step::before {
  content: ""; position: absolute; top: 24px; left: 48px; right: 0; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
}
.step:last-child::before { display: none; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.96rem; margin: 0; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .step::before { display: none; }
}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Pipeline (Conductor) --------------------------------------------------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; gap: 40px; } }

.pipeline { display: grid; gap: 12px; }
.stage {
  display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px;
}
.stage .tag {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ice); padding-top: 3px;
}
.stage .tag em { display: block; font-style: normal; color: var(--steel); font-size: 0.7rem; margin-top: 4px; letter-spacing: 0.08em; }
.stage h4 { font-size: 1.05rem; margin-bottom: 4px; }
.stage p { margin: 0; color: var(--muted); font-size: 0.94rem; }
@media (max-width: 560px) { .stage { grid-template-columns: 1fr; gap: 8px; padding: 18px; } }

.deploy-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 32px; }
.chip {
  font-family: var(--font-mono); font-size: 0.78rem;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--steel-light); background: rgba(255,255,255,0.02);
}

/* Feature grid (Analytics Max) ------------------------------------------ */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.feature { background: var(--bg-deep); padding: 32px 28px; }
.section-alt .feature { background: var(--bg); }
.feature .ico {
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  margin-bottom: 20px; color: var(--steel-light);
}
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.12rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.94rem; margin: 0; }
@media (max-width: 960px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } .feature { padding: 26px 20px; } }

/* Calm section ----------------------------------------------------------- */
.calm .container { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; }
.calm-art { position: relative; display: grid; place-items: center; }
.calm-art::before {
  content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(115,129,142,0.28) 0%, rgba(115,129,142,0) 70%);
}
.calm-art img { position: relative; width: 100%; max-width: 360px; height: auto; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.compare > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--surface); }
.compare h4 { font-size: 0.85rem; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.compare .before h4 { color: var(--muted); }
.compare .after { border-color: var(--line-strong); }
.compare .after h4 { color: var(--ice); }
.compare ul { list-style: none; margin: 0; padding: 0; }
.compare li { font-size: 0.93rem; padding: 7px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.compare li:first-child { border-top: 0; }
.compare .before li { color: var(--muted); }
.compare .before li::before { content: "×"; color: var(--accent); font-weight: 700; }
.compare .after li::before { content: "✓"; color: var(--ok); font-weight: 700; }
@media (max-width: 900px) {
  .calm .container { grid-template-columns: 1fr; gap: 32px; }
  .calm-art img { max-width: 240px; }
}
@media (max-width: 520px) { .compare { grid-template-columns: 1fr; } }

/* Audience --------------------------------------------------------------- */
.audience { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.aud { border-top: 2px solid var(--line-strong); padding-top: 22px; }
.aud h3 { font-size: 1.1rem; }
.aud p { color: var(--muted); font-size: 0.94rem; margin: 0; }
@media (max-width: 900px) { .audience { grid-template-columns: 1fr 1fr; gap: 32px 24px; } }
@media (max-width: 520px) { .audience { grid-template-columns: 1fr; } }

/* Pricing ---------------------------------------------------------------- */
.pricing-card {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface);
}
.pricing-card .left { padding: 48px 44px; }
.pricing-card .right { padding: 48px 44px; background: var(--surface-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.pricing-card .unit { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; color: var(--ice); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 8px; }
.pricing-card .unit span { color: var(--steel-light); }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.checks li { display: flex; gap: 10px; font-size: 0.95rem; }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.pricing-card .right p { color: var(--muted); }
.pricing-card .right .btn { margin-top: 12px; align-self: flex-start; }
@media (max-width: 900px) {
  .pricing-card { grid-template-columns: 1fr; }
  .pricing-card .right { border-left: 0; border-top: 1px solid var(--line); }
  .pricing-card .left, .pricing-card .right { padding: 32px 24px; }
}
@media (max-width: 520px) { .checks { grid-template-columns: 1fr; } }

/* FAQ -------------------------------------------------------------------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 24px 44px 24px 0; position: relative;
  font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; color: var(--ice);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--steel-light); border-bottom: 2px solid var(--steel-light);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--muted); padding: 0 40px 24px 0; margin: 0; }

/* Contact ---------------------------------------------------------------- */
.contact {
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(21,26,33,0.7) 40%, rgba(15,19,24,0.92) 100%),
    url("../assets/img/dark-material-bg.jpg") center / cover no-repeat;
}
.contact .container { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.contact-points { list-style: none; padding: 0; margin: 28px 0 0; }
.contact-points li { display: flex; gap: 14px; margin: 16px 0; color: var(--muted); font-size: 0.97rem; }
.contact-points b { color: var(--ice); font-weight: 600; display: block; }
.contact-points .n { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.8rem; color: var(--steel-light); }

form.card {
  background: rgba(28, 34, 43, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--steel-light); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px;
  background: var(--bg-deep); color: var(--ice);
  border: 1px solid var(--line-strong); border-radius: 8px;
  font: inherit; font-size: 0.97rem;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--steel-light); box-shadow: 0 0 0 3px rgba(166,181,198,0.15);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--steel-light) 50%), linear-gradient(135deg, var(--steel-light) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
form .btn { width: 100%; margin-top: 6px; }
.form-note { font-size: 0.82rem; color: var(--muted); margin: 14px 0 0; text-align: center; }
@media (max-width: 900px) { .contact .container { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; gap: 0; } form.card { padding: 24px 18px; } }

/* Footer ----------------------------------------------------------------- */
footer { background: var(--bg-deep); border-top: 1px solid var(--line); padding: 64px 0 40px; font-size: 0.92rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid h4 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel); margin-bottom: 16px; font-weight: 500; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin: 9px 0; }
.foot-grid a { color: var(--muted); }
.foot-grid a:hover { color: var(--ice); }
.foot-brand p { color: var(--muted); max-width: 340px; margin-top: 18px; }
.partner-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 8px;
  padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel-light);
}
.partner-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.legal { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--steel); font-size: 0.82rem; }
.legal p { margin: 0; max-width: 760px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* Reveal on scroll ------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* Utility ---------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--steel-light); outline-offset: 3px; border-radius: 4px; }
