/* ==========================================================================
   LARN.io v4 — Deep Research Observatory (cinematic HUD edition)
   ========================================================================== */

:root {
  --void: #03040a;
  --void-2: #060814;
  --panel: rgba(8, 11, 22, 0.74);
  --panel-2: rgba(11, 15, 30, 0.6);
  --line: rgba(150, 190, 255, 0.14);
  --line-2: rgba(150, 190, 255, 0.3);
  --amber: #ffb347;
  --amber-2: #ffcf7a;
  --amber-dim: rgba(255, 179, 71, 0.55);
  --amber-glow: rgba(255, 179, 71, 0.22);
  --ice: #9fd4ff;
  --text: #c6d2e6;
  --text-dim: #7c89a3;
  --white: #f4f8ff;
  --ok: #6fe3a5;

  --display: "Chakra Petch", "Noto Sans Thai", "Noto Sans SC", sans-serif;
  --body: "Inter", "Noto Sans Thai", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--void);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--amber); color: #1a1206; }

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  color: var(--white);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0.005em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.mono { font-family: var(--mono); }
.dim { color: var(--text-dim); }
.tld { color: var(--amber); }

/* ---------- Backdrop layers ---------- */
#view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}
#fallback-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 200, 120, 0.0) 0 6%, rgba(255, 170, 80, 0.32) 7%, rgba(120, 160, 255, 0.2) 12%, rgba(255, 130, 60, 0.11) 20%, transparent 34%),
    radial-gradient(circle at 50% 46%, #000 0 5.5%, transparent 6%),
    radial-gradient(120% 90% at 50% 40%, #0a0e1c, #03040a 70%);
}
#fallback-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg at 50% 46%, rgba(120,170,255,0.13), rgba(255,180,90,0.15), rgba(120,170,255,0.07), rgba(255,150,70,0.17), rgba(120,170,255,0.13));
  -webkit-mask: radial-gradient(circle at 50% 46%, transparent 6%, #000 8% 22%, transparent 30%);
  mask: radial-gradient(circle at 50% 46%, transparent 6%, #000 8% 22%, transparent 30%);
  filter: blur(6px);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.no-webgl #view { display: none; }
.no-webgl #fallback-bg { display: block; }

/* ---------- Cinematic overlay (grain + scanlines + vignette) ---------- */
#fx {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  opacity: 0.05;
  mix-blend-mode: overlay;
  animation: grain 0.6s steps(2) infinite;
}
@keyframes grain {
  0% { background-position: 0 0; }
  50% { background-position: 70px 40px; }
  100% { background-position: -40px 70px; }
}
#fx::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
  opacity: 0.4;
}
#fx::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(3, 4, 10, 0.16);
  background-image:
    radial-gradient(140% 100% at 50% 50%, transparent 45%, rgba(22, 26, 64, 0.5) 100%),
    radial-gradient(125% 92% at 50% 44%, transparent 38%, rgba(3, 4, 10, 0.92) 100%);
}

/* ==========================================================================
   HUD
   ========================================================================== */
#hud {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}
.bracket {
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--amber-dim);
}
.bracket.tl { top: 14px; left: 14px; border-top: 1.5px solid; border-left: 1.5px solid; }
.bracket.tr { top: 14px; right: 14px; border-top: 1.5px solid; border-right: 1.5px solid; }
.bracket.bl { bottom: 14px; left: 14px; border-bottom: 1.5px solid; border-left: 1.5px solid; }
.bracket.br { bottom: 14px; right: 14px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

/* top-left title */
#title-block { position: absolute; top: 26px; left: 30px; }
.title-main {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px var(--amber-glow);
}
.title-sub {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--text-dim);
  margin-top: 0.28rem;
}
.title-tag {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-top: 0.4rem;
  opacity: 0.85;
}

/* top-right controls + clock */
#ctrl-block { position: absolute; top: 24px; right: 30px; text-align: right; pointer-events: auto; }
.ctrl-row { display: flex; align-items: center; gap: 0.6rem; justify-content: flex-end; }

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(6, 8, 20, 0.6);
}
.lang-btn {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.26rem 0.55rem;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
}
.lang-btn:hover { color: var(--amber); }
.lang-btn.active { background: var(--amber); color: #1a1206; }

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--amber);
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--amber-dim);
  border-radius: 3px;
  background: rgba(6, 8, 20, 0.6);
  transition: background 0.25s, box-shadow 0.25s, color 0.25s;
}
.hud-btn:hover { background: var(--amber); color: #1a1206; box-shadow: 0 0 22px var(--amber-glow); }
.hud-btn-bars { display: inline-flex; flex-direction: column; gap: 3px; }
.hud-btn-bars i { width: 15px; height: 1.5px; background: currentColor; display: block; }

#clock-block { margin-top: 0.9rem; }
.clock-label { font-size: 0.58rem; letter-spacing: 0.22em; color: var(--text-dim); }
.clock-value { font-size: 1.15rem; font-weight: 500; color: var(--ice); letter-spacing: 0.08em; text-shadow: 0 0 16px rgba(159, 212, 255, 0.3); }

/* bottom-left telemetry */
#telemetry { position: absolute; bottom: 28px; left: 30px; display: grid; gap: 0.32rem; }
.tel-row {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}
.tel-row span { color: var(--text-dim); min-width: 132px; }
.tel-row b { color: var(--amber-2); font-weight: 500; }
.tel-row b.ok { color: var(--ok); }

/* bottom-right sector + scroll */
#sector-block { position: absolute; bottom: 28px; right: 30px; text-align: right; display: grid; gap: 0.7rem; justify-items: end; }
.sector-label { font-size: 0.66rem; letter-spacing: 0.1em; color: var(--text-dim); }
.sector-label b { color: var(--amber); font-weight: 500; }
#scroll-hint { display: flex; align-items: center; gap: 0.6rem; font-size: 0.6rem; letter-spacing: 0.18em; color: var(--text-dim); }
.scroll-line { width: 38px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--amber);
  transform: translateX(-100%);
  animation: scan 2.4s var(--ease) infinite;
}
@keyframes scan { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* ==========================================================================
   Menu overlay
   ========================================================================== */
#menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(3, 4, 10, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
#menu.open { opacity: 1; visibility: visible; }
#menu.hidden { display: flex; }
.menu-inner { width: min(680px, 88vw); }
.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.4rem;
}
.menu-title { font-size: 0.72rem; letter-spacing: 0.24em; color: var(--amber); }
.menu-nav { display: grid; }
.menu-link {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  padding: 1.05rem 0.4rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 500;
  color: var(--text);
  transition: color 0.25s, padding-left 0.25s;
}
.menu-link:hover { color: var(--amber); padding-left: 1rem; }
.menu-num { font-size: 0.8rem; color: var(--amber-dim); letter-spacing: 0.1em; }
.menu-foot { margin-top: 1.6rem; font-size: 0.62rem; letter-spacing: 0.14em; color: var(--text-dim); }

/* ==========================================================================
   Intro
   ========================================================================== */
#intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(120% 100% at 50% 50%, #070a16, #03040a 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 1s var(--ease), visibility 1s;
}
#intro.gone { opacity: 0; visibility: hidden; }
#intro-card { display: grid; gap: 1.1rem; justify-items: center; padding: 1rem; }
.intro-kicker { font-size: 0.7rem; letter-spacing: 0.32em; color: var(--amber); }
.intro-title {
  font-family: var(--display);
  font-size: clamp(3rem, 12vw, 6.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  text-shadow: 0 0 40px var(--amber-glow);
}
.intro-quote { font-size: clamp(0.95rem, 2.4vw, 1.2rem); color: var(--text); max-width: 40ch; font-style: italic; }
#btn-enter { margin-top: 0.6rem; }
.intro-load { width: min(240px, 60vw); height: 2px; background: var(--line); margin-top: 0.6rem; overflow: hidden; }
.load-bar { display: block; height: 100%; width: 40%; background: var(--amber); animation: load 1.4s var(--ease) infinite; }
@keyframes load { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.8rem;
  border-radius: 3px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn-primary {
  background: linear-gradient(180deg, var(--amber-2), var(--amber));
  color: #1a1206;
  box-shadow: 0 10px 30px -8px var(--amber-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(255, 179, 71, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-ghost { background: transparent; color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-dim); }
.btn-ghost:hover { background: rgba(255, 179, 71, 0.1); box-shadow: inset 0 0 0 1px var(--amber); transform: translateY(-2px); }
.btn-lg { padding: 1.05rem 2.2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.85rem; }

/* ==========================================================================
   Reveal (cinematic blur-up)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(7px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; filter: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  padding-bottom: 4rem;
}
/* left scrim keeps the headline legible over the bright singularity on the right */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(3, 4, 10, 0.94) 0%,
    rgba(3, 4, 10, 0.9) 45%,
    rgba(3, 4, 10, 0.55) 64%,
    rgba(3, 4, 10, 0) 80%
  );
}
.hero-inner { position: relative; z-index: 2; max-width: 820px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: rgba(6, 8, 20, 0.55);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ice);
  margin-bottom: 1.8rem;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); position: relative; flex: none; }
.pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.6; } 70%, 100% { transform: scale(2.8); opacity: 0; } }

.hero-title {
  font-size: clamp(2.7rem, 7vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: 0.005em;
  font-weight: 700;
  margin-bottom: 1.3rem;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}
.hero-title .line { display: block; }
.title-accent {
  font-style: normal;
  color: var(--amber);
  text-shadow: 0 0 34px var(--amber-glow);
}
.hero-acronym {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  margin-bottom: 1.6rem;
}
.hero-acronym b { color: var(--amber); font-weight: 600; }
.hero-sub {
  font-size: 1.12rem;
  line-height: 1.8;
  max-width: 58ch;
  color: var(--text);
  margin-bottom: 2.2rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2rem; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-bottom: 3rem; }
.hero-chips li { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.74rem; letter-spacing: 0.06em; color: var(--text-dim); }
.hero-chips .tick { color: var(--amber); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.8rem;
  max-width: 720px;
}
.stat-num { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600; color: var(--amber); line-height: 1; text-shadow: 0 0 24px var(--amber-glow); }
.stat-suffix { color: var(--ice); }
.stat-label { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.55rem; line-height: 1.45; }

/* ==========================================================================
   Sections + panels
   ========================================================================== */
.section { position: relative; z-index: 1; padding-block: clamp(4rem, 9vw, 7rem); }
.panel {
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(2rem, 5vw, 3.6rem);
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.85);
}
.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber-dim), transparent);
}
.panel-head { max-width: 720px; margin-bottom: clamp(2.2rem, 5vw, 3.2rem); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--amber-dim); }
.panel-head h2, .about-text h2, .contact-panel h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.section-sub { font-size: 1.05rem; margin-top: 1rem; color: var(--text); }

/* ---------- Research cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.card {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1.9rem;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
  overflow: hidden;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9); }
.glow-track::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), var(--amber-glow), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.glow-track:hover::before { opacity: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; }
.card-icon {
  width: 50px; height: 50px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: rgba(255, 179, 71, 0.06);
  color: var(--amber);
  display: grid;
  place-items: center;
}
.card-icon svg { width: 25px; height: 25px; }
.card-num { font-size: 0.72rem; letter-spacing: 0.14em; color: var(--ice); opacity: 0.8; }
.card h3 { font-size: 1.36rem; margin-bottom: 0.7rem; }
.card > p { font-size: 0.96rem; margin-bottom: 1.2rem; color: var(--text); }
.card-list { display: grid; gap: 0.6rem; }
.card-list li { position: relative; padding-left: 1.4rem; font-size: 0.9rem; line-height: 1.55; color: var(--text-dim); }
.card-list li::before { content: "▸"; position: absolute; left: 0; top: 0; color: var(--amber); }

/* ---------- Methodology procedure ---------- */
.procedure { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 2.5rem; }
.pstep { position: relative; display: flex; gap: 1.2rem; padding: 1.3rem; border: 1px solid var(--line); border-radius: 5px; background: var(--panel-2); transition: border-color 0.3s, transform 0.3s; }
.pstep:hover { border-color: var(--line-2); transform: translateY(-3px); }
.pstep-num {
  flex: none;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--amber);
  line-height: 1;
  text-shadow: 0 0 20px var(--amber-glow);
}
.pstep-body h4 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.pstep-body p { font-size: 0.92rem; color: var(--text-dim); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 4.5rem); align-items: center; }
.about-text h2 { margin-bottom: 1.3rem; }
.about-text p { margin-bottom: 1.1rem; font-size: 1rem; color: var(--text); }
.principles { display: grid; gap: 1rem; }
.principle {
  position: relative;
  display: flex;
  gap: 1.1rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-2);
  transition: transform 0.3s, border-color 0.3s;
  overflow: hidden;
}
.principle:hover { transform: translateY(-3px); border-color: var(--line-2); }
.principle-icon {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: rgba(159, 212, 255, 0.06);
  color: var(--ice);
  display: grid;
  place-items: center;
}
.principle-icon svg { width: 23px; height: 23px; }
.principle h4 { font-size: 1.16rem; margin-bottom: 0.35rem; }
.principle p { font-size: 0.92rem; color: var(--text-dim); }

/* ---------- Company dossier ---------- */
.dossier {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: rgba(6, 9, 18, 0.5);
  padding: clamp(1.8rem, 4vw, 2.8rem);
}
.corner { position: absolute; width: 18px; height: 18px; }
.corner.tl { top: -1px; left: -1px; border-top: 2px solid var(--amber); border-left: 2px solid var(--amber); }
.corner.tr { top: -1px; right: -1px; border-top: 2px solid var(--amber); border-right: 2px solid var(--amber); }
.corner.bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--amber); border-left: 2px solid var(--amber); }
.corner.br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--amber); border-right: 2px solid var(--amber); }
.dossier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.8rem;
}
.dossier-title { font-size: 0.74rem; letter-spacing: 0.18em; color: var(--amber); }
.seal { width: 96px; height: 96px; flex: none; }
.seal-text { font-family: var(--mono); font-weight: 500; }
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; }
.ledger-item { display: flex; flex-direction: column; gap: 0.35rem; }
.ledger-label { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.ledger-value { font-size: 1rem; color: var(--white); font-weight: 500; line-height: 1.5; }
.ledger-reg { color: var(--amber); font-weight: 600; font-size: 1.1rem; letter-spacing: 0.04em; }
.dossier-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.dossier-note { font-size: 0.86rem; color: var(--text-dim); max-width: 54ch; }

/* ---------- Contact ---------- */
.contact-panel { text-align: center; max-width: 760px; margin-inline: auto; }
.contact-panel .eyebrow { justify-content: center; }
.contact-panel .eyebrow::before { display: none; }
.contact-panel .section-sub { max-width: 52ch; margin-inline: auto; }
.contact-actions { display: flex; justify-content: center; margin: 2.2rem 0 1.6rem; }
.contact-addr { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--text-dim); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: rgba(3, 4, 10, 0.85); backdrop-filter: blur(8px); padding-top: 3rem; }
.footer-top { display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; padding-bottom: 2.2rem; }
.f-brand { max-width: 380px; }
.brand-name { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--white); }
.f-brand p { margin-top: 0.7rem; font-size: 0.94rem; color: var(--text-dim); }
.f-col { max-width: 440px; }
.f-col p { font-size: 0.9rem; color: var(--text-dim); }
.f-reg { margin-top: 0.5rem; font-size: 0.8rem; color: var(--amber-dim); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 1.4rem; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--text-dim); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  #telemetry { display: none; }
}
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .procedure { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; align-items: start; }
  #sector-block { display: none; }
}
/* narrow screens: declutter HUD corners so they never overlap */
@media (max-width: 768px) {
  .title-sub, .title-tag { display: none; }
  #clock-block { display: none; }
  .title-main { font-size: 1.2rem; }
  #title-block { top: 16px; left: 16px; }
  #ctrl-block { top: 14px; right: 16px; }
  .bracket { width: 16px; height: 16px; }
  .bracket.tl { top: 10px; left: 10px; }
  .bracket.tr { top: 10px; right: 10px; }
  .bracket.bl { bottom: 10px; left: 10px; }
  .bracket.br { bottom: 10px; right: 10px; }
  .hero { padding-top: 5rem; }
  /* on narrow screens the headline spans full width, so darken the whole hero */
  .hero::before {
    background:
      linear-gradient(90deg, rgba(3, 4, 10, 0.78), rgba(3, 4, 10, 0.5) 70%, rgba(3, 4, 10, 0.78)),
      radial-gradient(70% 55% at 50% 42%, rgba(3, 4, 10, 0) 30%, rgba(3, 4, 10, 0.5) 100%);
  }
}
@media (max-width: 640px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: 1.6rem; }
  .ledger { grid-template-columns: 1fr; }
  .dossier-head { flex-direction: column; text-align: center; }
  .dossier-foot { flex-direction: column; align-items: flex-start; }
  .footer-top { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
@media (max-width: 480px) {
  #btn-menu [data-i18n="nav.menu"] { display: none; }
  .lang-btn { padding: 0.26rem 0.42rem; font-size: 0.64rem; }
  .title-main { font-size: 1.05rem; }
  .ctrl-row { gap: 0.4rem; }
}

/* ---------- Short viewports: keep the corner HUD off the centred hero ----------
   The overlap is height-driven (centred hero overflows into the fixed corner HUD
   below ~980px tall, regardless of width), so the triggers are max-height only.
   The wide/tall happy path (e.g. 1920x1080) is untouched and keeps the full HUD. */
@media (max-height: 1000px) {
  #telemetry, #sector-block { display: none; }
}
@media (max-height: 880px) {
  .title-sub, .title-tag, #clock-block { display: none; }
  .hero { align-items: flex-start; padding-top: 6rem; padding-bottom: 2.5rem; }
  .hero-badge { margin-bottom: 1rem; }
  .hero-title { margin-bottom: 0.8rem; }
  .hero-sub { margin-bottom: 1.3rem; }
  .hero-chips { margin-bottom: 1.6rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  #fx { animation: none; }
}
