/* ============================================================
   CRYPTOTHREAT INTEL — style.css
   ============================================================ */

:root {
  --bg:       #080808;
  --bg2:      #0d0d0d;
  --bg3:      #131313;
  --surface:  #1a1a1a;
  --border:   rgba(255,255,255,0.07);
  --text:     #e0e0e0;
  --muted:    #555;
  --red:      #c0392b;
  --orange:   #d4600a;
  --yellow:   #d4aa17;
  --mono:     'JetBrains Mono', monospace;
  --sans:     'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

/* ── CANVAS BG ────────────────────────────────────────────── */
#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 52px;
  background: rgba(8,8,8,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}
.nav-logo span { color: var(--red); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: #ccc; }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  gap: 80px;
  padding: 100px 80px 80px;
  max-width: 1360px;
  margin: 0 auto;
}

.hero-left { flex: 1; max-width: 580px; }

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 14px;
  margin-bottom: 28px;
}

h1 {
  font-family: var(--sans);
  font-size: clamp(34px, 4.8vw, 62px);
  font-weight: 900;
  line-height: 1.04;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}

.hero-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.85;
  max-width: 460px;
  margin-bottom: 30px;
}

.alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #e87070;
  background: rgba(192,57,43,0.12);
  border: 1px solid rgba(192,57,43,0.45);
  padding: 8px 18px;
  border-radius: 3px;
  margin-bottom: 48px;
}

.alert-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.stats-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

.stat-value {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

/* ── WALLET STAGE ────────────────────────────────────────── */
.wallet-stage {
  flex-shrink: 0;
  position: relative;
  width: 300px;
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 8px;
  cursor: pointer;
  user-select: none;
}

.wallet-hint {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.18);
  margin-bottom: 20px;
  transition: color 0.2s;
}
.wallet-stage:hover .wallet-hint { color: rgba(255,255,255,0.4); }

/* 3D scene */
.wallet-scene {
  perspective: 1200px;
  width: 250px;
  height: 154px;
}

.wallet-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(10deg) rotateY(-5deg);
}

/* Both faces share */
.wallet-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* ─ FRONT FACE: Digital Web3 Wallet ───────────────────── */
.wallet-front {
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0d1235 100%);
  box-shadow:
    0 0 0 1px rgba(0, 212, 255, 0.3),
    0 0 40px rgba(0, 212, 255, 0.2),
    inset 0 0 60px rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

/* Grid pattern overlay */
.wallet-front::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.6;
}

/* Glow effect */
.wallet-front::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  animation: walletGlow 4s ease-in-out infinite;
}

@keyframes walletGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

/* Digital card slots */
.card-slots {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 4px;
  z-index: 2;
}
.card-slot {
  flex: 1;
  height: 24px;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}
.card-slot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%);
}
.cs-blue   { background: linear-gradient(135deg, #00d4ff, #0099cc); }
.cs-purple { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.cs-green  { background: linear-gradient(135deg, #10b981, #059669); }

/* chip + emboss */
.wallet-mid {
  position: absolute;
  bottom: 20px;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 2;
}

.wallet-chip {
  width: 40px;
  height: 28px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 40%, #ffd700 100%);
  box-shadow: 
    0 0 10px rgba(255, 215, 0, 0.4),
    inset 0 0 0 1px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.chip-inner {
  width: 28px;
  height: 20px;
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 2px;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.1) 2px,
    rgba(0,0,0,0.1) 4px
  );
}

.wallet-emboss {
  font-size: 28px;
  color: rgba(0, 212, 255, 0.4);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Circuit lines */
.wallet-circuit {
  position: absolute;
  bottom: 8px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 212, 255, 0.4) 20%, 
    rgba(0, 212, 255, 0.4) 80%, 
    transparent 100%);
  z-index: 2;
}

.wallet-circuit::before,
.wallet-circuit::after {
  content: '';
  position: absolute;
  width: 1px;
  height: 8px;
  background: rgba(0, 212, 255, 0.4);
}
.wallet-circuit::before { left: 30px; top: -4px; }
.wallet-circuit::after { right: 30px; top: -4px; }

/* ─ BACK FACE ───────────────────────────────────────────── */
.wallet-back {
  background: linear-gradient(135deg, #1a0000 0%, #2d0000 100%);
  transform: rotateY(180deg);
  border: 1px solid rgba(255, 56, 96, 0.6);
  box-shadow:
    0 0 0 1px rgba(255, 56, 96, 0.3),
    0 0 40px rgba(255, 56, 96, 0.3),
    inset 0 0 40px rgba(255, 56, 96, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-content { text-align: center; padding: 8px; z-index: 2; }

.back-icon {
  font-size: 24px;
  color: #ff3860;
  line-height: 1;
  margin-bottom: 8px;
  animation: flicker 0.8s ease-in-out infinite alternate;
  text-shadow: 0 0 20px rgba(255, 56, 96, 0.8);
}

.back-label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: #ff3860;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-shadow: 0 0 10px rgba(255, 56, 96, 0.6);
}

.back-sub {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: rgba(255, 56, 96, 0.6);
  margin-top: 10px;
}

.back-addr {
  font-family: var(--mono);
  font-size: 7px;
  color: rgba(255, 56, 96, 0.5);
  margin-top: 4px;
}

/* ── COINS ──────────────────────────────────────────────── */
.coins-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
}

.coin {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow:
    0 4px 20px rgba(0,0,0,0.6),
    inset 0 2px 8px rgba(255,255,255,0.2),
    inset 0 -2px 8px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  will-change: transform, left, top;
  overflow: hidden;
  padding: 4px;
}

.coin-img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.coin-x {
  position: absolute;
  top: -6px; right: -6px;
  width: 20px; height: 20px;
  background: #ff3860;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(255, 56, 96, 0.6);
  animation: crossPulse 2s ease-in-out infinite;
}

@keyframes crossPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.9; }
}

/* ── WALLET STATUS ───────────────────────────────────────── */
.wallet-status {
  position: absolute;
  bottom: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #2ecc71;
  transition: color 0.4s;
  z-index: 10;
}
.wallet-status.danger { color: #ff3860; }

/* ── SECTIONS ────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}
.inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 80px;
}

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

/* ── THREAT CARDS ────────────────────────────────────────── */
.threats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.threat-card {
  background: var(--bg2);
  padding: 26px;
  border-top: 2px solid transparent;
  transition: background 0.2s;
}
.threat-card:hover { background: var(--bg3); }

.sev-critical { border-top-color: var(--red); }
.sev-high     { border-top-color: var(--orange); }
.sev-medium   { border-top-color: var(--yellow); }

.tc-sev {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}
.sev-critical .tc-sev { color: var(--red); }
.sev-high     .tc-sev { color: var(--orange); }
.sev-medium   .tc-sev { color: var(--yellow); }

.tc-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
}

.tc-body {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.tc-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-tags span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.04);
  padding: 3px 7px;
  border-radius: 2px;
}

/* ── TERMINAL ────────────────────────────────────────────── */
.terminal {
  background: #050505;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.term-bar {
  background: #0e0e0e;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.dr { background: #ff5f56; }
.dy { background: #ffbd2e; }
.dg { background: #27c93f; }

.term-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}

.term-body {
  padding: 24px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 2;
  color: #666;
  min-height: 260px;
  white-space: pre-wrap;
  word-break: break-all;
}

.line { display: block; }
.ok   { color: #27c93f; }
.warn { color: #ffbd2e; }
.err  { color: #e74c3c; }
.info { color: #5dade2; }

.cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: #666;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* ── IOC ────────────────────────────────────────────────── */
.ioc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ioc-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 22px;
}

.ioc-head {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.ioc-row {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
.ioc-row.mono { font-size: 10px; color: var(--muted); letter-spacing: 0.02em; }

.tag {
  font-size: 7px;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 2px;
  flex-shrink: 0;
  font-weight: 600;
}
.tag-dom   { background: rgba(192,57,43,0.18); color: #e57368; }
.tag-phish { background: rgba(212,96,10,0.18); color: #e88c42; }
.tag-c2    { background: rgba(180,30,30,0.22); color: #f06060; }
.tag-api   { background: rgba(52,152,219,0.18); color: #5dade2; }
.tag-net   { background: rgba(46,204,113,0.18); color: #58d68d; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

.footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-logo {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.25);
}

.footer-note {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.2);
}

.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: #aaa; }

/* ── KEYFRAMES ───────────────────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

@keyframes flicker {
  from { opacity: 0.75; text-shadow: none; }
  to   { opacity: 1; text-shadow: 0 0 14px rgba(192,57,43,0.9); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes w-bob {
  0%, 100% { transform: translateY(0px) rotateX(4deg) rotateY(-6deg); }
  50%       { transform: translateY(-9px) rotateX(-2deg) rotateY(4deg); }
}

@keyframes w-shake {
  0%   { transform: translate(0,0) rotate(0); }
  12%  { transform: translate(-9px,2px) rotate(-2.5deg); }
  25%  { transform: translate(9px,-2px) rotate(2.5deg); }
  37%  { transform: translate(-7px,1px) rotate(-1.5deg); }
  50%  { transform: translate(7px,-1px) rotate(1.5deg); }
  62%  { transform: translate(-4px,1px) rotate(-0.8deg); }
  75%  { transform: translate(4px,-1px) rotate(0.8deg); }
  87%  { transform: translate(-2px,0) rotate(0); }
  100% { transform: translate(0,0) rotate(0); }
}

/* classes toggled by JS */
.w-bob    { animation: w-bob 2.8s ease-in-out infinite; }
.w-shake  { animation: w-shake 0.55s ease-in-out forwards; }
.w-flip   {
  transform: rotateY(180deg) !important;
  transition: transform 0.85s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero { 
    flex-direction: column; 
    align-items: center; 
    min-height: auto; 
    padding-top: 100px;
    gap: 50px;
  }
  
  .hero-left { 
    max-width: 100%; 
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  
  .stats-row {
    justify-content: center;
  }
  
  .threats-grid, .ioc-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 700px) {
  .navbar { padding: 0 20px; }
  .nav-links { display: none; }
  .hero, .inner { padding-left: 20px; padding-right: 20px; }
  .threats-grid, .ioc-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 28px; }
  
  .footer-inner { 
    flex-direction: column; 
    align-items: center; 
    text-align: center;
    padding: 0 20px; 
  }
  
  /* Center and scale wallet on mobile */
  .wallet-stage {
    width: 260px;
    height: 340px;
    margin: 0 auto;
  }
  
  .wallet-scene {
    width: 220px;
    height: 135px;
  }
  
  .coin {
    width: 48px;
    height: 48px;
  }
}
