:root {
  --bg: oklch(9% 0.015 150);
  --bg-terminal: oklch(6% 0.01 150);
  --bg-card: oklch(11% 0.015 150);
  --bg-riesgo: oklch(11% 0.02 150);
  --fg: oklch(90% 0.02 150);
  --fg-70: oklch(70% 0.02 150);
  --fg-65: oklch(65% 0.02 150);
  --fg-62: oklch(62% 0.02 150);
  --fg-60: oklch(60% 0.02 150);
  --fg-58: oklch(80% 0.02 150);
  --fg-55: oklch(55% 0.02 150);
  --fg-48: oklch(48% 0.02 150);
  --green: oklch(85% 0.25 145);
  --green-bright: oklch(90% 0.25 145);
  --amber: oklch(80% 0.15 90);
  --red: oklch(65% 0.22 25);
  --border: oklch(30% 0.02 150);
  --border-soft: oklch(26% 0.02 150);
  --border-mid: oklch(35% 0.02 150);
  --border-strong: oklch(40% 0.02 150);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
a { color: inherit; }
::selection { background: var(--green); color: var(--bg); }

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background-image: repeating-linear-gradient(0deg, oklch(0% 0 0 / 0.12) 0px, transparent 1px, transparent 3px);
  opacity: 0.5;
}

@keyframes blink { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes glitch1 { 0%,100% { clip-path: inset(0 0 90% 0); transform: translate(0); } 20% { clip-path: inset(20% 0 60% 0); transform: translate(-3px,0); } 40% { clip-path: inset(60% 0 10% 0); transform: translate(3px,0); } 60% { clip-path: inset(10% 0 70% 0); transform: translate(-2px,0); } 80% { clip-path: inset(80% 0 5% 0); transform: translate(2px,0); } }
@keyframes glitch2 { 0%,100% { clip-path: inset(30% 0 40% 0); transform: translate(0); } 25% { clip-path: inset(5% 0 85% 0); transform: translate(3px,0); } 50% { clip-path: inset(50% 0 20% 0); transform: translate(-3px,0); } 75% { clip-path: inset(70% 0 10% 0); transform: translate(2px,0); } }
@keyframes qEnter { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes flashRed { 0% { background: oklch(30% 0.15 25 / 0.4); } 100% { background: transparent; } }

.blink, .dot.blink { animation: blink 0.8s step-end infinite; }
.glitch-wrap { position: relative; display: inline-block; }
.glitch-wrap .g1, .glitch-wrap .g2 { position: absolute; top: 0; left: 0; width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .glitch-wrap:hover .g1 { animation: glitch1 0.5s steps(2) infinite; color: var(--red); }
  .glitch-wrap:hover .g2 { animation: glitch2 0.5s steps(2) infinite; color: oklch(70% 0.18 250); }
  .blink-cursor { animation: blink 1s step-end infinite; }
  .q-anim { animation: qEnter 0.32s ease both; }
  .risk-flash { animation: flashRed 0.4s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .blink, .dot.blink { animation: none; }
}

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  background: oklch(9% 0.015 150 / 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid oklch(85% 0.25 145 / 0.3);
}
.logo { display: flex; align-items: center; gap: 4px; font-size: 22px; font-weight: 800; }
.accent, .accent-text, .logo-chevron { color: var(--green); }
.logo-cursor { display: inline-block; width: 10px; height: 22px; background: var(--green); margin-left: 2px; }
.site-nav { display: flex; align-items: center; gap: 32px; font-size: 14px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--fg-58); }
.nav-cta { color: var(--bg) !important; font-weight: 700; background: var(--green); padding: 10px 20px; border: 2px solid var(--green); }

/* buttons */
.btn {
  cursor: pointer; text-decoration: none; font-family: 'JetBrains Mono', monospace;
  display: inline-block; text-align: center;
}
.btn-primary { background: var(--green); color: var(--bg); font-weight: 700; padding: 17px 32px; font-size: 16px; text-transform: uppercase; letter-spacing: 0.5px; border: none; }
.btn-primary:hover { background: var(--green-bright); }
.btn-primary:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; }
.btn-outline { color: var(--fg); font-weight: 600; padding: 15px 20px; font-size: 15px; border: 1px solid var(--border-strong); background: transparent; }
.btn-ghost { background: transparent; color: var(--fg-58); border: 1px solid var(--border-mid); padding: 12px 18px; font-size: 13px; }
.btn-ghost:focus-visible, .btn-outline:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* hero */
.hero { position: relative; padding: 120px 48px 100px; overflow: hidden; border-bottom: 1px solid oklch(85% 0.25 145 / 0.25); }
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(oklch(85% 0.25 145 / 0.05) 1px, transparent 1px), linear-gradient(90deg, oklch(85% 0.25 145 / 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at top left, black, transparent 70%);
}
.hero-content { position: relative; max-width: 820px; }
.alert-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px;
  border: 1px solid var(--red); font-size: 13px; color: var(--red); margin-bottom: 28px;
}
.alert-badge .dot { width: 8px; height: 8px; background: var(--red); border-radius: 0; display: inline-block; }
.hero-title { font-size: 58px; line-height: 1.08; font-weight: 800; margin: 0 0 26px; text-transform: uppercase; }
.hero-title .real { position: relative; }
.hero-copy { font-size: 17px; line-height: 1.7; color: var(--fg-70); margin: 0 0 40px; max-width: 620px; }
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.terminal-mock {
  position: relative; max-width: 620px; margin: 64px auto 0;
  background: var(--bg-terminal); border: 1px solid oklch(85% 0.25 145 / 0.4);
  box-shadow: 0 0 40px oklch(85% 0.25 145 / 0.12);
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; }
.tl-dot.red { background: var(--red); }
.tl-dot.amber { background: var(--amber); }
.tl-dot.green { background: var(--green); }
.terminal-title { margin-left: 10px; font-size: 12px; color: var(--fg-55); }
.coords { margin-left: auto; font-size: 11px; color: var(--border-strong); }
.terminal-body { padding: 22px 24px; font-size: 13.5px; line-height: 2; color: oklch(80% 0.15 145); }
.terminal-body .dim { color: var(--fg-65); }
.terminal-body .red-text { color: var(--red); }
.terminal-body .fg-text { color: var(--fg); }
.cursor-block { display: inline-block; width: 9px; height: 14px; background: var(--green); margin-left: 6px; vertical-align: -2px; }

/* quiz section */
.quiz-section { position: relative; padding: 100px 48px 110px; border-bottom: 1px solid oklch(85% 0.25 145 / 0.3); overflow: hidden; }
.quiz-grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(oklch(85% 0.25 145 / 0.04) 1px, transparent 1px), linear-gradient(90deg, oklch(85% 0.25 145 / 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(ellipse at bottom right, black, transparent 70%);
  pointer-events: none;
}
.quiz-header { position: relative; max-width: 900px; margin: 0 auto 48px; text-align: center; }
.eyebrow { font-size: 13px; color: var(--green); letter-spacing: 1px; margin-bottom: 14px; }
.hero-title-sm { font-size: 40px; font-weight: 800; margin: 0 0 16px; text-transform: uppercase; }
.quiz-lead { color: var(--fg-65); font-size: 15.5px; line-height: 1.6; margin: 0 0 18px; }
.terminal-line { font-size: 13.5px; color: oklch(80% 0.15 145); margin-bottom: 6px; }

.quiz-shell {
  position: relative; max-width: 900px; margin: 0 auto;
  border: 1px solid oklch(85% 0.25 145 / 0.5); background: var(--bg-terminal);
  box-shadow: 0 0 50px oklch(85% 0.25 145 / 0.1);
}
.corner { position: absolute; width: 16px; height: 16px; }
.corner-tl { top: -1px; left: -1px; border-top: 2px solid var(--green); border-left: 2px solid var(--green); }
.corner-tr { top: -1px; right: -1px; border-top: 2px solid var(--green); border-right: 2px solid var(--green); }
.corner-bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--green); border-left: 2px solid var(--green); }
.corner-br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--green); border-right: 2px solid var(--green); }

.intro-body { padding: 40px 32px; text-align: center; }
.warning-tag { font-size: 12.5px; color: var(--red); border: 1px solid var(--red); display: inline-block; padding: 8px 16px; margin-bottom: 28px; }

.quiz-body-grid { display: grid; grid-template-columns: 1fr 180px; }
.quiz-main { padding: 30px 32px; }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: 13px; color: var(--fg-70); }
.exposure-value { font-weight: 700; }
.progress-bar { display: flex; gap: 4px; margin-bottom: 26px; }
.progress-bar .seg { height: 5px; flex: 1; background: var(--border-soft); }
.progress-bar .seg.filled { background: var(--green); }
.question-title { font-size: 19px; font-weight: 700; margin: 0 0 22px; text-transform: uppercase; line-height: 1.4; }
.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  cursor: pointer; text-align: left; background: var(--bg); border: 1px solid var(--border);
  color: var(--fg); padding: 14px 16px; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; line-height: 1.5;
}
.option-btn:hover, .option-btn:focus-visible { border-color: var(--green); }
.option-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.option-btn .opt-key { font-weight: 700; margin-right: 8px; }
.diagnostic-box { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--green); background: var(--bg-card); font-size: 13px; line-height: 1.6; }
.diag-tag { font-weight: 700; margin-right: 8px; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 26px; gap: 12px; flex-wrap: wrap; }
.quiz-log { border-left: 1px solid var(--border-soft); padding: 20px 16px; font-size: 11px; line-height: 1.9; color: var(--fg-55); overflow: hidden; }
.log-title { color: var(--fg-60); margin-bottom: 8px; letter-spacing: 0.5px; }

.scan-lines { padding: 48px 32px; min-height: 220px; }
.scan-lines div { font-size: 14px; color: var(--green); margin-bottom: 10px; }

.stage { display: block; }
.stage[hidden] { display: none; }

#stageResult { padding: 36px 32px; }
.result-tag { font-size: 12px; color: var(--fg-60); margin-bottom: 6px; }
.band-tag { font-size: 22px; font-weight: 800; margin-bottom: 6px; text-transform: uppercase; }
.band-desc { color: var(--fg-70); font-size: 14px; line-height: 1.6; margin: 0 0 24px; max-width: 560px; }
.score-bar { height: 8px; background: oklch(20% 0.02 150); margin-bottom: 24px; }
.score-fill { height: 100%; width: 0%; background: var(--green); }
.result-counts { display: flex; gap: 28px; margin-bottom: 28px; flex-wrap: wrap; }
.count-green { color: var(--green); font-weight: 700; }
.count-amber { color: var(--amber); font-weight: 700; }
.count-red { color: var(--red); font-weight: 700; }
.count-label { font-size: 12px; color: var(--fg-60); }
.vulns-block { margin-bottom: 28px; }
.vulns-title { font-size: 12.5px; color: var(--fg-70); letter-spacing: 0.5px; margin-bottom: 10px; }
.rec-line { font-size: 13.5px; line-height: 1.7; margin-bottom: 6px; }
.rec-line .bullet { color: var(--red); margin-right: 8px; }
.disclaimer { font-size: 11.5px; color: var(--fg-48); margin: 0 0 26px; }
.result-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* stats */
.stats-row { padding: 28px 48px; border-bottom: 1px solid var(--border); display: flex; justify-content: center; gap: 64px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--green); }
.stat-label { font-size: 12px; color: var(--fg-60); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* services */
.services-section { padding: 100px 48px; }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-title { font-size: 34px; font-weight: 800; margin: 0 0 16px; text-transform: uppercase; }
.section-lead { color: var(--fg-65); font-size: 15.5px; line-height: 1.6; margin: 0; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; max-width: 1200px; margin: 0 auto; background: var(--border); }
.service-card { background: var(--bg-card); padding: 30px; }
.service-id { font-size: 13px; color: var(--green); margin-bottom: 14px; }
.service-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 10px; text-transform: uppercase; }
.service-card p { color: var(--fg-62); font-size: 13.5px; line-height: 1.6; margin: 0; }

/* riesgo */
.riesgo-section { padding: 90px 48px; background: var(--bg-riesgo); border-top: 1px solid oklch(65% 0.22 25 / 0.4); border-bottom: 1px solid oklch(65% 0.22 25 / 0.4); }
.riesgo-section .section-head { max-width: 900px; }
.riesgo-section .section-title { text-wrap: pretty; }
.diffs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: 900px; margin: 32px auto 0; }
.diff-card { border: 1px solid var(--border); padding: 24px 18px; }
.diff-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--green); }
.diff-desc { font-size: 13px; color: var(--fg-62); line-height: 1.55; }

/* contact */
.contact-section { position: relative; margin: 90px 48px; padding: 70px 60px; border: 2px solid var(--green); overflow: hidden; }
.contact-bg { position: absolute; inset: 0; background-image: repeating-linear-gradient(45deg, oklch(85% 0.25 145 / 0.04) 0px, transparent 2px, transparent 20px); pointer-events: none; }
.contact-inner { position: relative; text-align: center; max-width: 720px; margin: 0 auto; }
.contact-inner .section-title { margin-bottom: 18px; text-wrap: pretty; }
.contact-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* footer */
.site-footer { padding: 36px 48px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.footer-logo { font-weight: 800; }
.footer-copy { color: var(--fg-55); }
.footer-link { color: var(--fg-62); text-decoration: none; }

@media (max-width: 760px) {
  .site-nav { gap: 14px !important; font-size: 12.5px !important; }
  .site-nav a { padding: 8px 12px !important; }
  .hero-title, .hero-title-sm { font-size: 32px !important; }
  .stats-row { gap: 28px !important; }
  .services-grid, .diffs-grid { grid-template-columns: 1fr !important; }
  .quiz-body-grid { grid-template-columns: 1fr !important; }
  .quiz-log { display: none !important; }
  section, .hero, .quiz-section, .services-section, .riesgo-section, .contact-section, .site-header, .site-footer { padding-left: 20px !important; padding-right: 20px !important; }
  .contact-section { margin-left: 20px !important; margin-right: 20px !important; }
}
