/* layout.css — навигация, hero-структура, рамки секций, сетки.
   Декор (фон, частицы, орбита, силуэт коня) — в space.css.
   Карточки/чипы/кнопки — в components.css.
   Зависит от tokens.css, base.css.
*/

/* ====================================================================
   NAV
   ==================================================================== */
.nav{
  position:fixed; top:0; left:0; right:0;
  z-index:60;
  display:flex; align-items:center;
  height:var(--nav-h);
  padding:0 var(--pad-x);
  transition:background .25s var(--ease), backdrop-filter .25s var(--ease), height .25s var(--ease), border-color .25s var(--ease);
  border-bottom:1px solid transparent;
}
.nav.is-scrolled{
  height:56px;
  background:rgba(11,26,48,.72);
  backdrop-filter:saturate(160%) blur(14px);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  border-bottom-color:var(--rule);
}
.nav-inner{ display:flex; align-items:center; gap:24px; width:100%; max-width:1440px; margin:0 auto; }
.nav-mark{ display:flex; align-items:center; gap:12px; }
.nav-mark svg{ height:30px; width:auto; display:block; }
.nav-mark .nav-mark-meta{
  font-size:10px; letter-spacing:.22em; text-transform:uppercase; color:var(--ink-mute);
  line-height:1.2; display:flex; flex-direction:column;
  white-space:nowrap;
}
.nav-mark .nav-mark-meta b{ color:var(--ink-dim); font-weight:600; letter-spacing:.18em; }

/* Акцентная Results-кнопка — выделена из ряда .nav-links как «главное
   действие во время турнира». Пульсирующая «LIVE»-точка справа от
   обычного nav-row, перед nav-right. */
.nav-results{
  display:inline-flex; align-items:center; gap:8px;
  margin-left:6px; padding:8px 16px;
  border-radius:var(--r-pill);
  background:linear-gradient(180deg, rgba(36,119,189,.85), rgba(28,129,215,.95));
  border:1px solid rgba(78,164,230,.7);
  color:#fff; font-size:13px; font-weight:600;
  text-decoration:none; white-space:nowrap;
  box-shadow:0 6px 20px rgba(28,129,215,.35), inset 0 0 0 1px rgba(255,255,255,.08);
  transition:background .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
}
.nav-results:hover{
  background:linear-gradient(180deg, rgba(36,119,189,1), rgba(28,129,215,1));
  transform:translateY(-1px);
  box-shadow:0 8px 24px rgba(28,129,215,.45), inset 0 0 0 1px rgba(255,255,255,.15);
}
.nav-results.is-current{
  box-shadow:0 0 0 2px rgba(255,255,255,.12), 0 6px 20px rgba(28,129,215,.35);
}
.nav-results .nr-dot{
  display:inline-block; width:8px; height:8px; border-radius:50%;
  background:#ff5454; box-shadow:0 0 0 0 rgba(255,84,84,.6);
  animation:nrPulse 1.6s ease-out infinite;
}
@keyframes nrPulse{
  0%   { box-shadow:0 0 0 0   rgba(255,84,84,.55); }
  70%  { box-shadow:0 0 0 8px rgba(255,84,84,0);   }
  100% { box-shadow:0 0 0 0   rgba(255,84,84,0);   }
}

/* Mobile overlay: «Results»-ссылка тоже акцентная (тот же nr-dot + fill). */
.nav-overlay .links a.is-accent{
  display:inline-flex; align-items:center; gap:10px;
  background:rgba(36,119,189,.18);
  border:1px solid rgba(78,164,230,.55);
  border-radius:var(--r-pill);
  padding:8px 16px;
  color:#fff !important;
  width:fit-content;
}
.nav-overlay .links a.is-accent .nr-dot{
  display:inline-block; width:8px; height:8px; border-radius:50%;
  background:#ff5454;
  animation:nrPulse 1.6s ease-out infinite;
}

.nav-links{ display:flex; gap:6px; margin-left:auto; }
.nav-links a{
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 14px; border-radius:var(--r-pill);
  font-size:13px; font-weight:500; color:var(--ink-dim);
  transition:color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover{ color:var(--ink); background:var(--ink-ghost); }
.nav-right{ display:flex; align-items:center; gap:14px; }

.nav-lang{
  display:inline-flex; align-items:center; gap:2px; padding:3px;
  border:1px solid var(--ink-faint); border-radius:var(--r-pill);
  background:rgba(255,255,255,.02);
}
.nav-lang button{
  appearance:none; border:0; background:transparent;
  color:var(--ink-mute); font-weight:600; letter-spacing:.16em; font-size:10.5px;
  padding:6px 10px; border-radius:var(--r-pill); cursor:pointer;
  transition:color .2s var(--ease), background .2s var(--ease);
}
.nav-lang button:hover{ color:var(--ink); }
.nav-lang button.is-active{
  color:var(--ink);
  background:linear-gradient(180deg, rgba(36,119,189,.65), rgba(28,129,215,1));
  box-shadow:0 4px 14px rgba(28,129,215,.45), inset 0 0 0 1px rgba(255,255,255,.18);
}

.nav-burger{ display:none; appearance:none; border:0; background:transparent; cursor:pointer; padding:8px; }
.nav-burger svg{ width:22px; height:22px; }

/* mobile overlay */
.nav-overlay{
  position:fixed; inset:0; z-index:70;
  background:linear-gradient(180deg, rgba(8,21,42,.96), rgba(6,15,28,.98));
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  display:none;
  flex-direction:column;
  padding:24px var(--pad-x);
}
.nav-overlay.is-open{ display:flex; }
.nav-overlay .top{ display:flex; align-items:center; justify-content:space-between; height:var(--nav-h); }
.nav-overlay .top .nav-mark svg{ height:26px; }
.nav-overlay .links{ display:flex; flex-direction:column; gap:2px; margin-top:32px; overflow-y:auto; }
.nav-overlay .links a{
  font-size:clamp(22px, 6vw, 36px);
  font-weight:700; letter-spacing:-.02em;
  color:var(--ink); padding:12px 0; border-bottom:1px solid var(--ink-faint);
  display:flex; align-items:center; justify-content:space-between;
}
.nav-overlay .bottom{ margin-top:auto; display:flex; justify-content:space-between; align-items:center; padding-bottom:24px; padding-top:18px; }

@media (max-width:980px){
  .nav-links{ display:none; }
  .nav-burger{ display:inline-flex; margin-left:auto; }
}
@media (max-width:520px){
  .nav-mark .nav-mark-meta{ display:none; }
  .nav-mark svg{ height:26px; }
  .nav-lang button{ font-size:10px; padding:5px 8px; }
}

/* ====================================================================
   HERO
   ==================================================================== */
.hero{
  position:relative;
  min-height:100dvh;
  padding-top:calc(var(--nav-h) + 32px);
  padding-bottom:80px;
  overflow:hidden;
  isolation:isolate;
  display:flex; flex-direction:column;
}
.hero-inner{
  position:relative; z-index:1;
  flex:1 1 auto;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  text-align:center;
  gap:clamp(18px, 2.6vw, 32px);
}

/* 4 логотипа организаторов в линию (eqFed / eur1 / FEI / max).
   Белые SVG на тёмном фоне. Выровнены по высоте, ширина auto. */
.hero-organisers{
  position:relative; z-index:2;
  display:flex; align-items:center; justify-content:center;
  padding:10px var(--pad-x) 0;
}
.hero-organisers__list{
  display:flex; align-items:center; justify-content:center;
  gap:28px;
  flex-wrap:wrap;
}
.org-logo{
  display:block;
  /* Dual cap: max-height для квадратных/высоких, max-width для широких.
     Лого с разными аспектами (FEI 3.13, feisol 2.56, asianef/eur1/max ≈1.0)
     при одной только height:32px давали очень разные ширины (FEI ≈100px,
     swirl 32px). Теперь широкие упираются в max-width и оптически
     близки к квадратным. */
  max-height:34px;
  max-width:74px;
  width:auto;
  height:auto;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.25));
  opacity:.92;
  transition:opacity .2s var(--ease);
}
.org-logo:hover{ opacity:1; }

@media (max-width:520px){
  .hero-organisers{ padding-top:8px; }
  .hero-organisers__list{ gap:14px; }
  .org-logo{ max-height:26px; max-width:60px; }
}
@media (max-width:380px){
  .hero-organisers__list{ gap:10px; }
  .org-logo{ max-height:24px; max-width:52px; }
}
.hero-mark{
  /* full composition: horse + ASTANA wordmark + Baiterek (~931×520 viewBox) */
  width:min(340px, 56vw); height:auto;
  filter:drop-shadow(0 12px 36px rgba(36,119,189,.45));
  opacity:0; transform:translateY(8px);
  animation:fadeUp 1.1s var(--ease) .15s forwards;
}
@keyframes fadeUp{ to{ opacity:1; transform:translateY(0); } }

.hero-eyebrow{
  font-size:var(--t-eyebrow);
  letter-spacing:.34em; text-transform:uppercase;
  color:var(--ink-dim); font-weight:500;
  display:inline-flex; align-items:center; gap:14px;
  opacity:0; animation:fadeUp 1.1s var(--ease) .35s forwards;
}
.hero-eyebrow::before, .hero-eyebrow::after{
  content:""; width:34px; height:1px; background:var(--ink-faint);
}
.hero-title{
  font-weight:800; font-size:var(--t-h1); line-height:.9;
  letter-spacing:-.04em;
  background:linear-gradient(180deg, #ffffff 0%, #c9deef 60%, #4ea4e6 100%);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;
  opacity:0; animation:fadeUp 1.1s var(--ease) .5s forwards;
  max-width:1100px;
}
.hero-disciplines{
  display:flex; flex-wrap:wrap; justify-content:center; gap:10px;
  max-width:980px;
  opacity:0; animation:fadeUp 1.1s var(--ease) .75s forwards;
}
.hero-meta{
  display:inline-flex; align-items:center; gap:18px;
  color:var(--ink-dim);
  font-family:"JetBrains Mono", ui-monospace, monospace;
  font-size:13px; letter-spacing:.04em;
  opacity:0; animation:fadeUp 1.1s var(--ease) .95s forwards;
}
.hero-meta .sep{ width:4px; height:4px; border-radius:50%; background:var(--ink-faint); }
.hero-meta b{ color:var(--ink); font-weight:600; }
.hero-cta{
  display:grid; gap:14px;
  grid-template-columns:repeat(4, minmax(0,1fr));
  width:100%;
  max-width:980px;
  margin-top:clamp(18px, 3vw, 40px);
  opacity:0; animation:fadeUp 1.1s var(--ease) 1.15s forwards;
}
@media (max-width:880px){
  .hero-cta{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:480px){
  .hero-cta{ grid-template-columns:1fr 1fr; gap:10px; }
}

/* ====================================================================
   Generic section frame
   ==================================================================== */
section{ position:relative; }
.sec{ padding:var(--sec-y) 0; }
/* SCHEDULE-I18N задача 4.1: на узком экране секционные отступы сильно
   урезаются, чтобы не было дыр в пол-экрана между разделами. */
@media (max-width:768px){
  .sec{ padding:48px 0; }
}
@media (max-width:480px){
  .sec{ padding:40px 0; }
}
.sec-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:24px;
  margin-bottom:clamp(28px, 4vw, 56px);
}
.sec-head .left{ max-width:780px; }
.sec-head .eyebrow{
  font-size:11px; letter-spacing:.32em; text-transform:uppercase; color:var(--ink-mute);
  font-weight:600; display:inline-flex; align-items:center; gap:12px;
  margin-bottom:14px;
}
.sec-head .eyebrow::before{
  content:""; width:34px; height:1px; background:var(--blue-2);
}
.sec-head h2{
  font-size:var(--t-h2); font-weight:700; letter-spacing:-.025em; line-height:1.02;
}
.sec-head p{
  margin-top:14px; color:var(--ink-dim); font-size:var(--t-body); line-height:1.55;
  max-width:600px;
}
.sec-num{
  font-family:"JetBrains Mono", monospace; color:var(--ink-mute);
  font-size:12px; letter-spacing:.16em;
}
@media (max-width:680px){
  .sec-head{ flex-direction:column; align-items:flex-start; }
}

/* Subsection within Officials block: tighter spacing, smaller h2 */
.subsec{ padding:clamp(40px,5vw,72px) 0; }
.subsec .sec-head h2{ font-size:clamp(22px, 2.6vw, 38px); }
.subsec .sec-head{ margin-bottom:clamp(22px, 3vw, 36px); }

/* ====================================================================
   WELCOMES — сетка из 2 карточек (FEI + EFK), центрирована.
   Stage CONTENT-UPDATE: с 4 → 2 карточек убрали Organising Committee
   и Partners. Сетка теперь центрированная пара, не растянутая.
   ==================================================================== */
.welcome-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 480px));
  gap:22px;
  justify-content:center;
}
@media (max-width:1024px){
  .welcome-grid{
    grid-template-columns:1fr;
    max-width:560px;
    margin:0 auto;
  }
}

/* ====================================================================
   OFFICIALS — единый блок: chip-bar (фильтры) + off-grid (сетка карточек)
   ==================================================================== */
.chip-bar{
  display:flex; flex-wrap:wrap; gap:8px;
  margin-bottom:clamp(20px, 3vw, 32px);
}
.off-grid{
  display:grid; gap:14px;
  grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
}
@media (max-width:480px){
  .off-grid{ grid-template-columns:1fr; }
}

/* ====================================================================
   NEWS — карусель + CTA
   ==================================================================== */
.news-shell{ position:relative; }

/* ====================================================================
   COUNTRIES — сетка
   ==================================================================== */
.countries-grid{
  display:grid;
  grid-template-columns:repeat(6, 1fr);
  gap:14px;
}
@media (max-width:1100px){ .countries-grid{ grid-template-columns:repeat(4, 1fr); } }
@media (max-width:680px){  .countries-grid{ grid-template-columns:repeat(3, 1fr); } }
@media (max-width:420px){  .countries-grid{ grid-template-columns:repeat(2, 1fr); } }

/* ====================================================================
   PARTNERS — 4-уровневая структура, стили в components.css (.partner-tiers
   и потомки). Старые .partner-blocks / .partner-row / .partner-grid /
   .partner-title-block убраны вместе с placeholder-разметкой
   (PARTNERS-LOGOS rewrite, май 2026).
   ==================================================================== */

/* ====================================================================
   CONTACTS / FOOTER
   ==================================================================== */
.contact-grid{
  display:grid; grid-template-columns:1.4fr 1fr; gap:48px;
}
@media (max-width:880px){ .contact-grid{ grid-template-columns:1fr; gap:32px; } }
.contact-block .item{
  padding:18px 0; border-bottom:1px solid var(--ink-faint);
  display:flex; flex-direction:column; gap:6px;
}
.contact-block .item:first-child{ padding-top:0; }
.contact-block .lbl{
  font-size:10px; letter-spacing:.22em; text-transform:uppercase; color:var(--ink-mute); font-weight:600;
}
.contact-block .val{
  font-size:clamp(18px, 1.9vw, 22px); font-weight:600; letter-spacing:-.01em;
}
.contact-block .val.muted{ color:var(--ink-mute); font-weight:500; font-style:italic; font-size:16px; }

.footer-bottom{
  border-top:1px solid var(--ink-faint);
  padding:28px 0;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px;
  color:var(--ink-mute); font-size:12px;
}
.footer-bottom .marks{ display:flex; align-items:center; gap:18px; }
.footer-bottom .marks .m{
  height:28px; padding:0 12px; border:1px dashed var(--ink-faint);
  border-radius:var(--r-sm); display:inline-flex; align-items:center;
  font-family:"JetBrains Mono", monospace; font-size:10px; letter-spacing:.16em;
  color:var(--ink-mute); text-transform:uppercase;
}
.footer-bottom .links{ display:flex; gap:14px; }
.footer-bottom .links a:hover{ color:var(--ink); }
