/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ===== Tokens ===== */
:root {
  --bg: #060a08;
  --bg-1: #0a1310;
  --bg-2: #0e1a15;
  --line: rgba(47, 232, 138, 0.22);
  --line-strong: rgba(47, 232, 138, 0.5);
  --green: #2fe88a;
  --green-bright: #8dffcb;
  --green-dim: #123724;
  --amber: #ffb347;
  --text: #d9f2e6;
  --text-dim: #86a99b;
  --text-faint: #4c655c;
  --danger: #ff6b5c;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  --display: 'Archivo Black', Arial Black, sans-serif;
  --container: 1180px;
  --gap: clamp(1rem, 2vw, 2rem);
  --section-pad: clamp(3.5rem, 8vw, 7rem);
}

/* ===== Base ===== */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

::selection { background: var(--green); color: #04160e; }

*:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--green-dim); border: 1px solid var(--line); }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: #04160e;
  padding: 0.6rem 1rem;
  font-weight: 700;
  z-index: 200;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--green-bright) !important;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
  max-width: 26ch;
}

section p + p { margin-top: 1rem; }

/* ===== Decorative: scanlines ===== */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.5;
}

/* ===== Frame corners (injected by JS) ===== */
.frame { position: relative; }
.corner {
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}
.corner--tl { top: -1px; left: -1px; border-top: 2px solid var(--green); border-left: 2px solid var(--green); }
.corner--tr { top: -1px; right: -1px; border-top: 2px solid var(--green); border-right: 2px solid var(--green); }
.corner--bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--green); border-left: 2px solid var(--green); }
.corner--br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--green); border-right: 2px solid var(--green); }

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px 1px var(--green);
}
.dot--rec { background: var(--danger); box-shadow: 0 0 6px 1px var(--danger); }

.status-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-left: 0.5em;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(47, 232, 138, 0.5); }
  50% { opacity: 0.5; box-shadow: 0 0 0 4px rgba(47, 232, 138, 0); }
}

/* ===== Boot screen ===== */
.boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.5s ease;
}
.boot.is-leaving { opacity: 0; }
.boot__text {
  font-family: var(--mono);
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  white-space: pre-wrap;
  max-width: 40rem;
}
.boot__text::after {
  content: '_';
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.9em 1.4em;
  border: 1px solid var(--green);
  color: var(--green);
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn::before { content: '['; margin-right: 0.15em; }
.btn::after { content: ']'; margin-left: 0.15em; }
.btn--primary { background: var(--green-dim); }
.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--green);
  color: #04160e;
  box-shadow: 0 0 24px rgba(47, 232, 138, 0.45);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  background: var(--green-dim);
  box-shadow: 0 0 16px rgba(47, 232, 138, 0.25);
}
.btn--small { padding: 0.55em 0.9em; font-size: 0.75rem; }

/* ===== Topbar / Nav ===== */
.topbar {
  position: relative;
  z-index: 20;
}
.topbar__inner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  min-width: 100vw;
}
.topbar.is-scrolled .topbar__inner {
  background: rgba(6, 10, 8, 0.85);
  border-bottom-color: var(--line);
  backdrop-filter: blur(6px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.brand__mark { width: 30px; height: 30px; color: var(--green); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}
.nav a:not(.btn) {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0.3em 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav a:not(.btn):hover,
.nav a:not(.btn):focus-visible,
.nav a:not(.btn).is-active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.nav-toggle {
  display: none;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--green);
  border: 1px solid var(--line-strong);
  padding: 0.5em 0.8em;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(80vw, 320px);
    background: var(--bg-1);
    border-left: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav.is-open { transform: translateX(0); }
  .nav a:not(.btn) { font-size: 1rem; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 5rem;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(1.2) contrast(1.05);
}
.hero__sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220vmax;
  height: 220vmax;
  margin: -110vmax 0 0 -110vmax;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(47,232,138,0.16) 8deg, transparent 40deg, transparent 360deg);
  animation: sweep 8s linear infinite;
  mix-blend-mode: screen;
}
@keyframes sweep { to { transform: rotate(360deg); } }
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(6,10,8,0.2), rgba(6,10,8,0.75) 60%),
    linear-gradient(to bottom, rgba(6,10,8,0.3) 0%, var(--bg) 96%);
}
.hero__content { position: relative; z-index: 1; padding: 4rem 0 6rem; }
.hero__title {
  font-family: var(--display);
  font-size: clamp(2.75rem, 9vw, 6rem);
  line-height: 0.98;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 30px rgba(47, 232, 138, 0.35);
  margin-bottom: 1.25rem;
}
.hero__tagline {
  max-width: 42ch;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text);
  margin-bottom: 2rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 3vw, 3rem);
}
.hero__meta li { display: flex; flex-direction: column; gap: 0.25em; }
.hero__meta-label { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-faint); }
.hero__meta-value { font-weight: 700; color: var(--green); }

.hero__scrolldown {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--green);
  font-size: 1.25rem;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ===== Panels (Dispatch / Specs) ===== */
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
}
.panel__bar {
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.85em 1.25em;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.panel__bar-title { color: var(--green); font-weight: 700; }
.panel__bar-meta { margin-left: auto; color: var(--text-faint); display: none; }
@media (min-width: 560px) { .panel__bar-meta { display: inline; } }
.panel__body { padding: clamp(1.5rem, 4vw, 2.5rem); }
.panel__body p { max-width: 62ch; color: var(--text); }
.panel__body p:not(:first-of-type) { color: var(--text-dim); }

.dispatch { padding: var(--section-pad) 0; }

/* ===== Features ===== */
.features { padding: var(--section-pad) 0; background: var(--bg-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 2.5rem;
}
.card {
  background: var(--bg);
  padding: 2rem;
}
.card__icon { width: 32px; height: 32px; color: var(--green); margin-bottom: 1.25rem; }
.card__title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
}
.card__index { color: var(--green); font-size: 0.85em; }
.card p { color: var(--text-dim); font-size: 0.92rem; }

/* ===== Gallery ===== */
.gallery { padding: var(--section-pad) 0; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
  margin-top: 2.5rem;
}
.gallery__item {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  display: block;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transition: transform 0.4s ease, filter 0.4s ease;
}
.gallery__item:hover img, .gallery__item:focus-visible img {
  transform: scale(1.06);
  filter: saturate(1.2) contrast(1.05);
}
.gallery__tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: rgba(6, 10, 8, 0.75);
  border: 1px solid var(--line-strong);
  padding: 0.3em 0.6em;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--green-bright);
}

/* ===== Specs ===== */
.specs { padding: var(--section-pad) 0; background: var(--bg-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.specs__list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9em 1.25em;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.specs__list > div:last-child { border-bottom: 0; }
.specs__list dt { color: var(--text-faint); letter-spacing: 0.06em; }
.specs__list dd { color: var(--text); font-weight: 600; text-align: right; }

.review-meter { margin-top: 3rem; }
.review-meter__bar {
  height: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  overflow: hidden;
}
.review-meter__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-dim), var(--green));
  box-shadow: 0 0 12px rgba(47, 232, 138, 0.5);
}
.review-meter__label { margin-top: 0.75em; font-size: 0.85rem; color: var(--text-dim); }
.review-meter__label strong { color: var(--green); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}
.tags li {
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.4em 0.75em;
}

/* ===== Final CTA ===== */
.cta-final { padding: var(--section-pad) 0; }
.cta-final__panel { padding: clamp(2rem, 6vw, 4rem); text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-final__panel .section-title { max-width: none; }
.cta-final__panel p { max-width: 46ch; color: var(--text-dim); }
.cta-final__panel .hero__actions { margin: 2rem 0 1rem; justify-content: center; }
.cta-final__meta { font-size: 0.8rem; letter-spacing: 0.06em; color: var(--text-faint); }

/* ===== Footer ===== */
.site-footer { padding: 3rem 0 2rem; border-top: 1px solid var(--line); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.site-footer__brand { font-weight: 700; color: var(--green); letter-spacing: 0.05em; }
.site-footer__team { font-size: 0.8rem; color: var(--text-faint); margin-top: 0.25em; }
.site-footer__links { display: flex; align-items: center; gap: 1.5rem; font-size: 0.8rem; }
.site-footer__links a { color: var(--text-dim); border-bottom: 1px solid transparent; }
.site-footer__links a:hover, .site-footer__links a:focus-visible { color: var(--green); border-bottom-color: var(--green); }
.site-footer__clock-label { color: var(--text-faint); }
#local-time { color: var(--green); font-weight: 600; }
.site-footer__legal { font-size: 0.72rem; color: var(--text-faint); max-width: 70ch; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 6, 0.92);
}
.lightbox__figure {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 1100px);
  max-height: 82vh;
  border: 1px solid var(--line-strong);
  background: var(--bg-1);
}
.lightbox__img { max-height: 76vh; width: auto; margin: 0 auto; }
.lightbox__caption {
  padding: 0.75em 1em;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--green-bright);
  border-top: 1px solid var(--line);
}
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  z-index: 2;
  color: var(--green);
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1;
  background: rgba(6, 10, 8, 0.7);
  border: 1px solid var(--line-strong);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.lightbox__close:hover, .lightbox__close:focus-visible,
.lightbox__prev:hover, .lightbox__prev:focus-visible,
.lightbox__next:hover, .lightbox__next:focus-visible {
  background: var(--green);
  color: #04160e;
  box-shadow: 0 0 16px rgba(47, 232, 138, 0.4);
}
.lightbox__close {
  top: clamp(0.5rem, 3vw, 1.5rem);
  right: clamp(0.5rem, 3vw, 1.5rem);
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
}
.lightbox__prev, .lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  padding: 0.4rem 0.9rem;
}
.lightbox__prev { left: clamp(0.5rem, 3vw, 1.5rem); }
.lightbox__next { right: clamp(0.5rem, 3vw, 1.5rem); }

/* ===== Motion & accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__sweep, .status-pulse, .hero__scrolldown, .boot__text::after {
    animation: none !important;
  }
  .boot { display: none !important; }
}
