/* =========================================================
   Koryo Gym – Stylesheet
   No external fonts or CDNs (DSGVO-friendly, fast).
   ========================================================= */

:root {
  --bg: #0b0b0d;
  --bg-2: #141418;
  --bg-3: #1c1c22;
  --line: #2a2a32;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --red: #e11d2a;
  --red-2: #ff3b47;
  --radius: 14px;
  --max: 1180px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Black", "Arial Black", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--red-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer; font-size: 1rem; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-2); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-sm { padding: .55em 1.1em; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,11,13,.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 38px; width: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem;
}
.site-nav a:hover { color: #fff; background: var(--bg-3); }
.lang-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; flex-shrink: 0; }
.lang-switch a {
  padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  text-decoration: none; color: var(--muted);
}
.lang-switch a:hover { color: #fff; }
.lang-switch a[aria-current="page"] { background: #fff; color: #111; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 0; color: #fff;
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; background: currentColor; margin: auto;
  position: relative; transition: transform .2s ease, background .2s ease;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .lang-switch { margin-left: auto; }
  .nav-toggle { display: block; margin-left: 4px; }
  .header-cta { display: none; }
  .brand img { height: 30px; }
  .site-nav {
    position: absolute; inset: 72px 0 auto 0; background: var(--bg);
    border-bottom: 1px solid var(--line); display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .site-nav a { padding: 14px 12px; font-size: 1.05rem; color: #fff; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(88vh, 760px); display: flex; align-items: center;
  padding: 80px 0 64px;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,11,13,.95) 0%, rgba(11,11,13,.78) 45%, rgba(11,11,13,.35) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--red-2); margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: clamp(2.3rem, 6.5vw, 4.6rem); letter-spacing: -.01em; max-width: 13ch;
}
.hero h1 em { color: var(--red); font-style: italic; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #d4d4d8; max-width: 44ch; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 16px 0 0; color: #d4d4d8; font-size: .95rem; }
.hero-note a { color: #fff; font-weight: 700; text-decoration: none; }
.hero-note a:hover { color: var(--red-2); }
.stats {
  display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 40px;
  margin-top: 48px; padding: 0; list-style: none;
}
.stats strong { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 900; font-style: italic; }
.stats span { color: var(--muted); font-size: .9rem; }
@media (max-width: 600px) {
  .hero { min-height: auto; padding: 56px 0 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 {
  font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}
.section-head p { color: var(--muted); font-size: 1.08rem; }
@media (max-width: 600px) { .section { padding: 64px 0; } }

/* ---------- Sports ---------- */
.sports-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.sport-card {
  position: relative; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
}
.sport-card:hover { transform: translateY(-4px); border-color: #3f3f48; }
.sport-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.sport-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.sport-body h3 { font-size: 1.25rem; }
.sport-body p { color: var(--muted); font-size: .95rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.tags li { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--bg-3); color: #d4d4d8; }
.card-links { display: flex; flex-wrap: wrap; gap: 14px; }
.card-link { color: var(--red-2); font-weight: 700; text-decoration: none; font-size: .95rem; }
.card-link:hover { text-decoration: underline; }

/* ---------- Timetable ---------- */
.opening {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 36px;
}
.info-box { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.info-box h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.info-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; }
.info-box dt { color: var(--muted); }
.info-box dd { margin: 0; font-weight: 600; text-align: right; }

.sport-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  --c: #fff;
  border: 1px solid var(--line); background: var(--bg-3); color: #e4e4e7; border-radius: 999px;
  padding: 7px 14px; font: 600 .88rem var(--font); cursor: pointer;
}
.chip::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c); margin-right: 8px; vertical-align: 1px;
}
.chip[data-sport="all"]::before { display: none; }
.chip[aria-pressed="true"] { background: #fff; color: #111; border-color: #fff; }

.day-tabs { display: none; gap: 6px; margin-bottom: 16px; overflow-x: auto; }
.day-tab {
  flex: 1; border: 1px solid var(--line); background: var(--bg-3); color: #e4e4e7;
  border-radius: 10px; padding: 10px 0; font: 700 .95rem var(--font); cursor: pointer; position: relative;
}
.day-tab .long { display: none; }
.day-tab[aria-selected="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.day-tab.is-today::after {
  content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: #fff;
}

.schedule-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.grid-day {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  padding: 0 0 10px; border-bottom: 2px solid var(--line); margin-bottom: 10px;
}
.grid-day.is-today { color: #fff; border-bottom-color: var(--red); }
.grid-col .class-card + .class-card { margin-top: 8px; }
.schedule-list { display: none; }
.schedule-list .class-card + .class-card { margin-top: 10px; }

.class-card {
  --c: var(--red);
  background: var(--bg-3); border-radius: 10px; padding: 10px 12px;
  border-left: 4px solid var(--c);
}
.class-time { font-size: .8rem; color: var(--muted); margin: 0 0 2px; font-variant-numeric: tabular-nums; }
.class-name { font-size: .92rem; margin: 0 0 2px; }
.class-group { font-size: .82rem; color: #d4d4d8; margin: 0; }
.class-note { font-size: .78rem; color: var(--muted); margin: 4px 0 0; }
.empty { color: var(--muted); font-size: .9rem; }
.schedule-hint { color: var(--muted); font-size: .9rem; margin-top: 20px; }

@media (max-width: 960px) {
  .day-tabs { display: flex; }
  .schedule-grid { display: none; }
  .schedule-list { display: block; }
  .class-card { padding: 14px 16px; }
  .class-name { font-size: 1.05rem; }
  .class-time { font-size: .9rem; }
}
@media (min-width: 600px) and (max-width: 960px) {
  .day-tab .long { display: inline; }
  .day-tab .short { display: none; }
}
/* No-JS fallback */
#schedule:not(.is-ready) .schedule-js { display: none; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.about-text p { color: #d4d4d8; font-size: 1.08rem; }
.about-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about-gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.about-gallery figure:first-child { grid-column: 1 / -1; }
.about-gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before {
  content: "✓"; flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font-size: .8rem; font-weight: 700; margin-top: 2px;
}
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Trainers ---------- */
.trainer-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.trainer { margin: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.trainer img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; filter: grayscale(1) contrast(1.05); transition: filter .3s ease; }
.trainer:hover img { filter: none; }
.trainer figcaption { padding: 14px 16px 18px; }
.trainer h3 { font-size: 1.1rem; margin-bottom: 6px; }
.trainer p { color: var(--muted); font-size: .9rem; margin: 0; }
@media (max-width: 520px) {
  .trainer-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .trainer figcaption { padding: 10px 12px 14px; }
  .trainer h3 { font-size: 1rem; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--red) 0%, #9f1239 100%);
  border-radius: 20px; padding: 48px; display: flex; flex-wrap: wrap; gap: 24px;
  align-items: center; justify-content: space-between;
}
.cta-band h2 { font-family: var(--display); font-style: italic; text-transform: uppercase; font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 0 0 6px; }
.cta-band p { margin: 0; color: #ffe4e6; }
.cta-band .btn-primary { background: #fff; color: #111; }
.cta-band .btn-primary:hover { background: #f4f4f5; }
@media (max-width: 600px) { .cta-band { padding: 32px 22px; } .cta-band .btn { width: 100%; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.contact .info-box { padding: 26px; }
.contact .info-box h3 { margin-bottom: 14px; }
.contact a { color: #fff; text-decoration: none; font-weight: 600; }
.contact a:hover { color: var(--red-2); }
.contact address { font-style: normal; font-size: 1.1rem; margin-bottom: 16px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contact-list small { display: block; color: var(--muted); font-size: .85rem; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); font-size: .9rem;
}
.social svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.footer-inner nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ---------- Legal pages ---------- */
.legal { padding: 64px 0 96px; }
.legal .container { max-width: 780px; }
.legal h1 { font-family: var(--display); font-style: italic; text-transform: uppercase; font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal h3 { font-size: 1.05rem; margin-top: 1.5em; }
.legal p, .legal li { color: #d4d4d8; }
.legal a { color: var(--red-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
