:root {
  --ink: #f0eee7;
  --muted: #aaa9a3;
  --red: #9f191d;
  --red-bright: #d13635;
  --gold: #b29c6e;
  --black: #050606;
  --panel: rgba(8, 10, 10, 0.76);
  --line: rgba(240, 238, 231, 0.2);
  --pointer-x: 50%;
  --pointer-y: 50%;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--black);
  font-family: "Segoe UI", Arial, sans-serif;
}

button, a { font: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: .75rem 1rem;
  color: #050606;
  background: var(--ink);
  transform: translateY(-150%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); }

.cinematic-background,
.cinematic-background video,
.color-wash,
.vignette,
.film-grain,
.scanline {
  position: fixed;
  inset: 0;
}

.cinematic-background { z-index: -2; background: #050606; }

.cinematic-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.56) contrast(1.17) brightness(.7);
  transform: scale(1.025);
}

.color-wash {
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), transparent 0 16%, rgba(0, 0, 0, .16) 53%, rgba(0, 0, 0, .58) 100%),
    linear-gradient(90deg, rgba(1, 5, 6, .76) 0%, rgba(1, 5, 6, .12) 44%, rgba(8, 3, 3, .5) 100%),
    linear-gradient(180deg, rgba(1, 4, 4, .72) 0%, transparent 24%, transparent 58%, rgba(2, 4, 4, .9) 100%);
  mix-blend-mode: multiply;
}

.vignette {
  box-shadow: inset 0 0 16vw 3vw rgba(0, 0, 0, .78);
  background: linear-gradient(115deg, rgba(58, 8, 9, .12), transparent 45% 75%, rgba(99, 12, 12, .08));
}

.film-grain {
  opacity: .16;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(circle at 17% 31%, rgba(255,255,255,.3) 0 1px, transparent 1px 4px),
    repeating-radial-gradient(circle at 71% 63%, rgba(255,255,255,.2) 0 1px, transparent 1px 5px);
  background-size: 7px 9px, 11px 13px;
  mix-blend-mode: soft-light;
  animation: grain .22s steps(2) infinite;
}

.scanline {
  height: 14%;
  opacity: .12;
  background: linear-gradient(transparent, rgba(205, 221, 214, .22), transparent);
  animation: scan 8s linear infinite;
}

.site-header,
.site-footer {
  position: fixed;
  z-index: 10;
  left: 0;
  width: 100%;
  display: grid;
  align-items: center;
  gap: 1.5rem;
  padding-inline: clamp(1.25rem, 4vw, 4.75rem);
  text-transform: uppercase;
  letter-spacing: .15em;
}

.site-header {
  top: 0;
  grid-template-columns: 1fr auto 1fr;
  min-height: 6.5rem;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(180deg, rgba(2, 3, 3, .64), transparent);
}

.ordem-brand { width: fit-content; display: block; }
.ordem-brand img {
  display: block;
  width: clamp(108px, 10vw, 165px);
  max-height: 70px;
  object-fit: contain;
  filter: invert(1) drop-shadow(0 2px 15px rgba(0,0,0,.65));
  opacity: .88;
}

.signal-status {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .61rem;
  color: #c7c5be;
}

.signal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 0 5px rgba(209, 54, 53, .12), 0 0 17px var(--red-bright);
  animation: pulse 2.2s ease-in-out infinite;
}

.signal-code { color: #74756f; }

.sound-toggle {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: .75rem;
  border: 0;
  padding: .6rem 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .58rem;
}

.sound-toggle:hover, .sound-toggle:focus-visible { color: var(--ink); }
.sound-toggle:focus-visible, .enter-button:focus-visible, .ordem-brand:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 5px; }

.sound-icon { display: flex; align-items: center; gap: 2px; height: 14px; }
.sound-icon i { width: 2px; height: 3px; background: currentColor; transition: height .2s ease; }
.sound-toggle[aria-pressed="true"] .sound-icon i:nth-child(1) { height: 8px; animation: sound 1s ease-in-out infinite; }
.sound-toggle[aria-pressed="true"] .sound-icon i:nth-child(2) { height: 14px; animation: sound 1.25s ease-in-out -.4s infinite; }
.sound-toggle[aria-pressed="true"] .sound-icon i:nth-child(3) { height: 9px; animation: sound .85s ease-in-out -.15s infinite; }

.hero {
  width: 100%;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  align-items: end;
  gap: clamp(2rem, 7vw, 8rem);
  padding: 9rem clamp(1.25rem, 4vw, 4.75rem) 7rem;
}

.title-block {
  align-self: end;
  max-width: 850px;
  padding-bottom: clamp(1rem, 7vh, 6rem);
  text-shadow: 0 4px 24px #000;
}

.overline,
.operation-label,
.file-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .33em;
  font-weight: 600;
  font-size: clamp(.58rem, .7vw, .72rem);
}

.overline { color: #bbb8ae; opacity: 0; animation: reveal .9s .9s ease forwards; }
.overline span { color: var(--red-bright); }

h1 {
  position: relative;
  margin: .35rem 0 .7rem;
  width: fit-content;
  text-transform: uppercase;
  font-family: "Arial Narrow", "Bahnschrift Condensed", Impact, sans-serif;
  font-size: clamp(4.4rem, 10.5vw, 10rem);
  font-weight: 700;
  line-height: .78;
  letter-spacing: -.035em;
  color: transparent;
  background: linear-gradient(105deg, #aaa79f 8%, #f1eee5 34%, #fff 45%, #8d8b85 58%, #e7e4db 78%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,.7));
  opacity: 0;
  transform: translateY(22px);
  animation:
    title-in 1.15s .28s cubic-bezier(.16,.8,.2,1) forwards,
    title-shimmer 7s 1.6s ease-in-out infinite;
}

h1::before,
h1::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

h1::before {
  color: rgba(188, 20, 25, .48);
  text-shadow: -4px 0 rgba(110, 6, 12, .45), 4px 0 rgba(183, 187, 176, .13);
  clip-path: inset(18% 0 54% 0);
  animation: title-glitch 5.5s 1.8s steps(1, end) infinite;
}

h1::after {
  color: transparent;
  -webkit-text-stroke: 1px rgba(177, 31, 33, .45);
  transform: translate(5px, 3px);
  clip-path: inset(54% 0 27% 0);
  animation: title-fracture 5.5s 1.8s steps(1, end) infinite;
}

.subtitle {
  margin: 0;
  color: #d2cfc5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.35vw, 1.35rem);
  font-style: italic;
  line-height: 1.5;
  opacity: 0;
  animation: reveal .9s 1.05s ease forwards;
}

.title-rule { display: flex; align-items: center; gap: .7rem; max-width: 380px; margin: 1.5rem 0 .75rem; opacity: 0; animation: reveal .9s 1.2s ease forwards; }
.title-rule span { height: 1px; flex: 1; background: linear-gradient(90deg, var(--red), rgba(180, 175, 160, .2)); }
.title-rule span:last-child { background: linear-gradient(90deg, rgba(180, 175, 160, .2), var(--red)); }
.title-rule i { width: 8px; height: 8px; border: 1px solid var(--red-bright); transform: rotate(45deg); }
.operation-label { color: #8f918b; letter-spacing: .19em; opacity: 0; animation: reveal .9s 1.3s ease forwards; }

.briefing-card {
  position: relative;
  width: 100%;
  max-width: 510px;
  justify-self: end;
  padding: clamp(1.35rem, 2.4vw, 2.25rem);
  border: 1px solid var(--line);
  border-top-color: rgba(209, 54, 53, .58);
  background: linear-gradient(145deg, rgba(16, 17, 16, .82), rgba(5, 7, 7, .7));
  box-shadow: 0 24px 80px rgba(0,0,0,.46), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(12px) saturate(.7);
  opacity: 0;
  transform: translateX(25px);
  animation: card-in 1s .72s cubic-bezier(.16,.8,.2,1) forwards;
}

.briefing-card::before,
.briefing-card::after {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  pointer-events: none;
}
.briefing-card::before { top: -1px; left: -1px; border-top: 2px solid var(--red-bright); border-left: 2px solid var(--red-bright); }
.briefing-card::after { right: -1px; bottom: -1px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); }

.briefing-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1.15rem; border-bottom: 1px solid var(--line); }
.file-label { color: #797a75; letter-spacing: .17em; }
.briefing-heading h2 { margin: .35rem 0 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(1.6rem, 2vw, 2.1rem); }
.classification { padding: .36rem .48rem; border: 1px solid rgba(209,54,53,.55); color: #f0b1af; background: rgba(125,15,18,.2); text-transform: uppercase; letter-spacing: .17em; font-size: .52rem; }

.briefing-copy { padding: 1rem 0 .3rem; }
.briefing-copy p { margin: 0 0 .78rem; color: #bbb9b1; font-family: Georgia, "Times New Roman", serif; font-size: clamp(.84rem, .86vw, .98rem); line-height: 1.58; }
.briefing-copy strong { color: #e8e5dc; font-weight: 600; }
.briefing-copy em { color: #e07a76; font-style: normal; }

.mission-data {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: .9rem 0 1.1rem;
  border-block: 1px solid var(--line);
}
.mission-data div { padding: .72rem .45rem; border-right: 1px solid var(--line); }
.mission-data div:first-child { padding-left: 0; }
.mission-data div:last-child { border-right: 0; }
.mission-data span, .mission-data strong { display: block; text-transform: uppercase; }
.mission-data span { margin-bottom: .28rem; color: #74756f; font-size: .5rem; letter-spacing: .16em; }
.mission-data strong { color: #ccc9c0; font-size: .62rem; letter-spacing: .08em; }
.mission-data .danger { color: #de625f; }

.enter-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: .85rem 1rem;
  border: 1px solid rgba(209,54,53,.65);
  color: #f0e9df;
  background: linear-gradient(90deg, rgba(135, 15, 18, .55), rgba(72, 7, 8, .14));
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .66rem;
  transition: border-color .2s ease, background .2s ease, padding .2s ease;
}
.enter-button:hover { padding-left: 1.25rem; border-color: var(--red-bright); background: linear-gradient(90deg, rgba(158,20,23,.82), rgba(72,7,8,.32)); }
.arrow { font-size: 1.2rem; font-weight: 300; }

.site-footer {
  bottom: 0;
  grid-template-columns: 1fr auto 1fr;
  min-height: 3.75rem;
  border-top: 1px solid rgba(255,255,255,.09);
  color: #666862;
  background: rgba(3, 4, 4, .48);
  font-size: .5rem;
}
.site-footer span:last-child { justify-self: end; }
.site-footer .warning { color: #b24d4b; }
.site-footer .fan-disclaimer {
  max-width: 470px;
  justify-self: end;
  text-align: right;
  letter-spacing: .08em;
  line-height: 1.45;
  text-transform: none;
}

.loading-screen {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.2rem;
  background: #050606;
  transition: opacity .8s ease, visibility .8s ease;
}
.loading-screen.is-hidden { opacity: 0; visibility: hidden; }
.loading-screen p { margin: 0; color: #777973; text-transform: uppercase; letter-spacing: .32em; font-size: .6rem; }
.loading-mark { width: 31px; height: 31px; border: 1px solid #682023; transform: rotate(45deg); animation: loader 1.6s ease-in-out infinite; }

@keyframes grain { 0% { transform: translate(0); } 25% { transform: translate(-2%, 1%); } 50% { transform: translate(1%, -2%); } 75% { transform: translate(2%, 2%); } }
@keyframes scan { from { transform: translateY(-120%); } to { transform: translateY(850%); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }
@keyframes sound { 50% { height: 3px; } }
@keyframes reveal { to { opacity: 1; } }
@keyframes title-in { to { opacity: 1; transform: translateY(0); } }
@keyframes title-shimmer {
  0%, 68%, 100% { background-position: 100% 50%; }
  82% { background-position: 0 50%; }
}
@keyframes title-glitch {
  0%, 84%, 88%, 92%, 100% { transform: translate(0); opacity: .48; }
  85% { transform: translate(-8px, 1px); opacity: .75; }
  86% { transform: translate(6px, -2px); clip-path: inset(61% 0 15% 0); }
  89% { transform: translate(3px, 1px); clip-path: inset(9% 0 72% 0); }
  90% { transform: translate(-4px, 0); opacity: .25; }
}
@keyframes title-fracture {
  0%, 84%, 91%, 100% { transform: translate(5px, 3px); }
  85% { transform: translate(14px, 3px); clip-path: inset(42% 0 36% 0); }
  87% { transform: translate(-7px, 1px); clip-path: inset(67% 0 12% 0); }
  89% { transform: translate(9px, -1px); clip-path: inset(25% 0 57% 0); }
}
@keyframes card-in { to { opacity: 1; transform: translateX(0); } }
@keyframes loader { 50% { transform: rotate(135deg) scale(.65); border-color: #c82b2e; } }

@media (max-width: 1000px) {
  body { overflow-y: auto; }
  .site-header { grid-template-columns: 1fr auto; }
  .signal-status { display: none; }
  .hero { grid-template-columns: 1fr; align-items: end; gap: 2.5rem; padding-top: 8rem; padding-bottom: 6rem; }
  .title-block { min-height: 60svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 0; }
  .briefing-card { justify-self: start; max-width: 640px; }
  .site-footer { position: relative; grid-template-columns: auto 1fr; padding-block: .85rem; }
  .site-footer .warning { display: none; }
  .site-footer .fan-disclaimer { max-width: 560px; }
}

@media (max-width: 620px) {
  .site-header { min-height: 5rem; padding-inline: 1rem; }
  .ordem-brand img { width: 102px; }
  .sound-label { display: none; }
  .hero { padding: 6.5rem 1rem 2.25rem; }
  .title-block { min-height: 68svh; }
  h1 { font-size: clamp(3.65rem, 19.2vw, 6rem); }
  .overline { letter-spacing: .23em; }
  .subtitle { max-width: 300px; }
  .briefing-card { padding: 1.25rem; backdrop-filter: blur(16px); }
  .briefing-heading { align-items: center; }
  .briefing-heading h2 { font-size: 1.65rem; }
  .classification { display: none; }
  .briefing-copy p { font-size: .9rem; }
  .mission-data { grid-template-columns: 1fr; }
  .mission-data div, .mission-data div:first-child { padding: .65rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .mission-data div:last-child { border-bottom: 0; }
  .site-footer { padding: 1rem; min-height: auto; grid-template-columns: 1fr; line-height: 1.5; }
  .site-footer > span:first-child { display: none; }
  .site-footer .fan-disclaimer { display: block; justify-self: start; text-align: left; }
  .cinematic-background video { object-position: 52% center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .film-grain, .scanline { display: none; }
}

@supports not (backdrop-filter: blur(12px)) {
  .briefing-card { background: rgba(8, 10, 10, .93); }
}
