/* The Jaipur Journey — Luxury Typography & Narrative Overlays */

:root {
  --sw-bg: #0d090a;
  --sw-ink: #fdf6ec;
  --sw-accent: #d4af37;
  --sw-sandstone: #e07a5f;
  --sw-turquoise: #2a9d8f;
  --sw-font-heading: 'Cinzel', serif;
  --sw-font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--sw-bg);
  color: var(--sw-ink);
  font-family: var(--sw-font-body);
  overflow-x: hidden;
}

/* Hide default widgets */
.sw-topbar,
.sw-route,
.sw-hint,
.sw-scrollbar,
.sw-sky,
.sw-particles,
.notice-modal {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Story Overlays Layer — Main Scrim */
.sw-copylayer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
}

/* Natural White Blur Scrim on the bottom-left for beats 2, 3, 4 (Expanded & High Contrast) */
.sw-side-scrim {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  background: radial-gradient(ellipse 1150px 950px at 0% 100%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.94) 40%, rgba(255, 255, 255, 0.82) 62%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%);
  backdrop-filter: blur(36px) saturate(140%);
  -webkit-backdrop-filter: blur(36px) saturate(140%);
  -webkit-mask-image: radial-gradient(ellipse 1100px 900px at 0% 100%, black 0%, black 45%, rgba(0, 0, 0, 0.6) 72%, transparent 95%);
  mask-image: radial-gradient(ellipse 1100px 900px at 0% 100%, black 0%, black 45%, rgba(0, 0, 0, 0.6) 72%, transparent 95%);
}

/* Beat 1 (Centered Hero Beat) */
.story-beat {
  position: absolute;
  max-width: 820px;
  width: 90%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
}

/* Side Beats (Beats 2, 3, 4 matching attached screenshot layout) */
.story-beat--side {
  position: absolute;
  left: clamp(24px, 6vw, 92px);
  bottom: clamp(48px, 12vh, 108px);
  top: auto;
  right: auto;
  max-width: min(90vw, 620px);
  width: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  will-change: transform, opacity;
}

/* Side Number Counter (02 / 04) */
.sw-side__num {
  font-family: ui-monospace, 'Plus Jakarta Sans', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #475569;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.8);
}

/* Side Display Heading Title (Dark Charcoal / Black) */
.sw-side__title {
  font-family: 'Plus Jakarta Sans', var(--sw-font-heading), sans-serif;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-weight: 800;
  color: #09090b;
  line-height: 1.16;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem 0;
  max-width: 23ch;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.6);
}

/* Side Pill Tags (Light Frosted Glass with Dark Slate Text) */
.sw-side__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.sw-side__tags li {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #334155;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* Primary CTA Button on Side (Beat 4) — Only shows at complete end of background animation */
.sw-side__btn {
  margin-top: 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 1.1rem 2.5rem;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-family: var(--sw-font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, background 0.28s ease;
}

.sw-side__btn.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sw-side__btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.35);
  background: #1e293b;
}

.sw-side__btn .down-arrow-icon {
  width: 20px;
  height: 20px;
  fill: #ffffff;
  animation: bounceArrow 2s infinite ease-in-out;
}

/* Beat 1 Date Header (Blue/Purple) */
.beat-date {
  font-family: var(--sw-font-heading);
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  font-weight: 700;
  color: #A594F9;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.95), 0 0 20px rgba(165, 148, 249, 0.4);
}

/* Display Heading Title for Beat 1 (White) */
.beat-title {
  font-family: var(--sw-font-heading);
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.08;
  letter-spacing: 0.02em;
  margin: 0;
  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.95), 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* Name Container & Cycler (Blue/Purple) */
.name-wrapper {
  margin-top: 0.6rem;
  min-height: clamp(3.2rem, 7vw, 5.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.name-cycler {
  display: inline-block;
  font-family: var(--sw-font-heading);
  font-size: clamp(2.8rem, 6.4vw, 5.2rem);
  font-weight: 800;
  color: #A594F9;
  letter-spacing: 0.06em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.95), 0 0 35px rgba(165, 148, 249, 0.5);
  border-bottom: 3.5px solid #A594F9;
  padding: 0 1.2rem 4px 1.2rem;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
}

.name-cycler.swap {
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
}

@keyframes bounceArrow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(6px);
  }
  60% {
    transform: translateY(3px);
  }
}

/* Videos Section Below 3D World — Unlocked only upon clicking the final button */
#videos-section {
  position: relative;
  z-index: 300;
  min-height: 100vh;
  background-color: #0D090A;
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  box-shadow: 0 -30px 60px rgba(0, 0, 0, 0.95);
  transition: opacity 0.6s ease;
}

#videos-section.is-unlocked {
  display: flex;
  opacity: 1;
}

.videos-header {
  text-align: center;
  max-width: 600px;
}

.videos-header h2 {
  font-family: var(--sw-font-heading);
  font-size: 2.5rem;
  color: var(--sw-accent);
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.02em;
}

.videos-header p {
  color: rgba(253, 246, 236, 0.7);
  font-size: 1.05rem;
}

/* Luxury Gold Loading Overlay */
.sw-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(circle at center, rgba(20, 14, 16, 0.88) 0%, rgba(13, 9, 10, 0.96) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.sw-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.03);
}

.sw-loader__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sw-loader__spinner {
  position: relative;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
}

.sw-loader__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid rgba(212, 175, 55, 0.15);
  border-top-color: var(--sw-accent);
  border-right-color: #e07a5f;
  animation: sw-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.sw-loader__ring-inner {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 2px dashed rgba(212, 175, 55, 0.35);
  animation: sw-spin-reverse 3s linear infinite;
}

.sw-loader__pct {
  font-family: var(--sw-font-heading), 'Cinzel', ui-monospace, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sw-accent);
  text-shadow: 0 0 16px rgba(212, 175, 55, 0.65);
  user-select: none;
  letter-spacing: 0.04em;
}

@keyframes sw-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes sw-spin-reverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@media (max-width: 860px) {
  .sw-side-scrim {
    background: radial-gradient(circle 600px at 0% 100%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 40%, rgba(255, 255, 255, 0.65) 68%, rgba(255, 255, 255, 0) 90%);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
  }

  .story-beat--side {
    left: clamp(16px, 4vw, 24px);
    right: clamp(16px, 4vw, 24px);
    bottom: calc(clamp(32px, 8vh, 64px) + env(safe-area-inset-bottom));
    max-width: none;
  }

  .sw-side__title {
    font-size: clamp(1.85rem, 6.8vw, 2.6rem);
  }

  .sw-side__body {
    font-size: clamp(0.9rem, 3.2vw, 1.05rem);
    margin-bottom: 1.2rem;
  }

  .sw-side__tags li {
    font-size: 0.78rem;
    padding: 6px 14px;
  }
}


/* Appreciation video wall */
#videos-section {
  justify-content: flex-start;
  gap: 3rem;
}

.videos-grid {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-auto-flow: dense;
  gap: 1.5rem;
}

.video-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.video-card--wide {
  grid-column: span 2;
}

.video-card__frame {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1214;
  border: 1px solid rgba(212, 175, 55, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.video-card__frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.video-card figcaption {
  font-family: var(--sw-font-heading);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--sw-accent);
  text-align: center;
}

@media (max-width: 560px) {
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
  }
  #videos-section {
    padding: 3.5rem 1rem;
  }
}
