:root {
  --bg: #F7C6A3;
  --ink: #241f1a;
  --muted: #9a7364;
  --accent: #7A1E5C;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  touch-action: pan-x;
}

.track {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  white-space: nowrap;
  padding: 0 8vw;
  will-change: transform;
}

/* ---------- text ---------- */

.word {
  display: inline-block;
  font-weight: 500;
  font-size: clamp(2.9rem, 9vw, 6rem);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  will-change: transform;
}

.word.hero {
  font-weight: 700;
  font-size: clamp(3.8rem, 14vw, 10rem);
  color: var(--accent);
}

.word.muted {
  color: var(--muted);
  font-weight: 300;
}

.word.dim {
  opacity: 0.35;
  font-weight: 300;
}

.word.accent-word {
  color: var(--accent);
  font-weight: 700;
}

.word.italic-word {
  font-style: italic;
  font-weight: 300;
  opacity: 0.8;
}

.divider {
  display: inline-block;
  width: clamp(0.4rem, 1vw, 0.6rem);
  height: clamp(0.4rem, 1vw, 0.6rem);
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------- photos ---------- */

.photo {
  position: relative;
  flex-shrink: 0;
  background: #fff;
  padding: 18px 18px 56px 18px;
  margin-inline: clamp(4rem, 12vw, 13rem);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.06),
    0 18px 40px -12px rgba(36, 31, 26, 0.25);
  border-radius: 2px;
  will-change: transform;
}

.photo img {
  display: block;
  width: auto;
  height: auto;
  max-height: 70vh;
  max-width: min(78vw, 900px);
  object-fit: contain;
  background: #e8e0d3;
}

.photo:nth-of-type(3n) { transform: rotate(-2.5deg); }
.photo:nth-of-type(3n+1) { transform: rotate(2deg); }
.photo:nth-of-type(3n+2) { transform: rotate(-1deg); }

/* ---------- ui chrome ---------- */

.hint {
  position: fixed;
  bottom: clamp(1.2rem, 4vw, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 10;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.hint-arrow {
  opacity: 0.5;
  animation: pulse 1.8s ease-in-out infinite;
}
.hint-arrow:last-child { animation-delay: 0.3s; }

@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: translateX(0); }
  50% { opacity: 0.9; }
}

.hint.faded { opacity: 0; }

.progress {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: rgba(36, 31, 26, 0.08);
  z-index: 10;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.05s linear;
}

.audio-toggle {
  position: fixed;
  top: clamp(1.2rem, 4vw, 2rem);
  right: clamp(1.2rem, 4vw, 2rem);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(36, 31, 26, 0.15);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.audio-toggle:hover {
  background: rgba(255, 255, 255, 0.55);
}

.audio-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 16px;
}

.audio-bars span {
  display: block;
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: bottom;
  transition: height 0.2s ease;
}

.audio-bars span:nth-child(2) { height: 10px; }
.audio-bars span:nth-child(3) { height: 4px; }

.audio-toggle.playing .audio-bars span {
  animation: bar-bounce 0.9s ease-in-out infinite;
}

.audio-toggle.playing .audio-bars span:nth-child(1) { animation-delay: 0s; }
.audio-toggle.playing .audio-bars span:nth-child(2) { animation-delay: 0.15s; }
.audio-toggle.playing .audio-bars span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bar-bounce {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

@media (max-width: 640px) {
  .track { gap: 1.6rem; padding: 0 6vw; }
  .photo { padding: 12px 12px 40px 12px; margin-inline: clamp(3rem, 16vw, 6rem); }
  .photo img { max-height: 62vh; max-width: 84vw; }
}
