/* 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-display: block;
}

/* Nunito */
@font-face {
  font-family: 'Nunito';
  src: url('/assets/fonts/nunito-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

/* Oswald */
@font-face {
  font-family: 'Oswald';
  src: url('/assets/fonts/oswald-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: 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-hue-maroon: 319;
  --bg-hue-golden-yellow: 40;
  --bg-hue: var(--bg-hue-maroon);
  --bg-overscroll-color: hsl(var(--bg-hue), 25%, 6%);
  --bg-overlay-under-hero: hsla(var(--bg-hue), 60%, 8%, 0.4);
  --bg-gradient: linear-gradient(
    to bottom,
    transparent 0%,
    transparent calc(var(--hero-scale-px) * 0.84),
    /* hsla(var(--bg-hue), 60%, 8%, 0.4) calc(var(--hero-scale-px) * 0.89), */
    hsla(var(--bg-hue), 60%, 6%, 0.6) calc(var(--hero-scale-px) * 1.2),
    /* hsla(var(--bg-hue), 60%, 5%, 0.9) calc(var(--hero-scale-px) * 1.5), */
    hsla(var(--bg-hue), 60%, 4%, 0.8) 100%
  );
  --accent: hsl(29, 38%, 77%);
  --text: hsl(0, 0%, 91%);
  --muted: hsl(0, 0%, 65%);
  --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, 23vw, 14rem);
  --letter-spacing-hero-accent: clamp(0.3rem, 1vw, 4rem);
  --hero-scale-px: clamp(15rem, 75vw, 60rem);

  --gap-xs: 0.25rem;
  --gap-sm: 0.5rem;
  --gap-md: 1rem;
  --gap-lg: 2rem;
  --gap-xl: 3rem;
  --gap-2xl: 4rem;
  --border-divider: 1px solid hsla(0, 0%, 33%, 0);
  --border-side: 1px solid hsla(0, 0%, 100%, 0.1);

  --main-side-padding: clamp(var(--gap-md), 4vw, var(--gap-lg));
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-overscroll-color);
}

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

.outer-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-gradient);
}

.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  min-width: 100vw;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  z-index: -1;
  &.image {
    background-image: url('/assets/bg-placeholder.webp');
    background-position: 50% 0;
    background-size: cover;
    background-repeat: no-repeat;
    transition: background-image 0.4s ease;
  }
  &.overlay {
    background: var(--bg-overlay-under-hero);
  }
}

/* iOS: lock dimensions to prevent background scaling on scroll */
@supports (-webkit-touch-callout: none) {
  .bg-layer {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
  }
}

a {
  color: var(--muted);
  text-decoration: none;
}

a:hover {
  color: var(--text);
}

header {
  padding: var(--gap-lg);
  border-bottom: var(--border-divider);
}

.starts-hidden,
section.starts-hidden,
section.standard-flex.starts-hidden {
  /* win the specificity battle */
  display: none;
}

.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;
  display: flex;
  flex-direction: column;
  gap: var(--gap-2xl);
  max-width: 780px;
  margin: 0 auto;
  padding: var(--gap-2xl) var(--main-side-padding) var(--gap-2xl);
  width: 100%;
}

footer {
  padding: var(--gap-md) var(--main-side-padding);
  border-top: var(--border-divider);
  color: var(--muted);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-oswald);

  display: flex;
  gap: var(--gap-md);
  justify-content: space-between;
  align-items: center;
  .website a {
    font-size: 0.6rem;
  }

  .website,
  .jasmine-co {
    font-size: 0.75rem;
    flex: 1;
    &.jasmine-co {
      text-align: right;
    }
  }
}

.hero-scale {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(var(--font-size-h1) * 0.75);
}

@supports (animation-timeline: scroll()) {
  /* 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;
  }
}

@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 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--font-size-h1) * 0.15);
  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);
    line-height: 50%;
    font-weight: normal;
    letter-spacing: 0.5rem;
    color: white;
    font-family: var(--font-giro);
    text-shadow: 0 0 0.1em white;
  }

  .subtitle {
    font-size: calc(var(--font-size-h1) * 0.3);
    line-height: 0;
    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;
    line-height: 1.7;
    font-family: var(--font-body);
  }
}

/* Event details */
.details {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  align-items: center;
}

.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 (decorative line) */
.divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  align-self: center;
  opacity: 0.5;
  flex-shrink: 0;
}

section.standard-flex {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

/* Sections – inter-section spacing only */
main > section {
  padding-top: var(--gap-2xl);
  border-top: var(--border-divider);
}

main > section:first-child {
  padding-top: 0;
  border-top: none;
}

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);
}

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

/* Events */
.events-container {
  display: flex;
  flex-direction: column;
  gap: var(--gap-2xl);
}

/* .events-section {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xl);
} */

.events-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xl);
}

.events-pool {
  display: none;
}

.event {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

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

.event-meta-group {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xs);
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  align-items: center;
  font-family: var(--font-oswald);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.event-meta a.venue-map-link {
  display: inline-flex;
  gap: var(--gap-xs);
  align-items: center;
  color: var(--muted);
  text-decoration: none;
}

.event-meta a.venue-map-link:hover {
  color: var(--text);
}

.event-meta .add-to-calendar {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-sm);
}

.event-meta .calendar-link {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  font-size: 0.8em;
  color: var(--accent);
  text-decoration: none;
}

.event-meta .calendar-link:hover {
  color: var(--text);
}

.schedule {
  list-style: none;
  border-left: var(--border-side);
  padding-left: var(--gap-lg);
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);

  li {
    display: flex;
    flex-direction: column;
    gap: var(--gap-xs);
    font-size: 0.95rem;
    color: var(--text);

    .schedule-item {
      display: flex;
      flex-direction: column;
      gap: var(--gap-xs);
    }

    .schedule-description {
      line-height: 120%;
    }

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

    .schedule-note {
      font-size: 0.85rem;
      color: var(--muted);
      line-height: 105%;
    }
  }
}

/* About */

#about {
  .here-we-invite {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
  }
  ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    padding-left: 0;
  }

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

/* Policies */
#policies {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.policy-block {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

#policies h3 {
  font-family: var(--font-oswald);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
