/* =========================================================
   PROGRAM GUIDE THEME
   Matched to the wedding-site project design system.
   ========================================================= */
:root {
  --bg-page: #f8f5f0;
  --bg-alt: #f2ece3;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-footer: #C58D25;
  --card-border: rgba(0, 0, 0, 0.14);
  --card-blur: 18px;
  --text-main: #181818;
  --text-muted: #666666;
  --text-invert: #f5f5f5;
  --border-soft: rgba(0, 0, 0, 0.12);
  --font-body: "Ramabhadra", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Georgia", serif;
  --gold: #C58D25;
  --gold-deep: #8E5A16;
  --section-gap: clamp(2.25rem, 5vh, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background-color: var(--bg-footer); }
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-footer);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }

/* ========================= HERO ========================= */
.hero-placeholder {
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  position: relative;
  height: clamp(280px, 46vw, 620px);
}
.hero-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
  transform: translate3d(0, var(--hero-parallax, 0px), 0) scale(var(--hero-scale, 1.03));
  transform-origin: center center;
  will-change: transform;
  opacity: 0;
  animation: heroBgFadeIn 900ms ease-out forwards;
}
@keyframes heroBgFadeIn { from { opacity: 0; } to { opacity: 1; } }
.hero-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.28), rgba(0,0,0,.65));
  pointer-events: none;
  z-index: 1;
}
.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
  z-index: 2;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.hero-scroll-label {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-scroll-arrow {
  width: 16px;
  height: 16px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: heroScrollBounce 1.5s ease-in-out infinite;
}
@keyframes heroScrollBounce {
  0%,100% { transform: rotate(45deg) translate(0,0); }
  50% { transform: rotate(45deg) translate(6px,6px); }
}

/* ========================= INTRO ========================= */
.program-intro {
  width: 100%;
  background-color: var(--bg-footer);
  color: var(--text-main);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(2.6rem, 8vw, 5.4rem) 1.5rem clamp(3.4rem, 8vw, 5.8rem);
}
.spinner-wrapper { display: flex; justify-content: center; margin-bottom: var(--section-gap); }
.spinner-svg { display: block; width: 28vw; max-width: 160px; height: auto; animation: spin 22s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.gate-title { margin: 0 0 .5rem; font-size: 1.4rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.6; }
.brand-text { display: inline-flex; flex-direction: column; align-items: center; }
.brand-main { display: block; font-weight: 600; font-size: 1.2rem; letter-spacing: .14em; text-transform: uppercase; }
.brand-subtext { display: none; color: #181818; font-weight: 600; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; opacity: .9; }
.eyebrow { margin: .5rem 0 .5rem; font-size: .95rem; opacity: .9; }
.intro-copy { width: min(460px, 100%); margin: 0; font-size: .95rem; line-height: 1.6; opacity: .9; }

/* ========================= CEREMONY ========================= */
.guide {
  position: relative;
  background-color: var(--bg-page);
  padding: 90px 20px;
}
.guide-heading {
  width: min(1120px, 100%);
  margin: 0 auto 36px;
  text-align: center;
  display: block;
}
.guide-heading .guide-rule { display: none; }
.guide-heading > span:nth-child(2) {
  display: block;
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(20px, 4.5vw, 56px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-main);
}
.timeline {
  position: relative;
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 24px;
  scroll-snap-type: y proximity;
}
.timeline::before { display: none; }

/* Section title cards: clear and bold, but same thin border as project cards. */
.timeline-section {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  margin: 28px auto 4px;
  padding: 16px 18px 14px;
  border: 1px solid var(--card-border);
  border-radius: 3.6px;
  background-color: var(--bg-alt);
  text-align: center;
}
.timeline-section:first-child { margin-top: 0; }
.timeline-section__label {
  display: block;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1rem + .35vw, 1.28rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.timeline-section__range {
  margin: .35rem 0 0;
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.3;
  text-transform: uppercase;
}

/* Event cards use the wedding site's card/glass vocabulary. */
.ritual {
  position: relative;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(1.7rem, 4vw, 3rem);
  align-items: center;
  min-height: 240px;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--card-border);
  border-radius: 3.6px;
  background-color: var(--bg-card);
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  scroll-snap-align: start;
  scroll-margin-top: 1.25rem;
}
.ritual-art-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.ritual-art {
  width: min(220px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background-color: var(--bg-alt);
}
.ritual-copy { max-width: 650px; padding: .25rem 0; }
.ritual-kicker {
  color: var(--gold-deep);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1;
  margin-bottom: .55rem;
}
.ritual h2 {
  margin: 0 0 .55rem;
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 1.18rem + .72vw, 1.9rem);
  line-height: 1.16;
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ritual p {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .18vw, 1.1rem);
  line-height: 1.48;
}
.ritual p em { color: var(--text-main); }

/* Subtle alternating layout on wider screens, preserving the guide structure. */
@media (min-width: 860px) {
  .ritual:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) 250px; }
  .ritual:nth-of-type(even) .ritual-art-wrap { grid-column: 2; grid-row: 1; }
  .ritual:nth-of-type(even) .ritual-copy { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; }
}

/* ========================= HASHTAG OUTRO ========================= */
.hashtag-outro {
  position: relative;
  min-height: 250px;
  padding: 64px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    linear-gradient(rgba(105, 96, 92, 0.62), rgba(105, 96, 92, 0.70)),
    radial-gradient(circle at center, rgba(105, 96, 92, 0.10) 0%, rgba(105, 96, 92, 0.30) 58%, rgba(105, 96, 92, 0.52) 100%),
    url("hashtag-footer.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}
.hero-hashtag {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(.86rem, 2.4vw, 1rem);
  letter-spacing: clamp(.13em, .7vw, .22em);
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
  color: #ffffff;
  white-space: nowrap;
}
.hero-highlight {
  color: #C58D25;
  animation: heroHighlightPulse 2.4s ease-in-out infinite;
}
@keyframes heroHighlightPulse {
  0% { color: #C58D25; }
  50% { color: #ffffff; }
  100% { color: #C58D25; }
}

/* ========================= FOOTER ========================= */
.site-footer {
  background-color: var(--bg-footer);
  color: var(--text-main);
  padding: 22px 0 18px;
  font-size: 13px;
  font-weight: 600;
}
.footer-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  opacity: .86;
}
.site-footer p { margin: 0; }

/* ========================= BACK TO TOP ========================= */
.back-to-top {
  position: fixed;
  right: 2rem;
  bottom: 2.5rem;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(24,24,24,.92);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease, background-color 180ms ease;
  z-index: 40;
}
.back-to-top:hover { background: #000; }
.back-to-top:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top__arrow {
  width: 16px;
  height: 16px;
  display: block;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform-origin: center;
  animation: backToTopBounce 1.5s ease-in-out infinite;
}
@keyframes backToTopBounce {
  0%,100% { transform: translateY(2px) rotate(225deg); }
  50% { transform: translateY(-4px) rotate(225deg); }
}

/* ========================= RESPONSIVE ========================= */
@media (min-width: 768px) {
  .spinner-svg { width: 14vw; max-width: 120px; }
}
@media (min-width: 1024px) {
  .spinner-svg { width: 9vw; max-width: 100px; }
}
@media (max-width: 859px) {
  .hero-placeholder { height: clamp(330px, 78vw, 520px); }
  .hero-placeholder img { object-position: center center; }
  .guide { padding: 64px 18px 68px; }
  .timeline { gap: 18px; }
  .ritual {
    grid-template-columns: 130px minmax(0,1fr);
    gap: 1.25rem;
    min-height: 0;
    padding: 18px;
  }
  .ritual-art { width: 114px; }
  .ritual-copy { padding: 0; }
  .ritual h2 { font-size: 1.34rem; }
  .ritual p { font-size: .98rem; line-height: 1.46; }
}
@media (max-width: 768px) {
  .brand-subtext { display: inline-block; }
  .hero-scroll-label { font-size: .68rem; }
}
@media (max-width: 700px) {
  .guide { padding: 56px 18px 60px; }
  .guide-heading { margin-bottom: 24px; }
  .guide-heading > span:nth-child(2) {
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: .12em;
  }
  .timeline-section {
    width: 100%;
    margin: 18px 0 0;
    padding: 14px 14px 12px;
  }
  .timeline-section:first-child { margin-top: 0; }
  .timeline-section__label { font-size: 1rem; letter-spacing: .1em; }
  .timeline-section__range { font-size: .8rem; }
  .ritual {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 14px 15px;
  }
  .ritual-art-wrap { justify-content: center; }
  .ritual-art { width: min(118px, 36vw); }
  .ritual-copy { max-width: none; text-align: left; }
  .ritual-kicker { font-size: 15px; margin-bottom: .45rem; }
  .ritual h2 { font-size: 1.26rem; margin-bottom: .45rem; }
  .ritual p { font-size: .96rem; line-height: 1.44; }
  .back-to-top { right: 1.5rem; bottom: 1.75rem; width: 48px; height: 48px; }
  .hashtag-outro { min-height: 200px; padding: 48px 18px; background-position: center center; }
}
@media (max-width: 420px) {
  .hero-hashtag { font-size: .82rem; letter-spacing: .12em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner-svg, .hero-scroll-arrow, .back-to-top__arrow, .hero-highlight, .hero-placeholder img { animation: none; }
  .hero-placeholder img { opacity: 1; transform: none !important; }
  .back-to-top { transition: none; }
}
