/* ======================================================
   ETHICS · CS — Interactive Site
   Modern dark theme with soft gradients & micro-interactions
   ====================================================== */

:root {
  --bg: #0a0b14;
  --bg-2: #11132a;
  --bg-3: #161937;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.10);
  --text: #e7e9ff;
  --text-soft: #9aa0c7;
  --text-dim: #6c7299;
  --accent: #7c5cff;
  --accent-2: #00d6ff;
  --accent-3: #ff5dac;
  --green: #46e1a3;
  --red: #ff5757;
  --amber: #ffb648;
  --grad-1: linear-gradient(135deg, #7c5cff 0%, #00d6ff 100%);
  --grad-2: linear-gradient(135deg, #ff5dac 0%, #7c5cff 100%);
  --grad-3: linear-gradient(135deg, #ffb648 0%, #ff5757 100%);
  --grad-4: linear-gradient(135deg, #46e1a3 0%, #00d6ff 100%);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
  --t: 320ms cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--accent-2); }
strong { color: var(--text); }

/* ===== Progress bar ===== */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad-1);
  z-index: 1000;
  transition: width 80ms linear;
}

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 999;
  backdrop-filter: blur(18px);
  background: rgba(10,11,20,0.6);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.logo-mark {
  display: inline-block;
  background: var(--grad-1);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-size: 24px;
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.logo-text em { font-style: normal; color: var(--accent); font-weight: 800; }
.nav-links {
  list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0;
}
.nav-links a {
  padding: 8px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  color: var(--text-soft);
  transition: color var(--t), background var(--t);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: 6px 12px; font-size: 18px; cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 24px 60px;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 600px at 20% 30%, rgba(124,92,255,0.35), transparent 60%),
    radial-gradient(700px 500px at 80% 20%, rgba(0,214,255,0.25), transparent 60%),
    radial-gradient(600px 500px at 50% 90%, rgba(255,93,172,0.20), transparent 60%);
  filter: blur(0px);
  z-index: 0;
  animation: pulse 14s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.hero-content { position: relative; z-index: 1; max-width: 1100px; }
.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--surface);
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.hero-title .word {
  display: inline-block; margin: 0 8px;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.9s cubic-bezier(.2,.8,.2,1) forwards;
}
.hero-title .word:nth-child(1) { animation-delay: 0.05s; }
.hero-title .word:nth-child(2) { animation-delay: 0.2s; }
.hero-title .word:nth-child(3) { animation-delay: 0.35s; }
.hero-title .word:nth-child(4) { animation-delay: 0.5s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.hero-title .grad {
  background: var(--grad-1);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  color: var(--text-soft);
  max-width: 720px; margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), background var(--t);
}
.btn-primary {
  background: var(--grad-1); color: white;
  box-shadow: 0 12px 30px -10px rgba(124,92,255,0.6);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px rgba(124,92,255,0.8); }
.btn-ghost {
  background: var(--surface); border-color: var(--border); color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-3px); }
.hero-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  padding: 24px; max-width: 900px; margin: 0 auto;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
}
.hero-stats > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-stats strong {
  font-size: 2rem; font-weight: 800;
  background: var(--grad-1);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-stats span { font-size: 12px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.08em; }
.scroll-hint {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.2em;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ===== Sections ===== */
.section { padding: 100px 24px; position: relative; }
.section-alt { background: var(--bg-2); }
.section-dark {
  background:
    radial-gradient(800px 500px at 30% 30%, rgba(124,92,255,0.18), transparent 60%),
    radial-gradient(700px 500px at 80% 80%, rgba(255,93,172,0.15), transparent 60%),
    #07081a;
}
.container { max-width: 1300px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 56px; }
.kicker {
  display: inline-block; padding: 5px 14px;
  border-radius: 999px; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 700;
  background: var(--surface); color: var(--accent-2);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.kicker.light { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.section-head h2.light { color: white; }
.section-head p { color: var(--text-soft); max-width: 720px; margin: 0 auto; font-size: 1.05rem; }
.section-head p.light { color: rgba(255,255,255,0.75); }
.sub-h {
  font-size: 1.4rem; font-weight: 700; margin: 56px 0 24px;
  display: flex; align-items: center; gap: 14px;
}
.sub-h::before {
  content: ''; height: 24px; width: 4px; border-radius: 2px;
  background: var(--grad-1);
}
.hint {
  margin-top: 40px; text-align: center; color: var(--text-soft); font-size: 0.95rem;
  padding: 18px; border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--surface);
}

/* ===== Pillars ===== */
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.pillar {
  position: relative;
  min-height: 360px;
  perspective: 1200px;
  cursor: pointer;
}
.pillar-face {
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; flex-direction: column; justify-content: center;
  backface-visibility: hidden;
  transition: transform 700ms cubic-bezier(.4,.2,.2,1);
}
.pillar-face.back { transform: rotateY(180deg); background: var(--bg-3); }
.pillar:hover .pillar-face.front { transform: rotateY(-180deg); }
.pillar:hover .pillar-face.back { transform: rotateY(0); }
.pillar-icon { font-size: 56px; margin-bottom: 16px; }
.pillar h3 {
  margin: 0 0 8px; font-size: 1.8rem; font-weight: 800;
}
.pillar[data-pillar="ethics"] h3 { color: var(--accent-2); }
.pillar[data-pillar="regulation"] h3 { color: var(--accent-3); }
.pillar[data-pillar="legislation"] h3 { color: var(--amber); }
.pillar p { color: var(--text-soft); font-size: 1rem; margin: 6px 0; }
.pillar-face.back p { font-size: 0.95rem; }

/* ===== Principles wheel ===== */
.principles-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.wheel { position: relative; width: 100%; max-width: 500px; aspect-ratio: 1; margin: 0 auto; }
.wheel-svg { width: 100%; height: 100%; cursor: pointer; }
.wheel-slice {
  cursor: pointer;
  transition: opacity 240ms, transform 300ms;
  transform-origin: 0 0;
}
.wheel-slice:hover, .wheel-slice.active { opacity: 1 !important; transform: scale(1.04); }
.wheel-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 700;
  pointer-events: none;
  fill: white;
  text-anchor: middle;
}
.wheel-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40%; aspect-ratio: 1; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-weight: 700; font-size: 1rem;
  color: var(--text); line-height: 1.3;
  pointer-events: none;
}
.principle-detail {
  padding: 36px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); min-height: 320px;
}
.principle-detail h3 { font-size: 2rem; margin: 12px 0 12px; }
.principle-detail p { color: var(--text-soft); }
.pd-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.pd-meta .tag {
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--accent-2);
}

/* ===== Framework grid ===== */
.framework-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px;
}
.framework-card {
  padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform var(--t), border-color var(--t), background var(--t);
  cursor: pointer;
}
.framework-card:hover { transform: translateY(-6px); border-color: var(--accent); background: var(--surface-2); }
.framework-card .acronym {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 1.1rem; color: var(--accent);
  margin-bottom: 8px; letter-spacing: 0.04em;
}
.framework-card h4 { margin: 0 0 12px; font-size: 1.2rem; }
.framework-card p { color: var(--text-soft); font-size: 0.95rem; margin: 0 0 14px; }
.framework-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.framework-card .tags span {
  font-size: 10px; padding: 3px 9px; border-radius: 999px;
  background: var(--bg-3); color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ===== Brussels effect ===== */
.brussels-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; }
.brussels-map {
  padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
}
.world-svg { width: 100%; height: auto; display: block; }
.region {
  cursor: pointer;
  transition: fill 240ms, stroke 240ms;
  stroke: rgba(255,255,255,0.15);
  stroke-width: 1;
}
.region:hover { stroke: var(--accent-2); stroke-width: 2; }
.region.eu { fill: url(#euGrad); }
.region.eu:hover { filter: brightness(1.2); }
.influence-arc {
  fill: none; stroke: var(--accent); stroke-width: 1.5;
  stroke-dasharray: 6 6;
  opacity: 0.7;
  animation: dash 14s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -200; } }
.brussels-info {
  padding: 32px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface);
}
.brussels-info h3 { font-size: 1.5rem; margin: 12px 0 14px; }
.brussels-info p { color: var(--text-soft); }
.brussels-info ul { padding-left: 18px; margin-top: 16px; }
.brussels-info li { margin: 6px 0; color: var(--text-soft); }

/* ===== EU laws tabs ===== */
.laws-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: 32px;
}
.laws-tab {
  padding: 12px 20px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-soft); font-weight: 600; cursor: pointer;
  transition: all var(--t);
  font-size: 14px;
}
.laws-tab:hover { color: var(--text); border-color: var(--accent); }
.laws-tab.active {
  background: var(--grad-1); color: white; border-color: transparent;
  box-shadow: 0 12px 30px -10px rgba(124,92,255,0.5);
}
.laws-content {
  padding: 40px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
  min-height: 360px;
}
.law-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.law-detail h3 { font-size: 1.8rem; margin: 0 0 6px; }
.law-detail .subtitle { color: var(--accent-2); font-weight: 600; margin: 0 0 16px; }
.law-detail .description { color: var(--text-soft); margin-bottom: 20px; }
.law-detail .fact-grid { display: grid; gap: 12px; }
.law-detail .fact {
  padding: 14px 18px; border-radius: 12px;
  background: var(--bg-3); border-left: 3px solid var(--accent);
}
.law-detail .fact strong { display: block; font-size: 11px; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }

/* ===== AI Act pyramid ===== */
.pyramid-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.pyramid {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 30px;
}
.tier {
  cursor: pointer;
  padding: 18px 24px;
  border-radius: 12px;
  font-weight: 700; text-align: center;
  transition: transform var(--t), box-shadow var(--t);
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
}
.tier:hover, .tier.active { transform: scale(1.04); }
.tier span { display: block; font-size: 1.1rem; }
.tier em { display: block; font-size: 0.8rem; font-weight: 500; font-style: normal; opacity: 0.85; margin-top: 2px; color: rgba(255,255,255,0.85); }
.tier-1 { width: 30%; background: linear-gradient(135deg, #ff3b3b, #c0156c); }
.tier-2 { width: 50%; background: linear-gradient(135deg, #ff8c3b, #ff3b8c); }
.tier-3 { width: 70%; background: linear-gradient(135deg, #ffb648, #ff8c3b); }
.tier-4 { width: 90%; background: linear-gradient(135deg, #46e1a3, #00d6ff); }
.tier.active { box-shadow: 0 14px 40px -10px rgba(255,255,255,0.3); outline: 2px solid white; }
.pyramid-info {
  padding: 32px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface);
}
.pyramid-info h3 { font-size: 1.6rem; margin: 8px 0 14px; }
.pyramid-info p { color: var(--text-soft); }
.pyramid-info .examples {
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border);
}
.pyramid-info .examples h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-2); margin: 0 0 10px; }
.pyramid-info .examples ul { margin: 0; padding-left: 18px; }
.pyramid-info .examples li { margin: 4px 0; color: var(--text-soft); }

/* ===== GDPR grid ===== */
.gdpr-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.gdpr-card {
  padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform var(--t), border-color var(--t);
}
.gdpr-card:hover { transform: translateY(-4px); border-color: var(--accent-2); }
.gdpr-card .num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 1.5rem;
  background: var(--grad-1); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.gdpr-card h4 { margin: 4px 0 8px; font-size: 1.05rem; }
.gdpr-card p { font-size: 0.9rem; color: var(--text-soft); margin: 0; }

/* ===== Compare EU vs US ===== */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 20px; }
.compare-col {
  padding: 30px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface);
}
.compare-eu { border-top: 4px solid #ffd200; }
.compare-us { border-top: 4px solid #b22234; }
.compare-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.flag { font-size: 1.8rem; }
.compare-head h4 { margin: 0; font-size: 1.3rem; }
.compare-col ul { padding-left: 18px; margin: 0; }
.compare-col li { margin: 10px 0; color: var(--text-soft); }

/* ===== Ten Steps ===== */
.ten-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.ten-card {
  position: relative; min-height: 280px;
  perspective: 1200px; cursor: pointer;
}
.ten-face {
  position: absolute; inset: 0;
  padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backface-visibility: hidden;
  transition: transform 700ms cubic-bezier(.4,.2,.2,1);
  display: flex; flex-direction: column;
}
.ten-face.back { transform: rotateY(180deg); background: var(--bg-3); }
.ten-card.flipped .ten-face.front { transform: rotateY(-180deg); }
.ten-card.flipped .ten-face.back { transform: rotateY(0); }
.ten-num {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-1);
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.2rem;
  color: white;
  margin-bottom: 14px;
}
.ten-face h4 { margin: 0 0 8px; font-size: 1.15rem; }
.ten-face p { font-size: 0.92rem; color: var(--text-soft); margin: 0 0 auto; }
.ten-face .flip-hint { font-size: 11px; color: var(--text-dim); margin-top: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.ten-face.back .do, .ten-face.back .dont {
  font-size: 0.85rem; margin: 6px 0; padding: 6px 10px;
  border-radius: 8px;
}
.ten-face.back .do { background: rgba(70,225,163,0.10); border-left: 2px solid var(--green); }
.ten-face.back .dont { background: rgba(255,87,87,0.10); border-left: 2px solid var(--red); }
.ten-face.back .label { font-weight: 700; font-size: 11px; letter-spacing: 0.1em; }
.ten-face.back .do .label { color: var(--green); }
.ten-face.back .dont .label { color: var(--red); }

/* ===== Challenge grid ===== */
.challenge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.challenge {
  padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform var(--t), border-color var(--t);
  cursor: pointer;
}
.challenge:hover { transform: translateY(-6px); border-color: var(--accent); }
.challenge-icon { font-size: 36px; margin-bottom: 14px; }
.challenge h4 { margin: 0 0 10px; font-size: 1.15rem; }
.challenge p { color: var(--text-soft); font-size: 0.92rem; margin: 0; }
.challenge .ex {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border);
  font-size: 0.85rem; color: var(--accent-2);
  display: none;
}
.challenge.open .ex { display: block; animation: fade 320ms ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Asimov ===== */
.asimov {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px;
  margin-bottom: 40px;
}
.asimov-card {
  padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  position: relative;
  transition: transform var(--t);
}
.asimov-card:hover { transform: translateY(-6px); }
.law-no {
  position: absolute; top: 14px; right: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 3rem;
  background: var(--grad-3); -webkit-background-clip: text; background-clip: text;
  color: transparent;
  opacity: 0.55;
}
.asimov-card h3 { margin: 0 0 10px; font-size: 1.2rem; color: var(--amber); }
.asimov-card p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }
.dilemma-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
}
.dilemma-card {
  padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-3);
}
.dilemma-card h5 { margin: 0 0 8px; font-size: 1rem; color: var(--accent-2); }
.dilemma-card p { margin: 0; color: var(--text-soft); font-size: 0.9rem; }

/* ===== Frontier ===== */
.frontier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.frontier-card {
  padding: 36px; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative; overflow: hidden;
  transition: transform var(--t), border-color var(--t);
  cursor: pointer;
}
.frontier-card::before {
  content: ''; position: absolute; inset: -2px -2px auto auto;
  width: 200px; height: 200px;
  background: var(--grad-1); opacity: 0.10;
  border-radius: 50%;
  transition: transform var(--t);
}
.frontier-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.frontier-card:hover::before { transform: scale(1.4); opacity: 0.18; }
.frontier-icon { font-size: 40px; position: relative; z-index: 1; }
.frontier-card h3 { margin: 14px 0 10px; font-size: 1.4rem; position: relative; z-index: 1; }
.frontier-card p { margin: 0 0 14px; color: var(--text-soft); font-size: 0.95rem; position: relative; z-index: 1; }
.frontier-points { list-style: none; padding: 0; margin: 0; position: relative; z-index: 1; }
.frontier-points li { padding: 6px 0; color: var(--text-soft); font-size: 0.88rem; }
.frontier-points li::before { content: '→ '; color: var(--accent); font-weight: 700; }

/* ===== Simulator ===== */
.sim-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: 28px;
}
.sim-tab {
  padding: 10px 18px; border-radius: 10px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7); font-weight: 600; cursor: pointer;
  transition: all var(--t); font-size: 13px;
}
.sim-tab:hover { color: white; }
.sim-tab.active {
  background: var(--grad-2); color: white; border-color: transparent;
}
.sim-stage {
  padding: 40px; border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
  color: white;
  min-height: 360px;
}
.sim-scenario h3 { margin: 0 0 12px; font-size: 1.6rem; color: white; }
.sim-scenario .context { color: rgba(255,255,255,0.85); font-size: 1rem; margin-bottom: 24px; }
.sim-question { font-weight: 600; margin-bottom: 16px; color: var(--accent-2); }
.sim-options { display: grid; gap: 12px; margin-bottom: 24px; }
.sim-option {
  text-align: left; padding: 16px 20px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px; color: white; cursor: pointer;
  transition: all var(--t); font-size: 0.95rem;
}
.sim-option:hover { background: rgba(255,255,255,0.10); border-color: var(--accent); }
.sim-option.chosen { background: var(--grad-1); border-color: transparent; }
.sim-feedback {
  margin-top: 20px; padding: 20px;
  background: rgba(0,214,255,0.08);
  border-left: 3px solid var(--accent-2);
  border-radius: 8px;
  display: none;
}
.sim-feedback.show { display: block; animation: fade 320ms ease; }
.sim-feedback h4 { margin: 0 0 8px; color: var(--accent-2); }
.sim-feedback .frameworks { margin-top: 14px; display: grid; gap: 10px; }
.sim-feedback .fw {
  padding: 10px 14px; border-radius: 8px;
  background: rgba(0,0,0,0.3);
  font-size: 0.9rem;
}
.sim-feedback .fw strong { color: var(--amber); }
.sim-reset {
  margin-top: 14px; padding: 8px 16px;
  background: transparent; border: 1px solid rgba(255,255,255,0.2);
  color: white; border-radius: 8px; cursor: pointer;
  font-size: 13px;
}

/* ===== Timeline ===== */
.timeline {
  list-style: none; padding: 0; margin: 0;
  position: relative;
}
.timeline::before {
  content: ''; position: absolute; left: 28px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline li {
  position: relative; padding: 16px 0 16px 80px;
  cursor: pointer;
  transition: background var(--t);
}
.timeline li::before {
  content: attr(data-num);
  position: absolute; left: 0; top: 16px;
  width: 56px; height: 56px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 1.2rem; color: var(--accent);
  transition: all var(--t);
}
.timeline li:hover::before, .timeline li.open::before {
  background: var(--grad-1); color: white; border-color: transparent;
  transform: scale(1.1);
}
.timeline li h4 { margin: 0 0 4px; font-size: 1.15rem; }
.timeline li .topic { color: var(--text-soft); font-size: 0.95rem; }
.timeline li .details {
  margin-top: 12px; padding: 14px 18px;
  background: var(--surface); border-radius: 12px;
  border-left: 3px solid var(--accent);
  color: var(--text-soft); font-size: 0.92rem;
  display: none;
}
.timeline li.open .details { display: block; animation: fade 320ms ease; }

/* ===== Quiz ===== */
.quiz {
  padding: 40px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  max-width: 800px; margin: 0 auto;
}
.quiz-progress {
  display: flex; gap: 6px; margin-bottom: 24px;
}
.quiz-dot {
  flex: 1; height: 4px; background: var(--bg-3); border-radius: 2px;
  transition: background var(--t);
}
.quiz-dot.done { background: var(--accent); }
.quiz-dot.current { background: var(--accent-2); }
.quiz-q-num { font-size: 11px; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.1em; }
.quiz-q { font-size: 1.3rem; font-weight: 700; margin: 8px 0 22px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-opt {
  text-align: left; padding: 14px 18px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); cursor: pointer;
  transition: all var(--t); font-size: 0.95rem;
}
.quiz-opt:hover { border-color: var(--accent); background: var(--surface-2); }
.quiz-opt.right { background: rgba(70,225,163,0.15); border-color: var(--green); }
.quiz-opt.wrong { background: rgba(255,87,87,0.15); border-color: var(--red); }
.quiz-explain {
  margin-top: 18px; padding: 14px 18px;
  background: var(--bg-3); border-left: 3px solid var(--accent-2);
  border-radius: 8px;
  display: none;
}
.quiz-explain.show { display: block; animation: fade 320ms ease; }
.quiz-actions { display: flex; justify-content: space-between; margin-top: 22px; gap: 12px; }
.quiz-result {
  text-align: center; padding: 40px 20px;
}
.quiz-result .score {
  font-size: 4rem; font-weight: 900;
  background: var(--grad-1); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.quiz-result h3 { font-size: 1.5rem; margin: 8px 0 16px; }
.quiz-result p { color: var(--text-soft); margin-bottom: 20px; }

/* ===== Glossary ===== */
.glossary-search {
  width: 100%; max-width: 600px; margin: 0 auto 32px;
  display: block;
  padding: 14px 20px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 12px;
  font-size: 1rem; font-family: inherit;
}
.glossary-search:focus { outline: 2px solid var(--accent); }
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.glossary-card {
  padding: 18px 22px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  transition: all var(--t);
}
.glossary-card.hidden { display: none; }
.glossary-card h5 {
  margin: 0 0 6px; font-size: 1rem;
  color: var(--accent-2);
  font-family: 'JetBrains Mono', monospace;
}
.glossary-card p { margin: 0; color: var(--text-soft); font-size: 0.9rem; }
.glossary-empty {
  text-align: center; padding: 40px;
  color: var(--text-dim);
  grid-column: 1 / -1;
}

/* ===== Footer ===== */
.footer {
  padding: 50px 24px; text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-soft); font-size: 0.9rem;
}
.footer .muted { color: var(--text-dim); margin-top: 6px; }

/* ===== Reveal animations ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 700ms, transform 700ms; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .pillars { grid-template-columns: 1fr; }
  .principles-wrap, .brussels-wrap, .pyramid-wrap, .law-detail, .compare { grid-template-columns: 1fr; }
  .pillar { min-height: 320px; }
}
@media (max-width: 720px) {
  .section { padding: 70px 18px; }
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: absolute; top: 60px; right: 18px; left: 18px;
    flex-direction: column;
    background: var(--bg-2);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .hero-stats { gap: 18px; padding: 16px; }
  .hero-stats strong { font-size: 1.4rem; }
  .laws-content { padding: 24px; }
  .ten-card { min-height: 320px; }
  .timeline li { padding-left: 70px; }
  .timeline li::before { width: 48px; height: 48px; font-size: 1rem; }
  .timeline::before { left: 24px; }
  .quiz { padding: 24px; }
  .quiz-q { font-size: 1.1rem; }
}
