:root {
  color-scheme: dark;
  --bg: #070808;
  --surface: #101414;
  --surface-2: #171d1d;
  --line: #263031;
  --text: #f5f7f5;
  --muted: #a8b2ad;
  --soft: #d7ded9;
  --fire: #ff4d22;
  --ember: #ff9f1c;
  --court: #14b8a6;
  --lime: #c4f234;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::selection {
  background: rgba(255, 77, 34, 0.35);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.icon-sprite {
  display: none;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 16px;
  left: 50%;
  display: grid;
  width: min(1180px, calc(100% - 32px));
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(7, 8, 8, 0.74);
  padding: 10px;
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.site-header.public-header {
  grid-template-columns: auto 1fr;
}

.brand,
.header-action,
.button,
.text-link,
.contact-item {
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--fire), var(--ember));
  color: #160b05;
  font-size: 13px;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.main-nav a {
  border-radius: 8px;
  color: var(--soft);
  padding: 10px 14px;
  font-size: 14px;
  transition: background 160ms ease, color 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.header-action {
  background: #f3f7ef;
  color: #111;
  font-size: 14px;
}

.button:hover,
.header-action:hover,
.contact-item:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--fire), var(--ember));
  color: #160b05;
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.hero {
  position: relative;
  display: grid;
  min-height: 78svh;
  overflow: hidden;
  align-items: end;
  padding: 140px 24px 72px;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 8, 8, 0.96) 0%, rgba(7, 8, 8, 0.78) 34%, rgba(7, 8, 8, 0.12) 76%),
    linear-gradient(180deg, rgba(7, 8, 8, 0.28) 0%, rgba(7, 8, 8, 0.84) 100%);
}

.hero-content {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: 56px;
  line-height: 0.98;
}

.hero-copy {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-meta {
  display: grid;
  width: min(720px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 38px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-meta div {
  min-width: 0;
  background: rgba(13, 16, 16, 0.76);
  padding: 18px;
}

.hero-meta dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.hero-meta dd {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 900;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-head {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.1;
}

.segmented {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px;
}

.segment {
  min-height: 38px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 800;
}

.segment:hover,
.segment.active {
  background: #f3f7ef;
  color: #111;
}

.schedule-grid {
  display: grid;
  gap: 12px;
}

.event-card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(255, 255, 255, 0.03));
  padding: 16px;
  box-shadow: var(--shadow);
}

.event-card.is-hidden {
  display: none;
}

.event-card time {
  display: grid;
  height: 82px;
  place-items: center;
  border-radius: 8px;
  background: #f3f7ef;
  color: #111;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.event-card time span {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.event-body h3 {
  margin: 3px 0 8px;
  font-size: 22px;
}

.event-body p {
  margin: 0;
  color: var(--muted);
}

.event-body .event-type {
  color: var(--ember);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.event-side {
  min-width: 132px;
  text-align: right;
}

.event-side span {
  display: block;
  font-size: 28px;
  font-weight: 900;
}

.event-side small {
  color: var(--muted);
}

.stats-section,
.contacts-section {
  border-top: 1px solid var(--line);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
  font-weight: 800;
}

.stats-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.leaderboard {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 18px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.stat-cards {
  display: grid;
  gap: 12px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 18px;
}

.stat-card .icon {
  color: var(--court);
}

.stat-card span,
.stat-card small {
  display: block;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin: 12px 0 2px;
  font-size: 36px;
}

.contacts-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 18px;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-item {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.contact-item:hover {
  border-color: rgba(255, 77, 34, 0.74);
}

.contact-item .icon {
  color: var(--fire);
  flex: 0 0 auto;
}

.contact-item strong,
.contact-item span {
  display: block;
}

.contact-item span {
  color: var(--muted);
}

.contact-item strong {
  color: var(--text);
  margin-bottom: 2px;
}

.contact-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 77, 34, 0.13), rgba(20, 184, 166, 0.08));
  padding: 18px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 8, 8, 0.72);
  color: var(--text);
  outline: 0;
  padding: 13px 14px;
}

.contact-form textarea {
  min-height: 116px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--court);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--lime);
  font-size: 14px;
}

.site-footer {
  display: flex;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 28px 0 36px;
}

.site-footer span {
  color: var(--text);
  font-weight: 900;
}

@media (min-width: 900px) {
  .hero h1 {
    font-size: 78px;
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 8px;
    top: 8px;
  }

  .site-header.public-header {
    grid-template-columns: 1fr;
  }

  .main-nav {
    order: 3;
    justify-content: start;
    overflow-x: auto;
  }

  .header-action {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    padding: 0;
    font-size: 0;
  }

  .hero {
    min-height: 82svh;
    padding-top: 178px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .section-head,
  .contacts-layout,
  .stats-layout {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .segmented {
    overflow-x: auto;
  }

  .event-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .event-side {
    grid-column: 2;
    min-width: 0;
    text-align: left;
  }

  .contacts-layout {
    display: grid;
  }

  .site-footer {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .site-header {
    width: calc(100% - 16px);
  }

  .brand {
    max-width: calc(100% - 56px);
  }

  .hero {
    min-height: 86svh;
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .section {
    width: calc(100% - 24px);
    padding: 56px 0;
  }

  .section h2 {
    font-size: 30px;
  }

  .event-card {
    gap: 14px;
    padding: 12px;
  }

  .event-card time {
    width: 68px;
    height: 72px;
  }

  .event-body h3 {
    font-size: 20px;
  }
}
