:root {
  color-scheme: dark;
  --background: #101410;
  --surface: #171d16;
  --edge: #36402e;
  --text: #f1f1e7;
  --muted: #b4b9ad;
  --accent: #d9ed80;
  --ink: #171d12;
  --body: system-ui, sans-serif;
  --display: Impact, 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font: 1rem/1.65 var(--body); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
p, h1, h2, h3, figure { margin: 0; }
[id] { scroll-margin-top: 1.25rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.wrap { width: min(100% - 3rem, 74rem); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  z-index: 10;
  inset: .65rem auto auto .65rem;
  padding: .55rem .85rem;
  background: var(--accent);
  color: var(--ink);
}

.site-header { position: relative; z-index: 2; background: #101410; border-bottom: 1px solid var(--edge); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; }
.header-inner { min-height: 4.6rem; gap: 2rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  font: 800 .84rem/1.02 var(--body);
  letter-spacing: .035em;
  flex: 0 0 auto;
}
.brand > span:last-child > span { display: block; color: var(--accent); }
.brand-mark { position: relative; width: 1.75rem; height: 1.75rem; border: 1px solid var(--accent); color: var(--accent); }
.brand-mark::before, .brand-mark::after { content: ''; position: absolute; inset: 24%; border: 1px solid; transform: rotate(45deg); }
.brand-mark::after { inset: 41%; background: currentColor; }

.site-nav { display: flex; align-items: center; gap: clamp(1.15rem, 3vw, 2.65rem); }
.site-nav a, .menu-toggle { color: var(--muted); font: 700 .76rem/1.25 var(--mono); letter-spacing: .09em; text-transform: uppercase; text-decoration: none; }
.site-nav a:hover, .back-to-top:hover { color: var(--accent); }
.site-nav .nav-trailer { display: inline-flex; align-items: center; gap: .9rem; padding: .66rem .83rem; border: 1px solid #526140; color: var(--accent); }
.site-nav .nav-trailer:hover { border-color: var(--accent); }
.play-icon { display: inline-block; width: 0; height: 0; border-block: .31rem solid transparent; border-left: .48rem solid currentColor; }
.menu-toggle { display: none; }

.hero {
  isolation: isolate;
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(38rem, 52vw, 47rem);
  background: #19231c;
  border-bottom: 1px solid var(--edge);
}
.hero-image, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { z-index: -2; object-fit: cover; object-position: 66% center; }
.hero::after {
  z-index: -1;
  content: '';
  background: linear-gradient(90deg, #0b100de8 0%, #0b100dc2 32%, #0b100d39 67%, #0b100d21 100%), linear-gradient(0deg, #101410 0%, transparent 34%);
}
.hero-inner { padding-block: 4.5rem 5.5rem; }
.eyebrow { display: flex; align-items: center; gap: .65rem; color: var(--accent); font: 700 .74rem/1.45 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.signal { flex: 0 0 auto; width: .5rem; height: .5rem; background: var(--accent); box-shadow: 0 0 1rem #d9ed8066; }
.hero h1 {
  margin: 1.3rem 0 1.5rem;
  font: 400 clamp(3.35rem, 9.45vw, 8.1rem)/.89 var(--display);
  letter-spacing: -.018em;
  text-transform: uppercase;
}
.hero h1 span { display: block; color: var(--accent); }
.hero-hook { font-size: clamp(1.2rem, 2.05vw, 1.6rem); font-weight: 700; line-height: 1.3; }
.hero-copy { margin-top: .55rem; max-width: 33ch; color: #d0d5c9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  min-height: 2.9rem;
  padding: .65rem .92rem;
  border: 1px solid transparent;
  font: 800 .91rem/1.2 var(--body);
  text-decoration: none;
}
.button > span { font-size: 1.12em; }
.button-primary { background: var(--accent); color: var(--ink); }
.button-primary:hover { background: #edffa4; }
.button-outline { border-color: #737f67; background: #101410ad; }
.button-outline:hover { border-color: var(--accent); color: var(--accent); }
.hero-credit { position: absolute; bottom: 1.35rem; right: max(1.5rem, calc((100% - 74rem) / 2)); color: #c8cdbf; font: .7rem/1.4 var(--mono); }

.section { padding-block: clamp(3.65rem, 7vw, 6.35rem); }
.section h2 { font: 400 clamp(2.3rem, 5.4vw, 4.4rem)/1.04 var(--display); text-transform: uppercase; letter-spacing: .005em; }
.section h3 { font: 750 1.25rem/1.2 var(--body); }
.section p { color: var(--muted); }
.section .eyebrow { color: var(--accent); }
.section-label { margin-bottom: .75rem; }
.section-label::before { content: ''; width: 1.45rem; height: 1px; background: var(--accent); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.4rem 2rem; margin-bottom: 2.1rem; }
.section-heading > p { max-width: 20rem; }

.story-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.story-grid h2 + p { margin-top: 1.15rem; }
.story-grid h2 ~ p { max-width: 56ch; }
.story-grid p + p { margin-top: .6rem; }
.mission {
  padding: clamp(1.15rem, 3.4vw, 2.2rem);
  border: 1px solid var(--edge);
  border-top: 2px solid var(--accent);
  background: repeating-linear-gradient(0deg, transparent 0 14px, #d9ed8007 14px 15px), var(--surface);
}
.mission .mission-title { color: var(--text); font-size: clamp(1.15rem, 2.2vw, 1.55rem); font-weight: 750; }
.piece-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(.3rem, 1vw, .65rem); margin-top: 1.25rem; }
.piece-grid span {
  display: grid;
  place-items: center;
  aspect-ratio: 1.15;
  min-height: 2.1rem;
  border: 1px solid #50603b;
  background: #1d2619;
  color: var(--accent);
  font: 700 clamp(.72rem, 1.3vw, .92rem)/1 var(--mono);
}

.advances { background: #151a14; border-block: 1px solid #293222; }
.feature-grid, .gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-grid { border: 1px solid var(--edge); }
.feature { min-width: 0; padding: clamp(1.25rem, 2.8vw, 2.25rem); }
.feature + .feature { border-left: 1px solid var(--edge); }
.feature p { max-width: 32ch; margin-top: .7rem; }
.feature-icon { position: relative; display: block; width: 1.8rem; height: 1.8rem; margin: 0 0 1.4rem; color: var(--accent); }
.icon-explore { border: 1px solid; border-radius: 50%; }
.icon-explore::before, .icon-explore::after { content: ''; position: absolute; inset: 46% -15%; background: currentColor; }
.icon-explore::after { inset: -15% 46%; }
.icon-puzzle { border: 1px solid; transform: scale(.9) rotate(45deg); }
.icon-puzzle::before { content: ''; position: absolute; inset: 30%; border: 1px solid; }
.icon-survive { background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 76%, 50% 100%, 0 76%); }
.icon-survive::before { content: ''; position: absolute; inset: 1px; background: #151a14; clip-path: inherit; }
.icon-survive::after { content: '+'; position: absolute; inset: 0; text-align: center; font: 700 1rem/1.65 var(--mono); }

.gallery-grid { gap: .95rem; }
.gallery-grid figure { min-width: 0; border: 1px solid var(--edge); background: var(--surface); }
.gallery-link { display: block; position: relative; overflow: hidden; }
.gallery-link img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; }
.gallery-link:hover img { filter: brightness(1.15); }
.gallery-link:focus-visible { z-index: 1; outline-offset: 1px; }
.gallery-expand { position: absolute; bottom: .65rem; right: .65rem; display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid #8b9970; background: #101410e8; color: var(--accent); }
.gallery-grid figcaption { padding: .75rem .9rem; color: var(--text); font: 700 .78rem/1.4 var(--mono); letter-spacing: .055em; text-transform: uppercase; }

.trailer { padding-top: 0; }
.trailer-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: clamp(17rem, 34vw, 28rem);
  padding: 1.5rem;
  border: 1px solid var(--edge);
  background: linear-gradient(#111712db, #111712eb), url('assets/subterraneo.webp') center 52% / cover;
  text-align: center;
}
.trailer-symbol { display: grid; place-items: center; width: 3.55rem; height: 3.55rem; margin-bottom: .4rem; border: 1px solid #718055; border-radius: 50%; color: var(--accent); }
.trailer-symbol .play-icon { margin-left: .18rem; border-block-width: .45rem; border-left-width: .69rem; }
.trailer-placeholder .trailer-status { color: var(--text); font: 400 clamp(2rem, 4.7vw, 3.3rem)/1.05 var(--display); text-transform: uppercase; }
.trailer-video { display: block; width: 100%; height: auto; aspect-ratio: 16/9; border: 1px solid var(--edge); background: #0c100d; }

.site-footer { border-top: 1px solid var(--edge); }
.footer-inner { gap: 1rem; padding-block: 1.55rem; }
.back-to-top { color: var(--muted); font: 700 .75rem/1.3 var(--mono); text-decoration: none; }

.lightbox {
  max-width: min(66rem, 100% - 1.5rem);
  max-height: 95dvh;
  padding: 0;
  border: 1px solid var(--edge);
  background: var(--background);
  color: var(--text);
}
.lightbox::backdrop { background: #080c09e8; }
.lightbox-inner { padding: .6rem; }
.lightbox img { width: auto; max-height: 78dvh; }
.lightbox p { padding: .6rem .3rem .2rem; }
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border: 1px solid #768663;
  background: #101410ed;
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--accent); }

@media (max-width: 48rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; gap: 0; min-height: 4rem; padding-block: .75rem; }
  .site-nav { flex-basis: 100%; flex-wrap: wrap; gap: .3rem .95rem; padding-top: .9rem; }
  .site-nav a { padding-block: .65rem; }
  .menu-enhanced .menu-toggle { display: flex; align-items: center; gap: .55rem; min-height: 2.5rem; padding: .4rem .7rem; border: 1px solid var(--edge); background: transparent; color: var(--text); cursor: pointer; }
  .menu-enhanced .menu-toggle span { color: var(--accent); font-size: 1rem; }
  .menu-enhanced .menu-toggle[aria-expanded='true'] span { transform: rotate(45deg); }
  .menu-enhanced .menu-toggle[aria-expanded='false'] + .site-nav { display: none; }
  .hero { min-height: 34rem; }
  .hero-inner { padding-block: 4.5rem; }
  .hero h1 { font-size: clamp(2.62rem, 10.6vw, 5.3rem); }
  .hero::after { background: linear-gradient(90deg, #0b100de0, #0b100d52), linear-gradient(0deg, #101410 0%, transparent 57%); }
  .hero-credit { right: 1rem; }
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .mission { max-width: 32rem; }
  .section-heading { align-items: start; flex-direction: column; gap: .75rem; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 33rem) {
  .hero { min-height: 33rem; }
  .eyebrow { gap: .45rem; letter-spacing: .1em; }
  .feature-grid, .gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .feature + .feature { border-left: 0; border-top: 1px solid var(--edge); }
  .feature-icon { margin-bottom: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
