/* ============================================================================
   Random & Unfair Battlefields — landing page
   Rebuilt from design_handoff_landing_page. Every colour, size and spacing
   value below comes from that handoff; the desktop layout is the design to
   the pixel. The @media blocks at the foot are additions — the design is
   desktop-only and says so.

   ⚠️ --accent is the one theme knob. Everything gold reads it.
   ⚠️ No border-radius anywhere except circles. The design is square-cornered
      on purpose; adding a radius here changes the whole character of it.
   ============================================================================ */

/* ---- fonts -------------------------------------------------------------- */
/* Latin subset only — the copy is English plus ©, ↑, ‹, ›, all of which the
   latin subset carries. ↗ is not in it and falls back to the system sans,
   which is what you want for an arrow glyph anyway. */
@font-face {
  font-family: Saira;
  src: url(/fonts/saira-var-latin.woff2) format('woff2');
  font-weight: 100 900;      /* variable file: one download covers 500/700/800 */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url(/fonts/barlow-300-latin.woff2) format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url(/fonts/barlow-400-latin.woff2) format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url(/fonts/barlow-500-latin.woff2) format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---- tokens ------------------------------------------------------------- */
:root {
  --accent: #e8c07a;
  --accent-hover: #fff2da;
  --accent-bright: #fbe3b8;

  --bg: #120b0b;
  --panel: #1a0f0e;

  --text: #d8c6bb;
  --heading: #f3e2cd;
  --body: #c0aa9e;
  --muted: #b6866a;
  --dim: #8a6653;

  --line-soft: rgba(232, 192, 122, .14);
  --line: rgba(232, 192, 122, .18);
  --line-mid: rgba(232, 192, 122, .28);
  --line-strong: rgba(232, 192, 122, .45);

  --card-a: linear-gradient(120deg, rgba(32, 18, 16, .9), rgba(22, 13, 12, .6));
  --card-b: linear-gradient(240deg, rgba(32, 18, 16, .9), rgba(22, 13, 12, .6));

  --header-h: 104px;
  --maxw: 1320px;
  --pad: 56px;
  --gap: 34px;
  --hero-vh: 92vh;

  --sans: Saira, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif-body: Barlow, "Helvetica Neue", Helvetica, Arial, sans-serif;

  color-scheme: dark;
}

/* ---- base --------------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }   /* this is what makes the nav links glide */
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); }

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

::selection { background: var(--accent); color: var(--panel); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 100;
  padding: 12px 18px;
  font-family: var(--sans); font-size: 12px; letter-spacing: .18em;
  background: var(--panel); color: var(--accent);
  border: 1px solid var(--line-strong);
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

/* ---- header ------------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; padding: 0 48px; height: var(--header-h);
  background: linear-gradient(180deg, rgba(18, 11, 11, .96) 0%, rgba(18, 11, 11, .75) 60%, rgba(18, 11, 11, 0) 100%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.header-logo {
  display: block; width: 168px; height: 60px; flex: none;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.header-logo.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.header-logo img { width: 100%; height: 100%; object-fit: contain; }

.nav {
  display: flex; flex: 1; gap: 44px;
  justify-content: center; align-items: center;
  padding-right: 168px;      /* offsets the logo so the links read as centred */
}
.nav a {
  font-family: var(--sans); font-weight: 700; font-size: 14px;
  letter-spacing: .22em; color: var(--accent);
}
.nav a:hover, .nav a:focus-visible { color: var(--accent-hover); }
.nav__nowrap { white-space: nowrap; }

/* Hidden on desktop; the phone breakpoint at the foot turns it on. */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 0; flex: none;
  background: rgba(28, 15, 14, .7); border: 1px solid var(--line-strong);
  color: var(--accent); cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 5px; }
.nav-toggle__bars span { display: block; width: 18px; height: 2px; background: currentColor; }

/* ---- hero --------------------------------------------------------------- */
.hero {
  position: relative; min-height: var(--hero-vh);
  display: flex; align-items: center; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .6s ease;
}
.hero__video.is-playing { opacity: 1; }

/* Light on purpose — it must not crush the footage. */
.hero__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(12, 7, 7, .12) 0%, rgba(12, 7, 7, .34) 70%, rgba(12, 7, 7, .6) 100%);
}
.hero__fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 220px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 11, 11, 0), var(--bg));
}

/* Trip point for the header logo. 62% down the hero, matching the design. */
.hero__sentinel { position: absolute; top: 62%; left: 0; width: 1px; height: 1px; pointer-events: none; }

.hero__content {
  position: relative; pointer-events: none;   /* so drags land on the video */
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 150px var(--pad) 90px;
}
.hero__inner {
  max-width: 820px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}

.hero__logo { margin: 0; position: relative; }
/* ⚠️ farthest-side matters — the default sizing clips and leaves visible
   vertical edges on the darkening ellipse behind the logo. */
.hero__logo::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: 112%; height: 135%; pointer-events: none;
  background: radial-gradient(ellipse farthest-side at center, rgba(8, 4, 4, .6) 0%, rgba(8, 4, 4, .4) 45%, rgba(8, 4, 4, .16) 75%, rgba(8, 4, 4, 0) 100%);
}
.hero__logo img {
  position: relative; width: 100%; max-width: 680px; height: auto;
  filter: drop-shadow(0 8px 40px rgba(0, 0, 0, .85));
}

.hero__actions {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; margin-top: 16px; pointer-events: auto;
}
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.btn-row--sub { align-items: center; gap: 10px; }

.btn {
  display: flex; align-items: center; gap: 14px; padding: 15px 30px;
  font-family: var(--sans); font-weight: 800; font-size: 13px; letter-spacing: .16em;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn--play {
  color: var(--accent); background: rgba(28, 15, 14, .7);
  border-color: var(--line-strong);
}
.btn--play:hover, .btn--play:focus-visible {
  color: var(--accent); background: rgba(56, 28, 22, .85); border-color: var(--accent);
}
.btn--disabled {
  color: #8d8079; background: rgba(58, 52, 49, .55);
  border-color: rgba(141, 128, 121, .4); cursor: not-allowed;
}
/* Generic four-pane mark, deliberately NOT Microsoft's licensed logo. */
.win-glyph { display: grid; grid-template-columns: 8px 8px; grid-template-rows: 8px 8px; gap: 3px; }
.win-glyph span { background: #8d8079; }

.trailer {
  display: flex; align-items: center; gap: 14px; padding: 8px 6px;
  font-family: var(--sans); font-weight: 700; font-size: 14px;
  letter-spacing: .2em; color: #e6d3c2;
}
.trailer:hover, .trailer:focus-visible { color: var(--accent-hover); }
.trailer__icon {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(232, 192, 122, .6);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.trailer__tri {
  width: 0; height: 0; margin-left: 3px;      /* optically centres the triangle */
  border-left: 10px solid var(--accent);
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}

.socials {
  display: flex; align-items: center; gap: 12px;
  padding-left: 14px; margin-left: 8px;
  border-left: 1px solid rgba(232, 192, 122, .2);
}
.social {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  border: 1px solid rgba(232, 192, 122, .35);
  background: rgba(20, 11, 11, .55);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  transition: background .18s ease, border-color .18s ease;
}
.social:hover, .social:focus-visible {
  color: var(--accent); border-color: var(--accent); background: rgba(56, 28, 22, .85);
}
/* Until a real URL is set in main.js these point nowhere — don't let them
   jump the page to the top. */
.social[aria-disabled="true"], .tile[aria-disabled="true"] { cursor: default; }

/* ---- shared section furniture ------------------------------------------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: 90px var(--pad) 110px;
  scroll-margin-top: var(--header-h);
}
.section--features { padding-top: 30px; }   /* it follows the hero */
.section--howto { padding-top: 20px; }
.section--contact { padding-bottom: 40px; }

.rule { display: flex; align-items: center; gap: 30px; margin-bottom: 70px; }
.rule::before, .rule::after { content: ''; height: 1px; flex: 1; }
.rule::before { background: linear-gradient(90deg, rgba(232, 192, 122, 0), rgba(232, 192, 122, .55)); }
.rule::after { background: linear-gradient(90deg, rgba(232, 192, 122, .55), rgba(232, 192, 122, 0)); }
.rule h2 {
  margin: 0; text-align: center;
  font-family: var(--sans); font-weight: 800; font-size: 44px;
  letter-spacing: .18em; color: var(--accent);
}
.rule--sm { margin-bottom: 60px; }
.rule--xs { margin-bottom: 26px; }

.eyebrow {
  font-family: var(--sans); font-size: 11px; letter-spacing: .34em; color: var(--muted);
}
.eyebrow--block { display: block; margin-bottom: 22px; }

.lede {
  margin: 0 auto 46px; max-width: 640px; text-align: center;
  font-size: 16px; line-height: 1.85; font-weight: 300; color: var(--body);
}

/* ---- features ----------------------------------------------------------- */
.features { display: flex; flex-direction: column; gap: var(--gap); }

/* ⚠️ minmax(0,1fr), not 1fr — a plain 1fr lets the image column blow out
   its track. */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap); align-items: stretch;
}
.feature__media {
  position: relative; min-width: 0; overflow: hidden; min-height: 340px;
  border: 1px solid var(--line); background: var(--panel);
}
.feature__media img { width: 100%; height: 100%; object-fit: cover; }

.feature__body {
  padding: 44px 48px;
  background: var(--card-a);
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column; justify-content: center;
}
/* Flipped rows put the text first, so the light edge of the gradient still
   faces the image. */
.feature--flip .feature__media { order: 2; }
.feature--flip .feature__body { order: 1; background: var(--card-b); }

.feature__num {
  font-family: var(--sans); font-size: 12px; letter-spacing: .34em;
  color: var(--muted); margin-bottom: 14px;
}
.feature__body h3 {
  margin: 0 0 16px;
  font-family: var(--sans); font-weight: 700; font-size: 30px;
  letter-spacing: .06em; color: var(--heading);
}
.feature__body p {
  margin: 0; max-width: 760px;
  font-size: 16px; line-height: 1.85; font-weight: 300; color: var(--body);
}

/* ---- how to play -------------------------------------------------------- */
.video-frame {
  position: relative; max-width: 1060px; margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-mid); background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.video-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; display: block; background: #000;
}

/* ---- gallery ------------------------------------------------------------ */
.gallery {
  background: linear-gradient(180deg, var(--bg), var(--panel) 50%, var(--bg));
  padding: 90px 0 110px;
  scroll-margin-top: var(--header-h);
}
.gallery__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.carousel { position: relative; }

.rail {
  display: flex; gap: 18px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding-bottom: 4px; cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
/* Snapping fights a pointer drag, so both come off while one is in progress. */
.rail.is-dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }

.card {
  flex: 0 0 calc((100% - 36px) / 3);   /* three across, minus two 18px gaps */
  position: relative; min-width: 0; overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line); background: var(--panel);
  scroll-snap-align: start;
}
.card img {
  width: 100%; height: 100%; object-fit: cover;
  user-select: none; -webkit-user-drag: none;
}

.arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(232, 192, 122, .4);
  background: rgba(18, 11, 11, .9); color: var(--accent);
  font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s ease, border-color .18s ease;
}
.arrow:hover, .arrow:focus-visible { border-color: var(--accent); background: rgba(56, 28, 22, .95); }
.arrow--prev { left: -24px; }
.arrow--next { right: -24px; }

.dots { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(232, 192, 122, .5); background: transparent; cursor: pointer;
}
.dots button[aria-selected="true"] { background: var(--accent); }

/* ---- contact ------------------------------------------------------------ */
.contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: start; }
.contact__col { display: flex; flex-direction: column; gap: 6px; }

.contact__email {
  font-family: var(--sans); font-size: 21px; letter-spacing: .02em; color: var(--heading);
}
.contact__email:hover, .contact__email:focus-visible { color: var(--accent); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border: 1px solid rgba(232, 192, 122, .22); background: rgba(32, 18, 16, .6);
  font-family: var(--sans); font-size: 13px; letter-spacing: .18em; color: var(--accent);
  transition: background .18s ease, border-color .18s ease;
}
.tile:hover, .tile:focus-visible { color: var(--accent); border-color: var(--accent); background: rgba(56, 28, 22, .8); }
.tile__arrow { color: var(--dim); }

.footer {
  margin-top: 80px; padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-family: var(--sans); font-size: 11px; letter-spacing: .28em; color: var(--dim);
}
.footer a { color: var(--dim); }
.footer a:hover, .footer a:focus-visible { color: var(--accent); }

/* ============================================================================
   RESPONSIVE — additions, not part of the original design.
   Desktop above 1180px is untouched by everything below.
   ============================================================================ */

/* Laptops / small desktops: pull the gutters and the biggest type in. */
@media (max-width: 1180px) {
  :root { --pad: 40px; --gap: 26px; }
  .site-header { padding: 0 28px; }
  .nav { gap: 30px; padding-right: 140px; }
  .header-logo { width: 140px; height: 50px; }
  .rule h2 { font-size: 36px; letter-spacing: .14em; }
  .rule { gap: 22px; margin-bottom: 56px; }
  .feature__body { padding: 36px 34px; }
  .feature__body h3 { font-size: 26px; }
}

/* Tablets: one column everywhere, two gallery cards. */
@media (max-width: 980px) {
  .section { padding: 70px var(--pad) 80px; }
  .gallery { padding: 70px 0 80px; }

  .feature { grid-template-columns: 1fr; gap: 0; }
  /* Image always above the text once stacked, whichever way the row runs. */
  .feature__media, .feature--flip .feature__media { order: 0; min-height: 0; aspect-ratio: 3 / 2; }
  .feature__body, .feature--flip .feature__body { order: 1; border-top: 0; }

  .card { flex-basis: calc((100% - 18px) / 2); }

  .contact { grid-template-columns: 1fr; gap: 40px; }

  .hero__content { padding: 130px var(--pad) 80px; }
}

/* Phones: nav collapses to a menu, one gallery card, arrows move inboard. */
@media (max-width: 760px) {
  :root { --pad: 22px; --header-h: 78px; --hero-vh: 82vh; }

  .site-header { padding: 0 16px; gap: 12px; }
  .header-logo { width: 118px; height: 42px; }

  .nav-toggle { display: flex; order: 3; }
  .nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px 0 12px;
    /* Solid, not 98%: the hero logo is bright white and ghosts straight
       through even a 2% gap. */
    background: #150c0c;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 15px 22px; font-size: 13px; }

  .hero__content { padding: 108px var(--pad) 64px; }
  .hero__logo img { max-width: 380px; }
  .hero__actions { gap: 20px; }
  .btn { padding: 14px 22px; font-size: 12px; }
  /* Once the pair wraps to two lines, content-sized buttons come out ragged. */
  .btn-row:not(.btn-row--sub) { width: 100%; max-width: 340px; }
  .btn-row:not(.btn-row--sub) .btn { flex: 1 1 100%; justify-content: center; }
  .btn-row--sub { flex-direction: column; gap: 16px; }
  .socials { border-left: 0; padding-left: 0; margin-left: 0; }

  .section { padding: 54px var(--pad) 62px; }
  .section--features { padding-top: 20px; }
  .gallery { padding: 54px 0 62px; }

  .rule { gap: 14px; margin-bottom: 40px; }
  .rule h2 { font-size: 26px; letter-spacing: .1em; }
  .rule--xs { margin-bottom: 20px; }

  .feature__body { padding: 28px 24px; }
  .feature__body h3 { font-size: 22px; }
  .lede { margin-bottom: 32px; }

  .card { flex-basis: 100%; }
  .arrow { width: 44px; height: 44px; }
  .arrow--prev { left: 8px; }
  .arrow--next { right: 8px; }

  .tiles { grid-template-columns: 1fr; }
  .contact__email { font-size: 18px; word-break: break-word; }

  .footer { margin-top: 54px; justify-content: center; text-align: center; }
}

/* ---- reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rail { scroll-behavior: auto; }
}
