/* Спортивний клуб «Сокіл» — draft site
   Palette mirrors the club logo and VTAFLC/Palette.swift:
   red #E31F25, black1 #0E0E0E, white1 #EDEDED, blue1 #007FBF */

:root {
  --red:        #E31F25;
  --red-dark:   #B3161B;
  --black:      #0E0E0E;
  --panel:      #151515;
  --panel-2:    #1C1C1C;
  --line:       #2A2A2A;
  --white:      #EDEDED;
  --muted:      #9A9A9A;
  --blue:       #007FBF;

  --wrap:       1100px;
  --radius:     14px;
  --gap:        24px;

  --font: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* `display` on .btn/.badge would otherwise win over the UA rule for [hidden] */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--white); text-decoration: none; }
a:hover { color: var(--red); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--red); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 14, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; }
.brand-text small { font-size: .72rem; color: var(--muted); letter-spacing: .06em; }

.nav { display: flex; gap: 26px; }
.nav a { font-size: .95rem; color: var(--white); }

.header-tools { display: flex; align-items: center; gap: 12px; }

.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font: 600 .78rem/1 var(--font); letter-spacing: .06em;
  padding: 8px 12px;
}
.lang-btn:hover { color: var(--white); }
.lang-btn[aria-pressed="true"] { background: var(--red); color: #fff; }

.burger {
  display: none; width: 42px; height: 38px; border: 1px solid var(--line);
  border-radius: 10px; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--white); }

/* ── Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(56px, 10vw, 110px) 0 clamp(48px, 8vw, 90px);
  text-align: center;
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(227, 31, 37, .22), transparent 70%),
    var(--black);
  border-bottom: 1px solid var(--line);
}
.hero-logo { margin: 0 auto 28px; border-radius: 18px; width: 160px; height: 160px; }
.hero-tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem); font-weight: 600;
  color: var(--red); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .2em;
}
.hero-sub { color: var(--muted); margin-bottom: 2em; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; border: 1px solid transparent;
  transition: background .18s, color .18s, border-color .18s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--white); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.badge {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  border: 1px dashed var(--line); color: var(--muted); font-size: .9rem;
}

/* ── Sections ───────────────────────────────────────── */
.section { padding: clamp(52px, 8vw, 92px) 0; }
.section-alt { background: var(--panel); border-block: 1px solid var(--line); }

.eyebrow {
  color: var(--red); font-size: .78rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; margin-bottom: .6em;
}
.lead { max-width: 68ch; color: #C9C9C9; }
.note { font-size: .88rem; color: var(--muted); margin-top: 1.4em; }

/* ── Cards ──────────────────────────────────────────── */
.cards {
  display: grid; gap: var(--gap); margin-top: 40px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  border-top: 3px solid var(--red);
}
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ── Gallery ────────────────────────────────────────── */
/* Fixed 3 columns at every width: 9 tiles always fill 3 full rows,
   and it echoes the club's own Instagram grid. */
.gallery {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.gallery a {
  display: block; position: relative; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2);
}
.gallery img {
  width: 100%; height: 100%; aspect-ratio: 1;
  object-fit: cover; object-position: center 32%;
  transition: transform .35s ease, opacity .25s ease;
}
/* Reels are 9:16 with captions burned into the top and bottom of the frame.
   32% keeps most of the club's bottom captions; tile 6 needs a lower crop
   because its own caption sits right at the top edge. */
.gallery li:nth-child(6) img { object-position: center 45%; }
.gallery a:hover img { transform: scale(1.06); opacity: .85; }
/* every tile links to a reel — mark it so the thumbnail does not read as a still */
.gallery a::after {
  content: ""; position: absolute; top: 9px; right: 9px;
  width: 0; height: 0; border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent rgba(255, 255, 255, .92);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8));
}
.gallery-more { margin: 28px 0 0; }

@media (max-width: 560px) {
  .gallery { gap: 6px; }
  .gallery a { border-radius: 8px; }
}

/* ── Schedule ───────────────────────────────────────── */
.table-scroll { overflow-x: auto; margin-top: 36px; }
.schedule { width: 100%; min-width: 520px; border-collapse: collapse; }
.schedule th, .schedule td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.schedule th {
  font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.schedule tbody tr:hover { background: rgba(227, 31, 37, .07); }
.schedule td:nth-child(2) { color: var(--red); font-weight: 600; white-space: nowrap; }

/* ── App ────────────────────────────────────────────── */
.app-grid {
  display: grid; gap: clamp(28px, 5vw, 56px); align-items: center;
  grid-template-columns: minmax(180px, 260px) 1fr;
}
.app-visual img {
  border-radius: 22%; border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.ticks { list-style: none; padding: 0; margin: 0 0 28px; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 10px; color: #C9C9C9; }
.ticks li::before {
  content: ""; position: absolute; left: 6px; top: .62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
}
.app-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* ── Contacts ───────────────────────────────────────── */
.contact-grid {
  display: grid; gap: var(--gap); margin-top: 40px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.contact-block h3 {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-bottom: .8em;
}
.contact-block p { margin: 0; }
.social { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; background: var(--black); }
.footer-inner {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .88rem; color: var(--muted);
}
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--red); }

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 820px) {
  .burger { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--panel); border-bottom: 1px solid var(--line);
    padding: 8px 20px 18px;
  }
  .nav:not(.open) { display: none; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .app-grid { grid-template-columns: 1fr; }
  .app-visual { max-width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
