/*
Theme Name: QAF
Description: Сайт Qazaq Airsoft Federation (qaf.pkb.kz): о федерации, турниры и команды с сайта турнира, контакты.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: qaf
*/

/* Палитра федерации: тёмно-синий, бирюзовый QAF и золото медалей. Тема одна, тёмная. */
:root {
	color-scheme: dark;
	--bg: #08111a;
	--panel: #0f1b27;
	--panel-2: #132331;
	--line: #203547;
	--text: #ecf3f8;
	--muted: #95a9b9;
	--accent: #19c3e6;
	--accent-ink: #04131a;
	--gold: #e5b552;
	--radius: 14px;
	--font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: "Unbounded", "Manrope", system-ui, sans-serif;
	--header: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2.5rem, 1200px); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; margin-bottom: .6rem; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
section { padding: clamp(56px, 9vw, 100px) 0; border-top: 1px solid var(--line); }
section.alt { background: var(--panel); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); max-width: 52ch; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none; transition: transform .15s, filter .15s; }
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }

/* Шапка */
.header { position: sticky; top: 0; z-index: 50; background: rgb(8 17 26 / .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar .header { top: var(--wp-admin--admin-bar--height, 32px); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header); }
.brand img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 700; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav .btn { margin-left: 8px; padding: 10px 16px; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 700; }
@media (max-width: 1080px) {
	.menu-btn { display: block; }
	.nav { position: fixed; inset: var(--header) 0 auto; flex-direction: column; align-items: stretch; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
	.nav.open { display: flex; }
	.nav .btn { margin: 8px 0 0; }
}

/* Первый экран */
.hero { border-top: 0; position: relative; overflow: hidden; padding-bottom: 0; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
	radial-gradient(600px 380px at 85% 10%, rgb(25 195 230 / .18), transparent 70%),
	radial-gradient(500px 300px at 0% 90%, rgb(229 181 82 / .1), transparent 70%),
	repeating-linear-gradient(115deg, transparent 0 38px, rgb(255 255 255 / .018) 38px 39px); }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero-logo { width: clamp(150px, 20vw, 240px); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.1rem, 5.6vw, 4.2rem); font-weight: 800; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.next-card { display: grid; gap: 6px; padding: 26px; border-radius: 20px; text-decoration: none; color: var(--text);
	background: linear-gradient(160deg, rgb(25 195 230 / .16), rgb(15 27 39 / .9) 55%); border: 1px solid rgb(25 195 230 / .4); transition: transform .2s, border-color .2s; }
.next-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.next-card strong { font: 800 clamp(1.5rem, 3vw, 2rem)/1.1 var(--display); }
.next-card > span { color: var(--muted); }
.tag { justify-self: start; display: inline-block; padding: 4px 10px; border-radius: 99px; background: rgb(25 195 230 / .14); color: var(--accent) !important; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.countdown { display: flex; gap: 8px; margin: 10px 0 4px; }
.countdown > span { display: grid; justify-items: center; min-width: 58px; padding: 8px 6px; border-radius: 10px; background: rgb(8 17 26 / .7); border: 1px solid var(--line); font-size: .7rem; color: var(--muted); text-transform: uppercase; }
.countdown b { font: 800 1.5rem/1.1 var(--display); color: var(--gold); }
.next-more { color: var(--accent) !important; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(40px, 7vw, 72px); border-top: 1px solid var(--line); }
.stats > div { display: grid; padding: 22px 0 26px 22px; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; padding-left: 0; }
.stats b { font: 800 clamp(1.8rem, 4vw, 2.6rem)/1 var(--display); color: var(--accent); }
.stats span { color: var(--muted); margin-top: 6px; }
@media (max-width: 860px) {
	.hero-grid { grid-template-columns: 1fr; }
	.stats { grid-template-columns: 1fr 1fr; }
	.stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
	.stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* О федерации */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.about-grid p { color: var(--muted); font-size: 1.08rem; }
.goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.goals li { padding: 16px 18px 16px 52px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); position: relative; font-weight: 700; }
.goals li::before { content: ""; position: absolute; left: 18px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent); box-shadow: inset 0 0 0 4px var(--panel), inset 0 0 0 10px var(--accent); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* Турниры */
.tournaments { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 20px; }
.tournament { display: grid; grid-template-columns: 170px 1fr; overflow: hidden; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); }
.tournament img { width: 100%; height: 100%; object-fit: cover; }
.tournament-body { display: grid; gap: 4px; align-content: start; justify-items: start; padding: 22px; }
.tournament h3 { margin: 6px 0 2px; font-size: 1.5rem; }
.tournament p { margin: 0; }
.when { color: var(--gold); font-weight: 800; }
.meter { width: 100%; height: 6px; margin: 10px 0 2px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.tournament .btn { margin-top: 12px; }
@media (max-width: 520px) { .tournament { grid-template-columns: 1fr; } .tournament img { aspect-ratio: 16 / 9; } }

/* Команды */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filters button { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.teams { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.teams li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); transition: border-color .2s; }
.teams li:hover { border-color: var(--accent); }
.teams li[hidden] { display: none; }
.teams img, .team-initials { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #000; }
.team-initials { display: grid; place-items: center; font: 800 1.2rem var(--display); color: var(--accent); background: var(--panel-2); }
.teams strong { display: block; font-family: var(--display); font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.teams li > div > span { display: block; color: var(--muted); font-size: .9rem; }
.badges { display: flex !important; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.badge { font-style: normal; font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgb(25 195 230 / .14); color: var(--accent); }
.badge-milsim { background: rgb(229 181 82 / .14); color: var(--gold); }
.team-insta { align-self: start; font-size: .75rem; font-weight: 800; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px 7px; }
.team-insta:hover { color: var(--accent); border-color: var(--accent); }

/* Дисциплины */
.disciplines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.disciplines article { overflow: hidden; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); }
.disciplines img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.disciplines h3 { margin: 18px 20px 6px; }
.disciplines p { margin: 0 20px 22px; color: var(--muted); }
@media (max-width: 860px) { .disciplines { grid-template-columns: 1fr; } }

/* Награды */
.awards { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; align-items: center; }
.awards p { color: var(--muted); font-size: 1.05rem; }
.awards img { border-radius: 50%; filter: drop-shadow(0 18px 40px rgb(229 181 82 / .25)); }
@media (max-width: 860px) { .awards { grid-template-columns: 1fr 1fr; } .awards > div { grid-column: 1 / -1; } }

/* Новости */
.news { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.news-card { display: grid; gap: 6px; align-content: start; padding-bottom: 20px; border-radius: 20px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.news-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 8px; }
.news-card > :not(img) { margin-inline: 20px; }
.news-card strong { font-family: var(--display); font-size: 1.1rem; line-height: 1.25; }
.news-card > span:last-child { color: var(--muted); }
.news-card:hover { border-color: var(--accent); }

/* Партнёры и контакты */
.partners h2 { margin-bottom: 20px; }
.partner { display: flex; align-items: center; gap: 24px; padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); text-decoration: none; max-width: 760px; }
.partner img { width: 130px; flex: none; }
.partner:hover { border-color: var(--accent); }
@media (max-width: 560px) { .partner { flex-direction: column; align-items: start; } }
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.contacts a { display: grid; gap: 4px; padding: 20px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.contacts b { font-family: var(--display); }
.contacts span { color: var(--muted); }
.contacts a:hover { border-color: var(--accent); }

/* Подвал и записи */
.footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.footer-row p { margin: 0; }
.footer-links { display: flex; gap: 18px; margin-left: auto !important; }
.page { padding-block: 48px 72px; max-width: 760px; }
.entry h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.entry-cover { border-radius: 20px; margin: 20px 0; }
.entry-body { font-size: 1.08rem; }
.back { margin-top: 32px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
