/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500&family=Nunito:wght@300;400;600&display=block');

/* Giro webfont */
@font-face {
  font-family: 'Giro';
  src:
    url('/assets/fonts/girolight001-webfont.woff2') format('woff2'),
    url('/assets/fonts/girolight001.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-giro: block;
}

@font-face {
  font-family: 'GiroOutline';
  src:
    url('/assets/fonts/girooutline001-webfont.woff2') format('woff2'),
    url('/assets/fonts/girooutline001.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-giro: block;
}

/* Dissolve animation */
@keyframes dissolve-out {
  from {
    transform: scale(1);
    opacity: 1;
    max-height: 500px;
  }
  to {
    transform: scale(0);
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
  }
}

.dissolve {
  animation: dissolve-out 0.5s ease-in-out forwards;
  overflow: hidden;
}

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

:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --accent: hsl(29, 38%, 77%);
  --text: #e8e8e8;
  --muted: #888;
  --font-giro: 'Giro', 'Nunito', 'Georgia', serif;
  --font-body: 'Nunito', 'Oswald', 'Georgia', sans-serif;
  --font-oswald: 'Oswald', 'Nunito', 'Arial', sans-serif;
  --font-size-h1: clamp(5.5rem, 20vw, 14rem);
  --letter-spacing-hero-accent: clamp(0.3rem, 1vw, 4rem);
  --hero-scale-px: clamp(30rem, 48vw, 48vw);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 2rem;
  border-bottom: 1px solid #2a2a2a;
}

.site-title {
  color: var(--accent);
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-oswald);
}

main {
  flex: 1;
  max-width: 780px;
  margin: 0 auto;

  padding: 1rem clamp(1rem, 4vw, 2rem) 2rem;
  width: 100%;
}

footer {
  padding: 2rem;
  border-top: 1px solid #2a2a2a;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-oswald);
}

/* Hero */
.hero-sticky-wrapper {
  height: var(--hero-scale-px);
  flex-shrink: 0;
}

.hero {
  position: sticky;
  top: calc(var(--font-size-h1) * 0.2);
}

.hero-scale {
  animation: hero-scale ease-out;
  animation-timeline: scroll();
  animation-range: 0px calc(var(--hero-scale-px));
  animation-fill-mode: forwards;
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes hero-scale {
  from {
    height: calc(var(--font-size-h1));
    max-height: calc(var(--font-size-h1));
    opacity: 1;
  }
  to {
    height: 0;
    max-height: 0;
    opacity: 0;
  }
}

.hero {
  text-align: center;
  text-transform: lowercase;

  .above-title,
  .below-title {
    font-size: clamp(
      1rem,
      var(--font-size-h1) * 0.15,
      var(--font-size-h1) * 0.15
    );
    text-transform: uppercase;
    font-family: var(--font-oswald);
    color: var(--accent);
    letter-spacing: var(--letter-spacing-hero-accent);
    &.above-title {
      letter-spacing: calc(var(--letter-spacing-hero-accent) * 1.33);
    }
  }

  h1 {
    font-size: var(--font-size-h1);
    margin-top: calc(var(--font-size-h1) * 0.1);
    line-height: 50%;
    font-weight: normal;
    letter-spacing: 0.5rem;
    color: white;
    font-family: var(--font-giro);
  }

  .subtitle {
    font-size: calc(var(--font-size-h1) * 0.3);
    line-height: 0;
    margin-top: calc(var(--font-size-h1) * 0.2);
    color: white;
    letter-spacing: 0.5rem;
    text-transform: lowercase;
    font-family: var(--font-giro);
  }

  .tagline {
    font-size: 1.15rem;
    color: var(--text);
    max-width: 480px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    font-family: var(--font-body);
  }
}

/* Event details */
.details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

.detail-item {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  font-family: var(--font-oswald);
}

.detail-item strong {
  color: var(--text);
}

/* Divider */
.divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 3rem auto;
  opacity: 0.5;
}

/* Sections */
main > section + section {
  border-top: 1px solid #2a2a2a;
  margin-top: 4rem;
  padding-top: 4rem;
}

section h2 {
  font-family: var(--font-oswald);
  letter-spacing: 0.1em;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: normal;
  color: var(--accent);
  margin-bottom: 2rem;
}

section p,
section li {
  line-height: 1.75;
  color: var(--text);
}

section p + p {
  margin-top: 1rem;
}

/* Upcoming dances */
.event {
  margin-bottom: 3rem;
}

.event + .event {
  border-top: 1px solid #2a2a2a;
  padding-top: 3rem;
}

.event h3 {
  font-family: var(--font-oswald);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.event-meta {
  font-family: var(--font-oswald);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.schedule {
  list-style: none;
  border-left: 1px solid #2a2a2a;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.schedule li {
  font-size: 0.95rem;
  color: var(--text);
}

.schedule-time {
  font-family: var(--font-oswald);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.1rem;
}

.schedule-note {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* About */
#about ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1rem 0;
  padding-left: 0;
}

#about li::before {
  content: '— ';
  color: var(--accent);
}

/* Policies */
#policies h3 {
  font-family: var(--font-oswald);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

#policies h3:first-of-type {
  margin-top: 0;
}
