/* ============================================================
   STORY PAGE — SCROLLYTELLING
   ============================================================ */

.story-hero{
  padding-top:9rem;
  padding-bottom:5rem;
  background:linear-gradient(180deg, var(--color-surface-offset), var(--color-bg));
}

.scrollytelling{
  position:relative;
  min-height:100vh;
  padding-block:6rem;
}

/* Left column: sticky media */
.scrolly-media{
  position:sticky;top:6rem;
  width:50%;
  height:calc(100vh - 8rem);
  max-height:720px;
  float:left;
  border-radius:var(--radius-md);
  overflow:hidden;
  margin-left:clamp(1rem,4vw,3rem);
  box-shadow:var(--shadow-lg);
}
.scrolly-panel{
  position:absolute;inset:0;
  opacity:0;
  transition:opacity 900ms cubic-bezier(.16,1,.3,1);
}
.scrolly-panel.active{opacity:1}
.scrolly-panel img{
  width:100%;height:100%;object-fit:cover;
}

/* Right column: steps */
.scrolly-steps{
  width:44%;
  margin-left:52%;
  padding-inline:clamp(1rem,3vw,3rem);
  padding-right:clamp(1rem,4vw,3rem);
}
.scrolly-step{
  min-height:70vh;
  padding-block:4rem;
  opacity:.5;
  transition:opacity 600ms ease;
  display:flex;flex-direction:column;justify-content:center;
}
.scrolly-step.active{opacity:1}
.scrolly-step .step-num{
  font-family:var(--font-display);
  font-size:.9rem;font-weight:400;
  color:var(--color-accent);
  letter-spacing:.24em;
  margin-bottom:1rem;
  display:block;
}
.scrolly-step h2{
  font-family:var(--font-display);
  font-size:clamp(1.75rem,3.5vw,3rem);
  font-weight:400;
  line-height:1.05;
  letter-spacing:-.025em;
  margin-bottom:1.5rem;
}
.scrolly-step p{
  font-size:var(--text-base);
  line-height:1.7;
  color:var(--color-text-muted);
  margin-bottom:1rem;
  max-width:34em;
}
.scrolly-step p strong{color:var(--color-text);font-weight:600}
.scrolly-step p em{color:var(--color-text);font-style:italic}

@media (max-width:900px){
  .scrolly-media{
    position:relative;top:auto;
    width:100%;height:400px;float:none;
    margin:0 auto 2rem;
    max-width:calc(100% - 2rem);
  }
  /* On mobile: show only the currently-active image inline instead of sticky */
  .scrolly-panel:not(.active){display:none}
  .scrolly-steps{width:100%;margin-left:0;padding-inline:1.5rem}
  .scrolly-step{min-height:auto;padding-block:2.5rem;opacity:1}
}

/* ————— Voice of Trinidad ————— */
.voice-section {
  padding: 7rem 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212,169,74,0.06), transparent 60%),
    linear-gradient(180deg, var(--color-bg) 0%, rgba(6,17,26,0.95) 100%);
  position: relative;
}
.voice-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 3rem;
  background: linear-gradient(180deg, transparent, rgba(212,169,74,0.6));
}
.voice-header { text-align: center; margin-bottom: 3rem; }
.voice-header h2 { margin-top: 1rem; color: var(--color-text); }
.voice-header .section-sub {
  color: var(--color-text-muted);
  max-width: 34rem;
  margin-left: auto; margin-right: auto;
  line-height: 1.6;
}

.voice-widget {
  background: linear-gradient(180deg, rgba(212,169,74,0.05), rgba(11,30,46,0.5));
  border: 1px solid rgba(212,169,74,0.22);
  border-radius: 4px;
  padding: 2.5rem 2rem;
  position: relative;
}
.voice-widget::before,
.voice-widget::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border: 1px solid rgba(212,169,74,0.4);
}
.voice-widget::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.voice-widget::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.voice-visual {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.voice-play {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4A94A 0%, #B88A2E 100%);
  color: #0B1E2E;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(232,200,120,0.5),
    0 0 0 6px rgba(212,169,74,0.10),
    0 8px 20px rgba(0,0,0,0.35);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.voice-play:hover:not([disabled]) {
  transform: scale(1.05);
  box-shadow:
    0 0 0 1px rgba(232,200,120,0.7),
    0 0 0 8px rgba(212,169,74,0.18),
    0 10px 28px rgba(0,0,0,0.45);
}
.voice-play:focus-visible {
  outline: 2px solid #F5DA9A;
  outline-offset: 4px;
}
.voice-play[disabled] { opacity: 0.4; cursor: not-allowed; }
.voice-play svg { transition: opacity 200ms ease; position: absolute; }
.voice-icon-pause { opacity: 0; }
.voice-play.playing .voice-icon-play { opacity: 0; }
.voice-play.playing .voice-icon-pause { opacity: 1; }
.voice-play.playing {
  animation: voicePulse 1.6s ease-in-out infinite;
}
@keyframes voicePulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(232,200,120,0.5), 0 0 0 6px rgba(212,169,74,0.10), 0 8px 20px rgba(0,0,0,0.35); }
  50%     { box-shadow: 0 0 0 1px rgba(232,200,120,0.7), 0 0 0 14px rgba(212,169,74,0.06), 0 8px 20px rgba(0,0,0,0.35); }
}
@media (prefers-reduced-motion: reduce) { .voice-play.playing { animation: none; } }

.voice-canvas-wrap {
  position: relative;
  min-width: 0;
}
.voice-canvas {
  width: 100%;
  height: 64px;
  display: block;
}
.voice-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.5rem;
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.voice-eyebrow { color: rgba(212,169,74,0.75); }
.voice-time { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

.voice-widget.unavailable .voice-canvas { opacity: 0.35; }
.voice-widget.unavailable::before { display: none; }

.voice-citation {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(212,169,74,0.18);
  margin: 0 0 0.75rem;
}
.voice-attr {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0;
}

@media (max-width: 640px) {
  .voice-widget { padding: 2rem 1.25rem; }
  .voice-visual { grid-template-columns: 1fr; }
  .voice-play { justify-self: start; }
  .voice-citation { font-size: 1rem; }
}
