:root {
  color-scheme: light;
  --red: #b83232;
  --yellow: #fff0a6;
  --blue: #0055bf;
  --green: #00a651;
  --dark: #222222;
  --ink: #302c2c;
  --muted: #696969;
  --background: #fafafa;
  --card: #ffffff;
  --line: #e7e2dc;
  --shadow: 0 14px 35px rgba(34, 34, 34, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  transform: translateY(-140%);
  border-radius: 6px;
  background: var(--dark);
  color: #ffffff;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  background:
    linear-gradient(90deg, rgba(184, 50, 50, 0.94), rgba(184, 50, 50, 0.78)),
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(255, 255, 255, 0.12) 62px 64px);
  color: #ffffff;
}

.topbar,
.hero,
.events-page,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
  height: 82px;
  width: 82px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 36%;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.social-links a,
.event-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 2px solid currentColor;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 700;
  text-decoration: none;
}

.social-links a {
  color: #ffffff;
}

.external-icon {
  flex: 0 0 auto;
  width: 0.95em;
  height: 0.95em;
  max-width: 16px;
  max-height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.hero {
  display: grid;
  align-items: end;
  min-height: 340px;
  padding: 0 0 48px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--yellow);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 7vw, 4.8rem);
  line-height: 0.98;
}

.tagline {
  max-width: 620px;
  margin-bottom: 0;
  font-size: 1.2rem;
}

.events-page {
  padding: 40px 0 58px;
}

.intro {
  max-width: 790px;
  margin-bottom: 34px;
  font-size: 1.08rem;
}

.directory {
  display: grid;
  gap: 44px;
}

.category-section h2 {
  margin-bottom: 18px;
  color: var(--dark);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 18px;
}

.event-card {
  display: flex;
  flex-direction: column;
  min-height: 310px;
  border: 1px solid var(--line);
  border-top: 7px solid var(--red);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 20px;
}

.event-card:nth-child(4n + 2) {
  border-top-color: var(--blue);
}

.event-card:nth-child(4n + 3) {
  border-top-color: var(--yellow);
}

.event-card:nth-child(4n + 4) {
  border-top-color: var(--green);
}

.event-card h3 {
  margin-bottom: 8px;
  color: var(--dark);
  font-size: 1.2rem;
}

.event-location {
  margin-bottom: 12px;
  color: var(--red);
  font-size: 0.92rem;
  font-weight: 800;
}

.event-synopsis {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border-radius: 999px;
  background: #f2f0ec;
  color: var(--muted);
  padding: 5px 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.event-link {
  align-self: flex-start;
  margin-top: auto;
  color: var(--red);
}

.event-link:hover,
.social-links a:hover {
  background: currentColor;
}

.event-link:hover {
  color: #ffffff;
  background: var(--red);
}

.social-links a:hover {
  color: var(--red);
  background: #ffffff;
}

.loading,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 22px;
}

.notice h2 {
  margin-bottom: 8px;
}

.notice p {
  margin-bottom: 0;
}

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

.site-footer p {
  margin-bottom: 0;
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: 300px;
    padding: 28px 0 44px;
  }
}
