/* ============================================================
   sport.technorazum.ru — Спорт-клуб
   Mobile-first | GPU-accelerated animations
   Палитра: #8B5CF6 (фиолет) · #3B82F6 (синий) · #06B6D4 (голубой) · #0a0a0f (фон)
   ============================================================ */

/* Импорт общих стилей Техноразум */
@import url('../_shared/style.css');

/* ---------- Локальные CSS-переменные ---------- */
:root {
  --sport-purple: #8B5CF6;
  --sport-blue:   #3B82F6;
  --sport-cyan:   #06B6D4;
  --sport-dark:   #0a0a0f;
  --sport-bg-2:   #111118;
  --sport-card-bg: rgba(255, 255, 255, 0.04);
  --sport-border: rgba(139, 92, 246, 0.2);
  --sport-border-hover: rgba(139, 92, 246, 0.55);
  --sport-text:   #f0f4f8;
  --sport-muted:  #94a3b8;
  --grad-primary: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
  --grad-accent:  linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
}

/* ---------- Базовая типографика (мобильный первый) ---------- */
body {
  background: var(--sport-dark);
  color: var(--sport-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem 1.25rem 4rem;
  min-height: 80vh;
  align-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(6, 182, 212, 0.14), transparent 60%),
    var(--sport-dark);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--sport-dark) 95%);
  z-index: 1;
  pointer-events: none;
}

.hero-atom {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  will-change: transform;
  animation: atom-pulse 4s ease-in-out infinite, atom-rotate 20s linear infinite;
  transform-origin: center;
}

.hero-atom .atom-svg,
.hero-atom object {
  width: min(70vw, 280px);
  height: min(70vw, 280px);
  filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.45));
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid var(--sport-border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sport-purple);
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

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

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--sport-muted);
  max-width: 36rem;
  margin: 0 auto 2rem;
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 30rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.hero-stats strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--sport-text);
}

.hero-stats span {
  font-size: 0.75rem;
  color: var(--sport-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   SECTIONS (общие)
   ============================================================ */
.section {
  padding: 4rem 1.25rem;
  max-width: 1280px;
  margin: 0 auto;
  scroll-margin-top: 80px;
}

.section-alt {
  background: var(--sport-bg-2);
  max-width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
}

.section-alt > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sport-purple);
  margin-bottom: 0.75rem;
}

.section-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.section-lead {
  font-size: 1.0625rem;
  color: var(--sport-muted);
  line-height: 1.6;
}

/* ============================================================
   CARD GRID
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 0;
  list-style: none;
}

.card-grid-3 {
  /* тот же грид, до 3 колонок на десктопе */
}

.card {
  background: var(--sport-card-bg);
  border: 1px solid var(--sport-border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  will-change: transform;
  /* GPU-анимация появления */
  animation: card-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px) translateZ(0);
  border-color: var(--sport-border-hover);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.18);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3));
}

.card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--sport-text);
}

.card p {
  color: var(--sport-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.card-tags li {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 999px;
  color: var(--sport-text);
  font-weight: 500;
}

.card-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--sport-cyan);
  transition: transform 0.2s ease, color 0.2s ease;
}

.card-link:hover {
  transform: translateX(4px);
  color: var(--sport-purple);
}

.card-glow {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.08), rgba(255, 255, 255, 0.02));
  border-color: rgba(139, 92, 246, 0.3);
}

/* Каскадные задержки анимации */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.75rem;
  border-left: 2px solid rgba(139, 92, 246, 0.3);
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.timeline-item {
  position: relative;
  padding: 0.5rem 0 2rem;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.95rem;
  top: 1.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sport-purple);
  box-shadow: 0 0 12px var(--sport-purple), 0 0 0 4px rgba(139, 92, 246, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover::before {
  transform: scale(1.4);
  box-shadow: 0 0 20px var(--sport-purple), 0 0 0 6px rgba(139, 92, 246, 0.2);
}

.timeline-date {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sport-cyan);
  margin-bottom: 0.5rem;
}

.timeline-item h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--sport-text);
}

.timeline-item p {
  color: var(--sport-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

.timeline-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px;
  color: #93C5FD;
}

/* ============================================================
   SCHEDULE TABLE
   ============================================================ */
.schedule-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--sport-border);
  background: var(--sport-card-bg);
  -webkit-overflow-scrolling: touch;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}

.schedule-table th,
.schedule-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9375rem;
}

.schedule-table thead th {
  color: var(--sport-purple);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  background: rgba(139, 92, 246, 0.06);
  border-bottom: 1px solid var(--sport-border);
  position: sticky;
  top: 0;
}

.schedule-table tbody tr {
  cursor: pointer;
  transition: background 0.2s ease;
}

.schedule-table tbody tr:hover,
.schedule-table tbody tr.is-highlighted {
  background: rgba(139, 92, 246, 0.1);
}

.schedule-table tbody tr.is-highlighted td:first-child,
.schedule-table tbody tr.is-highlighted th:first-child {
  color: var(--sport-cyan);
  font-weight: 600;
}

.schedule-table tbody th[scope="row"] {
  color: var(--sport-text);
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
}

.row-weekend {
  opacity: 0.7;
  font-style: italic;
}

.level-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.level-pro     { background: rgba(139, 92, 246, 0.18); color: #C4B5FD; }
.level-mid     { background: rgba(59, 130, 246, 0.18);  color: #93C5FD; }
.level-beg     { background: rgba(6, 182, 212, 0.18);  color: #67E8F9; }
.level-open    { background: rgba(16, 185, 129, 0.18); color: #6EE7B7; }
.level-private { background: rgba(239, 68, 68, 0.18);  color: #FCA5A5; }

/* ============================================================
   STEPS
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}

.step {
  background: var(--sport-card-bg);
  border: 1px solid var(--sport-border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.step:hover {
  transform: translateY(-3px);
  border-color: var(--sport-border-hover);
}

.step-num {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.step h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.step p {
  color: var(--sport-muted);
  font-size: 0.9375rem;
  margin: 0 0 1rem;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-list li {
  font-size: 0.9375rem;
  color: var(--sport-text);
  padding: 0.3rem 0;
}

/* ============================================================
   JOIN FORM
   ============================================================ */
.join-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.join-form input[type="email"] {
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sport-border);
  border-radius: 10px;
  color: var(--sport-text);
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.join-form input[type="email"]:focus {
  outline: none;
  border-color: var(--sport-purple);
  background: rgba(139, 92, 246, 0.08);
}

.join-form input[type="email"]::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.form-status {
  font-size: 0.8125rem;
  margin: 0.25rem 0 0;
  min-height: 1.1em;
}

.form-status.is-ok    { color: #6EE7B7; }
.form-status.is-error { color: #FCA5A5; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-primary);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  will-change: transform;
  transform: translateZ(0);
}

.btn-primary:hover {
  transform: scale(1.05) translateZ(0);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: scale(0.98) translateZ(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--sport-purple);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-1px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--sport-bg-2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 1.25rem 1.5rem;
  color: var(--sport-muted);
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto 2rem;
}

.footer-col h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sport-text);
  margin: 0 0 0.75rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  padding: 0.25rem 0;
  font-size: 0.9375rem;
}

.footer-col a {
  color: var(--sport-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--sport-purple);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--sport-text);
  margin-bottom: 0.75rem;
}

.footer-logo {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.4));
}

.footer-tag {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--sport-muted);
  margin: 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 1280px;
  margin: 0 auto;
  font-size: 0.8125rem;
}

.footer-bottom p {
  margin: 0;
}

/* ============================================================
   KEYFRAMES (GPU-friendly)
   ============================================================ */
@keyframes atom-pulse {
  0%, 100% { transform: scale(1) translateZ(0); opacity: 1; }
  50%      { transform: scale(1.04) translateZ(0); opacity: 0.95; }
}

@keyframes atom-rotate {
  from { filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.45)); }
  to   { filter: drop-shadow(0 0 60px rgba(6, 182, 212, 0.4)); }
}

@keyframes card-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px) translateZ(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0) translateZ(0);
}

/* Уважение к пользовательским настройкам */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   BREAKPOINTS
   ============================================================ */

/* ≥ 480px — большие мобильные */
@media (min-width: 480px) {
  .hero { padding: 4rem 1.5rem 5rem; }
  .section { padding: 5rem 1.5rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ≥ 768px — планшеты */
@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    padding: 5rem 2rem 6rem;
    gap: 3rem;
  }

  .hero-content {
    text-align: left;
  }

  .hero-cta {
    justify-content: flex-start;
  }

  .hero-stats {
    margin: 0;
  }

  .hero-stats li {
    align-items: flex-start;
  }

  .section { padding: 6rem 2rem; }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .timeline {
    padding-left: 2.5rem;
  }

  .timeline-item::before {
    left: -2.65rem;
  }
}

/* ≥ 1024px — небольшие десктопы */
@media (min-width: 1024px) {
  .hero {
    padding: 6rem 3rem 7rem;
    gap: 4rem;
  }

  .hero-atom .atom-svg,
  .hero-atom object {
    width: 360px;
    height: 360px;
  }

  .section { padding: 7rem 3rem; }
}

/* ≤ 768px — мобильные корректировки (override) */
@media (max-width: 767px) {
  .hero-atom .atom-svg,
  .hero-atom object {
    width: 200px;
    height: 200px;
  }

  .card-grid,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-item::before {
    left: -1.7rem;
    width: 10px;
    height: 10px;
  }
}
