/* =====================================================
   Event Detail Page
   ----------------------------------------------------
   Matches Figma design: black bg, Savor titles, Montserrat
   body, Cormorant Garamond for the lead quote.
   All section gaps are 28px per spec.
   ===================================================== */

:root {
  --event-gap: 28px;          /* spec: 28px gap between components 3-10 */
  --event-pad-x: 20px;        /* horizontal page padding */
}

/* =====================================================
   TOP BAR — override the landing's style for this page
   3-column grid: back · FESTIVAL · share
   ===================================================== */
.topbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
}

.topbar-icon-btn {
  width: 32px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  border-radius: 10px;
  transition: background 0.15s ease;
}
.topbar-icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.topbar-icon-btn img { display: block; }

.topbar-title {
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.8px;   /* spec: 28% letter-spacing on "FESTIVAL" */
  color: var(--color-yellow-light);
  text-transform: uppercase;
}

/* =====================================================
   HERO — motive + glow + title + date + image
   Layout per Figma:
     · top area: rotating motive masked by glow (only top visible)
     · middle: title + date
     · bottom: hero image touching left/right edges
   ===================================================== */
.event-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-bg);
  padding-top: 60px;           /* leave space for the sticky topbar */
  isolation: isolate;
}

/* The rotating motive, absolutely positioned near the top */
.event-hero-motive {
  position: absolute;
  top: 20px;                   /* below the topbar */
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  max-width: 120%;
  aspect-ratio: 1 / 1;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  /* Mask — only the top ~45% of the motive is visible, fading out.
     This mimics the "glow as mask" rule. */
  -webkit-mask-image: linear-gradient(to bottom,
    rgba(0,0,0,1) 0%, rgba(0,0,0,0.9) 20%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0) 60%);
          mask-image: linear-gradient(to bottom,
    rgba(0,0,0,1) 0%, rgba(0,0,0,0.9) 20%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0) 60%);
}
.event-hero-motive img {
  width: 100%;
  height: 100%;
  animation: event-motive-spin 60s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes event-motive-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Soft warm glow from the top — makes the title feel lit */
.event-hero-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse 60% 70% at 50% 0%,
              rgba(206, 161, 85, 0.35) 0%,
              rgba(186, 141, 66, 0.12) 35%,
              transparent 70%);
}

/* Title + date block */
.event-hero-text {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 20px 28px;
}

.event-hero-name {
  font-family: 'Savor', 'Montserrat', serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  color: var(--color-white);
  margin: 0 auto 8px;
  max-width: 320px;
  letter-spacing: 0;
}

.event-hero-date {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-yellow-light);
  letter-spacing: 1px;
}

/* Hero image — full bleed at bottom of hero section */
.event-hero-image {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 4px;
  line-height: 0;
}
.event-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}
.event-hero-image img:not([src]),
.event-hero-image img[src=""] {
  display: none;
}

/* =====================================================
   MAP BUTTON
   ===================================================== */
.event-map-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  background: rgba(206, 161, 85, 0.24);   /* #CEA155 @ 24% */
  border: none;
  border-top: 4px solid var(--color-yellow-light);
  border-radius: 0;
  text-decoration: none;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
.event-map-btn:hover { background: rgba(206, 161, 85, 0.32); }

.event-map-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.event-map-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-map-arrow {
  flex-shrink: 0;
}

/* =====================================================
   READ FOR ME CTA
   ===================================================== */
.event-readcta-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--event-gap);
  padding: 0 var(--event-pad-x);
}

.event-readcta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--glass-fill-strong);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
          backdrop-filter: blur(12px) saturate(140%);
  border: 0.64px solid var(--glass-border);
  box-shadow: var(--shadow-inner-light), var(--shadow-inner-dark);
  border-radius: 100px;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.event-readcta:hover { opacity: 0.9; }
.event-readcta[aria-pressed="true"] { background: rgba(206, 161, 85, 0.28); }
.event-readcta-icon { flex-shrink: 0; }

/* =====================================================
   LEAD QUOTE
   ===================================================== */
.event-quote {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--color-offwhite);
  text-align: center;
  margin: var(--event-gap) var(--event-pad-x) 0;
  padding: 0;
}
.event-quote:empty { display: none; }

/* =====================================================
   LIVE CTA (for events with liveUrl)
   ===================================================== */
.event-live-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--event-gap);
  padding: 0 var(--event-pad-x);
}
.event-live-wrap[hidden] { display: none; }

.event-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: rgba(227, 38, 41, 0.14);
  border: 1px solid rgba(227, 38, 41, 0.55);
  border-radius: 100px;
  color: #FFDADA;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.event-live-btn:hover { background: rgba(227, 38, 41, 0.22); }

.event-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #E32629;
  display: inline-block;
  animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.75); opacity: 0.55; }
}

/* =====================================================
   MAIN — section stack
   ===================================================== */
.event-main {
  display: flex;
  flex-direction: column;
  gap: var(--event-gap);
  margin-top: var(--event-gap);
  padding: 0 var(--event-pad-x);
}

.event-section,
.event-fromhome {
  margin: 0;
}
.event-section[hidden],
.event-fromhome[hidden] { display: none; }

/* =====================================================
   Section heading (tilak icon + Savor title)
   ===================================================== */
.event-h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: 'Savor', 'Montserrat', serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--color-white);
  letter-spacing: 0;
}

.event-h2-icon {
  width: 10px;
  height: 19px;
  flex-shrink: 0;
}

/* =====================================================
   Details — two-column key/value list
   ===================================================== */
.event-details-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-details-list .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
}

.event-details-list dt {
  margin: 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.3px;
  color: var(--color-yellow-light);
  text-transform: uppercase;
}

.event-details-list dd {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
  text-align: right;
}

/* =====================================================
   Rituals — list with sub-heading + body per ritual
   ===================================================== */
.event-rituals-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.event-ritual {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-ritual-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
  color: var(--color-yellow-light);
  text-transform: uppercase;
  line-height: 1.35;
}

.event-ritual-body {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-offwhite);
}

/* =====================================================
   Prose blocks (story, importance, fromhome)
   ===================================================== */
.event-prose {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-offwhite);
}
.event-prose p {
  margin: 0 0 12px;
}
.event-prose p:last-child { margin-bottom: 0; }
.event-prose strong { color: var(--color-white); font-weight: 600; }
.event-prose em     { color: var(--color-yellow-light); font-style: italic; }

/* =====================================================
   "From wherever you are" card
   Spec: BG #FFF 12px (12% fill, 12px radius in Figma),
   border #FFF 24%, padding 12px, gap 12px
   Icon + title in Cormorant Garamond 20px #CEA155
   ===================================================== */
.event-fromhome {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-fromhome-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-style: italic;
  font-size: 20px;
  font-weight: 500;
  color: var(--color-yellow-light);
  line-height: 1.15;
}

.event-fromhome-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.event-fromhome-body {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-offwhite);
}
.event-fromhome-body p { margin: 0 0 12px; }
.event-fromhome-body p:last-child { margin-bottom: 0; }

/* =====================================================
   What Comes Next — cards
   ===================================================== */
.event-next-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-next-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.64px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  cursor: pointer;
}
.event-next-card:hover {
  background: rgba(206, 161, 85, 0.08);
  border-color: rgba(206, 161, 85, 0.3);
}
.event-next-card:active { transform: scale(0.98); }

.event-next-card-name {
  font-family: 'Savor', 'Montserrat', serif;
  font-weight: 400;
  font-size: 18px;
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: 4px;
}

.event-next-card-date {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--color-yellow-light);
  text-transform: uppercase;
}

.event-next-card-arrow {
  display: flex;
  align-items: center;
  color: var(--color-yellow-light);
}

/* =====================================================
   Photos from Past — 3-column grid
   ===================================================== */
.event-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.event-photos-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid #444;
  border-radius: 6px;
  display: block;
  background: rgba(255, 255, 255, 0.06);
}

.event-photos-grid .photo-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =====================================================
   PREV / NEXT NAVIGATION (hero section)
   ===================================================== */
.event-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.event-nav-title-block {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.event-nav-title-block .event-hero-name { margin: 0 auto 8px; }

.event-nav-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-yellow-light);
  border: none !important;
  box-shadow: none !important;
  background: rgba(0, 0, 0, 0.35) !important;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  transition: background 0.18s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.event-nav-btn:active { transform: scale(0.90); }

/* Keep hidden buttons in the flow so the title stays centred */
.event-nav-btn[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
}

/* =====================================================
   Bottom spacer (so content doesn't hide under bottom nav)
   ===================================================== */
.event-bottom-spacer {
  height: 140px;
}

/* =====================================================
   Reduced motion
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  .event-hero-motive img { animation: none; }
  .event-live-dot { animation: none; }
}
