/* =========================================================================
   Всеказахстанская ассоциация рукопашного боя — официальный сайт
   Тёмная институциональная тема: графит + золото, казахский голубой акцент.
   Стек: нативный HTML/CSS/JS, без сборки.
   ========================================================================= */

:root {
  /* surfaces */
  --bg:           #0b0e13;
  --bg-alt:       #0e131a;
  --surface:      #141b24;
  --surface-2:    #19222d;
  --line:         rgba(255, 255, 255, 0.08);
  --line-strong:  rgba(255, 255, 255, 0.16);

  /* text */
  --text:         #eef1f6;
  --muted:        #98a2b1;
  --muted-2:      #6b7686;

  /* brand */
  --gold:         #c9a24b;
  --gold-soft:    #e2c479;
  --gold-deep:    #9c7a32;
  --blue:         #2ea6c8;   /* казахский голубой — атмосферный/декоративный */

  /* misc */
  --radius:       6px;
  --radius-sm:    4px;
  --maxw:         1200px;
  --gutter:       clamp(20px, 5vw, 64px);
  --sec-pad:      clamp(72px, 11vh, 140px);
  --shadow:       0 22px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft:  0 10px 30px rgba(0, 0, 0, 0.32);

  --font-display: "Oswald", system-ui, sans-serif;
  --font-body:    "Manrope", system-ui, -apple-system, sans-serif;
}

/* -------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--gold); color: #1a1304; }

/* a11y */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--gold); color: #14100a; padding: 12px 18px;
  border-radius: 0 0 var(--radius) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; border-radius: 2px; }

/* ------------------------------------------------------------ layout */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--sec-pad); position: relative; scroll-margin-top: 84px; }
.hero { scroll-margin-top: 0; }
.section--alt { background: var(--bg-alt); }
.section--line { border-top: 1px solid var(--line); }

/* shared display type */
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; line-height: 1.05; letter-spacing: .01em; }

/* flag-bar: decorative national accent (голубой + золото) */
.flag-bar { display: inline-flex; gap: 6px; align-items: center; }
.flag-bar i { display: block; height: 3px; border-radius: 2px; }
.flag-bar i:nth-child(1) { width: 34px; background: var(--blue); }
.flag-bar i:nth-child(2) { width: 14px; background: var(--gold); }

/* section header */
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head .kicker { color: var(--gold-soft); }
.section-head h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  text-transform: uppercase; letter-spacing: .02em;
  margin-top: 16px;
}
.section-head .lead { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); margin-top: 18px; }

.kicker {
  font-family: var(--font-display); font-weight: 500;
  text-transform: uppercase; letter-spacing: .22em; font-size: .82rem;
  color: var(--muted);
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; font-size: .92rem;
  border: 1px solid transparent; transition: transform .18s ease, background .2s ease, border-color .2s ease, color .2s ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #160f02; }
.btn-primary:hover { background: var(--gold-soft); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn .ph { font-size: 1.1em; }

/* ============================================================ TOPBAR */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: rgba(11, 14, 19, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.topbar .container { display: flex; align-items: center; gap: 24px; height: 76px; }

.brand { display: flex; align-items: center; gap: 13px; margin-right: auto; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-family: var(--font-display); font-weight: 600; font-size: .98rem; letter-spacing: .04em; text-transform: uppercase; }
.brand-text span { font-size: .68rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-family: var(--font-display); font-weight: 500; font-size: .92rem;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  padding: 6px 0; position: relative; transition: color .2s ease; white-space: nowrap;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold); transition: width .25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* language toggle */
.lang-toggle { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.lang-toggle button {
  display: grid; place-items: center; width: 50px; min-width: 50px; height: 38px;
  background: transparent; color: var(--muted); border: 0; padding: 0;
  font-family: var(--font-display); font-weight: 600; letter-spacing: .05em; font-size: .8rem;
  transition: background .2s ease, color .2s ease;
}
.lang-toggle button[aria-pressed="true"] { background: var(--gold); color: #160f02; }

.burger {
  display: none; background: transparent; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); width: 46px; height: 42px; color: var(--text);
  position: relative;
}
.burger span, .burger span::before, .burger span::after {
  content: ""; position: absolute; left: 50%; height: 2px; width: 20px; background: currentColor;
  transform: translateX(-50%); transition: transform .25s ease, opacity .2s ease;
}
.burger span { top: 50%; margin-top: -1px; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateX(-50%) translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }

/* ============================================================== HERO */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: center; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 78% 12%, rgba(46,166,200,0.16), transparent 55%),
    linear-gradient(100deg, rgba(8,10,15,0.96) 0%, rgba(8,10,15,0.88) 38%, rgba(8,10,15,0.55) 70%, rgba(8,10,15,0.4) 100%),
    linear-gradient(0deg, rgba(8,10,15,0.95) 0%, transparent 42%);
}
.hero-content { padding-top: 96px; padding-bottom: 64px; max-width: 760px; }
.hero .kicker { color: var(--gold-soft); }
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  text-transform: uppercase; margin-top: 20px; letter-spacing: .005em;
}
.hero h1 .accent { color: var(--gold); display: block; }
.hero .hero-sub { color: #c9d1dd; font-size: clamp(1.02rem, 1.7vw, 1.28rem); margin-top: 22px; max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ============================================================= ABOUT */
.about-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(34px, 5vw, 70px); align-items: start; }
.about-copy p { color: var(--muted); margin-bottom: 18px; }
.about-copy p strong { color: var(--text); font-weight: 600; }

.req-card {
  margin-top: 30px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px;
}
.req-card h3 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-soft); margin-bottom: 6px; }
.req-row { display: flex; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.req-row:last-child { border-bottom: 0; }
.req-row .k { color: var(--muted-2); min-width: 132px; flex-shrink: 0; text-transform: uppercase; font-size: .76rem; letter-spacing: .08em; padding-top: 3px; }
.req-row .v { color: var(--text); }
.req-row .v a:hover { color: var(--gold-soft); }

/* media stack (right column) */
.media-stack { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 14px; }
.media-stack figure { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.media-stack figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; aspect-ratio: 4/3; }
.media-stack figure:hover img { transform: scale(1.05); }
.media-stack .tall { grid-row: span 2; }
.media-stack .tall img { aspect-ratio: auto; height: 100%; }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: clamp(40px, 6vw, 72px); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-alt); padding: 30px 24px; text-align: center; }
.stat b { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--gold-soft); display: block; line-height: 1; }
.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: .9rem; }

/* ======================================================== LEADERSHIP */
.leader-feature {
  display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center;
  background: linear-gradient(120deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: clamp(26px, 4vw, 40px); margin-bottom: 30px;
}
.avatar {
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #20303f, #0e151d);
  border: 1px solid var(--line-strong); color: var(--gold-soft);
  font-family: var(--font-display); font-weight: 600; letter-spacing: .02em;
}
.avatar.lg { width: 116px; height: 116px; font-size: 2.2rem; }
.avatar.sm { width: 64px; height: 64px; font-size: 1.25rem; }
.avatar .ph { font-size: 1.45rem; }
.leader-photo { object-fit: cover; object-position: center; }
.leader-feature .role { color: var(--gold-soft); text-transform: uppercase; letter-spacing: .14em; font-size: .82rem; font-family: var(--font-display); }
.leader-feature h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 8px 0 12px; }
.leader-feature p { color: var(--muted); max-width: 62ch; font-size: .96rem; }

.leader-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.leader-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; transition: transform .2s ease, border-color .2s ease; }
.leader-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.leader-card .avatar { margin-bottom: 18px; }
.leader-card .role { color: var(--gold-soft); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-family: var(--font-display); }
.leader-card h4 { font-family: var(--font-body); font-weight: 700; font-size: 1.02rem; margin-top: 6px; }

/* governance + recognition */
.gov-wrap { display: grid; grid-template-columns: 1fr; gap: clamp(24px, 4vw, 48px); margin-top: 48px; max-width: 820px; }
.gov h3, .recog h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-soft); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.gov-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.gov-item:last-child { border-bottom: 0; }
.gov-item .t { font-family: var(--font-display); font-weight: 500; letter-spacing: .03em; text-transform: uppercase; font-size: .9rem; color: var(--text); }
.gov-item .d { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.recog { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.recog .person { display: flex; gap: 14px; align-items: center; padding: 12px 0; }
.recog .person:not(:last-child) { border-bottom: 1px solid var(--line); }
.recog .person .nm { font-weight: 700; font-size: .96rem; }
.recog .person .rl { color: var(--muted); font-size: .84rem; }

/* ========================================================== REGIONS */
.regions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.region-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; transition: transform .2s ease, border-color .2s ease, background .2s ease;
  position: relative; overflow: hidden;
}
.region-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); opacity: .55;
}
.region-card:hover { transform: translateY(-3px); border-color: var(--line-strong); background: var(--surface-2); }
.region-card .reg { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: 1.02rem; color: var(--text); }
.region-card .fed { color: var(--muted-2); font-size: .8rem; margin-top: 4px; line-height: 1.45; }

/* =========================================================== EVENTS */
.events-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.event { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.event img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.event:hover img { transform: scale(1.05); }
.event .body { position: absolute; inset: auto 0 0 0; padding: 28px; background: linear-gradient(0deg, rgba(7,9,13,0.94) 8%, rgba(7,9,13,0.55) 60%, transparent 100%); }
.event .tag { display: inline-block; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: #160f02; background: var(--gold); padding: 4px 10px; border-radius: 3px; margin-bottom: 12px; }
.event h3 { font-size: clamp(1.2rem, 2.4vw, 1.7rem); text-transform: uppercase; }
.event .meta { color: #c4ccd8; font-size: .88rem; margin-top: 8px; display: flex; gap: 16px; flex-wrap: wrap; }
.event .meta i { color: var(--gold-soft); }
.event--feature { grid-row: span 2; }
.event--feature .body p { color: #c4ccd8; margin-top: 10px; max-width: 52ch; font-size: .95rem; }
.event-col { display: grid; gap: 18px; grid-template-rows: 1fr 1fr; }

.events-cta {
  margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 28px;
}
.events-cta p { color: var(--muted); }
.events-cta b { color: var(--text); }

/* ========================================================= PARTNERS */
.partner-group + .partner-group { margin-top: 44px; }
.partner-group h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 20px; text-align: center; }
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; max-width: 920px; margin-inline: auto; }
.partner-card {
  display: flex; gap: 18px; align-items: center; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; transition: transform .2s ease, border-color .2s ease;
}
.partner-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.partner-mark {
  flex-shrink: 0; width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  color: var(--gold-soft); background: radial-gradient(circle at 30% 25%, #20303f, #0e151d); border: 1px solid var(--line-strong);
}
.partner-mark--logo {
  width: 78px; height: 78px; border-radius: 12px; background: #fff; padding: 9px;
}
.partner-mark--logo img { width: 100%; height: 100%; object-fit: contain; }
.partner-card .nm { font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; font-size: 1.02rem; line-height: 1.2; }
.partner-card .sub { color: var(--muted); font-size: .84rem; margin-top: 5px; }
.partner-card .sub a { color: var(--gold-soft); }

/* ========================================================== CONTACT */
.contact-grid { display: grid; grid-template-columns: minmax(0, 760px); gap: clamp(30px, 5vw, 64px); align-items: start; }
.contact-list .req-row .k { min-width: 120px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.contact-card {
  background: linear-gradient(150deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(26px, 4vw, 40px);
}
.contact-card h3 { font-size: 1.4rem; text-transform: uppercase; margin-bottom: 8px; }
.contact-card p { color: var(--muted); font-size: .95rem; }
.contact-card .full-names { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.contact-card .full-names div { padding: 8px 0; font-size: .9rem; }
.contact-card .full-names span { display: block; color: var(--muted-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }

/* =========================================================== FOOTER */
.footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding-block: 46px; }
.footer .container { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer .brand img { width: 40px; height: 40px; }
.footer .copy { color: var(--muted-2); font-size: .82rem; max-width: 60ch; }
.footer .socials { display: flex; gap: 12px; }
.footer .socials a {
  width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  display: grid; place-items: center; color: var(--muted); transition: color .2s ease, border-color .2s ease, transform .2s ease; font-size: 1.2rem;
}
.footer .socials a:hover { color: var(--gold-soft); border-color: var(--gold); transform: translateY(-2px); }

/* ====================================================== scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .event img, .media-stack figure img { transition: none; }
}

/* ========================================================= RESPONSIVE */
@media (max-width: 1024px) {
  .leader-grid { grid-template-columns: repeat(2, 1fr); }
  .regions-grid, .partners { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links, .brand-text span { display: none; }
  .burger { display: inline-grid; place-items: center; }
  .topbar .container { gap: 14px; }

  /* mobile nav panel */
  .nav-links {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; gap: 0; align-items: stretch;
    background: rgba(11,14,19,0.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 22px;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  }
  .nav-links.open { display: flex; transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-links a::after { display: none; }

  .about-grid, .gov-wrap, .contact-grid, .events-grid { grid-template-columns: 1fr; }
  .events-grid { gap: 16px; }
  .event--feature { grid-row: auto; min-height: 360px; }
  .event { min-height: 300px; }
  .event-col { grid-template-rows: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .event--feature .event-feature-text { display: none; }
  .leader-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .regions-grid, .partners { grid-template-columns: 1fr; }
  .leader-feature { grid-template-columns: 1fr; text-align: left; }
  .hero-meta { gap: 20px; }
  .footer .container { flex-direction: column; align-items: flex-start; }
}
