:root {
  --navy: #0b2545;
  --navy-deep: #071a33;
  --rail-blue: #0a56c2;
  --sky-blue: #69a6f1;
  --saffron: #e8871e;
  --signal-green: #45d483;
  --signal-red: #e8543f;
  --cream: #f3e9d8;
  --ink: #100b05;

  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  font-family: 'Hind', system-ui, sans-serif;
  color: var(--cream);
}

button { font-family: inherit; }

/* ---------------------------------------------------------------------- */
/* Scene / background                                                     */
/* ---------------------------------------------------------------------- */

.scene {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 32px);
  background: var(--ink);
}

/* Blurred fill layer — sits behind the real image so that on tall/narrow
   screens (where the panoramic photo can't fully "cover" without losing
   its edges), there is no empty letterbox: the gap is filled with a
   softly blurred, zoomed copy of the same photo instead of hard-cropping
   the original. */
.bg-blur {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(50px) brightness(0.55) saturate(1.15);
  transform: scale(1.2);
  opacity: 0.9;
}

.bg-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
 
}

/* The source photo is a wide panorama (~2:1). On near-square viewports
   (tablets in portrait, small windows) "cover" would zoom in hard and
   crop off large portions of the train + passengers on either side, so
   we switch to "contain" there and let the blurred layer fill the rest.
   Real phone-portrait screens are much taller than they are wide, so
   "contain" there would shrink the 2:1 photo down to a thin letterboxed
   strip in the middle of the screen — that range keeps "cover" instead,
   which is the correct, expected look for a full-bleed mobile hero. */
@media (max-aspect-ratio: 4/3) and (min-aspect-ratio: 3/4) {
  .bg-video {
    object-fit: contain;
    object-position: center center;
    animation: none;
  }
}

@media (max-aspect-ratio: 3/4) {
  .bg-video {
    object-position: center 38%;
  }
}

.scene-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(120% 90% at 50% 105%, rgba(4, 12, 24, 0.55), transparent 60%),
    linear-gradient(180deg, rgba(7, 18, 33, 0.7) 0%, rgba(7, 18, 33, 0.16) 26%, rgba(7, 18, 33, 0.1) 52%, rgba(7, 18, 33, 0.6) 80%, rgba(4, 12, 24, 0.92) 100%);
}

.scene::before {
  /* soft vignette for a premium, cinematic depth */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 min(18vw, 220px) rgba(4, 10, 20, 0.65);
}

@keyframes cinematicZoom {
  from { transform: scale(1.04); }
  to   { transform: scale(1.16); }
}

@media (min-aspect-ratio: 4/3) and (min-width: 1600px) {
  .bg-video { object-position: center 38%; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-video { animation: none; transform: scale(1.08); }
}

/* ---------------------------------------------------------------------- */
/* Top bar (Spotify / YT Music links + signal decoration)                 */
/* ---------------------------------------------------------------------- */

.topbar {
  position: absolute;
  top: clamp(14px, 3vw, 28px);
  left: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 5;
}

.topbar .deco-signal {
  position: static;
}

.stream-links {
  display: flex;
  gap: 8px;
}

.stream-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(11, 37, 69, 0.5);
  border: 1px solid rgba(105, 166, 241, 0.32);
  backdrop-filter: blur(10px);
  color: var(--cream);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.stream-link i { font-size: 1rem; }

.stream-link:hover,
.stream-link:focus-visible {
  background: rgba(10, 86, 194, 0.55);
  border-color: var(--sky-blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10, 86, 194, 0.35);
  color: var(--cream);
}

.stream-link:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }

.stream-link span { display: none; }

@media (min-width: 480px) {
  .stream-link span { display: inline; }
 
}

/* Status / error banner */

.status-banner {
  position: absolute;
  top: clamp(64px, 10vh, 84px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  max-width: min(92%, 480px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(232, 84, 63, 0.16);
  border: 1px solid rgba(232, 84, 63, 0.5);
  color: var(--cream);
  font-size: 0.82rem;
  line-height: 1.4;
  backdrop-filter: blur(10px);
}

.status-banner[hidden] { display: none; }

.status-retry-btn {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--cream);
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease);
}

.status-retry-btn:hover { background: #fff; transform: translateY(-1px); }
.status-retry-btn:active { transform: translateY(0) scale(0.97); }
.status-retry-btn[hidden] { display: none; }

/* ---------------------------------------------------------------------- */
/* Railway decorations (subtle, corner-anchored)                          */
/* ---------------------------------------------------------------------- */

.track-line {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(150px, 24vh, 210px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(105, 166, 241, 0.35) 20%, rgba(105, 166, 241, 0.35) 80%, transparent);
  pointer-events: none;
}

.deco {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 233, 216, 0.65);
  padding: 6px 10px;
  background: rgba(11, 37, 69, 0.4);
  border: 1px solid rgba(105, 166, 241, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.deco-label { white-space: nowrap; }

.deco-signal { top: clamp(14px, 3vw, 28px); left: clamp(14px, 3vw, 28px); }
.deco-platform { top: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px); }

.deco-number {
  font-family: 'Hind', sans-serif;
  font-weight: 700;
  color: var(--saffron);
}

.signal-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal-red);
  box-shadow: 0 0 6px 1px var(--signal-red);
  animation: signalSwitch 6s infinite;
}

@keyframes signalSwitch {
  0%, 45%   { background: var(--signal-red); box-shadow: 0 0 6px 1px var(--signal-red); }
  50%, 95%  { background: var(--signal-green); box-shadow: 0 0 6px 1px var(--signal-green); }
  100%      { background: var(--signal-red); box-shadow: 0 0 6px 1px var(--signal-red); }
}

@media (max-width: 640px) {
  .deco { font-size: 0.58rem; padding: 5px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .signal-light { animation: none; background: var(--signal-green); box-shadow: 0 0 6px 1px var(--signal-green); }
}

/* ---------------------------------------------------------------------- */
/* Centered content                                                       */
/* ---------------------------------------------------------------------- */

.content {
  position: absolute;
  z-index: 4;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2vh, 18px);
  margin-bottom: clamp(0px, 0vh, 0px);
  top: clamp(60px, 12vh, 110px);
}

.eyebrow,
.gold-divider {
  display: none;
}

.headline {
  margin: 0;
  font-family: 'Tiro Devanagari Hindi', serif;
  font-weight: 400;
  line-height: 1.1;
  color: var(--cream);
 
  min-height: 1.2em;
  transition: opacity 0.6s var(--ease);
  background: linear-gradient(100deg, var(--cream) 30%, #fff6e6 42%, var(--cream) 54%);
  background-size: 220% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  animation: headlineSheen 7s ease-in-out 1.2s 1;
}

.headline-main {
  display: inline-block;
  font-size: clamp(3rem, 10vw, 5.6rem);
}

.headline-sub {
  display: inline-block;
  font-size: clamp(1.6rem, 5.5vw, 3rem);
}

.journey-tagline {
  margin: 0 0 14px;
  text-align: center;
  font-family: 'Tiro Devanagari Hindi', serif;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--cream);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .journey-tagline { font-size: clamp(1rem, 4vw, 1.3rem); margin-bottom: 10px; }
}

@keyframes headlineSheen {
  0%   { background-position: 130% 0; }
  55%  { background-position: -30% 0; }
  100% { background-position: -30% 0; }
}

.headline.fade {
  opacity: 0;
}

.gold-divider {
  width: 64px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--saffron), transparent);
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .headline { transition: none; animation: none; background-position: 0 0; }
}

/* ---------------------------------------------------------------------- */
/* Train horn button — floating, signal-lamp inspired                     */
/* ---------------------------------------------------------------------- */

.horn-btn {
    position: absolute;
    z-index: 5;
    right: clamp(14px, 3vw, 28px);
    bottom: clamp(122px, 41vh, 281px);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(232, 135, 30, 0.55);
    background: radial-gradient(circle at 35% 30%, rgba(232, 135, 30, 0.55), rgba(11, 37, 69, 0.75) 72%);
    color: var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05) inset, inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}

.horn-btn:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: var(--saffron);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 22px rgba(232, 135, 30, 0.4);
}

.horn-btn:active { transform: translateY(0) scale(0.94); }

.horn-btn:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

.horn-icon {
  width: 26px;
  height: 26px;
  overflow: visible;
}

.horn-body {
  fill: var(--cream);
  stroke: rgba(16, 11, 5, 0.35);
  stroke-width: 1;
}

.horn-light {
  fill: var(--saffron);
  filter: drop-shadow(0 0 2px rgba(232, 135, 30, 0.9));
}

.horn-wave {
  fill: none;
  stroke: var(--sky-blue);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.85;
}

.horn-text {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cream);
 
}
span.headline-main {
    background: linear-gradient(180deg, #FF9933 0%, #FF9933 33%, #ffffff 33%, #ffffff 66%, #138808 66%, #138808 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}
/* Expanding sound-wave rings, hidden until a blast fires */

.horn-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.horn-rings .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--saffron);
  opacity: 0;
}

.horn-btn.blast .horn-icon .horn-light {
  animation: hornLightPulse 0.4s ease-in-out 3;
}

.horn-btn.blast .ring1 { animation: hornRing 1.1s var(--ease) forwards; }
.horn-btn.blast .ring2 { animation: hornRing 1.1s var(--ease) 0.15s forwards; }
.horn-btn.blast .ring3 { animation: hornRing 1.1s var(--ease) 0.3s forwards; }

.horn-btn.blast { animation: hornShake 0.5s var(--ease); }

@keyframes hornRing {
  0%   { transform: scale(1);   opacity: 0.7; border-color: var(--saffron); }
  100% { transform: scale(2.1); opacity: 0;   border-color: var(--sky-blue); }
}

@keyframes hornShake {
  0%, 100% { transform: translateY(0) rotate(0); }
  20%      { transform: translateY(-2px) rotate(-3deg); }
  40%      { transform: translateY(0) rotate(3deg); }
  60%      { transform: translateY(-1px) rotate(-2deg); }
  80%      { transform: translateY(0) rotate(1deg); }
}

@keyframes hornLightPulse {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(232, 135, 30, 0.9)); }
  50%      { filter: drop-shadow(0 0 10px rgba(232, 135, 30, 1)); }
}

/* Whole-scene headlight flash, synced to the horn blast */

.scene.horn-flash::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 85% 78%, rgba(232, 135, 30, 0.28), transparent 55%);
  animation: sceneFlash 0.9s var(--ease);
}

@keyframes sceneFlash {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 380px) {
  .horn-btn { width: 54px; height: 54px; bottom: clamp(112px, 24vh, 150px); }
  .horn-icon { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .horn-btn.blast,
  .horn-btn.blast .horn-icon .horn-light,
  .horn-btn.blast .ring1,
  .horn-btn.blast .ring2,
  .horn-btn.blast .ring3,
  .scene.horn-flash::after {
    animation: none;
  }
}

/* ---------------------------------------------------------------------- */
/* Glass pill player — spinning cover art, minimal controls               */
/* ---------------------------------------------------------------------- */

.player-stack {
  position: absolute;
  z-index: 4;
  bottom: clamp(14px, 3vh, 30px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(480px, calc(100% - 28px));
}

.player-pill {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.4vw, 16px);
  padding: 12px 20px 12px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.pill-art-wrap {
  position: relative;
  height: 64px;
  width: 64px;
  flex-shrink: 0;
}

.pill-art-spin {
  height: 100%;
  width: 100%;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  outline: 1px solid rgba(255, 255, 255, 0.2);
  outline-offset: -1px;
  animation: pillSpin 8s linear infinite;
  animation-play-state: paused;
  background: rgba(255, 255, 255, 0.06);
}

.pill-art-spin.playing { animation-play-state: running; }

.pill-art-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: block;
}

.pill-art-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 12px;
  width: 12px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: -2px;
  pointer-events: none;
}

@keyframes pillSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.pill-info { flex: 1; min-width: 0; }

.pill-title {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.94rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pill-artist {
  margin: 2px 0 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.pill-progress-row { margin-top: 9px; }

.pill-time {
  margin: 6px 0 0;
  text-align: left;
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
}

.progress-track {
  position: relative;
  width: 100%;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.progress-track::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

.progress-fill {
  position: absolute;
  left: 0;
  height: 4px;
  width: 0%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.progress-thumb {
  position: absolute;
  left: 0%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  opacity: 0;
  transition: left 0.1s linear, opacity 0.15s var(--ease);
}

.player-pill:hover .progress-thumb,
.progress-track:focus-visible .progress-thumb {
  opacity: 1;
}

.progress-track:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 2px;
  border-radius: 999px;
}

.pill-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.12s var(--ease);
}

.pill-btn:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.pill-btn:active { transform: scale(0.93); }

.pill-btn--main {
  width: 44px;
  height: 44px;
  background: #fff;
  color: #100b05;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.pill-btn--main:hover { background: #fff; color: #100b05; transform: scale(1.05); }
.pill-btn--main:active { transform: scale(0.95); }

.pill-btn:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 2px;
}

.yt-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* Small screens                                                          */
/* ---------------------------------------------------------------------- */

@media (max-width: 380px) {
  .headline-main { font-size: 2.3rem; }
  .headline-sub { font-size: 1.35rem; }
  .player-pill { padding: 9px 14px 9px 9px; gap: 10px; }
  .pill-art-wrap { height: 52px; width: 52px; }
  .pill-title { font-size: 0.86rem; }
  .pill-artist { font-size: 0.72rem; }
  .pill-btn { width: 32px; height: 32px; }
  .pill-btn--main { width: 40px; height: 40px; }
   
}

@media (max-height: 560px) {
  .content { margin-bottom: 84px; gap: 8px; }
  .headline-main { font-size: clamp(2rem, 7vw, 3.1rem); }
  .headline-sub { font-size: clamp(1.2rem, 4vw, 1.8rem); }

  
 
}

/* ---------------------------------------------------------------------- */
/* Global reduced-motion override (belt & suspenders)                     */
/* ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 320px) and (max-width: 520) {


}