/* ===== (09) Storytelling & film — Figma 3280:21982 ===== */

.story { padding: 142px 0 70px; overflow: hidden; }
.story__title { color: #000; line-height: 0.98; letter-spacing: -0.034em; }
.story__title .soft { color: rgba(0, 0, 0, 0.3); }
.story__lead { max-width: 795px; line-height: 1.5; }

/* --- Film ring — Figma 3280:21982 layout, Cleo-style drag motion ---
   Rest state matches Figma at 1920: centre card 833 × 564, side cards turned
   toward the viewer and cut by the screen edges, 174px gap, peach band behind.
   story_ring_controller.js places every card per frame. */
.story-ring {
  --card-w: min(833px, 43.4vw);
  --card-h: calc(var(--card-w) * 564 / 833);
  position: relative;
  margin-top: 2px;
  padding: 72px 0;
  background: linear-gradient(180deg, rgba(249, 61, 13, 0) 0%, rgba(249, 61, 13, 0.3) 50%, rgba(249, 61, 13, 0) 100%);
  outline: none;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.story-ring.is-dragging { cursor: grabbing; }
.story-ring:focus-visible .story-card.is-center { outline: 2px solid var(--accent); outline-offset: 6px; }

.story-ring__stage {
  position: relative;
  height: var(--card-h);
  transform-style: preserve-3d;
}

.story-card {
  --focus: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 20px;
  overflow: hidden;
  background: #111;
  transform: translate(-50%, -50%);
  backface-visibility: hidden;
  will-change: transform;
}
.story-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus-x, 50%) 50%;
  pointer-events: none;
}
.story-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.5) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.story-card__caption {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 28px;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.5s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1));
}
/* Title + subtitle stay out of the way and appear when you hover the centre film
   (or tab to it). On touch screens, where there's no hover, they show while paused. */
.story-card.is-center:hover .story-card__shade,
.story-card.is-center:focus-within .story-card__shade { opacity: var(--focus); }
.story-card.is-center:hover .story-card__caption,
.story-card.is-center:focus-within .story-card__caption { opacity: var(--focus); transform: none; }
@media (hover: none) {
  .story-card.is-center:not(.is-playing) .story-card__shade { opacity: var(--focus); }
  .story-card.is-center:not(.is-playing) .story-card__caption { opacity: var(--focus); transform: none; }
}
.story-card__caption h3 { font-weight: 400; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.story-card__caption p { margin-top: 6px; font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, 0.8); }

/* Centre play button (Figma): frosted circle; hides while the film plays and
   comes back as a pause button on hover. */
.story-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: #fff;
  background: rgba(12, 12, 14, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transform: translate(-50%, -50%) scale(calc(0.6 + var(--focus) * 0.4));
  opacity: var(--focus);
  pointer-events: none;
  transition: background-color 0.25s, opacity 0.3s;
}
.story-card.is-center .story-card__play { pointer-events: auto; }
.story-card__play:hover { background: var(--accent); }
.story-card__play svg { width: 22px; height: 22px; }
.story-card__ico { display: grid; }
.story-card__ico--play svg { margin-left: 3px; }
.story-card__ico--pause { display: none; }
.story-card.is-playing .story-card__ico--play { display: none; }
.story-card.is-playing .story-card__ico--pause { display: grid; }
/* While a film plays the big button steps aside; hovering the film brings it back
   as a pause button (and a click anywhere on the film pauses / plays it too). */
.story-card.is-playing .story-card__play { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
.story-card.is-playing:hover .story-card__play,
.story-card.is-playing .story-card__play:focus-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.story-card__play { transition: background-color 0.25s, opacity 0.3s, transform 0.4s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)); }
/* buffering: a thin spinning ring around the play button */
.story-card__play::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: #fff;
  opacity: 0; transition: opacity 0.2s;
}
.story-card.is-loading .story-card__play { opacity: var(--focus); }
.story-card.is-loading .story-card__play::after { opacity: 1; animation: story-spin 0.8s linear infinite; }
@keyframes story-spin { to { transform: rotate(360deg); } }

/* Sound: a small, quiet icon button in the centre card's top-right corner.
   Muted → speaker with a cross; on → speaker with waves. No text, no colour change. */
.story-card__controls {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  display: flex;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.story-card.is-center .story-card__controls { opacity: calc(var(--focus) * 0.75); pointer-events: auto; }
.story-card.is-center:hover .story-card__controls,
.story-card.is-center .story-card__controls:focus-within { opacity: var(--focus); }
.story-card__ctl {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: #fff;
  background: rgba(12, 12, 14, 0.4);
  transition: background-color 0.25s;
}
.story-card__ctl:hover { background: rgba(12, 12, 14, 0.65); }
.story-card__ctl:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.story-card__sound svg { width: 17px; height: 17px; }
.story-card__sound-text, .story-card__eq { display: none; }
.story-card__sound-ico { display: grid; }
.story-card__sound-ico--on { display: none; }
.story-card.has-sound .story-card__sound-ico--on { display: grid; }
.story-card.has-sound .story-card__sound-ico--off { display: none; }

/* tablets: bigger centre film (the desktop size is tuned for wide screens) */
@media (min-width: 768px) and (max-width: 1100px) {
  .story-ring { --card-w: 58vw; }
}

@media (max-width: 767px) {
  .story-card__controls { top: 10px; right: 10px; }
  .story-card__ctl { width: 32px; height: 32px; }
  .story { padding-top: 96px; }
  .story-ring { --card-w: 80vw; margin-top: 40px; padding: 48px 0; }
  .story-card { border-radius: 16px; }
  .story-card__caption { left: 16px; right: 16px; bottom: 12px; }
  .story-card__caption h3 { font-size: 15px; }
  .story-card__caption p { display: none; }
  .story-card__play { width: 44px; height: 44px; }
  .story-card__play svg { width: 18px; height: 18px; }
}
