/* Game Arena promo - shared layout for the gallery-video family (09-13).
 *
 * Class vocabulary is borrowed from the references: a masthead with a spec
 * strip, an evidence rail, category sections with visible slide counts, a
 * compare block, and a standings register. Concepts supply palette and choose
 * which sections to use.
 */

/* ===========================================================
   MASTHEAD - brand plus a spec strip, no navigation bar
   =========================================================== */

/* The language control floats; it is not part of a bar. */
.lang {
  position: fixed;
  top: 20px;
  right: max(20px, env(safe-area-inset-right));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn, 4px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 11px;
}

@media (max-width: 640px) { .lang { top: 14px; right: 14px; } }

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 22px 0 0;
  padding-right: 96px;
}

@media (max-width: 640px) { .masthead { padding-right: 84px; } }

.masthead__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.masthead__brand em { font-style: normal; color: var(--accent); }

.masthead__mark {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: none;
  border-radius: var(--r-mark, 3px);
  background: var(--accent);
  color: var(--accent-ink);
}

.masthead__mark svg { width: 12px; height: 12px; }


/* ===========================================================
   RAIL - the counts, on rules
   =========================================================== */

.rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 46px;
}

@media (max-width: 880px) { .rail { grid-template-columns: repeat(2, 1fr); } }

.rail__c { padding: 22px 20px 24px; border-left: 1px solid var(--line); }
.rail__c:first-child { border-left: 0; }

@media (max-width: 880px) {
  .rail__c:nth-child(odd) { border-left: 0; }
  .rail__c:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

.rail__v {
  font-family: var(--font-mono);
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.rail__k {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ===========================================================
   SECTION FURNITURE
   =========================================================== */

.head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
}

/* a real slide count, as the reference galleries use */
.count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* ===========================================================
   CLIP CARD
   =========================================================== */

.clip { position: relative; }

.clip__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card, 4px);
  background: var(--surface);
  cursor: pointer;
}

.clip__frame video,
.clip__frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.clip--tall .clip__frame video { aspect-ratio: 4 / 3; }
.clip--wide .clip__frame video { aspect-ratio: 2 / 1; }

.clip__toggle {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 9px;
  border: 1px solid #ffffff2e;
  border-radius: var(--r-btn, 4px);
  background: #05070ad4;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f2f5f7;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.clip__toggle:hover { background: #05070af2; border-color: var(--accent); }

.clip__icon { display: grid; place-items: center; width: 13px; height: 13px; }
.clip__icon svg { width: 13px; height: 13px; }

/* the pause glyph only shows while playing */
.clip__icon .i-pause { display: none; }
.clip.is-playing .clip__icon .i-play { display: none; }
.clip.is-playing .clip__icon .i-pause { display: inline; }

.clip.is-playing .clip__label::after { content: ""; }
.clip__dur {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 3px 7px;
  border-radius: 3px;
  background: #05070ab8;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #c8d2da;
}

.clip.is-playing .clip__toggle,
.clip.is-playing .clip__dur { opacity: 0; transition: opacity 0.3s ease 0.4s; }

.clip:hover .clip__toggle,
.clip:hover .clip__dur { opacity: 1; transition-delay: 0s; }

.clip__cap { margin-top: 11px; }

.clip__t { font-size: 14.5px; font-weight: 600; letter-spacing: -0.012em; }

.clip__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* ===========================================================
   GALLERY GRIDS
   =========================================================== */

.wall { display: grid; gap: 34px 22px; margin-top: 34px; }

.wall--2 { grid-template-columns: repeat(2, 1fr); }
.wall--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 980px) { .wall--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .wall--2, .wall--3 { grid-template-columns: 1fr; }
}

/* a horizontal snap rail, for the many-samples sections */
.railx {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 30%);
  gap: 18px;
  margin-top: 30px;
  padding-bottom: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.railx > * { scroll-snap-align: start; }

@media (max-width: 900px) { .railx { grid-auto-columns: minmax(240px, 74%); } }

/* ===========================================================
   COMPARE - the route into the arena
   =========================================================== */

.compare {
  margin-top: 60px;
  border: 1px solid var(--line);
  border-radius: var(--r-card, 4px);
  background: var(--surface);
  overflow: hidden;
}

.compare__top { padding: 28px 30px 26px; }

.compare__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 24px;
}

.outcomes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 24px;
}

@media (max-width: 760px) { .outcomes { grid-template-columns: repeat(2, 1fr); } }

.outcome {
  display: grid;
  gap: 3px;
  place-items: center;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn, 4px);
  background: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
}

.outcome__k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); }

@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.steps__c { padding: 24px 26px 26px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.steps__c:first-child { border-left: 0; }

@media (max-width: 860px) {
  .steps__c { border-left: 0; }
  .steps__c:first-child { border-top: 0; }
}

.steps__n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.1em; }
.steps__t { margin-top: 8px; font-size: 15.5px; font-weight: 620; letter-spacing: -0.014em; }
.steps__d { margin-top: 7px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* ===========================================================
   STANDINGS
   =========================================================== */

.stand {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-card, 4px);
  background: var(--surface);
  padding: 18px 8px 4px;
}

.stand .table th:first-child, .stand .table td:first-child { padding-left: 14px; }
.stand .table th:last-child,  .stand .table td:last-child  { padding-right: 14px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid color-mix(in srgb, var(--warn) 42%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--warn);
  white-space: nowrap;
}

.bar {
  position: relative;
  width: 74px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.bar span { position: absolute; inset: 0 auto 0 0; background: var(--accent); }

/* ===========================================================
   CTA
   =========================================================== */

.cta {
  margin-top: 50px;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-card, 4px);
  background: var(--surface2);
  display: flex;
  flex-wrap: wrap;
  gap: 22px 36px;
  align-items: center;
  justify-content: space-between;
}

.cta__acts { display: flex; flex-wrap: wrap; gap: 11px; }
