:root {
  color-scheme: dark;
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --bg: #020706;
  --panel: rgba(8, 22, 20, 0.78);
  --panel-strong: rgba(12, 34, 31, 0.94);
  --line: rgba(132, 255, 218, 0.18);
  --line-strong: rgba(79, 255, 176, 0.42);
  --text: #f0fff8;
  --muted: rgba(240, 255, 248, 0.68);
  --soft: rgba(240, 255, 248, 0.48);
  --accent: #3dff9f;
  --cyan: #54d5ff;
  --amber: #ffca5c;
  --danger: #ff5f7a;
  --button-text: #01120a;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.38);
  --mx: 50vw;
  --my: 40vh;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(61, 255, 159, 0.06) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, rgba(84, 213, 255, 0.04) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(135deg, #020706 0%, #05110f 48%, #091014 100%);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(61, 255, 159, 0.16), transparent 280px),
    linear-gradient(110deg, rgba(61, 255, 159, 0.09), transparent 34%),
    linear-gradient(250deg, rgba(84, 213, 255, 0.12), transparent 36%),
    linear-gradient(180deg, transparent 0%, rgba(2, 7, 6, 0.72) 100%);
  z-index: -2;
}

body.is-red-flag-active::before {
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 95, 122, 0.22), transparent 300px),
    linear-gradient(110deg, rgba(255, 95, 122, 0.12), transparent 34%),
    linear-gradient(250deg, rgba(255, 202, 92, 0.08), transparent 36%),
    linear-gradient(180deg, transparent 0%, rgba(13, 3, 5, 0.78) 100%);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.network-canvas,
.cursor-light {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.network-canvas {
  z-index: -4;
  opacity: 0.62;
  mix-blend-mode: screen;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.network-canvas.is-red-flag-active {
  opacity: 0.78;
  filter: drop-shadow(0 0 12px rgba(255, 95, 122, 0.28));
}

.cursor-light {
  z-index: -3;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(84, 213, 255, 0.1), transparent 340px);
  transition: background 0.35s ease;
}

body.is-red-flag-active .cursor-light {
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 95, 122, 0.13), transparent 360px);
}

.cyber-site {
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(1440px, calc(100% - 32px));
  min-height: 72px;
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 7, 6, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  transition: min-height 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(61, 255, 159, 0.18), transparent);
  opacity: 0;
  animation: headerGlide 5.4s ease-in-out infinite;
}

.site-header.is-compact {
  min-height: 60px;
  background: rgba(2, 7, 6, 0.88);
  border-color: rgba(132, 255, 218, 0.28);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--button-text);
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  box-shadow: 0 0 30px rgba(61, 255, 159, 0.26);
  font-weight: 950;
  animation: markPulse 2.8s ease-in-out infinite;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 30px);
  color: var(--muted);
  font-size: 15px;
}

.nav-links a,
.site-footer a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.nav-cta,
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(61, 255, 159, 0.44);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 850;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.nav-cta,
.btn.primary {
  color: var(--button-text);
  background: linear-gradient(135deg, var(--accent), #9dffd0);
  box-shadow: 0 16px 50px rgba(61, 255, 159, 0.22);
}

.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.nav-cta:hover,
.nav-cta:focus-visible,
.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 18px 60px rgba(61, 255, 159, 0.24);
}

.hero {
  width: min(1440px, calc(100% - 32px));
  min-height: clamp(690px, 82svh, 860px);
  margin: 0 auto;
  padding: clamp(38px, 5vw, 78px) 0 54px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(500px, 0.9fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.hero-visual {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  min-height: clamp(480px, 58vw, 660px);
  overflow: hidden;
  border: 1px solid rgba(132, 255, 218, 0.24);
  border-radius: 8px;
  background: #06110f;
  box-shadow: var(--shadow), inset 0 0 80px rgba(61, 255, 159, 0.08);
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.18s ease-out, border-color 0.28s ease;
}

.hero-visual:hover {
  border-color: var(--line-strong);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.03);
}

.visual-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 54%, rgba(2, 7, 6, 0.14) 100%),
    linear-gradient(180deg, rgba(2, 7, 6, 0.03), rgba(2, 7, 6, 0.66));
}

.scan-beam {
  position: absolute;
  inset: -20% 0;
  background: linear-gradient(100deg, transparent 0 42%, rgba(84, 213, 255, 0.2) 49%, rgba(61, 255, 159, 0.28) 50%, transparent 58% 100%);
  transform: translateX(-120%);
  animation: heroScan 4.8s ease-in-out infinite;
}

.radar {
  position: absolute;
  right: 22px;
  top: 22px;
  width: 144px;
  aspect-ratio: 1;
  border: 1px solid rgba(61, 255, 159, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(61, 255, 159, 0.18) 0 2px, transparent 3px),
    conic-gradient(from 0deg, rgba(61, 255, 159, 0.34), transparent 42%, transparent);
  animation: radarSpin 4.2s linear infinite;
}

.radar span {
  position: absolute;
  inset: var(--inset);
  border: 1px solid rgba(84, 213, 255, 0.28);
  border-radius: 50%;
}

.radar span:nth-child(1) { --inset: 18px; }
.radar span:nth-child(2) { --inset: 42px; }
.radar span:nth-child(3) { --inset: 66px; }

.holo-nodes i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(61, 255, 159, 0.78);
  animation: nodePing 2.4s ease-in-out infinite;
}

.holo-nodes i:nth-child(1) { left: 17%; top: 23%; animation-delay: 0s; }
.holo-nodes i:nth-child(2) { left: 42%; top: 18%; animation-delay: 0.28s; }
.holo-nodes i:nth-child(3) { left: 67%; top: 42%; animation-delay: 0.56s; }
.holo-nodes i:nth-child(4) { left: 54%; top: 71%; animation-delay: 0.84s; }
.holo-nodes i:nth-child(5) { left: 28%; top: 62%; animation-delay: 1.12s; }

.terminal-card {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: min(390px, calc(100% - 36px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 7, 6, 0.76);
  backdrop-filter: blur(14px);
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(132, 255, 218, 0.14);
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
}

.terminal-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.terminal-top strong {
  margin-left: auto;
}

.terminal-lines {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  font-family: "Cascadia Mono", Consolas, monospace;
  color: #b9ffd7;
  font-size: 13px;
}

.terminal-lines span {
  min-height: 20px;
}

.hero-copy {
  justify-self: end;
  max-width: 640px;
}

.panel-kicker,
.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.danger {
  color: var(--danger);
}

.hero-copy h1 {
  margin: 12px 0 0;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
  text-shadow: 0 0 30px rgba(61, 255, 159, 0.14);
}

.hero-copy h1 span {
  display: block;
}

.hero-statement {
  margin: 20px 0 0;
  color: var(--text);
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 900;
  line-height: 1.12;
}

.hero-lead,
.section-heading > p,
.soc-copy p,
.intake-copy p,
.service-card p,
.process-grid p,
.summary-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-lead {
  margin: 20px 0 0;
  font-size: clamp(17px, 1.5vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.hero-metrics article,
.service-card,
.process-grid article,
.scope-builder,
.ops-board,
.trace-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.hero-metrics article {
  min-height: 96px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.hero-metrics article::after,
.motion-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent, rgba(61, 255, 159, 0.15), transparent);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.hero-metrics article:hover::after,
.motion-card:hover::after {
  transform: translateX(120%);
}

.hero-metrics strong {
  display: block;
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}

.hero-metrics article > span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.hero-metrics strong span {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.threat-ticker {
  width: 100%;
  overflow: hidden;
  border-block: 1px solid rgba(132, 255, 218, 0.12);
  background: rgba(2, 7, 6, 0.46);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 14px;
  padding: 12px 0;
  animation: tickerMove 24s linear infinite;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 900;
}

.section {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 0;
}

.section-heading {
  max-width: 920px;
  margin-bottom: 28px;
}

.section-heading.compact {
  max-width: 780px;
}

.section h2 {
  margin: 10px 0 0;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading > p {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 18px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.motion-card {
  position: relative;
  overflow: hidden;
}

.service-card,
.process-grid article {
  padding: 22px;
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.service-card:hover,
.service-card:focus-within,
.process-grid article:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: var(--panel-strong);
}

.service-card span,
.process-grid span,
.trace-grid span {
  color: var(--cyan);
  font-weight: 950;
}

.service-card h3,
.process-grid h3,
.summary-panel h3 {
  margin: 14px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.service-card p,
.process-grid p {
  margin: 14px 0 0;
}

.card-stream {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.card-stream i {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: dataStream 2.5s ease-in-out infinite;
}

.card-stream i:nth-child(2) { animation-delay: 0.24s; }
.card-stream i:nth-child(3) { animation-delay: 0.48s; }

.red-flag-band {
  padding-top: clamp(38px, 6vw, 76px);
}

.red-flag-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: clamp(18px, 4vw, 48px);
  align-items: center;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(255, 95, 122, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(255, 95, 122, 0.16), transparent 36%),
    linear-gradient(90deg, rgba(61, 255, 159, 0.06) 1px, transparent 1px) 0 0 / 42px 42px,
    rgba(8, 22, 20, 0.84);
  box-shadow: 0 26px 90px rgba(255, 95, 122, 0.1), var(--shadow);
}

.flag-visual {
  position: relative;
  min-height: 280px;
  border: 1px solid rgba(255, 95, 122, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 95, 122, 0.24), transparent 36%),
    rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.flag-visual::before,
.flag-visual::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 95, 122, 0.18);
  border-radius: 50%;
  animation: flagRing 2.8s ease-in-out infinite;
}

.flag-visual::after {
  inset: 54px;
  animation-delay: 0.4s;
}

.flag-pole {
  position: absolute;
  left: 44%;
  top: 24%;
  bottom: 20%;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd4dc, var(--danger));
  box-shadow: 0 0 22px rgba(255, 95, 122, 0.44);
}

.flag-cloth {
  position: absolute;
  left: calc(44% + 4px);
  top: 25%;
  width: 94px;
  height: 66px;
  background:
    linear-gradient(135deg, #ff315f, #ff7a90),
    var(--danger);
  clip-path: polygon(0 0, 100% 10%, 72% 48%, 100% 86%, 0 78%);
  filter: drop-shadow(0 0 26px rgba(255, 95, 122, 0.44));
  animation: flagWave 1.8s ease-in-out infinite;
}

.flag-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 36px rgba(255, 95, 122, 0.7);
  animation: nodePing 1.6s ease-in-out infinite;
}

.red-flag-copy h2 {
  margin: 10px 0 0;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.02;
}

.red-flag-copy p {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 18px;
}

.drill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.danger-btn {
  background: linear-gradient(135deg, var(--danger), #ffb0bf) !important;
  border-color: rgba(255, 95, 122, 0.6) !important;
  box-shadow: 0 18px 60px rgba(255, 95, 122, 0.22) !important;
}

.drill-timeline {
  display: grid;
  gap: 10px;
}

.drill-timeline article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px 14px;
  align-items: center;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(255, 95, 122, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  animation: rowFloat 5s ease-in-out infinite;
}

.drill-timeline article:nth-child(2) { animation-delay: 0.18s; }
.drill-timeline article:nth-child(3) { animation-delay: 0.36s; }
.drill-timeline article:nth-child(4) { animation-delay: 0.54s; }

.drill-timeline span {
  grid-row: span 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: #24020a;
  background: var(--danger);
  font-weight: 950;
}

.drill-timeline strong {
  font-size: 19px;
}

.drill-timeline small {
  color: var(--muted);
  line-height: 1.55;
}

.soc-band {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(480px, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}

.soc-copy h2,
.intake-copy h2 {
  margin: 10px 0 0;
}

.soc-copy p,
.intake-copy p {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 18px;
}

.soc-score {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.soc-score strong {
  color: var(--accent);
  font-size: 46px;
  line-height: 1;
}

.soc-score span {
  color: var(--muted);
  font-weight: 900;
}

.ops-board {
  display: grid;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(61, 255, 159, 0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    rgba(3, 12, 11, 0.86);
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(132, 255, 218, 0.12);
  border-radius: 8px;
}

.heatmap span {
  min-height: 18px;
  border-radius: 4px;
  background: rgba(61, 255, 159, 0.12);
  animation: heatPulse 2.2s ease-in-out infinite;
}

.heatmap .level-2 { background: rgba(84, 213, 255, 0.22); }
.heatmap .level-3 { background: rgba(255, 202, 92, 0.35); }
.heatmap .level-4 { background: rgba(255, 95, 122, 0.42); }

.ops-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 74px;
  padding: 14px;
  border: 1px solid rgba(132, 255, 218, 0.14);
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  animation: rowFloat 5s ease-in-out infinite;
}

.ops-row:nth-child(3) { animation-delay: 0.2s; }
.ops-row:nth-child(4) { animation-delay: 0.4s; }
.ops-row:nth-child(5) { animation-delay: 0.6s; }

.ops-row.is-critical {
  border-left-color: var(--danger);
}

.ops-row.is-good {
  border-left-color: var(--accent);
}

.ops-row span {
  color: var(--soft);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.ops-row strong {
  font-size: 19px;
}

.ops-row small {
  color: var(--muted);
  text-align: right;
}

.trace-board {
  padding: 24px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(61, 255, 159, 0.08) 1px, transparent 1px) 0 0 / 46px 46px,
    rgba(3, 12, 11, 0.82);
}

.trace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  position: relative;
}

.trace-grid::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--cyan), transparent);
  animation: dataStream 2.4s ease-in-out infinite;
}

.trace-grid article {
  position: relative;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 7, 6, 0.78);
}

.trace-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 22px;
}

.trace-grid small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.intake-band {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(520px, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

.scope-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.86fr);
  gap: 14px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(61, 255, 159, 0.06) 1px, transparent 1px) 0 0 / 36px 36px,
    var(--panel);
}

.control-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(132, 255, 218, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.control-group strong {
  font-size: 15px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.segmented button {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.segmented button:hover,
.segmented button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--cyan);
}

.segmented button.is-active {
  color: var(--button-text);
  border-color: var(--accent);
  background: var(--accent);
}

.summary-panel {
  grid-row: span 3;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(61, 255, 159, 0.14), rgba(84, 213, 255, 0.08)), rgba(4, 15, 14, 0.96);
}

.pulse-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.pulse-meter i {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  box-shadow: 0 0 20px rgba(61, 255, 159, 0.34);
  transition: width 0.45s ease;
}

.summary-panel dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.summary-panel dl div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(132, 255, 218, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.summary-panel dt {
  color: var(--soft);
  font-size: 13px;
}

.summary-panel dd {
  margin: 0;
  font-weight: 850;
}

.summary-panel p {
  margin: 18px 0 0;
}

.btn.full {
  width: 100%;
  margin-top: 18px;
}

.site-footer {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 52px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.service-card,
.process-grid article,
.ops-board,
.scope-builder,
.trace-board,
.red-flag-panel {
  opacity: 0;
  transform: translateY(18px);
}

.is-visible {
  animation: revealUp 0.68s ease forwards;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headerGlide {
  0%, 72%, 100% { opacity: 0; transform: translateX(-30%); }
  40% { opacity: 1; transform: translateX(30%); }
}

@keyframes markPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(61, 255, 159, 0.22); }
  50% { box-shadow: 0 0 42px rgba(84, 213, 255, 0.42); }
}

@keyframes heroScan {
  0%, 12% { transform: translateX(-120%); opacity: 0; }
  28%, 54% { opacity: 1; }
  70%, 100% { transform: translateX(120%); opacity: 0; }
}

@keyframes radarSpin {
  to { transform: rotate(360deg); }
}

@keyframes nodePing {
  0%, 100% { transform: scale(0.8); opacity: 0.42; }
  50% { transform: scale(1.45); opacity: 1; }
}

@keyframes tickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes dataStream {
  0%, 100% { opacity: 0.26; transform: scaleX(0.34); transform-origin: left; }
  50% { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

@keyframes rowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes heatPulse {
  0%, 100% { opacity: 0.48; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes flagWave {
  0%, 100% { transform: skewY(-2deg) translateX(0); }
  50% { transform: skewY(5deg) translateX(5px); }
}

@keyframes flagRing {
  0%, 100% { opacity: 0.25; transform: scale(0.92); }
  50% { opacity: 0.72; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  .hero,
  .soc-band,
  .intake-band {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    justify-self: start;
    max-width: 760px;
    order: 1;
  }

  .hero-visual {
    order: 2;
  }

  .service-grid,
  .process-grid,
  .trace-grid,
  .red-flag-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .red-flag-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-cta {
    width: 100%;
  }

  .nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 40px;
  }

  .hero-metrics,
  .service-grid,
  .process-grid,
  .trace-grid,
  .red-flag-panel,
  .scope-builder,
  .segmented {
    grid-template-columns: 1fr;
  }

  .red-flag-copy {
    grid-column: auto;
  }

  .trace-grid::before {
    display: none;
  }

  .summary-panel {
    grid-row: auto;
  }

  .ops-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ops-row small {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .site-header,
  .hero,
  .section,
  .site-footer {
    width: min(100% - 24px, 1440px);
  }

  .brand strong {
    font-size: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(30px, 8.6vw, 36px);
  }

  .hero-statement {
    font-size: 25px;
  }

  .hero-visual {
    min-height: 390px;
  }

  .radar {
    width: 106px;
  }

  .terminal-card {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    margin: -138px 12px 12px;
  }

  .site-footer {
    flex-direction: column;
  }
}
