:root {
  --bg: #0a0d0f;
  --bg-soft: #10161b;
  --panel: #131b21;
  --panel-border: rgba(176, 151, 111, 0.22);
  --text: #e9e2d2;
  --muted: #b5ac98;
  --accent: #b0976f;
  --accent-hot: #d5ba83;
  --danger: #8a3f31;
  --max: 1180px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Saira", "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(176, 151, 111, 0.16), transparent 40%),
    radial-gradient(circle at 92% 10%, rgba(70, 95, 108, 0.22), transparent 33%),
    linear-gradient(180deg, #070a0d 0%, #0b1014 50%, #090d10 100%);
  line-height: 1.55;
}

body.is-loading {
  overflow: hidden;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

h1,
h2,
h3,
.brand,
.eyebrow,
.btn,
.badge,
.video-state {
  font-family: "Agency FB", "DIN Condensed", "Archivo Narrow", "Impact", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 88vh;
  border-bottom: 1px solid var(--panel-border);
  overflow: hidden;
}

.hero-bg,
.hero-video,
.hero-bg img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  filter: saturate(0.82) contrast(1.05);
}

.hero-bg img {
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center top;
  will-change: transform;
}

.hero-fallback {
  opacity: 0.35;
}

.hero-overlay {
  background:
    linear-gradient(110deg, rgba(7, 9, 11, 0.9) 0%, rgba(8, 10, 12, 0.45) 54%, rgba(7, 9, 11, 0.9) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(9, 13, 16, 0.96) 95%);
}

.top-nav,
.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

.top-nav {
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  color: var(--accent-hot);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.nav-link:hover,
.nav-link:focus-visible {
  border-color: var(--accent);
}

.hero-content {
  padding: clamp(3rem, 11vh, 7.5rem) 0 4.2rem;
  max-width: var(--max);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1rem, 4vw, 2.6rem);
  align-items: end;
}

.hero-copy {
  max-width: 60rem;
}

.hero-spotlight {
  position: relative;
  width: min(100%, 420px);
  justify-self: end;
  padding: 0.8rem;
  border: 1px solid rgba(176, 151, 111, 0.46);
  background:
    linear-gradient(165deg, rgba(176, 151, 111, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(8, 12, 15, 0.9), rgba(8, 11, 14, 0.82));
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  box-shadow: 0 28px 56px rgba(2, 4, 6, 0.64);
}

.hero-spotlight::before,
.hero-spotlight::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(213, 186, 131, 0.55);
}

.hero-spotlight::before {
  inset: 0.46rem;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.hero-spotlight::after {
  inset: 1.18rem auto auto 1.12rem;
  width: 74px;
  height: 18px;
  border-bottom: 0;
  border-right: 0;
}

.spotlight-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
  margin-bottom: 0.62rem;
}

.spotlight-label {
  margin: 0;
  color: #e7d5ac;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  font-family: "Agency FB", "DIN Condensed", "Archivo Narrow", "Impact", sans-serif;
}

.spotlight-frame {
  position: relative;
  border: 1px solid rgba(176, 151, 111, 0.52);
  background: #050709;
  box-shadow: inset 0 0 0 1px rgba(10, 15, 20, 0.86);
}

.spotlight-frame::after {
  content: "REC • BUILD";
  position: absolute;
  top: 0.45rem;
  right: 0.52rem;
  color: #ffd3bf;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  font-family: "Agency FB", "DIN Condensed", "Archivo Narrow", "Impact", sans-serif;
  background: rgba(127, 52, 41, 0.84);
  border: 1px solid rgba(216, 169, 143, 0.32);
  padding: 0.14rem 0.42rem;
}

.spotlight-frame video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.spotlight-controls {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.58rem;
}

.clip-toggle {
  border: 1px solid rgba(176, 151, 111, 0.44);
  background: rgba(4, 7, 10, 0.82);
  color: var(--text);
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  font-family: "Agency FB", "DIN Condensed", "Archivo Narrow", "Impact", sans-serif;
  padding: 0.28rem 0.52rem;
  cursor: pointer;
}

.clip-toggle.is-active {
  background: linear-gradient(90deg, #866d46, #bf9f69);
  color: #081015;
}

.spotlight-metrics {
  margin: 0.7rem 0 0;
  padding-left: 1rem;
}

.spotlight-metrics li {
  margin: 0.25rem 0;
  font-size: 0.83rem;
  color: #d5cab4;
}

.eyebrow {
  color: var(--accent);
  margin: 0;
  font-size: 0.9rem;
}

h1 {
  margin: 0.45rem 0;
  font-size: clamp(2.4rem, 7vw, 5.9rem);
  line-height: 0.94;
  max-width: 18ch;
  text-wrap: balance;
}

.hero-subhead {
  margin: 0.9rem 0 0;
  max-width: 62ch;
  color: #d7cebc;
}

.badge {
  margin-top: 1.1rem;
  display: inline-block;
  border: 1px solid var(--panel-border);
  color: var(--accent-hot);
  background: rgba(4, 6, 8, 0.55);
  padding: 0.35rem 0.62rem;
  font-size: 0.82rem;
}

.hero-cta,
.cta-actions {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--panel-border);
  border-radius: 0;
  padding: 0.68rem 1rem;
  transition: transform 0.22s ease, background-color 0.22s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  color: #0a0d0f;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
}

.btn-secondary {
  color: var(--text);
  background: rgba(6, 9, 12, 0.52);
}

.section {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.3rem) 0;
}

.section-head h2 {
  margin: 0.25rem 0 0.9rem;
  font-size: clamp(1.45rem, 3.8vw, 2.6rem);
  line-height: 1.05;
}

.section-intro,
.section-brief,
.section-video,
.section-cta,
.roadmap-card,
.systems-grid article {
  background: linear-gradient(180deg, rgba(18, 25, 31, 0.74), rgba(16, 21, 26, 0.72));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 3vw, 1.6rem);
}

.feature-grid,
.list-columns,
.systems-grid article ul,
.roadmap-card ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.feature-grid li,
.list-columns li,
.systems-grid li,
.roadmap-card li {
  margin: 0.3rem 0;
  color: #d8d0c1;
}

.quote {
  color: var(--accent-hot);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.82rem;
}

.gallery-card {
  border: 1px solid var(--panel-border);
  background: #0f151a;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-card picture {
  display: block;
  aspect-ratio: 1408 / 768;
}

.gallery-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery-card:hover img {
  transform: scale(1.03);
}

.gallery-card figcaption {
  padding: 0.6rem 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.gallery-card:nth-child(1),
.gallery-card:nth-child(4),
.gallery-card:nth-child(7) {
  grid-column: span 7;
}

.gallery-card:nth-child(2),
.gallery-card:nth-child(3),
.gallery-card:nth-child(5),
.gallery-card:nth-child(6),
.gallery-card:nth-child(8) {
  grid-column: span 5;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.systems-grid article h3 {
  margin: 0;
  color: var(--accent-hot);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.roadmap-card h3 {
  margin: 0;
}

.phase-chip {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: #071014;
  background: var(--accent-hot);
  padding: 0.2rem 0.52rem;
  font-size: 0.78rem;
}

.video-shell {
  position: relative;
  border: 1px solid var(--panel-border);
  overflow: hidden;
}

.video-shell video {
  width: 100%;
  display: block;
  aspect-ratio: 1408 / 768;
  object-fit: cover;
  background: #06090c;
}

.compact-shell video {
  aspect-ratio: 16 / 9;
}

.video-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: clamp(1rem, 3vw, 2rem);
  display: grid;
  align-content: end;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1) 5%, rgba(10, 14, 18, 0.91) 78%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 12px,
      rgba(176, 151, 111, 0.08) 12px,
      rgba(176, 151, 111, 0.08) 13px
    );
}

.video-state {
  display: inline-block;
  margin: 0;
  color: #ffd7be;
  background: rgba(138, 63, 49, 0.9);
  padding: 0.22rem 0.45rem;
  width: fit-content;
}

.video-overlay h3 {
  margin: 0.62rem 0 0;
}

.video-meta {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-cta {
  text-align: center;
}

.section-cta h2 {
  margin-top: 0;
}

.site-footer {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 1rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.loader-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background:
    radial-gradient(circle at 20% 18%, rgba(176, 151, 111, 0.16), transparent 36%),
    linear-gradient(120deg, rgba(9, 13, 16, 0.98), rgba(6, 9, 12, 0.98));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.loader-grid {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(176, 151, 111, 0.08) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(90deg, rgba(176, 151, 111, 0.08) 0 1px, transparent 1px 42px);
  opacity: 0.4;
}

.loader-content {
  position: relative;
  z-index: 2;
  width: min(90vw, 700px);
  text-align: center;
  padding: 1.4rem;
}

.loader-kicker {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.loader-title {
  margin: 0.5rem 0 0;
  max-width: none;
  font-size: clamp(1.9rem, 6vw, 4.5rem);
}

.loader-text {
  margin: 0.6rem auto 0;
  color: var(--muted);
  max-width: 48ch;
}

.loader-meter {
  margin: 1.1rem auto 0;
  height: 8px;
  border: 1px solid var(--panel-border);
  width: min(90%, 540px);
  background: rgba(3, 5, 7, 0.82);
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #9a8058 0%, #d5ba83 100%);
}

.loader-percent {
  margin: 0.5rem 0 0;
  color: var(--accent-hot);
  font-family: "Agency FB", "DIN Condensed", "Archivo Narrow", "Impact", sans-serif;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
}

.loader-btn {
  margin-top: 0.8rem;
}

.loader-fade {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: #090d11;
  opacity: 0;
  transition: opacity 0.95s ease;
}

.loader-screen.closing .loader-fade {
  opacity: 1;
}

.loader-screen.closing .loader-content {
  opacity: 0;
  transform: scale(0.99);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

.audio-mute-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 960;
  border: 1px solid rgba(176, 151, 111, 0.52);
  background: linear-gradient(180deg, rgba(8, 12, 15, 0.92), rgba(10, 15, 19, 0.84));
  color: var(--text);
  padding: 0.46rem 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
  font-family: "Agency FB", "DIN Condensed", "Archivo Narrow", "Impact", sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.44);
}

.audio-mute-btn.is-muted {
  color: #ffd3bf;
  border-color: rgba(190, 120, 96, 0.62);
  background: linear-gradient(180deg, rgba(85, 38, 31, 0.9), rgba(71, 31, 25, 0.83));
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .gallery-card img,
  .btn {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .loader-fade,
  .loader-screen.closing .loader-content {
    transition: none;
  }
}

@media (max-width: 960px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero-spotlight {
    width: min(100%, 500px);
    justify-self: start;
  }

  .gallery-card,
  .gallery-card:nth-child(n) {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 82vh;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 10ch;
  }

  .badge {
    font-size: 0.75rem;
  }
}
