:root {
  --bg: #f6f4ff;
  --text: #131517;
  --muted: #6b6d70;
  --accent: #6d5dfc;
  --max: 1080px;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131517;
    --text: #f2f2f3;
    --muted: #9a9ca0;
    --accent: #a99dff;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

em {
  font-style: italic;
}

/* Soft colour wash behind the page */
.bg-glow {
  position: fixed;
  inset: -20vh -20vw auto;
  height: 90vh;
  background:
    radial-gradient(40% 60% at 25% 30%, rgba(109, 93, 252, 0.22), transparent 70%),
    radial-gradient(35% 55% at 75% 20%, rgba(255, 138, 122, 0.2), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

/* Header */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem max(1.25rem, calc((100% - var(--max)) / 2 + 1.25rem));
}

.logo {
  font-family: var(--serif);
  font-size: 1.9rem;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-colon {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

/* Intro */
.intro h1 {
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  max-width: 14ch;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 48ch;
  color: var(--muted);
}

/* Featured next event */
.featured {
  margin-top: 5rem;
  scroll-margin-top: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.featured-title {
  font-size: clamp(3.25rem, 11vw, 7.5rem);
}

.featured-title em {
  color: var(--accent);
}

.featured-meta {
  margin: 1rem 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
}

.dot {
  color: var(--muted);
}

.countdown-status {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
}

.unit {
  display: flex;
  flex-direction: column;
}

.num {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.lbl {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 2rem 0 0;
}

.link-arrow {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.15s;
}

.link-arrow:hover,
.link-arrow:focus-visible {
  color: var(--accent);
}

/* Sections */
.section {
  margin-top: 6rem;
  scroll-margin-top: 1.5rem;
}

.section > h2 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  margin-bottom: 1.25rem;
}

.prose p {
  margin: 0 0 1rem;
  max-width: 60ch;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Past events + gallery */
.past-event + .past-event {
  margin-top: 3.5rem;
}

.past-event-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  flex-wrap: wrap;
}

.past-event-header h3 {
  font-size: 2rem;
}

.past-event-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.past-event-desc {
  margin: 0.4rem 0 1.25rem;
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.gallery-item img:hover,
.gallery-item img:focus-visible {
  transform: scale(1.03);
}

.gallery-item img:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

/* Lightbox */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 1280px);
  max-height: 90vh;
}

.lightbox::backdrop {
  background: rgba(10, 10, 14, 0.8);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox img {
  max-height: 90vh;
  width: auto;
  border-radius: 14px;
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--mono);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

.logo-small {
  font-size: 1.5rem;
  color: var(--text);
}

/* Tablet */
@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phone */
@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  main {
    padding-top: 2rem;
  }

  .logo {
    font-size: 1.6rem;
  }

  .site-nav {
    gap: 0.75rem;
  }

  .site-nav a {
    font-size: 0.75rem;
  }

  .featured {
    margin-top: 3.5rem;
  }

  .countdown {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    gap: 0.5rem;
  }

  .section {
    margin-top: 4.5rem;
  }

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

@media (max-width: 360px) {
  .site-nav {
    gap: 0.5rem;
  }

  .site-nav a {
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
