/* ============================================================
   BlackHole Labs — Cinematic Universe & Refined Systems Interface
   ============================================================ */

:root {
  --ink: #020307;
  --bg-deep: #03040a;
  --bg-subtle: #060811;
  --warm-white: #f0e9d8;
  --soft-gold: #e8c78a;
  --gold-glow: rgba(224, 170, 78, .35);
  --gold-accent: #f6d789;
  --gold-line: rgba(224, 170, 78, .18);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background: var(--ink);
  font-family: var(--sans);
  color: var(--warm-white);
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.6;
}

::selection { background: rgba(224, 170, 78, .3); color: #fff; }

/* ============ Top Floating Navigation ============ */

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 38px;
  background: linear-gradient(180deg, rgba(2, 3, 7, 0.92) 0%, rgba(2, 3, 7, 0.5) 70%, transparent 100%);
  pointer-events: none;
  transition: all 0.3s;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  opacity: .95;
  transition: opacity .4s;
  pointer-events: auto;
}
.brand:hover { opacity: 1; }

.brand-mark {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 8px rgba(224, 170, 78, .35));
}

.brand span {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .06em;
  color: var(--warm-white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  pointer-events: auto;
}

.nav-links a {
  text-decoration: none;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .04em;
  color: rgba(240, 233, 216, .75);
  transition: color .3s, text-shadow .3s;
}

.nav-links a:hover {
  color: var(--soft-gold);
  text-shadow: 0 0 12px rgba(224, 170, 78, .4);
}

.nav-gh {
  border: 1px solid rgba(224, 170, 78, .3);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 14px !important;
  font-family: var(--sans) !important;
  letter-spacing: .02em;
  background: rgba(224, 170, 78, .05);
}
.nav-gh:hover {
  background: rgba(224, 170, 78, .15);
  border-color: rgba(224, 170, 78, .6);
}

/* ============ Screen 1: Hero Cinematic Universe ============ */

.screen-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}

.scene {
  position: absolute;
  inset: 0;
  background: #020309;
  will-change: transform;
}

.scene-bg {
  position: absolute;
  inset: -3.5%;
  background: url('../assets/scene-bg.jpg') center 58% / cover no-repeat;
}

.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 4, 8, .55) 0%, rgba(3, 4, 8, 0) 15%);
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(3, 4, 8, 0) 58%,
    rgba(3, 4, 8, .45) 82%,
    rgba(2, 3, 7, 1) 100%);
}

/* ============ Format Marks (W / E / P / PDF) ============ */

.engine-marks {
  position: absolute;
  top: 104px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  user-select: none;
}

.engine-marks span {
  font-family: var(--serif);
  font-size: 31px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 210, 152, .8);
  cursor: pointer;
  transition: color .3s, text-shadow .3s, transform .3s;
}

.engine-marks span:hover {
  color: #f4e2ae;
  text-shadow: 0 0 20px rgba(224, 170, 78, .6);
  transform: translateY(-2px) scale(1.07);
}

.engine-marks span:active { transform: scale(.95); }
.engine-marks span.pulse { animation: markPulse .65s ease-out; }

.pdf-mark { font-size: 20px !important; letter-spacing: .09em; }

@keyframes markPulse {
  0%   { text-shadow: 0 0 0 rgba(240, 214, 158, 0); transform: scale(1); }
  35%  { text-shadow: 0 0 30px rgba(240, 214, 158, .9); transform: scale(1.22); }
  100% { text-shadow: 0 0 14px rgba(224, 170, 78, .22); transform: scale(1); }
}

/* ============ SCAN Button & Golden Tree ============ */

.scan-btn {
  position: absolute;
  top: clamp(34px, 6vh, 56px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: none;
  border: 0;
  padding: 6px 14px;
  cursor: pointer;
  color: #d2b77b;
  font: 500 17px var(--serif);
  letter-spacing: .34em;
  text-indent: .34em;
  text-shadow: 0 0 14px rgba(224, 170, 78, .22);
  transition: color .3s, text-shadow .3s, transform .3s;
}

.scan-btn:hover {
  color: #f4e2ae;
  text-shadow: 0 0 20px rgba(224, 170, 78, .6);
  transform: translateX(-50%) translateY(-2px) scale(1.06);
}

.scan-btn:active { transform: translateX(-50%) scale(.95); }
.scan-btn.pulse { animation: scanPulse .65s ease-out; }

.scan-btn .cup {
  position: absolute;
  left: 8px; right: 8px; bottom: 3px;
  height: 14px;
  border-left: 1.5px solid rgba(240, 214, 158, .84);
  border-right: 1.5px solid rgba(240, 214, 158, .84);
  border-bottom: 1.5px solid rgba(240, 214, 158, .84);
  border-radius: 0 0 11px 11px;
  box-shadow: 0 2px 6px rgba(224, 170, 78, .25);
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
}
body.menu-open .scan-btn .cup { opacity: 1; }

@keyframes scanPulse {
  0%   { text-shadow: 0 0 0 rgba(240, 214, 158, 0); }
  35%  { text-shadow: 0 0 30px rgba(240, 214, 158, .9); transform: translateX(-50%) scale(1.15); }
  100% { text-shadow: 0 0 14px rgba(224, 170, 78, .22); transform: translateX(-50%) scale(1); }
}

.scan-menu {
  position: absolute;
  top: clamp(68px, 10.5vh, 92px);
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 0;
  z-index: 28;
  pointer-events: none;
  opacity: 0;
  transition: opacity .28s ease;
}
.scan-menu.open { opacity: 1; pointer-events: auto; }

.sm-cups {
  position: absolute;
  top: 7px; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
}

.sm-cup {
  width: 84px; height: 14px;
  border-left: 1.5px solid rgba(240, 214, 158, .84);
  border-right: 1.5px solid rgba(240, 214, 158, .84);
  border-bottom: 1.5px solid rgba(240, 214, 158, .84);
  border-radius: 0 0 9px 9px;
  box-shadow: 0 3px 8px rgba(224, 170, 78, .10);
  pointer-events: auto;
  cursor: pointer;
  transition: border-color .3s, box-shadow .3s;
}
.sm-cup:hover {
  border-color: rgba(248, 228, 180, .8);
  box-shadow: 0 0 14px rgba(224, 170, 78, .25);
}

body.menu-open .engine-marks { transform: translate(-50%, 30px); }

/* ============ Stream Files & Multilingual Words ============ */

#stream-icons {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.stream-file {
  position: absolute; left: 0; top: 0;
  width: 52px; height: 56px; margin-left: -26px; margin-top: -28px;
  transform-origin: center; will-change: transform, opacity;
  color: #e6c98f;
  filter: drop-shadow(0 0 4px rgba(218, 174, 102, .24));
}
.stream-file svg { width: 100%; height: 100%; fill: rgba(5, 9, 14, .86); }

.stream-word {
  width: 112px; height: 32px; margin-left: -56px; margin-top: -16px;
  text-align: center; white-space: nowrap;
  font: 400 18px/32px var(--serif);
  color: #e0ccaa;
  filter: drop-shadow(0 1px 3px #030408);
}
.stream-word:lang(ar) { font-family: 'Amiri', serif; font-size: 22px; }
.stream-word:lang(zh) { font-family: 'Noto Serif SC', serif; font-size: 17px; }

/* ============ Dock (mic + ask bar) ============ */

.dock {
  position: absolute;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.mic {
  position: relative;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 6px;
  color: rgba(240, 233, 216, .85);
  transition: color .4s, filter .4s;
}
.mic svg { width: 24px; height: 24px; }
.mic:hover { color: #f6efdc; filter: drop-shadow(0 0 6px rgba(224, 170, 78, .35)); }
.mic.listening { color: var(--soft-gold); filter: drop-shadow(0 0 8px rgba(224, 170, 78, .5)); }

.ask {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: none;
  border: 0;
  padding: 0;
  transform: translateX(-67px);
}

.ask textarea {
  width: 360px;
  max-width: 60vw;
  text-align: right;
  background: none;
  border: 0;
  outline: 0;
  resize: none;
  overflow: hidden;
  color: var(--warm-white);
  font: 400 17px/1.5 var(--serif);
  letter-spacing: .03em;
  padding: 0;
  height: 26px;
  max-height: 80px;
}

.ask-send {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  color: rgba(240, 233, 216, .9);
  transition: color .4s, filter .4s;
  flex-shrink: 0;
}
.ask-send svg { width: 26px; height: 26px; display: block; }
.ask-send:hover { color: var(--soft-gold); filter: drop-shadow(0 0 6px rgba(224, 170, 78, .4)); }

/* Delicate Scroll Hint */
.scroll-cue {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: rgba(224, 170, 78, .4);
  font: 500 10px var(--sans);
  letter-spacing: .25em;
  transition: color .3s, transform .3s;
}
.scroll-cue:hover {
  color: var(--soft-gold);
  transform: translateX(-50%) translateY(3px);
}

/* ============ Below-The-Fold Editorial Content ============ */

.page-content {
  position: relative;
  z-index: 20;
  background: var(--ink);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Mission Intro */
.intro-section {
  padding: 120px 0 90px;
  text-align: center;
  border-bottom: 1px solid var(--gold-line);
}

.eyebrow {
  display: inline-block;
  font: 500 11px var(--sans);
  letter-spacing: .3em;
  color: var(--soft-gold);
  margin-bottom: 18px;
  opacity: .85;
}

.intro-title {
  font-family: var(--serif);
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: .02em;
  color: #fff;
  margin-bottom: 24px;
}

.intro-lead {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.8;
  color: rgba(240, 233, 216, .78);
  font-weight: 300;
  max-width: 740px;
  margin: 0 auto;
}

/* Blocks */
.content-block {
  padding: 110px 0;
  border-bottom: 1px solid var(--gold-line);
}

.bg-subtle {
  background: var(--bg-subtle);
}

.block-header {
  margin-bottom: 64px;
}

.block-num {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--soft-gold);
  letter-spacing: .15em;
  display: block;
  margin-bottom: 8px;
  opacity: .75;
}

.block-title {
  font-family: var(--serif);
  font-size: clamp(32px, 3.8vw, 46px);
  font-weight: 500;
  letter-spacing: .02em;
  color: #fff;
  margin-bottom: 12px;
}

.block-desc {
  font-size: 16px;
  color: rgba(240, 233, 216, .65);
  max-width: 580px;
}

/* What We Build: Refined Pillars Grid */
.grid-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 32px 40px;
}

.pillar {
  padding-top: 18px;
  border-top: 1px solid rgba(224, 170, 78, .15);
  transition: border-color .3s;
}
.pillar:hover {
  border-color: rgba(224, 170, 78, .5);
}

.pillar-idx {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--soft-gold);
  opacity: .7;
  display: block;
  margin-bottom: 12px;
}

.pillar-name {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: .02em;
}

.pillar-body {
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(240, 233, 216, .7);
  font-weight: 300;
}

.pillar-featured {
  border-top: 1px solid rgba(246, 215, 137, .4);
}
.pillar-featured .pillar-name {
  color: var(--gold-accent);
}

/* Security Grid */
.grid-sec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px;
}

.sec-col {
  position: relative;
  padding-left: 20px;
}

.sec-dot {
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--soft-gold);
  box-shadow: 0 0 8px rgba(224, 170, 78, .6);
}

.sec-heading {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 8px;
}

.sec-para {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(240, 233, 216, .68);
  font-weight: 300;
}

/* Founder Box */
.founder-box {
  text-align: center;
  padding: 60px 40px;
  border: 1px solid var(--gold-line);
  background: radial-gradient(circle at 50% 0%, rgba(224, 170, 78, .06) 0%, transparent 70%);
  border-radius: 4px;
}

.founder-tag {
  font: 500 11px var(--sans);
  letter-spacing: .25em;
  color: var(--soft-gold);
  display: block;
  margin-bottom: 16px;
  opacity: .8;
}

.founder-title {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 500;
  color: #fff;
  margin-bottom: 6px;
}

.founder-subtitle {
  font-size: 15px;
  color: var(--soft-gold);
  font-weight: 400;
  margin-bottom: 24px;
}

.founder-divider {
  width: 48px;
  height: 1px;
  background: var(--soft-gold);
  opacity: .4;
  margin: 0 auto 24px;
}

.founder-text {
  font-size: 15.5px;
  line-height: 1.8;
  color: rgba(240, 233, 216, .82);
  font-weight: 300;
  max-width: 620px;
  margin: 0 auto;
}

/* Contact Card */
.contact-card {
  padding: 50px 40px;
  border: 1px solid var(--gold-line);
  border-radius: 4px;
}

.contact-eyebrow {
  font: 500 11px var(--sans);
  letter-spacing: .25em;
  color: var(--soft-gold);
  display: block;
  margin-bottom: 12px;
  opacity: .8;
}

.contact-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 500;
  color: #fff;
  margin-bottom: 32px;
}

.contact-rows {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.c-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(224, 170, 78, .08);
  font-size: 15px;
  flex-wrap: wrap;
  gap: 8px;
}
.c-row:last-child { border-bottom: none; padding-bottom: 0; }

.c-key {
  color: rgba(240, 233, 216, .55);
  font-weight: 300;
}

.c-val {
  color: var(--warm-white);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 18px;
  transition: color .3s;
}
.c-val:hover { color: var(--soft-gold); }

.c-live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7fe4a8;
  font-size: 14px;
}

.live-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  display: inline-block;
}

/* Footer */
.footer {
  padding: 44px 0;
  text-align: center;
  border-top: 1px solid var(--gold-line);
  font-size: 13px;
  color: rgba(240, 233, 216, .45);
}

.footer-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-divider {
  color: var(--soft-gold);
  opacity: .4;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: rgba(14, 17, 28, 0.95);
  border: 1px solid rgba(224, 170, 78, 0.4);
  color: var(--warm-white);
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  transform: translateY(10px);
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Responsive */
@media(max-width: 800px) {
  .top-nav { padding: 18px 20px; }
  .nav-links { display: none; }
  .ask { transform: translateX(0); }
  .c-row { flex-direction: column; align-items: flex-start; }
}