/* ================================================
   MKCL SECURITY — DESIGN TOKENS
   ================================================ */
:root {
  --ink:        #0a0d10;
  --panel:      #12171d;
  --panel-alt:  #171e25;
  --line:       #232b33;
  --fg:         #e7ecef;
  --dim:        #7c8896;
  --dim-2:      #4d5761;

  --green:      #2fd97a;
  --green-dim:  rgba(47, 217, 122, 0.14);
  --red:        #ff5c5c;
  --red-dim:    rgba(255, 92, 92, 0.14);
  --amber:      #ffb454;
  --amber-dim:  rgba(255, 180, 84, 0.14);

  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --sans: 'Inter', -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--sans);
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

::selection { background: var(--green); color: var(--ink); }

button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ================================================
   BACKGROUND TEXTURE
   ================================================ */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 90%);
}

.bg-scanline {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(47,217,122,0.03) 50%, transparent 100%);
  height: 240px;
  animation: scan 9s linear infinite;
}
@keyframes scan {
  0%   { transform: translateY(-240px); }
  100% { transform: translateY(120vh); }
}

/* ================================================
   TOP CHROME
   ================================================ */
.chrome-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 18px 28px;
  font-family: var(--mono);
}

.brand { font-size: 13px; letter-spacing: 0.06em; color: var(--dim); white-space: nowrap; }
.brand-prompt { color: var(--green); font-weight: 600; }
.cursor { display: inline-block; margin-left: 2px; animation: blink 1.1s step-end infinite; color: var(--green); }
@keyframes blink { 50% { opacity: 0; } }

.progress-track { flex: 1; height: 2px; background: var(--line); position: relative; }
.progress-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--green); width: 8.33%;
  transition: width 0.5s var(--ease);
}

.slide-counter { font-size: 13px; color: var(--fg); white-space: nowrap; }
.slide-counter .dim { color: var(--dim-2); }

/* ================================================
   DECK / SLIDES
   ================================================ */
.deck { position: relative; z-index: 5; width: 100%; height: 100%; }

.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 90px 64px 100px;
  opacity: 0; visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  overflow-y: auto;
}
.slide.active { opacity: 1; visibility: visible; transform: translateY(0); }

.slide-inner { width: 100%; max-width: 980px; margin: 0 auto; }

.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em;
  font-weight: 600; margin: 0 0 18px;
}
.eyebrow-green { color: var(--green); }
.eyebrow-red { color: var(--red); }
.eyebrow-amber { color: var(--amber); }

.h2 {
  font-family: var(--sans); font-weight: 800; font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15; margin: 0 0 28px; letter-spacing: -0.01em;
}

.mega {
  font-family: var(--sans); font-weight: 800; font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05; margin: 0 0 22px; letter-spacing: -0.02em;
}
.mega-small { font-size: clamp(32px, 5vw, 54px); }
.hl-red { color: var(--red); }

.lede { font-size: clamp(17px, 2vw, 22px); color: var(--dim); margin: 0 0 40px; max-width: 560px; }
.lede-small { font-size: 15px; color: var(--dim); margin: 0 0 40px; }

.intro-inner { text-align: left; }

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em; padding: 14px 26px; border-radius: 3px;
  border: 1px solid transparent; transition: all 0.2s var(--ease);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: var(--green); color: var(--ink); }
.btn-primary:hover { background: #4ee892; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--green); color: var(--green); }
.btn-danger { background: var(--red); color: var(--ink); font-size: 16px; padding: 14px 34px; }
.btn-danger:hover { background: #ff7a7a; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn:disabled:hover { transform: none; border-color: var(--line); color: var(--fg); }

.btn-ghost {
  font-family: var(--mono); font-size: 13px; background: transparent;
  border: 1px solid var(--line); color: var(--dim); padding: 9px 20px; border-radius: 3px;
  transition: all 0.2s var(--ease);
}
.btn-ghost:hover { border-color: var(--fg); color: var(--fg); }

.reveal-late { opacity: 0; animation: fadeUp 0.5s var(--ease) 0.4s forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ================================================
   INTRO — NET ANIMATION
   ================================================ */
.net-anim { position: absolute; inset: 0; z-index: -1; opacity: 0.5; }
.net-anim svg { width: 100%; height: 100%; }
.net-lines line { stroke: var(--line); stroke-width: 1; }
.net-nodes circle { fill: var(--dim-2); }
.net-nodes .node-alert { fill: var(--red); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { r: 6; opacity: 1; }
  50% { r: 11; opacity: 0.4; }
}

.hint-fullscreen {
  position: absolute; bottom: 34px; left: 64px;
  font-family: var(--mono); font-size: 12px; color: var(--dim-2);
}
.hint-fullscreen kbd {
  border: 1px solid var(--line); border-radius: 2px; padding: 1px 6px; font-family: var(--mono);
}

/* ================================================
   EMAIL MOCKUP
   ================================================ */
.timestamp {
  font-family: var(--mono); font-size: 13px; color: var(--dim); letter-spacing: 0.08em;
  margin: 0 0 24px;
}

.email-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  max-width: 520px; overflow: hidden; margin-bottom: 32px;
}
.email-card-compact { max-width: 460px; margin-bottom: 0; }
.email-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.email-app { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.email-warn { font-size: 13px; color: var(--amber); font-weight: 600; }
.email-body { padding: 18px 20px; font-size: 14.5px; line-height: 1.6; color: var(--fg); }
.email-body p { margin: 0 0 12px; }
.email-link-line { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.email-cta {
  display: block; width: calc(100% - 40px); margin: 4px 20px 20px;
  background: #2b6ee0; color: #fff; border: none; padding: 11px; border-radius: 4px;
  font-size: 14px; font-weight: 600;
}

.flag-target { position: relative; transition: all 0.4s var(--ease); border-radius: 3px; }
.flag-target.flagged {
  background: var(--red-dim); color: var(--red); box-shadow: 0 0 0 1px var(--red);
  padding: 1px 4px; margin: -1px -4px;
}
button.email-cta.flag-target.flagged {
  background: var(--red-dim); color: var(--red); box-shadow: inset 0 0 0 1px var(--red);
  margin: 4px 20px 20px;
}

.prompt-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.prompt-question { font-size: 17px; font-weight: 600; margin: 0; }
.ghost-btn-row { display: flex; gap: 10px; }

/* ================================================
   ANALYSIS SLIDE
   ================================================ */
.analysis-layout { display: flex; gap: 44px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 40px; }

.flag-list { flex: 1; min-width: 260px; }
.flag-list-title {
  font-family: var(--mono); font-size: 13px; color: var(--dim);
  display: flex; justify-content: space-between; margin: 0 0 14px;
}
.flag-list-title #flagCount { color: var(--red); font-weight: 700; }
.flag-list ul { list-style: none; margin: 0 0 22px; padding: 0; }
.flag-list li {
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--dim-2);
  transition: color 0.4s var(--ease);
}
.flag-list li.found { color: var(--red); }
.flag-list li.found::before { content: '✅ '; }
.flag-list li[data-flag-item].found { }

.chain-flow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  opacity: 0; max-height: 0; overflow: hidden; transition: all 0.6s var(--ease);
}
.chain-flow.visible { opacity: 1; max-height: 200px; margin-top: 10px; }
.chain-step {
  font-family: var(--mono); font-size: 13px; padding: 10px 16px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--panel); white-space: nowrap;
}
.chain-step-red { border-color: var(--red); color: var(--red); }
.chain-step-amber { border-color: var(--amber); color: var(--amber); }
.chain-arrow { color: var(--dim-2); }

/* ================================================
   THREAT CARDS
   ================================================ */
.threat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.threat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 22px 16px; text-align: left; transition: all 0.3s var(--ease);
  display: flex; flex-direction: column; gap: 10px; min-height: 150px;
}
.threat-card:hover { border-color: var(--amber); transform: translateY(-3px); }
.threat-icon { font-size: 26px; }
.threat-name { font-weight: 700; font-size: 15px; color: var(--fg); }
.threat-desc {
  font-size: 13px; color: var(--dim); line-height: 1.5;
  max-height: 0; opacity: 0; overflow: hidden; transition: all 0.35s var(--ease);
}
.threat-card.open .threat-desc { max-height: 100px; opacity: 1; }
.threat-card.open { border-color: var(--amber); background: var(--amber-dim); }

/* ================================================
   VERTICAL CHAIN (chain / defense)
   ================================================ */
.vchain { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: 26px; }
.vchain-step {
  font-family: var(--mono); font-size: 15px; padding: 10px 20px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--panel); color: var(--dim-2);
  opacity: 0; transform: translateX(-10px); transition: all 0.45s var(--ease);
}
.vchain-step.visible { opacity: 1; transform: translateX(0); color: var(--fg); border-color: var(--red); }
.vchain-step.vchain-step-red.visible { color: var(--red); }
.vchain-green .vchain-step.visible { border-color: var(--green); color: var(--green); }
.vchain-arrow { color: var(--dim-2); padding: 2px 20px; font-size: 13px; }

.stop-question {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 20px 0; margin-bottom: 10px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
  opacity: 0; max-height: 0; overflow: hidden; transition: all 0.5s var(--ease);
}
.stop-question.visible { opacity: 1; max-height: 120px; margin: 20px 0; }

/* ================================================
   DEFENSE IN DEPTH
   ================================================ */
.depth-layout { display: flex; gap: 60px; align-items: center; flex-wrap: wrap; }
.depth-diagram { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.depth-node {
  font-family: var(--mono); font-weight: 600; font-size: 14px; letter-spacing: 0.04em;
  padding: 14px 30px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--panel); color: var(--fg); transition: all 0.25s var(--ease); cursor: default;
  text-align: center; min-width: 180px;
}
.depth-node:hover { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.depth-internet { color: var(--dim); border: none; background: transparent; font-size: 13px; }
.depth-final { border-color: var(--amber); }
.depth-final:hover { border-color: var(--amber); background: var(--amber-dim); color: var(--amber); }
.depth-line { width: 1px; height: 22px; background: var(--line); }

.depth-text { flex: 1; min-width: 280px; }
.tip-display {
  font-size: 15px; color: var(--dim); min-height: 44px; margin: 0 0 34px;
  border-left: 2px solid var(--green); padding-left: 16px; transition: all 0.2s var(--ease);
}
.core-statement { font-size: 20px; font-weight: 700; margin: 0 0 10px; line-height: 1.4; }
.core-statement-dim { color: var(--dim); font-weight: 500; font-size: 17px; }

/* ================================================
   INBOX / HUMAN FACTOR
   ================================================ */
.inbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0 24px; }
.inbox-item {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 26px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: all 0.25s var(--ease); text-align: center;
}
.inbox-item:hover { border-color: var(--fg); transform: translateY(-2px); }
.inbox-icon { font-size: 28px; }
.inbox-subject { font-size: 14px; font-weight: 600; }
.inbox-item.correct { border-color: var(--green); background: var(--green-dim); }
.inbox-item.wrong { border-color: var(--red); background: var(--red-dim); }

.inbox-feedback {
  opacity: 0; max-height: 0; overflow: hidden; transition: all 0.5s var(--ease);
  font-size: 15px; line-height: 1.6; padding: 0 22px; border-left: 2px solid var(--line);
}
.inbox-feedback.visible { opacity: 1; max-height: 200px; padding: 4px 22px; }

/* ================================================
   INCIDENT RESPONSE
   ================================================ */
.ir-timeline { display: flex; gap: 6px; margin-bottom: 30px; flex-wrap: wrap; }
.ir-step {
  font-family: var(--mono); font-size: 13px; background: var(--panel); border: 1px solid var(--line);
  color: var(--dim); padding: 10px 16px; border-radius: 4px; display: flex; align-items: center; gap: 8px;
  transition: all 0.25s var(--ease);
}
.ir-num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--dim);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
}
.ir-step.active { border-color: var(--red); color: var(--fg); }
.ir-step.active .ir-num { background: var(--red); color: var(--ink); }
.ir-step:hover { color: var(--fg); }

.ir-detail { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 26px 30px; min-height: 140px; }
.ir-detail ul { margin: 0; padding-left: 20px; }
.ir-detail li { font-size: 15px; line-height: 2; color: var(--fg); }

/* ================================================
   BACKUPS
   ================================================ */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.compare-col { padding: 22px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); }
.compare-title { font-family: var(--mono); font-weight: 700; margin: 0 0 18px; font-size: 15px; }
.compare-bad .compare-title { color: var(--red); }
.compare-good .compare-title { color: var(--green); }
.compare-step { font-size: 14px; padding: 9px 4px; }
.compare-arrow { color: var(--dim-2); font-size: 12px; padding-left: 4px; }
.compare-end-bad { color: var(--red); font-weight: 700; font-size: 15px; }
.compare-end-good { color: var(--green); font-weight: 700; font-size: 15px; }

.rule-title { font-family: var(--mono); color: var(--green); font-weight: 700; margin: 0 0 14px; letter-spacing: 0.05em; }
.rule-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rule-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 18px; font-size: 13px; color: var(--dim); display: flex; align-items: center; gap: 12px;
}
.rule-num { font-family: var(--mono); font-size: 26px; font-weight: 800; color: var(--green); }

/* ================================================
   SECURITY CHECK
   ================================================ */
.check-layout { display: flex; gap: 50px; flex-wrap: wrap; align-items: center; margin-bottom: 30px; }
.check-table { flex: 1; min-width: 280px; display: flex; flex-direction: column; }
.check-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 14.5px;
  opacity: 0.15; transform: translateX(-8px); transition: all 0.4s var(--ease);
}
.check-row.visible { opacity: 1; transform: translateX(0); }
.check-badge { font-size: 15px; }

.check-gauge-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.gauge { position: relative; width: 200px; height: 200px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: var(--line); stroke-width: 12; }
.gauge-fill {
  fill: none; stroke: var(--amber); stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 540; stroke-dashoffset: 540; transition: stroke-dashoffset 1.4s var(--ease);
}
.gauge-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 34px; font-weight: 700;
}
.gauge-max { font-size: 15px; color: var(--dim); margin-left: 2px; }

.check-verdict {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px dashed var(--line);
  opacity: 0; max-height: 0; overflow: hidden; transition: all 0.5s var(--ease);
}
.check-verdict.visible { opacity: 1; max-height: 200px; }
.verdict-text { font-size: 15px; color: var(--dim); margin: 0; opacity: 0; transition: opacity 0.5s var(--ease) 0.2s; }
.verdict-text.visible { opacity: 1; }

/* ================================================
   CLOSING SLIDE
   ================================================ */
.pillar-list { display: flex; flex-direction: column; gap: 4px; }
.pillar {
  font-family: var(--mono); font-size: 17px; padding: 12px 0; border-bottom: 1px solid var(--line);
  color: var(--fg);
}

/* ================================================
   RATING SCALE
   ================================================ */
.rating-scale { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 40px; }
.rating-btn {
  width: 52px; height: 52px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line);
  color: var(--fg); font-family: var(--mono); font-size: 16px; font-weight: 700;
  transition: all 0.2s var(--ease);
}
.rating-btn:hover { border-color: var(--green); color: var(--green); }
.rating-btn.selected { background: var(--green); border-color: var(--green); color: var(--ink); }

.rating-readout { display: flex; align-items: baseline; gap: 18px; }
.rating-big { font-family: var(--mono); font-size: 64px; font-weight: 800; color: var(--green); }
.rating-word { font-size: 16px; color: var(--dim); }

/* ================================================
   BOTTOM NAV
   ================================================ */
.chrome-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; gap: 22px;
  padding: 20px; pointer-events: none;
}
.nav-btn {
  pointer-events: all; width: 42px; height: 42px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--line); color: var(--fg);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.nav-btn:hover { border-color: var(--green); color: var(--green); }
.dots { display: flex; gap: 7px; pointer-events: all; }
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--line); border: none; padding: 0;
  transition: all 0.25s var(--ease); cursor: pointer;
}
.dot.active { background: var(--green); width: 20px; border-radius: 3px; }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 860px) {
  .slide { padding: 80px 24px 90px; }
  .threat-grid { grid-template-columns: repeat(2, 1fr); }
  .inbox-grid { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .rule-cards { grid-template-columns: 1fr; }
  .depth-layout { flex-direction: column; }
  .check-layout { flex-direction: column; }
  .analysis-layout { flex-direction: column; }
  .chrome-top { padding: 14px 18px; gap: 12px; }
  .brand { display: none; }
  .hint-fullscreen { left: 24px; }
}
