/* ========== OPERATION ENCRYPTION — Quantum Front Door ========== */

:root {
  /* Surfaces */
  --void: #04060c;
  --deep: #070b16;
  --panel: #0b111f;
  --panel-2: #0f172a;
  --line: rgba(148, 180, 220, 0.14);
  --line-strong: rgba(148, 180, 220, 0.28);

  /* Ink */
  --ink: #eaf2ff;
  --ink-2: #a8b8d4;
  --ink-3: #6e7f9c;

  /* Quantum spectrum */
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.16);
  --gold: #f2c14e;
  --alert: #fb7185;

  /* Type */
  --font-display: 'Cabinet Grotesk', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2.25rem;
  --text-3xl: 3.25rem;
  --text-hero: clamp(2.4rem, 5.6vw, 5.25rem);

  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-6: 3rem;
  --sp-8: 5rem;
  --sp-10: 8rem;

  --maxw: 1280px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--cyan); color: #04060c; }

/* ---------- Shared atoms ---------- */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-3); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; margin: 0; }

.section { position: relative; padding: var(--sp-10) 0; }
.section-head { max-width: 720px; margin-bottom: var(--sp-6); }
.section-head h2 { font-size: var(--text-2xl); margin: var(--sp-2) 0 var(--sp-2); }
.section-head p { color: var(--ink-2); font-size: var(--text-lg); margin: 0; }

.rule { height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); border: 0; margin: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(11, 17, 31, 0.6);
  backdrop-filter: blur(10px);
  transition: all 0.35s var(--ease);
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 32px -8px var(--cyan-soft); transform: translateY(-1px); }
.btn-primary { background: var(--cyan); color: #04060c; border-color: var(--cyan); font-weight: 700; }
.btn-primary:hover { background: #7ce7f7; color: #04060c; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
}
.nav.solid {
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand svg { width: 30px; height: 30px; color: var(--cyan); flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt b { font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.02em; }
.brand-txt span { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.2em; color: var(--ink-3); text-transform: uppercase; }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--cyan); }
@media (max-width: 980px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  padding: 8.5rem 0 var(--sp-6);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video, .hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.7;
  filter: saturate(115%) contrast(105%);
}
#lattice { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0.85; }
.hero-veil {
  position: absolute; inset: 0; z-index: 2;
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(34, 211, 238, 0.13), transparent 60%),
    radial-gradient(100% 80% at 85% 90%, rgba(139, 92, 246, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(4,6,12,0.72) 0%, rgba(4,6,12,0.35) 38%, rgba(4,6,12,0.92) 88%, var(--void) 100%);
}
.hero-inner { position: relative; z-index: 3; width: 100%; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.1);
  margin-bottom: var(--sp-3);
}
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 0 var(--violet); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(139,92,246,0.7); }
  70% { box-shadow: 0 0 0 12px rgba(139,92,246,0); }
  100% { box-shadow: 0 0 0 0 rgba(139,92,246,0); }
}
.hero h1 {
  font-size: var(--text-hero);
  letter-spacing: -0.045em;
  max-width: 24ch;
  margin-bottom: var(--sp-3);
}
.hero h1 .q {
  background: linear-gradient(100deg, var(--cyan) 0%, #a5f3fc 35%, var(--violet) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: var(--ink-2); max-width: 58ch; margin: 0 0 var(--sp-4);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: var(--sp-4); }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 0 2rem;
  border-top: 1px solid var(--line);
  padding-top: var(--sp-2);
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
}
.hero-meta b { color: var(--ink); font-weight: 500; }

/* ---------- Ticker ---------- */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--deep);
  overflow: hidden; padding: 0.85rem 0;
}
.ticker-track {
  display: flex; gap: 3rem; width: max-content;
  animation: slide 42s linear infinite;
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3);
  white-space: nowrap;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 3rem; }
.ticker-track span::after { content: '◈'; color: var(--cyan); opacity: 0.7; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- Video section ---------- */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
@media (max-width: 900px) { .videos { grid-template-columns: 1fr; } }
.vcard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--deep));
  overflow: hidden;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.vcard:hover { border-color: var(--line-strong); box-shadow: 0 30px 80px -50px rgba(34,211,238,0.5); }
.vcard video { width: 100%; aspect-ratio: 16/9; background: #000; object-fit: cover; }
.vcard-body { padding: var(--sp-3); }
.vcard-body h3 { font-size: var(--text-xl); margin-bottom: 0.5rem; }
.vcard-body p { color: var(--ink-2); font-size: var(--text-sm); margin: 0 0 var(--sp-2); }
.vtag {
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan);
  display: block; margin-bottom: 0.6rem;
}
.vmissing {
  aspect-ratio: 16/9; display: grid; place-content: center; gap: 0.5rem; text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(34,211,238,0.12), var(--deep));
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
  padding: var(--sp-3);
}

/* ---------- Lifecycle ---------- */
.flow { position: relative; }
.flow::before {
  content: ''; position: absolute; left: 26px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--cyan), var(--violet), transparent);
  opacity: 0.45;
}
@media (min-width: 900px) { .flow::before { left: 50%; } }

.stage { position: relative; padding-left: 68px; margin-bottom: var(--sp-6); }
@media (min-width: 900px) {
  .stage { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); padding-left: 0; align-items: center; }
  .stage .stage-body { grid-column: 1; text-align: right; }
  .stage .stage-visual { grid-column: 2; }
  .stage:nth-child(even) .stage-body { grid-column: 2; text-align: left; }
  .stage:nth-child(even) .stage-visual { grid-column: 1; grid-row: 1; }
}
.stage-dot {
  position: absolute; left: 19px; top: 6px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--void); border: 1px solid var(--cyan);
  box-shadow: 0 0 0 4px rgba(4,6,12,1), 0 0 24px var(--cyan-soft);
  z-index: 2;
}
@media (min-width: 900px) { .stage-dot { left: calc(50% - 7px); top: 50%; margin-top: -7px; } }
.stage-dot::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--cyan);
  opacity: 0.9;
}
.stage-num {
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.22em; color: var(--cyan); text-transform: uppercase;
  display: block; margin-bottom: 0.5rem;
}
.stage-body h3 { font-size: var(--text-xl); margin-bottom: 0.7rem; }
.stage-body p { color: var(--ink-2); font-size: var(--text-base); margin: 0 0 0.9rem; }
.stage-key {
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.06em; color: var(--ink-3);
  border-top: 1px solid var(--line); padding-top: 0.7rem; display: block;
}
.stage-key b { color: var(--gold); font-weight: 500; }
.stage-visual {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); aspect-ratio: 3/2; background: var(--panel);
}
.stage-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), opacity 0.6s; }
.stage:hover .stage-visual img { transform: scale(1.06); }
.stage-visual::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(4,6,12,0.75));
  pointer-events: none;
}

/* Firewall stage emphasis */
.stage.critical .stage-dot { border-color: var(--alert); box-shadow: 0 0 0 4px var(--void), 0 0 28px rgba(251,113,133,0.5); }
.stage.critical .stage-dot::after { background: var(--alert); }
.stage.critical .stage-num { color: var(--alert); }

/* ---------- Outline block ---------- */
.outline {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: clamp(1.25rem, 4vw, var(--sp-6));
}
.outline h3 { font-size: var(--text-xl); margin-bottom: var(--sp-1); }
.outline > p { color: var(--ink-3); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 var(--sp-3); }
.outline ol { list-style: none; padding: 0; margin: 0; }
.outline li {
  display: grid; grid-template-columns: 3.2rem 1fr; gap: var(--sp-2);
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.outline li i {
  font-style: normal;
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--cyan); letter-spacing: 0.08em; padding-top: 0.2rem;
}
.outline li b { color: var(--ink); font-weight: 600; display: block; font-size: var(--text-base); margin-bottom: 0.15rem; }

/* ---------- Pillars / front doors ---------- */
.pillar { margin-bottom: var(--sp-8); }
.pillar-band {
  position: relative; height: clamp(220px, 34vw, 400px);
  overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line);
  display: flex; align-items: flex-end;
}
.pillar-band img {
  position: absolute; inset: 0; width: 100%; height: 118%; object-fit: cover;
  will-change: transform;
}
.pillar-band::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,6,12,0.25) 0%, rgba(4,6,12,0.55) 50%, rgba(4,6,12,0.96) 100%);
}
.pillar-band-txt { position: relative; z-index: 2; padding: clamp(1.25rem, 4vw, var(--sp-4)); }
.pillar-band-txt h2 { font-size: clamp(1.75rem, 5vw, var(--text-3xl)); margin: 0.4rem 0 0.5rem; }
.pillar-band-txt p { color: var(--ink-2); max-width: 62ch; margin: 0; font-size: var(--text-base); }

.doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-top: 0; }
.door {
  position: relative;
  background: var(--deep);
  padding: var(--sp-3);
  display: flex; flex-direction: column; gap: 0.6rem;
  min-height: 210px;
  transition: background 0.45s var(--ease);
  overflow: hidden;
}
.door::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--cyan); transform: scaleY(0); transform-origin: top;
  transition: transform 0.5s var(--ease);
}
.door:hover { background: var(--panel-2); }
.door:hover::before { transform: scaleY(1); }
.door-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.door-idx { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-3); letter-spacing: 0.14em; }
.door-status {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.2rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink-3);
  white-space: nowrap;
}
.door-status.live { color: var(--cyan); border-color: rgba(34,211,238,0.45); background: rgba(34,211,238,0.08); }
.door-status.build { color: var(--gold); border-color: rgba(242,193,78,0.4); background: rgba(242,193,78,0.07); }
.door-status.research { color: #c4b5fd; border-color: rgba(139,92,246,0.45); background: rgba(139,92,246,0.09); }
.door h3 { font-size: var(--text-lg); font-family: var(--font-display); letter-spacing: -0.02em; }
.door p { color: var(--ink-2); font-size: var(--text-sm); margin: 0; flex: 1; }
.door-go {
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 0.5rem;
  transition: color 0.3s, gap 0.3s;
}
.door:hover .door-go { color: var(--cyan); gap: 0.9rem; }

/* ---------- Boundaries ---------- */
.bounds { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-3); }
.bound {
  border: 1px solid var(--line); border-left: 2px solid var(--alert);
  border-radius: var(--radius);
  background: var(--panel); padding: var(--sp-3);
}
.bound h4 { font-family: var(--font-display); font-size: var(--text-lg); margin: 0 0 0.5rem; letter-spacing: -0.02em; }
.bound p { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }

.quote {
  border-left: 2px solid var(--cyan);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-3);
  margin: var(--sp-6) 0 0;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.35rem, 3.4vw, 2.1rem);
  letter-spacing: -0.03em; line-height: 1.2; max-width: 26ch;
}

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--deep); padding: var(--sp-6) 0 var(--sp-4); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }
.foot h5 { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 var(--sp-2); font-weight: 400; }
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.foot a, .foot li { color: var(--ink-2); font-size: var(--text-sm); }
.foot a:hover { color: var(--cyan); }
.foot-note {
  margin-top: var(--sp-4); padding-top: var(--sp-2); border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: var(--text-xs); font-family: var(--font-mono); letter-spacing: 0.06em;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between;
}
