/* PlayTanki — design 2 (2026-10-06): tactical night. Self-hosted display font (Barlow Condensed, SIL OFL 1.1, see
   fonts/OFL.txt), system fonts for text, no external resources. No inline styles anywhere (the CSP forbids them). */

@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/barlow-condensed-latin-800-normal.woff2") format("woff2"); }

:root {
  --bg: #090d0a;
  --bg-2: #0d130f;
  --panel: #111a14;
  --panel-2: #16211a;
  --glass: rgba(14, 21, 16, 0.62);
  --line: rgba(214, 235, 214, 0.09);
  --line-2: rgba(214, 235, 214, 0.17);
  --text: #eef3ea;
  --text-2: #c3cec0;
  --muted: #8d9c8e;
  --accent: #ffb02e;
  --accent-2: #ffcf73;
  --accent-ink: #1c1304;
  --accent-glow: rgba(255, 176, 46, 0.32);
  --live: #45e08f;
  --danger: #ff6b57;
  --dm: #ff6b57;
  --tdm: #ffb02e;
  --ctf: #4fa8ff;
  --cp: #45e08f;
  --jgr: #b48cff;
  --radius: 16px;
  --header: 72px;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; }

.skip {
  position: absolute; left: -9999px; top: 10px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip:focus { left: 16px; }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.top.scrolled, .top.solid {
  background: rgba(9, 13, 10, 0.84);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-badge {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(145deg, #2b2412, #141008);
  border: 1px solid rgba(255, 176, 46, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 176, 46, 0.06), 0 8px 24px rgba(0, 0, 0, 0.4);
}
.brand-badge svg { width: 28px; height: 28px; color: var(--accent); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 27px; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1; }
.brand-name b { color: var(--accent); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--text-2); text-decoration: none; padding: 8px 14px; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.07em; text-transform: uppercase;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav .nav-cta { color: var(--accent-ink); background: var(--accent); margin-left: 6px; }
.nav .nav-cta:hover { color: var(--accent-ink); background: var(--accent-2); }
@media (max-width: 720px) {
  :root { --header: 62px; }
  .brand-name { font-size: 23px; }
  .brand-badge { width: 36px; height: 36px; }
  .brand-badge svg { width: 24px; height: 24px; }
  .nav a { font-size: 15px; padding: 7px 12px; }
  .nav a:not(.nav-cta) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 940px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--header) + 40px);
}
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-img {
  position: absolute; inset: -4%;
  background: url("img/hero.jpg") 64% 42% / cover no-repeat;
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-2%, -1.5%, 0); }
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 13, 10, 0.96) 0%, rgba(9, 13, 10, 0.8) 40%, rgba(9, 13, 10, 0.25) 74%, rgba(9, 13, 10, 0.45) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(9, 13, 10, 0) 40%),
    radial-gradient(120% 90% at 72% 28%, transparent 42%, rgba(0, 0, 0, 0.55) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px);
}
.hero-inner { flex: 1; display: flex; align-items: center; padding: 24px 0 48px; }
.hero-copy { max-width: 760px; animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.live-pill {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: rgba(9, 13, 10, 0.6); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px;
}
.live-pill:hover { color: var(--text); border-color: rgba(69, 224, 143, 0.55); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
[data-state="online"] .dot { background: var(--live); animation: pulse 2.2s infinite; }
[data-state="offline"] .dot { background: var(--danger); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(69, 224, 143, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(69, 224, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(69, 224, 143, 0); }
}

.hero h1 { font-size: clamp(40px, 10.5vw, 108px); line-height: 0.88; margin: 0 0 26px; text-shadow: 0 6px 40px rgba(0, 0, 0, 0.45); }
.hero h1 .hl { color: var(--accent); }
@supports (-webkit-text-stroke: 2px #000) {
  .hero h1 .hl { color: rgba(255, 176, 46, 0.08); -webkit-text-stroke: 2px var(--accent); }
}
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-2); max-width: 560px; margin: 0 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 12px;
  font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 14px 36px var(--accent-glow); }
.btn-ghost { color: var(--text); border-color: var(--line-2); background: rgba(9, 13, 10, 0.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-2); }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0;
  background: var(--glass); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: rise 0.9s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.hero-stats div { display: flex; flex-direction: column; padding: 20px 26px 22px; border-left: 1px solid var(--line); }
.hero-stats div:first-child { border-left: 0; }
.hero-stats dt { order: 2; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.hero-stats dd { order: 1; margin: 0 0 4px; font-family: var(--display); font-weight: 800; font-size: clamp(36px, 5vw, 56px); line-height: 1; font-variant-numeric: tabular-nums; }
.hero-stats div:first-child dd { color: var(--accent); }
@media (max-width: 640px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats div { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; border-left: 0; border-top: 1px solid var(--line); padding: 14px 18px; }
  .hero-stats div:first-child { border-top: 0; }
  .hero-stats dd { font-size: 34px; margin: 0; }
}

/* ---------- Sections ---------- */
.section { padding-top: clamp(72px, 10vw, 128px); }
.section-head { max-width: 760px; margin-bottom: 34px; }
.kicker {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 14px;
  color: var(--accent); font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: 0.24em; text-transform: uppercase;
}
.kicker::before { content: ""; width: 30px; height: 2px; background: var(--accent); }
h2 { font-size: clamp(42px, 6.2vw, 72px); margin: 0 0 14px; }
.sub { color: var(--muted); margin: 0; font-size: 17px; }

/* ---------- Live board ---------- */
.live-board {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 3vw, 30px); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.board-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.board-title { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: 0.07em; text-transform: uppercase; }
.board-time { margin-left: auto; color: var(--muted); font-size: 14px; }
.battle-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
@media (max-width: 820px) { .battle-list { grid-template-columns: 1fr; } }
.battle {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "mode map count" "bar bar bar";
  gap: 8px 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line);
}
.battle .mode { grid-area: mode; }
.battle-map { grid-area: map; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.battle-count { grid-area: count; font-family: var(--display); font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.battle-bar { grid-area: bar; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.battle-bar .fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.battle.full .battle-bar .fill { background: linear-gradient(90deg, #ff8a3d, var(--danger)); }
.battle.full .battle-count { color: var(--accent-2); }
.mode {
  display: inline-grid; place-items: center; min-width: 48px; padding: 3px 8px; border-radius: 6px;
  font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: 0.08em; color: #0b0f0c; background: var(--muted);
}
.mode-DM { background: var(--dm); }
.mode-TDM { background: var(--tdm); }
.mode-CTF { background: var(--ctf); }
.mode-CP { background: var(--cp); }
.mode-JGR { background: var(--jgr); }
.board-empty { color: var(--muted); margin: 12px 0 0; }

/* ---------- Modes + features ---------- */
.modes { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 980px) { .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mode-card { position: relative; overflow: hidden; padding: 20px 18px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.mode-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); }
.mode-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--c); opacity: 0.08; }
.mode-tag { display: block; font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1; color: var(--c); }
.mode-card strong { display: block; margin-top: 10px; font-size: 15px; }
.mode-card .mode-desc { color: var(--muted); font-size: 14px; }
.m-dm { --c: var(--dm); }
.m-tdm { --c: var(--tdm); }
.m-ctf { --c: var(--ctf); }
.m-cp { --c: var(--cp); }
.m-jgr { --c: var(--jgr); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }
.feature {
  position: relative; padding: 28px 26px 26px; border-radius: var(--radius); border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(140deg, rgba(255, 176, 46, 0.5), rgba(255, 176, 46, 0) 38%, rgba(214, 235, 214, 0.08)) border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 22px 46px rgba(0, 0, 0, 0.42); }
.icon-tile {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 176, 46, 0.3), rgba(255, 176, 46, 0.06));
  border: 1px solid rgba(255, 176, 46, 0.35); color: var(--accent);
}
.icon-tile svg { width: 28px; height: 28px; }
.feature h3 { font-size: 28px; margin: 18px 0 8px; }
.feature p { margin: 0; color: var(--text-2); }

/* ---------- Gallery + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 18vw, 232px); gap: 12px; }
.shot {
  position: relative; padding: 0; margin: 0; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); font: inherit; text-align: left;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.shot:hover img, .shot:focus-visible img { transform: scale(1.06); }
.shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 48%); pointer-events: none; }
.shot-name { position: absolute; left: 16px; bottom: 12px; z-index: 1; font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: 0.05em; text-transform: uppercase; }
.shot-big { grid-column: span 2; grid-row: span 2; }
.shot-big .shot-name { font-size: 40px; left: 22px; bottom: 16px; }
@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 140px; }
  .shot-big .shot-name { font-size: 30px; }
}

.lightbox { padding: 0; border: 0; background: transparent; color: var(--text); max-width: min(1200px, 94vw); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(4, 6, 5, 0.9); }
.lightbox img { max-width: 100%; max-height: 82vh; margin: 0 auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.lightbox-title { margin: 12px 0 0; text-align: center; font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: 0.05em; text-transform: uppercase; }
.lb-btn {
  position: fixed; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(9, 13, 10, 0.75); color: var(--text); cursor: pointer; font: 700 26px/1 var(--body);
}
.lb-btn:hover { border-color: var(--accent); color: var(--accent); }
.lb-prev { left: 2vw; top: 50%; transform: translateY(-50%); }
.lb-next { right: 2vw; top: 50%; transform: translateY(-50%); }
.lb-close { right: 2vw; top: 2vh; }

/* ---------- Join ---------- */
.join-band {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: clamp(72px, 10vw, 128px); padding: clamp(64px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
}
.join-bg { position: absolute; inset: 0; z-index: -2; background: url("img/rio.jpg") center / cover no-repeat; }
.join-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(9, 13, 10, 0.96) 0%, rgba(9, 13, 10, 0.86) 52%, rgba(9, 13, 10, 0.66) 100%); }
.join-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .join-inner { grid-template-columns: 1fr; } }
.join-copy p { color: var(--text-2); margin: 0 0 14px; max-width: 560px; }
.join-copy .btn { margin-top: 14px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.steps li {
  counter-increment: step; position: relative; padding: 18px 20px 18px 78px; border-radius: 14px;
  background: rgba(14, 21, 16, 0.74); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1; color: var(--accent);
}
.steps strong { display: block; font-family: var(--display); font-weight: 700; font-size: 23px; letter-spacing: 0.03em; text-transform: uppercase; }
.steps span { color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
.foot { background: var(--bg-2); border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; padding: 44px 0 36px; align-items: start; }
.foot-brand p { margin: 10px 0 0; color: var(--muted); }
.foot-links { display: flex; gap: 22px; padding-top: 8px; }
.foot-links a { color: var(--text); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--accent); }
.foot-note { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Legal pages ---------- */
.legal { padding-top: calc(var(--header) + clamp(36px, 6vw, 72px)); max-width: 800px; }
.legal h1 { font-size: clamp(46px, 7vw, 76px); margin: 0 0 18px; }
.legal h2 { font-size: 30px; margin: 38px 0 10px; }
.legal p, .legal li { color: var(--text-2); }
.legal address { font-style: normal; color: var(--text-2); }
.legal .meta { color: var(--muted); font-size: 14px; margin-top: 40px; }
.legal + .foot { margin-top: clamp(64px, 9vw, 112px); }

/* ---------- Reveal on scroll (only with JavaScript: early.js sets .js) ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
