/* Section layout. Mobile-first: the mock stacks at 768 and below and goes
 * two-column at 1280, so the hero switches layout at 1024px — between the two
 * frames the designers actually drew. */

/* ---------- Header ---------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.header__bar {
  height: 72px;
  background: var(--c-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--c-yellow);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  height: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--section-pad-x);
}

.header__logo img {
  width: clamp(140px, 11.8vw, 227px);
  height: auto;
}

.header__nav {
  display: none;
  align-items: center;
  gap: var(--sp-8);
}

.header__link {
  font-size: var(--fs-nav);
  line-height: 1.4;
  transition: color var(--dur-fast) var(--ease-out);
}

.header__link:hover {
  color: var(--c-yellow);
}

@media (min-width: 768px) {
  .header__nav { display: flex; }
}

/* Language switcher — a <details> so it works with JavaScript disabled. */
.lang {
  position: relative;
}

.lang__current {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--c-muted);
  border-radius: var(--sp-1);
  font-size: var(--fs-nav);
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.lang__current::-webkit-details-marker { display: none; }
.lang:hover .lang__current { border-color: var(--c-yellow); }

.lang__caret {
  width: 10px;
  height: 6px;
  transition: transform var(--dur-fast) var(--ease-out);
}

.lang[open] .lang__caret { transform: rotate(180deg); }

.lang__list {
  position: absolute;
  right: 0;
  top: calc(100% + var(--sp-2));
  min-width: 100%;
  padding: var(--sp-1);
  background: var(--c-section);
  border: 1px solid var(--c-hairline);
  border-radius: var(--sp-1);
}

.lang__list a {
  display: block;
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-nav);
  transition: color var(--dur-fast) var(--ease-out);
}

.lang__list a:hover { color: var(--c-yellow); }

/* The "powered by" tab hangs below the bar, merged into it as one shape in the
 * mock: the bar's line bends down into the tab and back up on rounded curves.
 * The mock draws two tabs with different slants — 245px wide at 360, 370px from
 * 768 up — so the template carries two drawings, switched at 768. Both are the
 * mock's own curves (the header `Union` node), moved 1px up to meet our bar
 * line, whose 2px border sits inside the bar rather than across its edge.
 *
 * The lockup sits on the tab's floor, ~9px above the line. A tab sized by the
 * viewport once shrank under the logo, which then sat on the line at every
 * width — the client's feedback of 2026-09-24. */
.ribbon {
  display: flex;
  justify-content: center;
  margin-top: -16px;
  pointer-events: none;
}

/* The box spans y 56-112 of the header: tall enough for the 43px desktop mark
 * to sit on the floor (bottom at 101) without overflowing its top. The grid row
 * hugs the mark; the label centres on it. */
.ribbon__inner {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  justify-content: center;
  align-content: end;
  align-items: center;
  column-gap: 7.8px;
  width: 245px;
  height: 56px;
  padding-bottom: 11px;
  pointer-events: auto;
}

/* Drawn 1:1 — each viewBox is in header pixels (y 69-112), centred on the tab.
 * The drawings are wider than this box, so base.css's svg width cap must not
 * reach them: shrunk to fit, the fill slid under the bar line and the line ran
 * straight through the tab. */
.ribbon__tab {
  position: absolute;
  top: 13px;
  left: 50%;
  height: 43px;
  max-width: none;
  translate: -50% 0;
  overflow: visible;
}

.ribbon__tab--sm { width: 280px; }
.ribbon__tab--lg { display: none; width: 404px; }

.ribbon__fill { fill: var(--c-bg); }

.ribbon__line {
  fill: none;
  stroke: var(--c-yellow);
  stroke-width: 2;
}

.ribbon__label,
.ribbon__mark {
  position: relative;
}

.ribbon__label {
  color: var(--c-yellow);
  font-size: var(--fs-ribbon);
  line-height: var(--lh-ribbon);
  white-space: nowrap;
}

.ribbon__mark {
  width: 122.5px;
  height: auto;
}

@media (min-width: 768px) {
  .ribbon__inner {
    width: 370px;
    column-gap: var(--sp-3);
  }

  .ribbon__tab--sm { display: none; }
  .ribbon__tab--lg { display: block; }
  .ribbon__mark { width: 187.7px; }
}

/* With white.market's URL configured the whole tab is the link — the mark alone
 * is a 122x28px target on a phone. The mock draws no hover; the tab lifting to
 * the surface tone is ours. */
.ribbon > a .ribbon__fill {
  transition: fill var(--dur-fast) var(--ease-out);
}

@media (hover: hover) {
  .ribbon > a:hover .ribbon__fill { fill: var(--c-surface); }
}

.ribbon > a:active .ribbon__fill { fill: var(--c-hairline); }

/* ---------- Burger + mobile menu -------------------------------------- */

.burger {
  display: inline-flex;
  padding: var(--sp-2);
}

/* Declared after .burger so it actually wins — the nav takes over at 768. */
@media (min-width: 768px) {
  .burger { display: none; }
}

.burger__box {
  display: grid;
  gap: 5px;
  width: 26px;
}

.burger__box i {
  display: block;
  height: 2px;
  background: var(--c-white);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.burger:hover .burger__box i { background: var(--c-yellow); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-10);
  background: rgb(1 1 1 / 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.menu__close {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--c-yellow);
}

.menu__close svg { width: 22px; height: 22px; }

.menu__nav {
  display: grid;
  gap: var(--sp-8);
  text-align: center;
}

.menu__nav a {
  font-family: var(--ff-text);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.menu__lang {
  display: flex;
  gap: var(--sp-4);
  font-size: var(--fs-nav);
}

.menu__lang a {
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--c-muted);
  border-radius: var(--sp-1);
}

/* ---------- Hero ------------------------------------------------------ */

.hero {
  position: relative;
  padding-bottom: var(--section-pad-y);
  isolation: isolate;
}

/* The magenta bloom the mock puts behind the operators. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 8%;
  right: -6%;
  width: min(792px, 76vw);
  aspect-ratio: 792 / 805;
  background: var(--c-magenta);
  opacity: 0.3;
  filter: blur(150px);
  border-radius: 50%;
  pointer-events: none;
}

/* No negative pull here: the sticky header is 72px of real layout plus the
 * ribbon hanging below it, and lifting the artwork under that crops the
 * operators' heads off — which is exactly what the mock does not do. */
.hero__art {
  position: relative;
  overflow-x: clip;
}

/* The operators are not centred in their own picture: the rifle on the right
 * widens the trimmed box, so centring the box set them left of centre — 28px
 * at 360, 43px at 768 (the client's feedback, 2026-09-24). The mock centres the
 * group: canvas x≈1833 of the 3840px original, 42.25% across our trimmed box
 * (763-3296, tools/images.py). The nudge is the rest of the way to 50%, in the
 * picture's own width so it holds at every size. The rifle tip goes past the
 * right edge, as it does in the mock. */
.hero__art img {
  width: 100%;
  height: auto;
  margin-inline: auto;
  max-width: 560px;
  translate: 7.75% 0;
}

/* The artwork fades into the page rather than ending on a hard edge. */
.hero__art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(180deg, rgb(1 1 1 / 0) 0%, var(--c-bg) 92%);
  pointer-events: none;
}

.hero__body {
  position: relative;
  margin-top: -8%;
  padding-inline: var(--section-pad-x);
  text-align: center;
}

.hero__title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--tracking-h1);
  text-transform: uppercase;
}

/* The mask the headline wipes up from. The vertical padding is cancelled by an
 * equal negative margin, so the clip box is taller than the line without
 * changing layout — otherwise a Cyrillic descender (Д, Ц) would be shaved. */
.hero__line {
  display: block;
  overflow: hidden;
  padding-block: 0.08em 0.12em;
  margin-block: -0.08em -0.12em;
}

.hero__line-in {
  display: block;
}

/* The mock sets the chevron as a separate vector sitting in the word gap before
 * FACEIT, so it needs the space on both sides that a real glyph would have. */
.hero__chevron {
  display: inline-block;
  width: 0.62em;
  height: 0.44em;
  margin-inline: 0.34em 0.1em;
  color: var(--c-faceit);
}

/* The chevron belongs to FACEIT: when the line breaks, both move down together,
 * as in the mock. Left loose it stayed at the end of the line above on phones
 * and tablets ("PLAY CS2 ON ◄" / "FACEIT"). */
.hero__faceit {
  white-space: nowrap;
}

.hero__lead {
  margin-top: var(--sp-6);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
}

/* fit-content plus start-aligned items: the block is centred as a whole while
 * the markers keep one shared left edge. Centring each row instead gives a
 * ragged left that reads as a mistake. */
.hero__points {
  display: grid;
  gap: var(--sp-3);
  width: fit-content;
  margin: var(--sp-10) auto 0;
  justify-items: start;
}

.hero__points li {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 19px);
  font-size: var(--fs-bullet);
  line-height: var(--lh-bullet);
  text-align: left;
}

.point__mark {
  flex: none;
  width: clamp(18px, 2.4vw, 32px);
  height: clamp(18px, 2.4vw, 32px);
  color: var(--c-yellow);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-7);
  margin-top: var(--sp-10);
}

.hero__more {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--dur-fast) var(--ease-out);
}

.hero__more:hover { color: var(--c-yellow); }

/* The link scrolls the page down and the mock gives no sign of that. One arrow,
 * nudging on hover, is the whole affordance. */
.hero__more-arrow {
  width: 0.58em;
  height: 0.66em;
  flex: none;
}

@media (min-width: 1024px) {
  /* The mock's hero is 890px from the very top of the page, with the header laid
   * over it. Ours starts below the header, so it is 890px less the header and
   * the next section begins where the mock's does. */
  .hero {
    min-height: calc(890px - var(--header-h));
    padding-bottom: 0;
    overflow: hidden;
  }

  /* The operators do not scale with the viewport; they get cropped by its right
   * edge. Left edge sits just past the text column, which ends at 51-52% in both
   * frames. They hang from the top, heads 24px under the header where the mock
   * has them (y 137), and the hero crops their legs under the fade as the mock
   * does — anchored to the floor, the heads would go under the header. */
  .hero__art {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 52%;
    right: auto;
    width: 808px;
    margin-top: 0;
    padding-top: var(--sp-6);
    display: flex;
    align-items: flex-start;
  }

  .hero__art img {
    max-width: none;
    width: 808px;
    height: auto;
    margin-inline: 0;
    translate: none;
  }

  /* The fade runs on to the page edge, as the mock's does: stopping at the
   * picture's box it left the magenta bloom lit beside it, a hard vertical seam
   * from ~1700px up. The hero's overflow cuts it at the edge. */
  .hero__art { overflow-x: visible; }
  .hero__art::after { height: 26%; right: -100vw; }

  /* The copy starts 32px under the header (the mock: y 143) on the same column
   * as every other section. The body used to add the header's height again and
   * put the section gutter inside an already centred container: the copy sat
   * 115px low — JOIN NOW below the fold at 1280x800 — and up to 104px right of
   * the page's column (2026-09-24). */
  .hero__body {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--section-pad-x));
    margin: 0 auto;
    padding-block: var(--sp-8) var(--sp-16);
    text-align: left;
  }

  .hero__title,
  .hero__lead { max-width: 640px; }

  .hero__lead { margin-top: var(--sp-10); }

  .hero__points { margin: var(--sp-16) 0 0; }

  .hero__actions { justify-content: flex-start; }
}

/* ---------- How to play ----------------------------------------------- */

.steps {
  background: var(--c-surface);
}

.steps__list {
  display: grid;
  gap: var(--sp-5);
  margin-top: var(--sp-15);
}

@media (min-width: 768px) {
  .steps__list { grid-template-columns: repeat(3, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 15px 15px 30px;
  background: var(--c-section);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform var(--dur-base) var(--ease-out);
}

/* A gradient border needs a painted layer; a plain border-color cannot hold one. */
.card::before,
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--border-card);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.card__media {
  display: block;
  overflow: hidden;
  border-radius: var(--r-media);
}

.card__media img {
  width: 100%;
  height: auto;
  transition: transform var(--dur-base) var(--ease-out);
}

.card__label {
  width: fit-content;
  margin-top: var(--sp-5);
  padding-bottom: var(--sp-1);
  border-bottom: 1px solid var(--c-yellow);
  color: var(--c-yellow);
  font-size: var(--fs-step-label);
  line-height: var(--lh-step-label);
}

.card__title {
  margin-top: var(--sp-4);
  font-family: var(--ff-text);
  font-weight: 700;
  font-size: var(--fs-card-title);
  line-height: var(--lh-card-title);
  text-transform: uppercase;
}

.card__body {
  margin-top: var(--sp-3);
  color: var(--c-muted);
  font-size: var(--fs-card-body);
  line-height: var(--lh-card-body);
}

/* ---------- Prizes ---------------------------------------------------- */

.prizes {
  background: var(--c-section);
}

/* The tiles follow the title directly: the leaderboard and giveaway labels that
 * sat between them were dropped by the client (2026-09-24). 60px is the gap the
 * 1920 frame — the only one already without them — leaves after the title. */
.prizes__tiles {
  display: grid;
  gap: var(--sp-5);
  margin-top: var(--sp-15);
  justify-items: center;
}

@media (min-width: 768px) {
  .prizes__tiles { grid-template-columns: repeat(3, 1fr); }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  max-width: 396px;
  aspect-ratio: 1;
  padding: var(--sp-5) var(--sp-3);
  background: var(--fill-tile);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out);
}

.tile__title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: var(--fs-tile);
  line-height: var(--lh-tile);
  color: var(--c-yellow);
  text-transform: uppercase;
  text-align: center;
}

.tile__media {
  position: relative;
  align-self: stretch;
  flex: 1;
  min-height: 0;
}

/* The artwork fills the space the tile leaves it and is contained inside it.
 * As a grid item its height: 100% had no definite row to resolve against, so
 * the height followed the width instead: up to 72px past the box, under the
 * "powered by" line and clipped by the tile's edge (measured 2026-09-23). */
.tile__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--dur-base) var(--ease-out);
}

.tile__by {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--c-white);
  font-size: var(--fs-micro);
  line-height: var(--lh-micro);
}

.tile__by img { width: clamp(70px, 8vw, 110px); height: auto; }

/* A tile whose "powered by" line is a link is a link as a whole: the anchor
 * keeps its place and its accessible name, and a pseudo-element stretches the
 * hit area over the tile. The yellow edge is the signal the language switcher
 * and the button already use — and what tells it apart from tiles that only lift. */
.tile > a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 2px solid transparent;
  border-radius: var(--r-card);
  transition: border-color var(--dur-fast) var(--ease-out);
}

@media (hover: hover) {
  .tile > a:hover::after { border-color: var(--c-yellow); }
}

/* Pressed: on a phone there is no hover, so this is the only feedback a tap gets. */
.tile:has(> a:active) {
  transform: scale(0.985);
  transition-duration: var(--dur-fast);
}

/* Focus rings the tile, like every other control, not the one line of text the
 * anchor occupies. Without :has() the anchor keeps the default ring. */
@supports selector(:has(a)) {
  .tile > a:focus-visible { outline: none; }

  .tile:has(> a:focus-visible) {
    outline: 2px solid var(--c-yellow);
    outline-offset: 3px;
  }
}

.prizes__legal {
  margin-top: var(--sp-12);
  color: var(--c-white);
  font-size: var(--fs-legal);
  line-height: var(--lh-legal);
  text-align: center;
}

/* ---------- Closing CTA + footer -------------------------------------- */

.closing {
  background: var(--c-section);
  text-align: center;
}

.closing__title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: var(--fs-section);
  line-height: var(--lh-section);
  text-transform: uppercase;
  max-width: 920px;
  margin-inline: auto;
}

.closing__action {
  margin-top: var(--sp-10);
}

.footer {
  padding: var(--sp-5) var(--section-pad-x);
  background: var(--c-bg);
  color: var(--c-muted);
  font-size: var(--fs-footer);
  line-height: var(--lh-footer);
  text-align: center;
}
