:root {
  --bg: #fffaf4;
  --ink: #1f2a37;
  --accent: #d62839;
  --accent-dark: #9b1b29;
  --teal: #0f766e;
  --card: #ffffff;
  --muted: #5f6c7b;
  --ring: rgba(214, 40, 57, 0.2);
  --radius: 20px;
  --line: #f2ddc8;
}

body[data-theme="ocean"] {
  --bg: #f5fbff;
  --ink: #0f2331;
  --accent: #0077b6;
  --accent-dark: #024f79;
  --teal: #0e7490;
  --card: #ffffff;
  --muted: #4d6475;
  --ring: rgba(0, 119, 182, 0.22);
  --line: #d4e8f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, #ffe6e8 0%, transparent 35%),
    radial-gradient(circle at 100% 10%, #dcfce7 0%, transparent 30%), var(--bg);
}

body[data-theme="ocean"] {
  background: radial-gradient(circle at 0% 0%, #dbeafe 0%, transparent 38%),
    radial-gradient(circle at 100% 8%, #cffafe 0%, transparent 30%), var(--bg);
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(120deg, transparent 45%, rgba(255, 255, 255, 0.65) 50%, transparent 55%);
  opacity: 0.2;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg) 86%, white);
  border-bottom: 1px solid var(--line);
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
}

.brand {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.brand img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid color-mix(in srgb, var(--accent) 24%, white);
}

.brand strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 0.98rem;
}

.brand span {
  font-size: 0.85rem;
  color: var(--muted);
}

.top-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.switch {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 80%, var(--bg));
  padding: 2px;
}

.switch-btn,
.pill-link,
.cta {
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  font-weight: 700;
}

.switch-btn {
  color: var(--muted);
  background: transparent;
}

.switch-btn.active {
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-dark));
}

.pill-link,
.cta {
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-dark));
  box-shadow: 0 10px 28px -14px var(--accent-dark);
}

.hero {
  padding: 72px 0 42px;
}

.eyebrow {
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1,
h2,
h3 {
  font-family: "Sora", sans-serif;
  margin: 0;
}

.hero h1 {
  max-width: 19ch;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.12;
  margin-top: 0.4rem;
}

.hero p {
  max-width: 62ch;
  color: var(--muted);
}

.stats {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
  max-width: 650px;
}

.stats li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
}

.stats strong {
  display: block;
  font-size: 1.5rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.85rem;
}

.events-section {
  padding: 24px 0 54px;
}

.events-heading {
  margin-bottom: 1rem;
}

.events-heading p,
.data-source {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.filters {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 1rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px 16px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select {
  font: inherit;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, #beaa95);
  padding: 0.65rem 0.75rem;
  background: #fffdfa;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.branch-filter {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  font: inherit;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.filter-chip.active {
  background: color-mix(in srgb, var(--accent) 13%, white);
  border-color: color-mix(in srgb, var(--accent) 30%, white);
  color: var(--accent-dark);
}

.event-list {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 14px;
}

.event-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 20px -17px rgba(0, 0, 0, 0.6);
  transform: translateY(8px);
  opacity: 0;
  animation: rise 0.38s ease forwards;
}

.event-card h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.meta {
  margin-top: 0.6rem;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag {
  display: inline-block;
  margin-bottom: 0.4rem;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ecfeff;
  color: var(--teal);
}

.empty {
  padding: 2rem;
  border-radius: 16px;
  background: #fff;
  border: 1px dashed color-mix(in srgb, var(--line) 80%, #beaa95);
  color: var(--muted);
  text-align: center;
}

.branches {
  padding-bottom: 40px;
}

.branch-grid {
  margin-top: 0.8rem;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.branch-grid article {
  border: 1px solid var(--line);
  background: linear-gradient(170deg, #fff, color-mix(in srgb, var(--bg) 70%, white));
  border-radius: 14px;
  padding: 0.95rem;
}

.branch-grid p,
.site-footer {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 3rem;
  font-size: 0.92rem;
}

@keyframes rise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .top-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-controls {
    width: 100%;
    justify-content: flex-start;
  }

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

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