/* Clash Esports: the shared look of every page except the branch picker (css/chooser.css).
   Red vs blue.
   One ground (near black), one ink, and the two team colours of the brand. Red is the action colour;
   blue answers it. They meet edge to edge, never blend. */

:root {
  --bg: #08080a;
  --surface: #131317;
  --surface-2: #1e1e23;
  --ink: #f3f3f1;
  --muted: #a9a9b0;
  --red: #e5232f;
  --red-strong: #ff3946;
  --blue: #1f6bff;
  --blue-strong: #4a88ff;
  --yellow: #f5c518;
  --accent: var(--red);
  --accent-ink: #ffffff;

  /* scene tokens (assets/scenes) */
  --ground: var(--bg);

  --font-display: "Barlow Condensed", "Cairo", system-ui, sans-serif;
  --font-text: "Cairo", system-ui, sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  --step-head: clamp(2.5rem, 1.3rem + 4.6vw, 5.25rem);
  --step-display: clamp(72px, 12.2vw, 260px);

  --margin: clamp(16px, 2.2vw, 32px);
  --gutter: clamp(12px, 1.6vw, 24px);
  --section: clamp(96px, 12vw, 200px);
  --bar: 64px;
  /* the iPhone status bar and home bar (0 elsewhere); the header grows by the first, the footer by the second */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bar-full: calc(var(--bar) + var(--safe-top));

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);
  --t-press: 120ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--bar-full); background: var(--surface); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.6;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-strong); outline-offset: 3px; }
::selection { background: var(--red); color: var(--accent-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 700; }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--red); color: var(--accent-ink); padding: 8px 16px; z-index: 60; }
.skip:not(:focus) { clip-path: inset(50%); }
.skip:focus { top: 8px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  background: var(--red); color: var(--accent-ink);
  font-weight: 800; font-size: var(--step-body); text-decoration: none; white-space: nowrap;
  border: 0; border-radius: 0; cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.btn:active { transform: scale(0.97); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: var(--step-small); }
.btn-ink { background: var(--bg); color: var(--ink); }
.link, .link-quiet {
  text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 2px;
  text-decoration-color: currentColor; font-weight: 600;
  transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease;
}
.link-quiet { text-decoration-color: transparent; font-size: var(--step-small); padding: 10px 4px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--red-strong); }
  .btn-ink:hover { background: var(--ink); color: var(--bg); }
  .link:hover { color: var(--blue-strong); }
  .link-quiet:hover { text-decoration-color: currentColor; }
}

/* ---------- header ---------- */
.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  height: var(--bar-full); padding: var(--safe-top) var(--margin) 0;
  background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: var(--step-lead); letter-spacing: 0.02em; line-height: 1; }
.nav { margin-inline-start: auto; }
.nav-links { display: flex; gap: clamp(16px, 2vw, 32px); }
.nav-links a { text-decoration: none; font-size: var(--step-small); font-weight: 600; padding: 10px 0; display: inline-block; transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--red-strong); } }
.bar-actions { display: flex; align-items: center; gap: 12px; }
.lang {
  background: none; border: 0; cursor: pointer; font-family: var(--font-display); font-weight: 700;
  font-size: 1rem; min-width: 44px; min-height: 44px; transition: color var(--t-hover) ease;
}
.lang:hover { color: var(--blue-strong); }
.menu-toggle { display: none; background: none; border: 0; min-height: 44px; padding: 0 4px; font-weight: 600; font-size: var(--step-small); cursor: pointer; }

/* ---------- headings ---------- */
.h-big { font-weight: 800; font-size: var(--step-head); line-height: 1.12; letter-spacing: -0.01em; max-width: 20ch; text-wrap: balance; }
.h-mid, .h-small { font-weight: 800; font-size: var(--step-lead); line-height: 1.3; }
.lead { font-size: var(--step-lead); line-height: 1.45; font-weight: 600; max-width: 34ch; }

/* ---------- footer: dark; red meets blue in a thin line along its top ---------- */
.foot {
  position: relative; overflow: hidden;
  background: var(--surface); color: var(--ink);
  padding: var(--section) var(--margin) var(--safe-bottom);
}
.foot::before, .foot::after { content: ""; position: absolute; top: 0; height: 4px; z-index: 0; }
.foot::before { inset-inline: 0 50%; background: var(--red); }
.foot::after { inset-inline: 50% 0; background: var(--blue); }
.foot .btn-ink { background: var(--red); color: var(--accent-ink); }
.foot > * { position: relative; z-index: 1; }
.foot-top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 48px; align-items: start; }
.foot-invite { grid-column: 1 / 6; display: grid; gap: 32px; justify-items: start; }
.foot-invite h2 { font-weight: 800; font-size: var(--step-head); line-height: 1.15; max-width: 10ch; }
.foot-branch { grid-column: 7 / 10; display: grid; gap: 10px; align-content: start; }
.foot-branch + .foot-branch { grid-column: 10 / 13; }
.foot-branch h3 { font-weight: 800; font-size: var(--step-lead); }
.foot-branch ul { display: grid; gap: 6px; }
.foot-social { grid-column: 7 / 13; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.foot a { text-decoration: none; font-weight: 600; }
.foot li a { display: inline-block; padding: 4px 0; }
@media (hover: hover) and (pointer: fine) { .foot a:not(.btn):hover { text-decoration: underline; text-underline-offset: 0.3em; } }
.foot-legal { padding-top: 64px; font-size: var(--step-small); }
.foot-name {
  display: flex; justify-content: center;
  font-family: "Barlow Condensed", sans-serif; font-weight: 700;
  font-size: 41vw; line-height: 0.8; letter-spacing: -0.03em; /* the cropped name, the page's one giant size */
  white-space: nowrap; color: var(--surface-2);
  pointer-events: none; /* decoration only: never sits on top of the footer links' clicks */
  margin: 0 calc(var(--margin) * -1) -0.18em;
}

/* ---------- whatsapp ---------- */
.wa {
  position: fixed; bottom: calc(20px + var(--safe-bottom)); inset-inline-end: 20px; z-index: 45;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #0c0c0d;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); /* floats over the page (taste-skill-ignore) */
  transition: transform var(--t-press) var(--ease-out), opacity 250ms ease;
}
.wa svg { width: 30px; height: 30px; }
.wa:active { transform: scale(0.94); }
.wa.is-away { opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity 250ms ease, visibility 0s 250ms, transform 250ms ease; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- English ---------- */
[lang="en"] .h-big, [lang="en"] .foot-invite h2 {
  font-family: "Barlow Condensed", sans-serif; font-weight: 700; text-transform: uppercase; line-height: 0.95; letter-spacing: -0.01em;
}
[lang="en"] .h-big { max-width: 18ch; }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 16px; }
  .foot-invite { grid-column: 1 / 13; }
  .foot-branch { grid-column: 1 / 7; }
  .foot-branch + .foot-branch { grid-column: 7 / 13; }
  .foot-social { grid-column: 1 / 13; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .bar { gap: 8px; }
  .brand span { display: none; }
  .menu-toggle { display: inline-block; }
  .nav { position: absolute; top: var(--bar-full); inset-inline: 0; margin: 0; }
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    background: var(--surface); padding: 8px var(--margin) 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5); /* open menu overlay (taste-skill-ignore) */
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px 0; font-size: var(--step-body); display: block; }
  .bar-actions { margin-inline-start: auto; gap: 4px; }
  .bar-actions .link-quiet { display: none; }

  .foot-invite h2 { font-size: clamp(2.6rem, 12vw, 3.5rem); }
  .foot-invite .btn { width: 100%; }
  .foot-branch, .foot-branch + .foot-branch, .foot-social { grid-column: 1 / 13; }
  .foot-name { font-size: 46vw; }
  /* footer and legal links: a 40 px hit area (padding, not a bigger font) */
  .foot-legal a, .foot li a, .foot-branch h3 a, .foot-social a:not(.btn) { display: inline-flex; align-items: center; min-height: 40px; }
}

/* ---------- arriving from another page: it fades in from dark ---------- */
@media (prefers-reduced-motion: no-preference) {
  html[data-arrive] body::after {
    content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
    background: var(--bg);
    animation: arrive 380ms ease both;
  }
}
@keyframes arrive { from { opacity: 1; } to { opacity: 0; } }
