/* ==========================================================
   Общие переменные и сброс
   ========================================================== */
:root {
  --bg: #0b0b0e;
  --bg-elevated: #15151b;
  --bg-card: #1c1c24;
  --border: #2a2a35;
  --text: #f2f2f5;
  --text-muted: #a0a0ad;
  --accent: #e63946;
  --accent-hover: #c1121f;
  --accent-soft: rgba(230, 57, 70, 0.12);
  --gradient: linear-gradient(135deg, #e63946 0%, #f77f00 100%);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --transition: 0.25s ease;
  --container: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

ul {
  list-style: none;
}

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

/* ==========================================================
   Типографика
   ========================================================== */
h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

h1 {
  font-size: clamp(2.2rem, 5vw + 1rem, 4.5rem);
}

h2 {
  font-size: clamp(1.8rem, 3vw + 1rem, 3rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-muted);
}

.accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title p {
  max-width: 640px;
  margin: 1rem auto 0;
}

/* ==========================================================
   Кнопки
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(230, 57, 70, 0.45);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================
   Шапка
   ========================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 2;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
}

.burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #f2f2f5;
  border-radius: 2px;
  transition: all var(--transition);
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================
   Hero (главная страница)
   Фон кладётся в three layers: тёмный градиент-заливка сверху,
   фото снизу. Если файла нет — gradient просто занимает весь блок
   и сайт всё равно выглядит как надо.
   ========================================================== */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(
      125deg,
      rgba(11, 11, 14, 0.96) 0%,
      rgba(11, 11, 14, 0.82) 35%,
      rgba(11, 11, 14, 0.55) 75%,
      rgba(11, 11, 14, 0.9) 100%
    ),
    url("../images/hero-bg.jpg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(230, 57, 70, 0.25);
}

/* Свечение по углам — как софиты над рингом + виньетка по краям */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(230, 57, 70, 0.28),
      transparent 45%
    ),
    radial-gradient(
      circle at 90% 85%,
      rgba(247, 127, 0, 0.18),
      transparent 45%
    ),
    radial-gradient(
      ellipse at center,
      transparent 35%,
      rgba(0, 0, 0, 0.55) 100%
    );
  pointer-events: none;
  z-index: 0;
}

/* Киношная зернистость — делается SVG-шумом, без внешних файлов */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero-lead {
  font-size: 1.15rem;
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #1a0a0d;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.75) 100%),
    url("../images/trainer.jpg"),
    var(--gradient);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  box-shadow: var(--shadow), 0 0 0 1px rgba(230, 57, 70, 0.15);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.hero-visual .placeholder-label {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ==========================================================
   Секции
   ========================================================== */
section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ==========================================================
   Карточки преимуществ / услуг
   ========================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

/* ==========================================================
   Страница "О тренере"
   ========================================================== */
.page-header {
  position: relative;
  padding: 80px 0 40px;
  text-align: center;
  overflow: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(
      180deg,
      rgba(11, 11, 14, 0.9) 0%,
      rgba(11, 11, 14, 0.85) 50%,
      rgba(11, 11, 14, 1) 100%
    ),
    url("../images/hero-bg.jpg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(230, 57, 70, 0.18),
    transparent 55%
  );
  pointer-events: none;
}

.page-header > * {
  position: relative;
  z-index: 1;
}

.page-header p {
  max-width: 640px;
  margin: 1rem auto 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: start;
}

.about-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background-color: #1a0a0d;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.75) 100%),
    url("../images/trainer.jpg"),
    var(--gradient);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  box-shadow: var(--shadow), 0 0 0 1px rgba(230, 57, 70, 0.15);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem;
  color: #fff;
  text-align: center;
  position: sticky;
  top: 100px;
}

.about-photo .placeholder-label {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.about-text h2 {
  text-align: left;
}

.about-text p + p {
  margin-top: 1rem;
}

.achievements {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.achievements li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: var(--text);
}

.achievements li strong {
  display: block;
  margin-bottom: 0.25rem;
}

.achievements li span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================
   Контакты
   ========================================================== */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.contact-card .card-icon {
  margin: 0 auto 1.25rem;
}

.contact-card a {
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
  word-break: break-word;
}

.contact-card .label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* ==========================================================
   Расписание
   ========================================================== */
.schedule {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.schedule-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.3fr 1fr;
  align-items: center;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.schedule-row:last-child {
  border-bottom: 0;
}

.schedule-row.head {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.schedule-row .day {
  font-weight: 700;
  color: var(--text);
}

.schedule-row .time {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.schedule-row .type {
  color: var(--text);
}

.schedule-row .level {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.schedule-note {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
}

/* ==========================================================
   CTA блок
   ========================================================== */
.cta-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(230, 57, 70, 0.18),
    transparent 60%
  );
  pointer-events: none;
}

.cta-block > * {
  position: relative;
}

.cta-block p {
  max-width: 560px;
  margin: 1rem auto 2rem;
}

/* ==========================================================
   Футер
   ========================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: var(--accent);
}

/* ==========================================================
   Адаптив
   ========================================================== */
@media (max-width: 900px) {
  .hero {
    padding: 60px 0 70px;
  }

  .hero-inner,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-visual,
  .about-photo {
    aspect-ratio: 16 / 10;
    position: static;
    max-height: 420px;
  }

  .schedule-row {
    grid-template-columns: 1fr 1fr;
    padding: 1rem 1.25rem;
  }

  .schedule-row.head {
    display: none;
  }

  .schedule-row .day {
    grid-column: 1 / -1;
    font-size: 1.1rem;
    color: var(--accent);
  }

  .schedule-row .type {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
    transition:
      transform var(--transition),
      opacity var(--transition),
      visibility 0s linear var(--transition);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      transform var(--transition),
      opacity var(--transition),
      visibility 0s;
  }

  .nav a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav a.active::after {
    display: none;
  }

  .nav a.active {
    color: var(--accent);
  }

  section,
  .page-header {
    padding: 50px 0;
  }

  .hero {
    padding: 50px 0 60px;
  }

  h1 {
    font-size: clamp(1.85rem, 8vw, 2.6rem);
    letter-spacing: -0.03em;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 1.25rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }
}

/* Узкие телефоны (iPhone SE, старые Android) */
@media (max-width: 420px) {
  .container {
    padding: 0 16px;
  }

  .logo {
    font-size: 1.1rem;
    gap: 0.4rem;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  h1 {
    font-size: clamp(1.6rem, 8vw, 2.1rem);
  }

  h2 {
    font-size: clamp(1.4rem, 6vw, 1.9rem);
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.95rem;
    width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats {
    gap: 1rem;
    justify-content: space-between;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .card,
  .contact-card {
    padding: 1.5rem;
  }

  .schedule-row {
    padding: 0.9rem 1.1rem;
  }
}
