:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #1c2333;
  --text-muted: #5a6478;
  --border: #e2e6f0;
  --primary: #9e1b32;
  --primary-dark: #6e1322;
  --accent: #b8860b;
  --shadow: 0 4px 16px rgba(28, 35, 51, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.header-inner .title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-inner .subtitle {
  margin: 0.5rem 0 0;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.88);
}

/* Tabs */
.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}

.tab-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.tabs-select {
  display: none;
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235a6478'%3E%3Cpath d='M5.5 7.5l4.5 5 4.5-5z'/%3E%3C/svg%3E") no-repeat right 1rem center;
  background-size: 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.9rem 2.5rem 0.9rem 1.25rem;
  cursor: pointer;
}

/* Content */
.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-top: 0;
  margin-bottom: 1rem;
}

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

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 70ch;
}

/* Overview flow cards */
.board-flow { margin-top: 2rem; }

.flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.25rem 0;
}

.flow-card {
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 0;
}

.flow-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Image zoom lightbox */
.image-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 20, 0.75);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1000;
}

.image-overlay-backdrop.visible { opacity: 1; }

.image-zoom-clone {
  position: fixed;
  z-index: 1001;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
  transition: top 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
              left 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
              width 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
              height 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.flow-card figcaption {
  padding: 1rem 1.25rem 1.25rem;
}

.flow-card figcaption p {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Rules columns */
.rules-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.rule-box {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.rule-box ul {
  margin: 0;
  padding-left: 1.2rem;
}

.rule-box li { margin-bottom: 0.6rem; }
.rule-box li:last-child { margin-bottom: 0; }

/* Video */
.video-wrap {
  margin-top: 1.5rem;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}

.video-wrap video {
  width: 100%;
  display: block;
  max-height: 70vh;
}

/* Sponsors */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.sponsor-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--accent);
}

.sponsor-card h3 { margin-top: 0; }
.sponsor-card p { margin-bottom: 0; color: var(--text-muted); }

.benefits-list {
  padding-left: 1.2rem;
  max-width: 65ch;
}

.benefits-list li { margin-bottom: 0.6rem; }

.cta {
  margin-top: 2.5rem;
  padding: 2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
}

.cta p {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
}

.cta-button {
  display: inline-block;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.cta-button:hover { transform: translateY(-2px); }

/* Footer */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .tabs { display: none; }
  .tabs-select { display: block; }
}
