/* ============================================================
   BRAIN PANIC — design tokens
   Terminal-panic-to-stable metaphor. Amber phosphor, not green.
   ============================================================ */

:root {
  --ink: #0b0e14;
  --ink-panel: #12161f;
  --ink-panel-raised: #171d29;
  --ink-line: #262e3d;
  --ink-line-soft: #1b212e;

  --amber: #e8a33d;
  --amber-bright: #f4bd63;
  --amber-dim: #6b5228;

  --rust: #c1440e;
  --rust-bright: #e3591c;

  --paper: #ece8e0;
  --paper-dim: #b9b6ae;
  --slate: #8b93a6;

  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1120px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle scanline / grain texture on the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.012),
    rgba(255, 255, 255, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- eyebrow / prompt label ---------- */
.prompt {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.prompt::before {
  content: "$";
  color: var(--slate);
}

/* ---------- headings ---------- */
h1, h2, h3 {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin: 0;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.15; }
h3 { font-size: 1.05rem; }

p { color: var(--paper-dim); margin: 0; }

/* ---------- top nav ---------- */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(11, 14, 20, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.logo .cursor {
  color: var(--amber);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

nav.links {
  display: flex;
  gap: 30px;
  font-family: var(--mono);
  font-size: 13.5px;
}
nav.links a {
  color: var(--slate);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}
nav.links a:hover, nav.links a[aria-current="page"] {
  color: var(--amber);
}
nav.links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--amber);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink-line);
  color: var(--paper);
  font-family: var(--mono);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 13px;
}

@media (max-width: 720px) {
  nav.links {
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--ink-panel);
    border-bottom: 1px solid var(--ink-line);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  nav.links.open { display: flex; }
  nav.links a { padding: 14px 28px; border-bottom: 1px solid var(--ink-line-soft); }
  .nav-toggle { display: inline-block; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--amber);
  color: #14100a;
  font-weight: 600;
}
.btn-primary:hover { background: var(--amber-bright); }
.btn-ghost {
  border-color: var(--ink-line);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--amber-dim); color: var(--amber); }

/* ---------- hero / terminal boot ---------- */
.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--ink-line-soft);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

.hero h1 { margin-bottom: 18px; }
.hero .lede {
  max-width: 46ch;
  font-size: 1.08rem;
  margin-bottom: 32px;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.terminal {
  background: var(--ink-panel);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink-line);
  background: var(--ink-panel-raised);
}
.terminal-bar span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink-line);
}
.terminal-bar .label {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--slate);
  width: auto; height: auto; border-radius: 0; background: none;
}
.terminal-body {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.85;
  padding: 20px 18px 24px;
  min-height: 232px;
  color: var(--slate);
}
.terminal-body .ok { color: var(--amber); }
.terminal-body .warn { color: var(--rust-bright); }
.terminal-body .dim { color: #4d5567; }
.terminal-cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--amber);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

/* ---------- sections ---------- */
section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { margin-top: 14px; font-size: 1.02rem; }

.divider {
  border: none;
  border-top: 1px solid var(--ink-line-soft);
  margin: 0;
}

/* ---------- service cards ---------- */
.grid-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ink-line-soft);
  border: 1px solid var(--ink-line-soft);
}
@media (max-width: 720px) { .grid-services { grid-template-columns: 1fr; } }

.service-card {
  background: var(--ink);
  padding: 34px 32px;
}
.service-card .tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  margin-bottom: 16px;
  display: block;
}
.service-card h3 { margin-bottom: 10px; }
.service-card p { font-size: 0.96rem; }

/* ---------- process ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 780px) { .process { grid-template-columns: 1fr; } }
.step {
  border-left: 2px solid var(--amber-dim);
  padding-left: 20px;
}
.step .n {
  font-family: var(--mono);
  color: var(--amber);
  font-size: 13px;
  display: block;
  margin-bottom: 10px;
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.95rem; }

/* ---------- maintenance callout ---------- */
.callout {
  background: var(--ink-panel);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 780px) { .callout { grid-template-columns: 1fr; } }
.callout h2 { margin-bottom: 12px; }
.callout p { font-size: 0.98rem; }
.callout-side {
  border-left: 1px solid var(--ink-line);
  padding-left: 32px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--slate);
}
@media (max-width: 780px) { .callout-side { border-left: none; padding-left: 0; border-top: 1px solid var(--ink-line); padding-top: 20px; } }
.callout-side div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--ink-line-soft); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--ink-line-soft);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--slate);
}
.footer-inner a:hover { color: var(--amber); }

/* ---------- simple page header (used on pricing/brief/contact) ---------- */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--ink-line-soft);
}
.page-hero .prompt { margin-bottom: 18px; }
.page-hero p.lede { max-width: 56ch; margin-top: 16px; font-size: 1.02rem; }

/* ---------- pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 32px 28px;
  background: var(--ink-panel);
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--amber-dim);
  background: linear-gradient(180deg, rgba(232,163,61,0.06), var(--ink-panel) 40%);
}
.price-card .tag { font-family: var(--mono); font-size: 12px; color: var(--amber); }
.price-card .price {
  font-family: var(--mono);
  font-size: 2rem;
  color: var(--paper);
  margin: 14px 0 4px;
}
.price-card .price .unit { font-size: 0.9rem; color: var(--slate); font-weight: 400; }
.price-card .desc { font-size: 0.9rem; margin-bottom: 20px; }
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  flex-grow: 1;
}
.price-card li {
  font-size: 0.92rem;
  color: var(--paper-dim);
  padding: 9px 0;
  border-top: 1px solid var(--ink-line-soft);
  display: flex;
  gap: 10px;
}
.price-card li::before {
  content: "›";
  color: var(--amber);
}
.price-note {
  margin-top: 28px;
  font-size: 0.88rem;
  color: var(--slate);
  font-family: var(--mono);
}

/* ---------- brief form ---------- */
.brief-form {
  display: grid;
  gap: 22px;
  max-width: 640px;
}
.form-note {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--slate);
  background: var(--ink-panel);
  border: 1px solid var(--ink-line);
  border-left: 2px solid var(--amber-dim);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: -6px 0 2px;
}
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--amber);
  margin-bottom: 8px;
}
.field .hint {
  font-family: var(--sans);
  color: var(--slate);
  font-weight: 400;
  font-size: 12.5px;
  margin-left: 8px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--ink-panel);
  border: 1px solid var(--ink-line);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14.5px;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--amber);
}
.field textarea { resize: vertical; min-height: 110px; }

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.check-row label {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--paper-dim);
  border: 1px solid var(--ink-line);
  border-radius: 20px;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.check-row input { width: auto; margin: 0; accent-color: var(--amber); }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  background: var(--ink-panel);
  padding: 28px;
}
.contact-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--ink-line-soft);
  font-family: var(--mono);
  font-size: 13.5px;
}
.contact-row:first-child { border-top: none; }
.contact-row .k { color: var(--slate); }
.contact-row .v { color: var(--paper); }

/* ---------- privacy page ---------- */
.policy {
  display: grid;
  gap: 0;
  max-width: 720px;
}
.policy-item {
  padding: 26px 0;
  border-top: 1px solid var(--ink-line-soft);
}
.policy-item:first-child { border-top: none; }
.policy-item h3 { margin-bottom: 10px; }
.policy-item p { font-size: 0.98rem; }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
