.brief-page {
  min-height: 100vh;
  margin: 0;

  background: #020506;

  color: #e9fff6;

  overflow-x: hidden;

  position: relative;
  isolation: isolate;
}

/* =========================================================
   RYE SPATIAL BACKGROUND
   ========================================================= */

.brief-spatial-bg {
  position: fixed;

  inset: 0;

  z-index: 0;

  overflow: hidden;

  pointer-events: none;

  background: #020506 url('/assets/images/page-bg/mission-brief-established-characters-20260825.webp') center center / cover no-repeat;
}

#brief-spatial-canvas {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  display: block;
}

/* Existing cinematic dark overlays */

.brief-spatial-bg::after {
  content: "";

  position: absolute;

  inset: 0;

  z-index: 2;

  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.66),
      rgba(0, 0, 0, 0.22) 48%,
      rgba(0, 0, 0, 0.5)
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.08),
      rgba(0, 0, 0, 0.68)
    );

  pointer-events: none;
}

.brief-spatial-motion-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 50;

  min-height: 44px;
  padding: 10px 14px;

  border: 1px solid rgba(216, 179, 95, 0.7);
  border-radius: 6px;

  background: rgba(0, 0, 0, 0.72);

  color: #d8b35f;

  font-family: "Courier New", Courier, monospace;
  font-size: 0.75rem;
  font-weight: 700;

  letter-spacing: 0.05em;
  text-transform: uppercase;

  cursor: pointer;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brief-spatial-motion-toggle[hidden] {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .brief-spatial-motion-toggle {
    display: none !important;
  }
}

/* Keep all site content above the spatial background */

.brief-shell,
.brief-page > header,
.brief-page > nav,
.brief-page > footer {
  position: relative;

  z-index: 10;
}

/* =========================================================
   MAIN TITLE
   ========================================================= */

.brief-page h1 {
  max-width: 760px;

  margin: 0 0 18px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(3.2rem, 7vw, 6.5rem);

  font-weight: 700;

  line-height: 1;

  letter-spacing: 0;

  color: yellow;

  -webkit-text-stroke: 1px black;

  text-shadow:
    0 2px 0 #000,
    0 16px 44px rgba(0, 0, 0, 0.62);
}

/* =========================================================
   PAGE SHELL
   ========================================================= */

.brief-shell {
  width: min(
    1120px,
    calc(100% - 32px)
  );

  margin: 0 auto;

  padding: 120px 0 56px;
}

/* =========================================================
   HERO
   ========================================================= */

.brief-hero {
  max-width: 860px;

  padding: 48px 0 32px;
}

.brief-kicker {
  display: inline-block;

  margin-bottom: 16px;

  padding: 7px 12px;

  border:
    1px solid
    rgba(216, 179, 95, 0.48);

  background:
    rgba(0, 0, 0, 0.55);

  color: #d8b35f;

  font-family:
    "Courier New",
    Courier,
    monospace;

  font-size: 0.78rem;

  letter-spacing: 1px;

  text-transform: uppercase;
}

.brief-lede {
  max-width: 760px;

  padding: 16px 20px;

  border-left:
    3px solid #c03a42;

  background:
    rgba(0, 0, 0, 0.48);

  color: #d8fff0;

  font-size: 1.15rem;

  line-height: 1.55;
}

/* =========================================================
   BRIEF GRID
   ========================================================= */

.brief-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 18px;
}

/* =========================================================
   PANELS
   ========================================================= */

.brief-panel {
  min-height: 0;

  padding: 20px;

  border:
    1px solid
    rgba(0, 255, 136, 0.28);

  border-radius: 8px;

  background:
    rgba(1, 13, 16, 0.46);

  box-shadow:
    0 18px 48px
    rgba(0, 0, 0, 0.38);

  backdrop-filter:
    blur(10px);

  -webkit-backdrop-filter:
    blur(10px);
}

.brief-panel-primary {
  border-color:
    rgba(192, 58, 66, 0.52);
}

/* =========================================================
   PANEL FILE CODE
   ========================================================= */

.brief-file-code {
  display: flex;

  width: fit-content;

  align-items: center;

  min-height: 28px;

  margin: 0 0 12px;

  padding: 5px 10px;

  border:
    1px solid
    rgba(0, 255, 136, 0.58);

  background:
    rgba(0, 0, 0, 0.58);

  color: #d8b35f;

  font-family:
    "Courier New",
    Courier,
    monospace;

  font-size: 0.72rem;

  font-weight: 800;

  letter-spacing: 0.08em;

  text-transform: uppercase;

  box-sizing: border-box;
}

/* =========================================================
   PANEL HEADINGS
   ========================================================= */

.brief-panel h2 {
  margin: 2px 0 12px;

  color: #f6f0e5;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 1.05rem;

  line-height: 1.18;

  letter-spacing: 0;
}

/* =========================================================
   PANEL TEXT
   ========================================================= */

.brief-panel p {
  margin: 0 0 14px;

  background: transparent;

  color: #d5fff0;

  line-height: 1.58;
}

.brief-panel p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   ACTIONS
   ========================================================= */

.brief-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 16px;

  justify-content: center;

  padding: 36px 0 0;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  #brief-spatial-canvas {
    transform: none;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 760px) {

  .brief-shell {
    width:
      min(
        100% - 20px,
        620px
      );

    padding-top: 96px;
  }

  .brief-grid {
    grid-template-columns: 1fr;
  }

  .brief-panel {
    min-height: 0;

    padding: 18px;
  }

  .brief-lede {
    font-size: 1rem;
  }
}
