/* Page-specific layout for VulnScan */

.hero {
  position: relative;
  min-height: 100vh;
  width: 100vw;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(140px, 16vh, 190px) 18px 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: clamp(90px, 14vh, 140px) 0 0;
  opacity: 0.6;
  pointer-events: none;
}

.hero-center {
  position: relative;
  z-index: 2;
  max-width: 460px;
  display: grid;
  gap: 16px;
  padding: 22px 26px;
}

.hero-center::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  backdrop-filter: blur(12px);
  filter: blur(2.4px);
  opacity: 1;
  z-index: -1;
}

.hero-center h1 {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-sub {
  margin: 0 auto;
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 20px);
}

.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.terminal-stage {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  z-index: 1;
  opacity: 0.9;
  padding-left: 0;
}

.terminal {
  width: min(980px, 92vw);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.terminal-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.terminal-head::before {
  content: "";
  position: absolute;
  inset: 6px 20px;
  border-radius: 14px;
  filter: blur(10px);
  opacity: 0.85;
  z-index: 0;
}

.terminal-head > * {
  position: relative;
  z-index: 1;
}

.terminal-body {
  padding: 18px 20px 26px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.8;
  color: color-mix(in oklab, var(--text) 88%, var(--muted));
  min-height: 360px;
  display: grid;
  gap: 4px;
  position: relative;
  text-align: left;
}

.terminal-body::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
}

.terminal-line {
  opacity: 0;
  animation: terminal-line 20s linear forwards;
  transform: translateY(6px);
}

.terminal-line strong {
  color: var(--accent-2);
  font-weight: 600;
}

@keyframes terminal-line {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  6% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
  }
}

.terminal-line:nth-child(1) { animation-delay: 0s; }
.terminal-line:nth-child(2) { animation-delay: 1s; }
.terminal-line:nth-child(3) { animation-delay: 2s; }
.terminal-line:nth-child(4) { animation-delay: 3s; }
.terminal-line:nth-child(5) { animation-delay: 4s; }
.terminal-line:nth-child(6) { animation-delay: 5s; }
.terminal-line:nth-child(7) { animation-delay: 6s; }
.terminal-line:nth-child(8) { animation-delay: 7s; }
.terminal-line:nth-child(9) { animation-delay: 8s; }
.terminal-line:nth-child(10) { animation-delay: 9s; }
.terminal-line:nth-child(11) { animation-delay: 10s; }
.terminal-line:nth-child(12) { animation-delay: 11s; }
.terminal-line:nth-child(13) { animation-delay: 12s; }
.terminal-line:nth-child(14) { animation-delay: 13s; }
.terminal-line:nth-child(15) { animation-delay: 14s; }
.terminal-line:nth-child(16) { animation-delay: 15s; }
.terminal-line:nth-child(17) { animation-delay: 16s; }
.terminal-line:nth-child(18) { animation-delay: 17s; }
.terminal-line:nth-child(19) { animation-delay: 18s; }
.terminal-line:nth-child(20) { animation-delay: 19s; }

.section {
  padding: 90px 0;
}

.container {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
}

.section-head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 40px;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.2vw, 40px);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

.threat-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in oklab, var(--panel) 92%, transparent);
  padding: 20px;
  display: grid;
  gap: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.threat-card h3 {
  margin: 0;
  font-size: 16px;
}

.threat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.threat-note {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 22px;
  background: color-mix(in oklab, var(--panel2) 96%, transparent);
  color: var(--muted);
  line-height: 1.7;
}

.threat-note strong {
  color: var(--text);
}

.protection-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.protection-copy {
  display: grid;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.app-shell {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: color-mix(in oklab, var(--panel) 94%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--panel2) 96%, transparent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-body {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.scan-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

.scan-input {
  width: 100%;
  background: color-mix(in oklab, var(--panel2) 98%, transparent);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: var(--mono);
  color: var(--text);
}

.scan-button {
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--accent) 60%, transparent),
    color-mix(in oklab, var(--accent-2) 40%, transparent));
  border: 1px solid color-mix(in oklab, var(--accent) 50%, var(--border));
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.scan-button.disabled {
  opacity: 0.45;
  filter: grayscale(0.2);
  cursor: not-allowed;
  border-color: var(--border);
  background: color-mix(in oklab, var(--panel2) 96%, transparent);
  box-shadow: none;
  pointer-events: none;
}

.scan-progress {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--panel2) 90%, transparent);
  border: 1px solid var(--border);
  overflow: hidden;
}

.scan-progress .bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: none;
}

@keyframes scan-item {
  0% { opacity: 0; transform: translateY(6px); }
  30% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

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

.severity-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: color-mix(in oklab, var(--panel2) 96%, transparent);
  display: grid;
  gap: 10px;
}

/* optional card reveal was removed to avoid double-animating; left class unused */

.severity-card h4 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.severity-card ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  display: grid;
  gap: 8px;
}

.severity-card.info h4 { color: var(--info); }
.severity-card.medium h4 { color: var(--warn); }
.severity-card.critical h4 { color: var(--bad); }

.severity-card ul li {
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in oklab, var(--panel) 70%, transparent);
  border: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
}

.severity-card .label {
  display: block;
  color: var(--text);
  font-weight: 600;
  --target-color: var(--text);
}

.severity-card .subline {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  margin-top: 2px;
  --target-color: var(--muted);
}

.ai-reco {
  position: relative;
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 16px 18px 60px;
  background: color-mix(in oklab, var(--panel2) 96%, transparent);
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.ai-reco h4 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.ai-reco ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  display: grid;
  gap: 10px;
}

.ai-reco li {
  position: relative;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--panel) 70%, transparent);
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  overflow: hidden;
  --target-color: var(--muted);
}

.ai-reco li::after {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  backdrop-filter: blur(5px);
}

/* Timeline-synced reveals */
:root {
  --scan-duration: 0s;
  --scan-hold: 0s;
  --scan-total: 0s;
  --step-count: 16;
}

.threat-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.threat-list li {
  padding-left: 14px;
  position: relative;
}

.threat-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-2);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: color-mix(in oklab, var(--panel) 85%, transparent);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item[open] {
  border-color: color-mix(in oklab, var(--accent) 38%, var(--border));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-strong);
  position: relative;
  padding-right: 28px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "▸";
  position: absolute;
  right: 4px;
  top: 2px;
  font-size: 16px;
  transform-origin: center;
  transition: transform 0.2s ease;
  color: var(--muted);
}

.faq-item[open] summary::after {
  transform: rotate(90deg);
  color: var(--accent);
}

.faq-item p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 980px) {
  .threat-grid,
  .severity-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 130px;
  }
}

@media (max-width: 720px) {
  .terminal {
    width: min(92vw, 720px);
  }

  .terminal-body {
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .terminal-line {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .scan-progress .bar {
    animation: none;
    width: 70%;
  }
}

/* Page-specific adjustments */
.vulnscan-page .topbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 36px));
  margin: 0;
  top: 16px;
  z-index: 120;
}

.vulnscan-page main {
  padding-top: 120px;
}
