/* ==========================================================================
   BattleDirector - marketing site
   Aesthetic: 80s synthwave / cyberpunk terminal, built entirely from
   gradients, grids and glow. No photography required, no images beyond the
   product's own screenshots. No build step, no external requests.

   Palette from battledirector-icon.png: deep teal ground, cream text, the
   neon green focus brackets as primary accent, orange as the horizon burn.
   ========================================================================== */

:root {
  --ink:        #060F0E;
  --ink-2:      #0A1917;
  --ink-3:      #0F221F;
  --line:       #1B3B35;
  --teal:       #3E7A72;
  --cream:      #EFE8CE;
  --cream-dim:  #93A79F;
  --green:      #4CE86B;
  --green-dim:  rgba(76, 232, 107, 0.55);
  --orange:     #F26A21;
  --amber:      #F2A21F;

  --glow-green: 0 0 12px rgba(76, 232, 107, 0.45);
  --glow-text:  0 0 18px rgba(76, 232, 107, 0.35);

  --wrap:       1180px;
  --radius:     10px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.12; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); letter-spacing: -0.025em; font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}
.wrap--narrow { max-width: 760px; }
.center { text-align: center; }

.lede { font-size: 1.1rem; color: var(--cream-dim); }
.fine { font-size: 0.85rem; color: var(--cream-dim); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  text-shadow: var(--glow-text);
  margin-bottom: 1.1em;
}
.eyebrow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: var(--glow-green);
}
@media (prefers-reduced-motion: no-preference) {
  .eyebrow__dot { animation: pulse 2.4s ease-in-out infinite; }
}
@keyframes pulse { 50% { opacity: 0.25; } }

/* ============================ CRT OVERLAY =============================
   Scanlines + vignette across the whole page. Decorative only.
   ====================================================================== */

.crt {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.22) 0px,
      rgba(0, 0, 0, 0.22) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  mix-blend-mode: multiply;
}

/* ========================= SYNTHWAVE BACKDROP ==========================
   Horizon sun + infinite perspective grid. Pure CSS, no assets.
   ====================================================================== */

/* The horizon sits at the FOOT of the section so the backdrop never competes
   with the copy. --hz is where the grid meets the sky. */
.synth {
  --hz: 26%;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Scrim: keeps the top of the section clean ground for text. */
.synth::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    var(--ink) 0%,
    rgba(6, 15, 14, 0.80) 32%,
    rgba(6, 15, 14, 0.30) 62%,
    transparent 88%);
}

/* The sun, band-sliced the way every synthwave cover does it. Only the top
   of the disc clears the horizon. */
.synth__sun {
  position: absolute;
  left: 50%;
  bottom: var(--hz);
  transform: translateX(-50%);
  width: min(380px, 46vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(180deg,
    var(--orange) 0%,
    var(--amber) 45%,
    var(--green) 95%);
  opacity: 0.3;
  filter: drop-shadow(0 0 90px rgba(242, 106, 33, 0.35));
}
/* Ink bands eating into the lower half of the sun. */
.synth__sun::after {
  content: "";
  position: absolute;
  inset: 52% 0 0 0;
  background: repeating-linear-gradient(
    to bottom,
    var(--ink) 0px, var(--ink) 5px,
    transparent 5px, transparent 14px
  );
}

/* The horizon line the grid runs to. */
.synth__horizon {
  position: absolute;
  left: 0; right: 0;
  bottom: var(--hz);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  box-shadow: 0 0 26px 4px rgba(76, 232, 107, 0.4);
}

/* Perspective floor grid, scrolling toward the viewer. */
.synth__grid {
  position: absolute;
  left: -60%; right: -60%;
  bottom: 0;
  height: var(--hz);
  transform: perspective(220px) rotateX(72deg);
  transform-origin: 50% 100%;
  background-image:
    repeating-linear-gradient(to right,
      var(--green-dim) 0 1px, transparent 1px 70px),
    repeating-linear-gradient(to bottom,
      var(--green-dim) 0 1px, transparent 1px 70px);
  opacity: 0.7;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
}
@media (prefers-reduced-motion: no-preference) {
  .synth__grid { animation: grid-run 5s linear infinite; }
}
@keyframes grid-run { to { background-position: 0 70px, 0 70px; } }

/* The backdrop sun always sits behind body copy, so it stays a soft disc.
   The band slices live in the placeholder frames, where they are the subject
   rather than a stripe running through a paragraph. */
.synth__sun::after { display: none; }
.hero .synth__sun { opacity: 0.22; }

/* The closing section is shorter, so the horizon rides higher. */
.synth--closing { --hz: 30%; }
.synth--closing .synth__sun { opacity: 0.30; }

/* ------------------------------- header -------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 15, 14, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(76, 232, 107, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 40px; height: 40px;
  border-radius: 8px;
  filter: drop-shadow(0 0 10px rgba(76, 232, 107, 0.3));
}
.brand__name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-nav { display: flex; align-items: center; gap: 26px; }
.header-nav a:not(.btn) {
  color: var(--cream-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.header-nav a:not(.btn):hover { color: var(--green); text-decoration: none; }

@media (max-width: 760px) {
  .header-nav a:not(.btn) { display: none; }
}
/* Wordmark yields to the CTA on narrow screens; the mark carries the brand. */
@media (max-width: 430px) {
  .brand__name { display: none; }
  .header-nav .btn { font-size: 0.72rem; padding: 8px 13px; }
}

/* ------------------------------- buttons ------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.18s ease,
              background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--sm { padding: 9px 15px; font-size: 0.76rem; }
.btn--lg { padding: 15px 28px; font-size: 0.92rem; }

.btn--primary {
  background: var(--green);
  color: #05100C;
  box-shadow: 0 0 0 1px rgba(76, 232, 107, 0.5), 0 0 22px rgba(76, 232, 107, 0.35);
}
.btn--primary:hover {
  background: #6BF085;
  box-shadow: 0 0 0 1px rgba(76, 232, 107, 0.7), 0 0 34px rgba(76, 232, 107, 0.55);
}

/* Steam slot, promoted state. Unused until the store page is live. */
.btn--steam {
  background: var(--orange);
  color: #14090A;
  box-shadow: 0 0 0 1px rgba(242, 106, 33, 0.5), 0 0 22px rgba(242, 106, 33, 0.35);
}
.btn--steam:hover {
  background: #FF8038;
  box-shadow: 0 0 0 1px rgba(242, 106, 33, 0.7), 0 0 34px rgba(242, 106, 33, 0.55);
}

.btn--ghost {
  background: rgba(10, 25, 23, 0.6);
  color: var(--cream);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--teal); box-shadow: var(--glow-green); }

.is-pending {
  color: var(--cream-dim);
  cursor: default;
  pointer-events: none;
}
.is-pending::before {
  content: "";
  width: 7px; height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px rgba(242, 106, 33, 0.8);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.cta-row--center { justify-content: center; }

/* ---------------------------- glitch heading --------------------------- */

.glitch { position: relative; text-shadow: 0 0 28px rgba(76, 232, 107, 0.22); }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.glitch::before {
  color: var(--green);
  transform: translateX(-2px);
  opacity: 0.5;
  clip-path: inset(0 0 52% 0);
}
.glitch::after {
  color: var(--orange);
  transform: translateX(2px);
  opacity: 0.45;
  clip-path: inset(52% 0 0 0);
}
@media (prefers-reduced-motion: no-preference) {
  .glitch::before { animation: skew-a 7s steps(1) infinite; }
  .glitch::after  { animation: skew-b 7s steps(1) infinite; }
}
@keyframes skew-a {
  0%, 96%, 100% { transform: translateX(-2px); }
  97%           { transform: translateX(-6px); }
  98%           { transform: translateX(1px); }
}
@keyframes skew-b {
  0%, 96%, 100% { transform: translateX(2px); }
  97%           { transform: translateX(6px); }
  98%           { transform: translateX(-1px); }
}

/* -------------------------------- media -------------------------------- */

.media { position: relative; margin: 0; }

.media__el {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--ink-2);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.media--hero .media__el {
  box-shadow:
    0 0 0 1px rgba(76, 232, 107, 0.25),
    0 0 60px rgba(76, 232, 107, 0.18),
    0 24px 70px rgba(0, 0, 0, 0.6);
}

.media__tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 5px 11px;
  border-radius: 4px;
  background: rgba(6, 15, 14, 0.85);
  border: 1px solid rgba(76, 232, 107, 0.35);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  text-shadow: var(--glow-text);
}

.media__sound {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 4px;
  background: rgba(6, 15, 14, 0.85);
  border: 1px solid rgba(76, 232, 107, 0.35);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  text-shadow: var(--glow-text);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.media__sound:hover,
.media__sound:focus-visible {
  border-color: var(--green);
  box-shadow: var(--glow-green);
  outline: none;
}
.media__sound svg { flex: none; }
.media__sound .icon-on,
.media__sound .label-on { display: none; }
.media__sound.is-unmuted .icon-off,
.media__sound.is-unmuted .label-off { display: none; }
.media__sound.is-unmuted .icon-on,
.media__sound.is-unmuted .label-on { display: inline-flex; }

/* Camera targeting reticle - the focus brackets from the logo mark. */
.reticle__c {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--green);
  filter: drop-shadow(0 0 8px rgba(76, 232, 107, 0.7));
}
.reticle__c--tl { top: -1px;    left: -1px;  border-right: 0; border-bottom: 0; border-radius: var(--radius) 0 0 0; }
.reticle__c--tr { top: -1px;    right: -1px; border-left: 0;  border-bottom: 0; border-radius: 0 var(--radius) 0 0; }
.reticle__c--bl { bottom: -1px; left: -1px;  border-right: 0; border-top: 0;    border-radius: 0 0 0 var(--radius); }
.reticle__c--br { bottom: -1px; right: -1px; border-left: 0;  border-top: 0;    border-radius: 0 0 var(--radius) 0; }

@media (prefers-reduced-motion: no-preference) {
  .media--hero .reticle__c { animation: lock 4.5s ease-in-out infinite; }
}
@keyframes lock {
  0%, 88%, 100% { opacity: 1; }
  92%           { opacity: 0.2; }
}

/* --------------------------------- hero -------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(40px, 6vw, 76px) 0 clamp(48px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}

@media (min-width: 1000px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  }
}

.hero__copy h1 { margin-bottom: 0.45em; }
.hero__copy .lede { margin-bottom: 0; }

/* ------------------------------- sections ------------------------------ */

.section { position: relative; padding: clamp(60px, 8vw, 100px) 0; }
.section--alt {
  background: var(--ink-2);
  border-block: 1px solid var(--line);
}

.section__title {
  position: relative;
  display: inline-block;
  margin-bottom: 1.4em;
  padding-bottom: 0.5em;
  color: var(--cream);
  text-shadow: 0 0 24px rgba(76, 232, 107, 0.2);
}
.section__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
  box-shadow: 0 0 12px rgba(76, 232, 107, 0.5);
}

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  position: relative;
  padding: 26px 20px;
  background:
    linear-gradient(180deg, rgba(76, 232, 107, 0.035), transparent 45%),
    var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--green), transparent 70%);
  opacity: 0.6;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(76, 232, 107, 0.35);
  box-shadow: 0 0 30px rgba(76, 232, 107, 0.12);
}
.card p:last-child { margin-bottom: 0; }
.card p:not(.card__label) { color: var(--cream-dim); font-size: 0.96rem; }
/* Headline-only cards: no body copy, so the heading carries the card. */
.card h3:last-child {
  margin-bottom: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  text-wrap: balance;
}

.card__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0.85;
  margin-bottom: 1em;
}

.section--alt .card { background: var(--ink-3); }

/* ----------------------------- screenshots ----------------------------- */

/* Real app screenshots. Stacked full width rather than side by side - a
   1440px UI shrunk into a half-width column is unreadable, and an
   unreadable screenshot proves nothing. */
.shots {
  display: grid;
  gap: 40px;
}

.media--shot .media__el {
  aspect-ratio: auto;
  height: auto;          /* required - the width/height attrs would otherwise
                            pin the box to 900px and letterbox the image */
  object-fit: contain;
  background: var(--ink-3);
  padding: 8px;
}
.media--shot a { display: block; }
.media--shot a:hover .media__el {
  border-color: rgba(76, 232, 107, 0.4);
  box-shadow: 0 0 26px rgba(76, 232, 107, 0.14);
}

.shots figcaption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* ---------------------------- requirements ----------------------------- */

.reqs { margin: 0; }

.req {
  display: grid;
  gap: 4px 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.req:last-child { border-bottom: 1px solid var(--line); }

@media (min-width: 700px) {
  .req { grid-template-columns: 260px minmax(0, 1fr); align-items: baseline; }
}

.req dt {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  color: var(--green);
  text-shadow: var(--glow-text);
}
.req dd { margin: 0; color: var(--cream-dim); }

/* The punchline under the requirements table. */
.reqs__note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--green);
  text-shadow: var(--glow-text);
}

/* -------------------------------- prose -------------------------------- */

.prose h1 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); margin-bottom: 0.5em; }

.prose h2 {
  margin-top: 2em;
  margin-bottom: 0.7em;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  letter-spacing: 0.05em;
  color: var(--green);
  text-shadow: var(--glow-text);
}

.prose p { color: var(--cream-dim); }
.prose .lede {
  color: var(--cream);
  font-size: 1.15rem;
  margin-bottom: 2em;
  padding-bottom: 1.6em;
  border-bottom: 1px solid var(--line);
}
.prose em { color: var(--cream); font-style: normal; font-weight: 600; }
.prose .cta-row { margin-top: 2.4em; }

/* --------------------------------- faq --------------------------------- */

.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--cream);
  transition: color 0.15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--green); }

/* Chevron drawn in CSS - no icon font, no SVG. */
.faq summary::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 0.45em;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}
.faq details[open] > summary::before { transform: rotate(45deg); }
.faq details[open] > summary { color: var(--green); }

.faq details > p {
  margin: 0 0 1em 22px;
  color: var(--cream-dim);
  font-size: 0.97rem;
}
.faq details > p:last-child { margin-bottom: 20px; }

/* Sample commentary lines - quoted output, not prose. */
.faq .quote {
  margin-left: 22px;
  padding: 14px 18px;
  border-left: 2px solid var(--green);
  background: rgba(76, 232, 107, 0.05);
  border-radius: 0 6px 6px 0;
  color: var(--cream);
  font-size: 0.95rem;
  line-height: 1.9;
}

/* ------------------------------- closing ------------------------------- */

.closing {
  position: relative;
  isolation: isolate;
  border-top: 1px solid var(--line);
}
.closing .wrap { position: relative; z-index: 1; }

/* -------------------------------- footer ------------------------------- */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  background: var(--ink-2);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.footer-inner p { margin: 0; color: var(--cream-dim); font-size: 0.9rem; }
.footer-inner .brand__mark { border-radius: 6px; margin-bottom: 8px; }

/* ------------------------------ focus ring ----------------------------- */

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}
