/* DevOpsPath landing. One accent (signal orange), Geist + Geist Mono.
   Shape rule: containers 12px, controls 8px, chips fully round. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="light"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --sunken: #f5f5f6;
  --ink: #141518;
  --muted: #52555c;
  --line: #dcdde1;
  --line-strong: #c4c6cc;
  --accent: #c2410c;
  --accent-hover: #a5370a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(194, 65, 12, 0.08);
  --accent-line: rgba(194, 65, 12, 0.38);
  --code-bg: #16171a;
  --code-ink: #e6e6e9;
  --code-dim: #9a9ca3;
  --shadow: 0 1px 2px rgba(20, 21, 24, 0.05), 0 8px 24px rgba(20, 21, 24, 0.05);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111214;
  --surface: #18191c;
  --sunken: #0c0d0f;
  --ink: #ededef;
  --muted: #a3a5ab;
  --line: #2a2c31;
  --line-strong: #3a3d43;
  --accent: #f0814a;
  --accent-hover: #f59b6c;
  --accent-ink: #1c0d04;
  --accent-soft: rgba(240, 129, 74, 0.1);
  --accent-line: rgba(240, 129, 74, 0.42);
  --code-bg: #0a0b0c;
  --code-ink: #e6e6e9;
  --code-dim: #8b8d94;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

code, pre, .mono { font-family: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- Buttons and form ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 8px;
  font: inherit; font-weight: 600; font-size: 15px; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.18s ease, transform 0.12s ease, border-color 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }

.link-btn {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-input {
  min-height: 46px; padding: 0 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px;
  font: inherit; font-size: 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field-input::placeholder { color: var(--muted); opacity: 0.85; }
.field-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-input.is-invalid { border-color: #c81e1e; }
[data-theme="dark"] .field-input.is-invalid { border-color: #f87171; }

.notify-form { margin-top: 28px; }
.field-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.field-row .field { flex: 1 1 140px; }
.field-row .field--grow { flex: 2 1 220px; }
.field-error { min-height: 22px; margin-top: 6px; font-size: 14px; color: #b91c1c; }
[data-theme="dark"] .field-error { color: #fca5a5; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.notify-success {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 28px;
  padding: 16px 18px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.notify-success svg { flex: none; color: var(--accent); margin-top: 3px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.wordmark { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; }
.wordmark span { color: var(--accent); }
.wordmark--sm { font-size: 16px; }
.site-nav { display: flex; gap: 22px; margin-left: 16px; }
.site-nav a { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color 0.18s ease; }
.site-nav a:hover { color: var(--ink); }
.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  background: none; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.icon-btn:hover { border-color: var(--line-strong); }
.theme-icon--moon { display: none; }
[data-theme="dark"] .theme-icon--sun { display: none; }
[data-theme="dark"] .theme-icon--moon { display: block; }
.lang-switch {
  display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.lang-switch:hover { border-color: var(--line-strong); }
@media (max-width: 860px) { .site-nav { display: none; } }
@media (max-width: 420px) { .header-tools .btn-sm { display: none; } }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 32px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-title {
  font-size: clamp(38px, 5.2vw, 64px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700;
  max-width: 13ch;
}
.hero-sub { margin-top: 20px; font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 40ch; }

.route {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px 24px 20px; box-shadow: var(--shadow);
}
.route-cap { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.route-list { position: relative; }
.route-list::before {
  content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(var(--line-strong), var(--accent));
}
.route-stop {
  position: relative; display: grid; grid-template-columns: 76px 1fr; column-gap: 12px;
  padding: 9px 0 9px 26px;
}
.route-stop::before {
  content: ""; position: absolute; left: 0; top: 15px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong);
}
.route-stop:last-child::before { border-color: var(--accent); background: var(--accent); }
.route-range { grid-row: span 2; font-family: "Geist Mono", monospace; font-size: 13px; color: var(--muted); padding-top: 2px; }
.route-where { font-weight: 600; font-size: 15px; line-height: 1.35; }
.route-tools { font-size: 13.5px; color: var(--muted); line-height: 1.4; }

@media (prefers-reduced-motion: no-preference) {
  .js .route-stop { opacity: 0; transform: translateY(6px); animation: stop-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: calc(0.15s + var(--i) * 0.09s); }
  @keyframes stop-in { to { opacity: 1; transform: none; } }
}

@media (max-width: 920px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section--sunken { background: var(--sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; max-width: 22ch; }
.section-lead { margin-top: 14px; font-size: 17px; color: var(--muted); max-width: 62ch; }
@media (max-width: 640px) { .section { padding: 64px 0; } }

.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- The app ---------- */

.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; }
.svc { padding: 22px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-height: 170px; display: flex; flex-direction: column; }
.svc--2 { background: var(--accent-soft); border-color: var(--accent-line); }
.svc-name { font-family: "Geist Mono", monospace; font-size: 18px; font-weight: 500; }
.svc-stack { font-size: 13px; color: var(--muted); margin-top: 2px; }
.svc-job { margin-top: auto; padding-top: 18px; font-size: 15px; line-height: 1.45; }

.knobs {
  grid-column: 1 / -1; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 28px; align-items: start;
  padding: 26px; border-radius: 12px; background: var(--code-bg); color: var(--code-ink);
}
.knobs-title { font-size: 20px; letter-spacing: -0.02em; }
.knobs-lead { margin-top: 8px; color: var(--code-dim); font-size: 15px; }
.knobs-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.knobs-list code { color: #ffb48a; font-size: 14px; }
.knobs-list dd { color: var(--code-dim); font-size: 14px; margin-top: 2px; }

@media (max-width: 920px) {
  .app-grid { grid-template-columns: 1fr 1fr; }
  .knobs { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .app-grid { grid-template-columns: 1fr; }
  .svc { min-height: 0; }
  .knobs-list { grid-template-columns: 1fr; }
}

/* ---------- Syllabus ---------- */

.arc-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 36px; }
.arc-link {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; transition: border-color 0.18s ease;
}
.arc-link:hover { border-color: var(--accent-line); }
.arc-link-name { font-weight: 600; }
.arc-link-range { font-family: "Geist Mono", monospace; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .arc-nav { grid-template-columns: 1fr 1fr; } }

.syl-tools {
  display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 18px 28px; align-items: start;
  margin-top: 28px; padding: 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  min-height: 34px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--line-strong);
  font: inherit; font-size: 13px; font-weight: 600;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.chip span { font-family: "Geist Mono", monospace; font-weight: 400; color: var(--muted); margin-left: 2px; }
.chip:hover { border-color: var(--accent-line); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip[aria-pressed="true"] span { color: inherit; opacity: 0.8; }
.syl-status { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.syl-count { font-size: 14px; color: var(--muted); }
.syl-none { margin-top: 24px; color: var(--muted); }
@media (max-width: 760px) { .syl-tools { grid-template-columns: 1fr; } }

.arc { display: grid; grid-template-columns: 260px 1fr; gap: 32px; margin-top: 56px; }
.arc-head { position: sticky; top: 88px; align-self: start; }
.arc-title { font-size: 26px; letter-spacing: -0.025em; }
.arc-sum { margin-top: 6px; color: var(--muted); font-size: 15px; }
.arc-range { margin-top: 10px; font-family: "Geist Mono", monospace; font-size: 13px; color: var(--accent); }
@media (max-width: 860px) {
  .arc { grid-template-columns: 1fr; gap: 16px; margin-top: 44px; }
  .arc-head { position: static; }
}

.phases { display: flex; flex-direction: column; gap: 8px; }
.phase { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.phase[open] { border-color: var(--line-strong); }
.phase summary {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: start;
  padding: 16px 18px; cursor: pointer; list-style: none;
}
.phase summary::-webkit-details-marker { display: none; }
.phase summary:hover .phase-title { color: var(--accent); }
.phase-id { font-family: "Geist Mono", monospace; font-size: 13px; color: var(--muted); padding-top: 3px; }
.phase-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.phase-title { font-weight: 600; font-size: 17px; transition: color 0.18s ease; }
.phase-out { font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.phase-count { font-family: "Geist Mono", monospace; font-size: 13px; color: var(--muted); white-space: nowrap; padding-top: 3px; }
.phase-count::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 10px; vertical-align: 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.phase[open] .phase-count::after { transform: rotate(-135deg); vertical-align: -1px; }

.steps { padding: 4px 18px 14px; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; padding: 10px 0; }
.step + .step { border-top: 1px dashed var(--line); }
.step-num { font-family: "Geist Mono", monospace; font-size: 13px; color: var(--accent); padding-top: 2px; }
.step-text { display: flex; flex-direction: column; min-width: 0; }
.step-title { font-weight: 500; font-size: 15px; line-height: 1.4; }
.step-out { font-size: 14px; color: var(--muted); line-height: 1.45; }
.step-certs { font-family: "Geist Mono", monospace; font-size: 11.5px; color: var(--muted); white-space: nowrap; padding-top: 3px; }
@media (max-width: 560px) {
  .phase summary, .step { grid-template-columns: 40px 1fr; }
  .phase-count { grid-column: 2; padding-top: 0; }
  .step-certs { grid-column: 2; padding-top: 0; }
}

/* ---------- Steps: rules + file ---------- */

.steps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.rules { margin-top: 32px; counter-reset: rule; display: flex; flex-direction: column; gap: 22px; }
.rules li { counter-increment: rule; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; }
.rules li::before {
  content: counter(rule); grid-row: span 2;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); font-family: "Geist Mono", monospace; font-size: 14px;
}
.rule-h { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.rule-p { color: var(--muted); font-size: 15px; margin-top: 2px; }

.file { border-radius: 12px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--line); position: sticky; top: 88px; }
.file-name { padding: 12px 18px; font-family: "Geist Mono", monospace; font-size: 12.5px; color: var(--code-dim); border-bottom: 1px solid rgba(255, 255, 255, 0.08); overflow-wrap: anywhere; }
.file-body { margin: 0; padding: 18px; overflow-x: auto; color: var(--code-ink); font-size: 13.5px; line-height: 1.65; }
@media (max-width: 920px) {
  .steps-grid { grid-template-columns: 1fr; gap: 36px; }
  .file { position: static; }
}

/* ---------- Cost staircase ---------- */

.stairs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; margin-top: 40px; }
.stair {
  display: flex; flex-direction: column; gap: 6px;
  min-height: calc(150px + var(--i) * 34px); padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px;
}
.stair-range { font-family: "Geist Mono", monospace; font-size: 13px; color: var(--muted); }
.stair-price { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.stair-what { margin-top: auto; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
@media (max-width: 860px) {
  .stairs { grid-template-columns: 1fr 1fr; }
  .stair { min-height: 0; }
}
@media (max-width: 520px) { .stairs { grid-template-columns: 1fr; } }

/* ---------- War Room marquee ---------- */

.war { overflow: hidden; }
.marquee { margin-top: 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.marquee-track { display: flex; gap: 40px; width: max-content; }
.incident { white-space: nowrap; font-size: 17px; color: var(--muted); }
.incident b { color: var(--ink); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 140s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
  @keyframes marquee { to { transform: translateX(-50%); } }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { width: auto; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; gap: 10px 28px; padding: 0 24px; }
  .marquee-track > .incident:nth-child(n + 27) { display: none; }
}

/* ---------- FAQ ---------- */

.faq { margin-top: 32px; display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq-item summary { padding: 18px 20px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: "Geist Mono", monospace; color: var(--accent); font-weight: 400; }
.faq-item[open] summary::after { content: "-"; }
.faq-item p { padding: 0 20px 18px; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer { padding: 32px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a, .footer-copy { font-size: 14px; color: var(--muted); }
.footer-copy { margin-left: auto; }
.footer-copy a { color: var(--ink); }
