:root {
  --page-bg: #080808;
  --header-bg: #000;
  --card-bg: #111;
  --text: #f3f3f3;
  --text-muted: #d2d2d2;
  --accent: #cf1f1f;
  --content-max: 1120px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

a {
  color: inherit;
}

.container {
  width: min(var(--content-max), 100% - 3rem);
  margin-inline: auto;
}

.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 84px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  padding: 1rem;
  border-radius: 8px;
}

.brand-link img {
  width: min(180px, 50vw);
  height: auto;
  max-height: 70px;
}

.social-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.social-link {
  width: 2.45rem;
  height: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: #f7f7f7;
  transition: background-color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.social-link:hover,
.social-link:focus-visible {
  background: rgba(207, 31, 31, 0.24);
  border-color: rgba(207, 31, 31, 0.72);
  transform: translateY(-1px);
}

.social-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.icon {
  width: 1.22rem;
  height: 1.22rem;
  display: block;
}

.championship-main {
  padding: 2.2rem 0 4rem;
}

.hero {
  position: relative;
  min-height: min(72vh, 580px);
  border-radius: 14px;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.55) 42%,
    rgba(0, 0, 0, 0.82) 100%
  );
}

.hero--open {
  background-image: url("assets/granpix-open-background-2.png");
}

.hero--rp {
  background-image: url("assets/granpix-rp-background.jpeg");
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: clamp(1.2rem, 2vw, 2rem);
}

.hero-meta {
  margin: 0 0 0.45rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  line-height: 1.3;
}

.hero-meta time {
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  line-height: 1.05;
}

.join-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.72rem 1.15rem;
  border: 0;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.join-button:hover,
.join-button:focus-visible {
  transform: translateY(-1px);
  background: #e62525;
}

.join-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.join-button--disabled,
.join-button:disabled {
  background: #545454;
  color: #e8e8e8;
  opacity: 0.84;
  cursor: not-allowed;
  pointer-events: none;
}

.join-status {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 62ch;
}

.join-status .join-button {
  margin-top: 0;
  flex-shrink: 0;
}

.join-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  line-height: 1.45;
}

.content {
  margin-top: 2.2rem;
}

.section-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: clamp(1rem, 2vw, 1.6rem);
}

.section-card + .section-card {
  margin-top: 1rem;
}

.section-card h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
}

.section-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.68;
  font-size: clamp(0.96rem, 1.12vw, 1.1rem);
}

.inline-link {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(207, 31, 31, 0.85);
  text-underline-offset: 0.15rem;
}

.section-lead {
  margin-bottom: 1rem !important;
}

.event-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.event-item {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.event-item.is-next {
  border-color: rgba(207, 31, 31, 0.85);
  box-shadow: 0 0 0 1px rgba(207, 31, 31, 0.22);
  background: rgba(207, 31, 31, 0.08);
}

.event-item.is-current {
  border-color: rgba(94, 219, 137, 0.88);
  box-shadow: 0 0 0 1px rgba(94, 219, 137, 0.2);
  background: rgba(94, 219, 137, 0.1);
}

.event-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0.5rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-badge--next {
  color: #ffd9d9;
  background: rgba(207, 31, 31, 0.3);
}

.event-badge--current {
  color: #dafde5;
  background: rgba(94, 219, 137, 0.3);
}

.event-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  line-height: 1.3;
}

.event-item time {
  color: #f5f5f5;
}

.event-iso {
  margin: 0 0 0.35rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.79rem;
  line-height: 1.3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.event-item p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.5;
}

.event-item p + p {
  margin-top: 0.25rem;
}

.tbd-note {
  margin-top: 1rem !important;
}

.car-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.car-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
}

.car-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.car-card h3 {
  margin: 0;
  padding: 0.7rem 0.78rem 0.78rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #f2f2f2;
}

.car-stats {
  margin: 0;
  padding: 0 0.78rem 0.86rem;
  list-style: none;
  display: grid;
  gap: 0.28rem;
}

.car-stats li {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.35;
}

.car-stats li span {
  font-weight: 700;
  color: #ffffff;
}

.car-note {
  margin-top: 0.75rem !important;
  font-size: 0.84rem !important;
  color: rgba(255, 255, 255, 0.65) !important;
}

@media (max-width: 720px) {
  .container {
    width: min(var(--content-max), 100% - 1.4rem);
  }

  .site-header .container {
    min-height: 74px;
  }

  .brand-link {
    padding: 0.32rem 0.4rem;
  }

  .social-link {
    width: 2.2rem;
    height: 2.2rem;
  }

  .hero {
    min-height: 360px;
    border-radius: 10px;
  }

  .content {
    margin-top: 1.5rem;
  }

  .event-grid {
    grid-template-columns: 1fr;
  }

  .car-grid {
    grid-template-columns: 1fr;
  }

  .join-status {
    align-items: flex-start;
    gap: 0.5rem;
  }
}
