/*
Theme Name: Barys
Description: Одностраничная тема развлекательно-тактического клуба Barys.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 8.0
Text Domain: barys
*/

/* Военная палитра: тёмный оливковый, выгоревший хаки и сигнальный оранжевый. Тема одна, тёмная. */
:root {
	color-scheme: dark;
	--bg: #13160e;
	--surface: #1c2015;
	--tint: #181b12;
	--ink: #ebe8da;
	--muted: #a9a88f;
	--line: #363c28;
	--accent: #e38b1c;
	--on-accent: #13160e;
	--radius: 0;
	--header: 76px;
	--display: Impact, Haettenschweiler, "Arial Narrow Bold", "Roboto Condensed", sans-serif;
	--cut: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
	/* камуфляжные пятна: пороговый шум, почти незаметный */
	--camo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.009' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .62 0 0 0 0 .66 0 0 0 0 .42 0 0 0 9 -4.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='.06'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header); }
body {
	font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	background: var(--bg);
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
}
img, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.05; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; }
h2::before { content: ""; display: block; width: 56px; height: 6px; margin-bottom: 1rem; background: var(--accent); }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: 1.25rem; font-weight: 800; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 58ch; margin-top: 1rem; }
.muted { color: var(--muted); }
.plain { list-style: none; padding: 0; display: grid; gap: 0.4rem; }

.wrap { width: min(100% - 2.5rem, 1240px); margin-inline: auto; }
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.tinted { background: var(--tint) var(--camo); }

.btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0.85rem 1.4rem; border: 2px solid var(--accent); clip-path: var(--cut);
	background: var(--accent); color: var(--on-accent);
	font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.9rem;
	text-decoration: none; white-space: nowrap;
	transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--surface); }

/* Шапка */
.header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--header); }
.brand img { height: 60px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav .btn { padding: 0.6rem 1rem; }
.menu-btn { display: none; padding: 0.55rem 0.9rem; font: inherit; font-weight: 700; color: var(--ink); background: none; border: 2px solid var(--ink); border-radius: var(--radius); cursor: pointer; }
@media (max-width: 1020px) {
	.menu-btn { display: block; }
	.nav { display: none; position: absolute; inset: var(--header) 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.25rem 1.25rem; background: var(--bg); border-bottom: 1px solid var(--line); }
	.nav.open { display: flex; }
	.nav a:not(.btn) { padding: 0.8rem 0; font-size: 1.05rem; }
	.nav .btn { margin-top: 0.75rem; padding: 0.85rem 1rem; }
}

/* Первый экран */
.hero { position: relative; padding: 0; isolation: isolate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 0%, rgb(19 22 14 / 0.9) 42%, rgb(19 22 14 / 0.3) 100%); }
.hero-grid { display: grid; align-items: center; min-height: calc(100dvh - var(--header) - 7.5rem); padding-block: 3rem; }
.hero-copy { max-width: 640px; }
.hero .lead { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
	.hero::after { background: rgb(19 22 14 / 0.78); }
	.hero-grid { min-height: 70dvh; }
}

.stats { padding: 0; border-block: 1px solid var(--line); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid > div { padding: 1.5rem 1.25rem; border-left: 1px solid var(--line); }
.stats-grid > div:first-child { border-left: 0; padding-left: 0; }
.stats dt { font-family: var(--display); font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 400; line-height: 1; color: var(--accent); }
.stats dd { color: var(--muted); margin-top: 0.3rem; }
@media (max-width: 700px) {
	.stats-grid { grid-template-columns: 1fr 1fr; }
	.stats-grid > div { padding-left: 0; border-left: 0; }
	.stats-grid > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* Направления: сетка с линиями в 1px */
.directions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 2.5rem; background: var(--line); border: 1px solid var(--line); }
.directions article { display: grid; gap: 0.5rem; align-content: start; padding: 1.75rem; background: var(--surface); transition: background 0.2s ease; }
.directions article:hover { background: var(--tint); }
.directions h3 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 0.5rem; color: var(--accent); }
@media (max-width: 900px) { .directions { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .directions { grid-template-columns: 1fr; } }

.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.advantages { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
.advantages li { padding-left: 1rem; border-left: 3px solid var(--accent); font-size: 1.1rem; font-weight: 650; line-height: 1.3; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .advantages { grid-template-columns: 1fr; } }

/* Карты: горизонтальная лента */
.maps { display: grid; grid-auto-flow: column; grid-auto-columns: min(80vw, 380px); gap: 1.25rem; margin-top: 2.5rem; padding: 0 max(1.25rem, (100vw - 1240px) / 2) 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(1.25rem, (100vw - 1240px) / 2); }
.maps article { scroll-snap-align: start; display: grid; gap: 0.5rem; align-content: start; }
.maps img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--tint); margin-bottom: 0.5rem; }

.prices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.prices article { display: grid; gap: 0.35rem; align-content: start; padding: 1.5rem; background: var(--surface); border-top: 4px solid var(--accent); border-radius: var(--radius); }
.price { font-family: var(--display); font-size: 2rem; font-weight: 400; letter-spacing: 0.02em; color: var(--accent); line-height: 1.1; margin-top: 0.75rem; }
.prices ul { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.extras { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin-top: 2rem; }
.extras dt { font-weight: 800; }
.extras dd { color: var(--muted); }
@media (max-width: 1200px) { .prices { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .prices { grid-template-columns: 1fr; } }

.video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); margin-top: 2.5rem; background: var(--tint); }

.events { display: grid; gap: 2rem; margin-top: 2.5rem; }
.events article { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 1.75rem; align-items: center; }
.events article > div { display: grid; gap: 0.5rem; justify-items: start; }
.events article > div:only-child { grid-column: 1 / -1; }
.events img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.events h3 { font-size: 1.6rem; }
.meta { font-weight: 800; color: var(--accent); }
@media (max-width: 640px) { .events article { grid-template-columns: 1fr; } }

.gallery, .wp-block-gallery { margin-top: 2.5rem; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.gallery img:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; } }

.rules { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.rules details + details { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.rules summary { font-size: 1.3rem; font-weight: 800; cursor: pointer; }
.rules ul { display: grid; gap: 0.5rem; margin-top: 1rem; padding-left: 1.2rem; color: var(--muted); }
@media (max-width: 760px) { .rules { grid-template-columns: 1fr; } }

.cta { background: var(--accent); color: var(--on-accent); border-top: 10px solid; border-image: repeating-linear-gradient(-45deg, var(--on-accent) 0 14px, var(--accent) 14px 28px) 10; }
.cta h2::before { background: var(--on-accent); }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta .btn { background: var(--on-accent); border-color: var(--on-accent); color: var(--accent); }

.footer { padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: end; }
.footer-phone { margin: 1rem 0; font-family: var(--display); font-size: clamp(1.8rem, 3.4vw, 2.8rem); letter-spacing: 0.03em; }
.footer a { color: var(--ink); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-note { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }

.content { padding-block: 3rem; }
.content > * + * { margin-top: 1.25rem; }

/* Блоки появляются при прокрутке: направляет взгляд на следующую секцию. */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		main section:not(.hero) > .wrap { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
		@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
	}
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.admin-bar .header { top: var(--wp-admin--admin-bar--height, 32px); }
