/* Home-page presentation reel. Eight scenes on one stage; the active scene gets .is-on and every
   animation below is a keyframe you can edit here. Sizes use cqw so the whole film scales with the stage. */

.reel-sec { padding-top: clamp(72px, 9vw, 130px); padding-bottom: clamp(72px, 9vw, 130px); }
.reel-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.reel-head h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); }
.reel-head p { margin: 0; max-width: 46ch; color: #aab4b7; }

.reel > .core { padding: 0; }
.reel-stage {
  --ease-x: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-q: cubic-bezier(0.25, 1, 0.5, 1);
  --ink-r: #0b0f11;
  --cream: #eef1ea;
  --g: #2fbf71;
  --g-ink: #13784a;
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--ink-r); color: #f3f5f4;
  container-type: inline-size;
  outline: none;
}
.reel-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--g); }

/* ---------- scenes ---------- */
.rs { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .75s var(--ease-q), visibility 0s .75s; }
.rs.is-on { opacity: 1; visibility: visible; z-index: 2; transition: opacity .75s var(--ease-q), visibility 0s; }
.rs.is-leaving { opacity: 0; z-index: 1; }
.rs--cream { background: var(--cream); color: #0e1412; }
.rs--dark { background: var(--ink-r); }

.rs-media { position: absolute; inset: 0; overflow: hidden; }
.rs-media img, .rs-media picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rs-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.rs--macro .rs-media::after { background: linear-gradient(0deg, rgba(11, 15, 17, .78) 0%, rgba(11, 15, 17, .1) 45%, rgba(11, 15, 17, .25) 100%); }
.rs--wide .rs-media::after { background: linear-gradient(90deg, rgba(11, 15, 17, .86) 0%, rgba(11, 15, 17, .45) 38%, rgba(11, 15, 17, 0) 62%); }

/* image motion (Ken Burns), one pass per scene */
@keyframes kb-in { from { transform: scale(1.2) translate3d(1.5%, 1%, 0); } to { transform: scale(1.04) translate3d(0, 0, 0); } }
@keyframes kb-pan { from { transform: scale(1.12) translate3d(4%, 0, 0); } to { transform: scale(1.12) translate3d(-3%, 0, 0); } }
@keyframes kb-rise { from { transform: scale(1.16) translate3d(0, 3%, 0); } to { transform: scale(1.05) translate3d(-1.5%, -1%, 0); } }
.rs.is-on .kb-in { animation: kb-in calc(var(--d) + .8s) var(--ease-q) both; }
.rs.is-on .kb-pan { animation: kb-pan calc(var(--d) + .8s) cubic-bezier(.45, 0, .25, 1) both; }
.rs.is-on .kb-rise { animation: kb-rise calc(var(--d) + .8s) var(--ease-q) both; }

/* small labels */
.rs-brand, .rs-tag {
  position: absolute; z-index: 3;
  font-family: var(--f-mono); text-transform: uppercase;
  font-size: max(10px, .82cqw); letter-spacing: .26em; opacity: .78;
}
.rs-brand { left: 4.2cqw; top: 3.6cqw; }
.rs-tag { left: 6cqw; top: 6cqw; }

/* text line reveal: each line rises out of its own mask */
.rs .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.rs .ln > span { display: block; transform: translateY(112%); }
@keyframes line-up { to { transform: translateY(0); } }
.rs.is-on .ln > span { animation: line-up 1s var(--ease-x) forwards; animation-delay: calc(.28s + var(--i, 0) * .1s); }

.rs-cap { position: absolute; z-index: 3; left: 4.2cqw; bottom: 6.6cqw; margin: 0; font-size: 2.5cqw; line-height: 1.12; font-weight: 500; letter-spacing: -.01em; }
.rs-sub { display: block; margin-top: 1.1cqw; font-family: var(--f-mono); font-size: max(10px, .85cqw); letter-spacing: .14em; text-transform: uppercase; color: #aab4b7; opacity: 0; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rs.is-on .rs-sub { animation: fade-up .8s var(--ease-x) .75s forwards; }

/* title cards */
.rs-title-wrap { position: absolute; z-index: 3; left: 6cqw; top: 50%; transform: translateY(-54%); }
.rs-title { margin: 0; font-family: var(--f-display); font-weight: 600; text-transform: uppercase; font-size: 8.6cqw; line-height: .9; letter-spacing: -.005em; }
.rs--cream .rs-title { color: var(--g-ink); }
.rs-rule { display: block; width: 5.4cqw; height: 2px; margin-top: 3.4cqw; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; opacity: .8; }
.rs--cream .rs-rule { background: var(--g-ink); }
@keyframes grow-x { to { transform: scaleX(1); } }
.rs.is-on .rs-rule { animation: grow-x .9s var(--ease-x) .7s forwards; }
.rs-ring { position: absolute; z-index: 2; right: 9cqw; top: 50%; width: 27cqw; height: 27cqw; transform: translateY(-50%) rotate(-90deg); overflow: visible; }
.rs-ring circle { fill: none; stroke: rgba(243, 245, 244, .55); stroke-width: .32; stroke-dasharray: 1; stroke-dashoffset: 1; }
.rs--cream .rs-ring circle { stroke: var(--g-ink); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.rs.is-on .rs-ring circle { animation: draw 1.7s cubic-bezier(.45, 0, .2, 1) .15s forwards; }
.rs-ring .dot { fill: var(--g); stroke: none; opacity: 0; }
.rs.is-on .rs-ring .dot { animation: fade-up .6s var(--ease-x) 1.6s forwards; }

/* wide scene: copy block + inspection ladder widget */
.rs-copy { position: absolute; z-index: 3; left: 4.2cqw; top: 50%; transform: translateY(-50%); width: 34cqw; }
.rs-copy .rs-h { margin: 0; font-size: 3.3cqw; line-height: 1.08; font-weight: 500; letter-spacing: -.015em; }
.rs-steps { display: flex; gap: .7cqw; margin-top: 2.6cqw; }
.rs-step {
  display: grid; place-items: center; min-width: 4.4cqw; height: 2.7cqw; padding: 0 .9cqw; border-radius: 99px;
  font-family: var(--f-mono); font-size: max(10px, .9cqw); letter-spacing: .06em;
  color: #8f9a9e; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  opacity: 0; transform: translateY(8px);
}
@keyframes step-in { to { opacity: 1; transform: none; } }
@keyframes step-lit { 0%, 100% { color: #8f9a9e; background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); } 20%, 60% { color: #0b0f11; background: var(--g); box-shadow: none; } }
.rs.is-on .rs-step {
  animation: step-in .6s var(--ease-x) forwards, step-lit 1.1s var(--ease-q) forwards;
  animation-delay: calc(.9s + var(--i) * .12s), calc(1.5s + var(--i) * .42s);
}
.rs.is-on .rs-step:last-child { animation: step-in .6s var(--ease-x) forwards; animation-delay: calc(.9s + var(--i) * .12s); color: #0b0f11; background: var(--g); box-shadow: none; }
.rs-steps-note { margin-top: 1.2cqw; font-family: var(--f-mono); font-size: max(10px, .8cqw); letter-spacing: .12em; text-transform: uppercase; color: #6f7b7f; opacity: 0; }
.rs.is-on .rs-steps-note { animation: fade-up .8s var(--ease-x) 1.1s forwards; }

/* hot-section scene: vibration widget */
.rs-widget {
  position: absolute; z-index: 3; left: 4.2cqw; top: 6cqw; width: 25cqw; padding: 1.5cqw 1.6cqw;
  border-radius: 1.4cqw; background: rgba(11, 15, 17, .66);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  opacity: 0; transform: translateY(14px);
}
.rs.is-on .rs-widget { animation: fade-up .9s var(--ease-x) .55s forwards; }
.rs-widget .wt { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: max(10px, .82cqw); letter-spacing: .12em; text-transform: uppercase; color: #c9d1d3; }
.rs-toggle { width: 3.2cqw; height: 1.7cqw; border-radius: 99px; background: rgba(255, 255, 255, .14); position: relative; }
.rs-toggle::after { content: ""; position: absolute; top: .25cqw; left: .25cqw; width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #fff; }
@keyframes toggle-on { to { transform: translateX(1.5cqw); } }
@keyframes toggle-bg { to { background: var(--g); } }
.rs.is-on .rs-toggle { animation: toggle-bg .4s var(--ease-q) 1.2s forwards; }
.rs.is-on .rs-toggle::after { animation: toggle-on .4s var(--ease-q) 1.2s forwards; }
.rs-wave { display: block; width: 100%; height: 4.6cqw; margin-top: 1.1cqw; overflow: visible; }
.rs-wave path { fill: none; stroke: var(--g); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.rs.is-on .rs-wave path { animation: draw 2.4s cubic-bezier(.45, 0, .2, 1) 1.3s forwards; }
.rs-widget .wn { margin-top: .8cqw; font-size: max(10px, .85cqw); color: #8f9a9e; }

/* triptych scene */
.rs-tri-head { position: absolute; z-index: 3; left: 0; right: 0; top: 4.4cqw; text-align: center; margin: 0; font-size: 1.7cqw; font-weight: 500; letter-spacing: -.01em; }
.rs-tri { position: absolute; left: 6cqw; right: 6cqw; top: 10.5cqw; bottom: 5cqw; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6cqw; }
.rs-tile { position: relative; overflow: hidden; border-radius: 1.2cqw; opacity: 0; transform: translateY(3cqw) scale(.97); }
.rs-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.rs-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11, 15, 17, .85), rgba(11, 15, 17, 0) 55%); }
.rs-tile b { position: absolute; z-index: 2; left: 1.4cqw; bottom: 1.3cqw; font-family: var(--f-display); text-transform: uppercase; font-weight: 600; font-size: 2.4cqw; letter-spacing: .01em; }
.rs-tile small { position: absolute; z-index: 2; left: 1.4cqw; bottom: 4.2cqw; font-family: var(--f-mono); font-size: max(10px, .78cqw); letter-spacing: .16em; text-transform: uppercase; color: #aab4b7; }
@keyframes tile-in { to { opacity: 1; transform: none; } }
@keyframes tile-img { to { transform: scale(1.02); } }
.rs.is-on .rs-tile { animation: tile-in 1s var(--ease-x) forwards; animation-delay: calc(.35s + var(--i) * .16s); }
.rs.is-on .rs-tile img { animation: tile-img calc(var(--d) + .6s) var(--ease-q) forwards; }

/* closing lockup */
.rs-lock { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; z-index: 3; }
.rs-marks { display: flex; align-items: center; gap: 2.4cqw; opacity: 0; transform: scale(.94); }
.rs.is-on .rs-marks { animation: tile-in 1.1s var(--ease-x) .2s forwards; }
.rs-marks img { height: 9cqw; width: auto; }
.rs-marks .x { font-family: var(--f-display); font-size: 3.4cqw; color: var(--g); }
.rs-lock .rs-title { font-size: 4.6cqw; margin-top: 2.6cqw; }
.rs-lock .rs-sub { margin-top: 1.4cqw; }
.rs-lock .btn { margin-top: 2.6cqw; opacity: 0; }
.rs.is-on.rs-lock-scene .btn { animation: fade-up .8s var(--ease-x) 1.25s forwards; }

/* ---------- controls ---------- */
.reel-ui {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: linear-gradient(0deg, rgba(11, 15, 17, .55), rgba(11, 15, 17, 0));
  opacity: 0; transition: opacity .5s var(--ease-q);
}
.reel-stage:hover .reel-ui, .reel-stage:focus-within .reel-ui, .reel-stage.is-paused .reel-ui { opacity: 1; }
@media (hover: none) { .reel-ui { opacity: 1; } }
.reel-play {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .4s var(--ease-q);
}
.reel-play:hover { background: var(--g); color: #0b0f11; }
.reel-play svg { width: 14px; height: 14px; }
.reel-play .i-play { display: none; }
.reel-stage.is-paused .reel-play .i-play { display: block; }
.reel-stage.is-paused .reel-play .i-pause { display: none; }
.reel-segs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; }
.reel-seg { height: 22px; border: 0; padding: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.reel-seg i { display: block; width: 100%; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .22); overflow: hidden; position: relative; }
.reel-seg i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }
.reel-seg.is-done i::after { transform: scaleX(1); }
@keyframes seg-fill { to { transform: scaleX(1); } }
.reel-seg.is-now i::after { animation: seg-fill var(--d) linear forwards; }
.reel-stage.is-paused .reel-seg.is-now i::after { animation-play-state: paused; }
.reel-count { flex: none; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; color: #c9d1d3; min-width: 44px; text-align: right; }

/* paused: freeze every keyframe exactly where it is */
.reel-stage.is-paused .rs, .reel-stage.is-paused .rs * , .reel-stage.is-paused .rs *::after { animation-play-state: paused !important; }

/* ---------- portrait / phones: 4:5 stage, larger type ---------- */
@media (max-width: 700px) {
  .reel-stage { aspect-ratio: 4 / 5; }
  .rs-brand { left: 6cqw; top: 6cqw; font-size: 2.4cqw; }
  .rs-cap { left: 6cqw; bottom: 21cqw; font-size: 7.2cqw; }
  .rs-sub { font-size: 2.6cqw; margin-top: 2.4cqw; }
  .rs-title-wrap { left: 7cqw; top: 40%; }
  .rs-title { font-size: 15cqw; }
  .rs-rule { width: 12cqw; margin-top: 6cqw; }
  .rs-ring { right: -14cqw; top: 68%; width: 62cqw; height: 62cqw; }
  .rs--wide .rs-media::after { background: linear-gradient(0deg, rgba(11, 15, 17, .92) 0%, rgba(11, 15, 17, .6) 45%, rgba(11, 15, 17, 0) 75%); }
  .rs-copy { left: 6cqw; right: 6cqw; width: auto; top: auto; bottom: 21cqw; transform: none; }
  .rs-copy .rs-h { font-size: 8.4cqw; }
  .rs-steps { gap: 1.6cqw; margin-top: 5cqw; flex-wrap: wrap; }
  .rs-step { min-width: 11cqw; height: 7cqw; padding: 0 2.2cqw; font-size: 2.8cqw; }
  .rs-steps-note { font-size: 2.4cqw; margin-top: 3cqw; }
  .rs-widget { left: 6cqw; right: 6cqw; width: auto; top: 18cqw; padding: 4cqw; border-radius: 4cqw; }
  .rs-widget .wt, .rs-widget .wn { font-size: 2.6cqw; }
  .rs-toggle { width: 9cqw; height: 4.8cqw; }
  .rs-toggle::after { top: .7cqw; left: .7cqw; width: 3.4cqw; height: 3.4cqw; }
  @keyframes toggle-on { to { transform: translateX(4.2cqw); } }
  .rs-wave { height: 12cqw; margin-top: 3cqw; }
  .rs-tri-head { top: 8cqw; font-size: 5cqw; padding: 0 6cqw; }
  .rs-tri { left: 6cqw; right: 6cqw; top: 24cqw; bottom: 19cqw; grid-template-columns: 1fr; gap: 2.4cqw; }
  .rs-tile { border-radius: 3cqw; }
  .rs-tile b { font-size: 6cqw; left: 4cqw; bottom: 3cqw; }
  .rs-tile small { font-size: 2.4cqw; left: 4cqw; bottom: auto; top: 3cqw; }
  .rs-marks img { height: 22cqw; }
  .rs-marks .x { font-size: 8cqw; }
  .rs-lock .rs-title { font-size: 10cqw; margin-top: 6cqw; }
  .rs-lock { padding-bottom: 8cqw; }
  .reel-ui { padding: 10px 12px; }
}

/* reduced motion: no autoplay or keyframes; every scene shows its finished state */
@media (prefers-reduced-motion: reduce) {
  .rs, .rs.is-on { transition: none; }
  .rs *, .rs *::after { animation: none !important; }
  .rs .ln > span, .rs-step, .rs-tile, .rs-marks, .rs-widget { transform: none; opacity: 1; }
  .rs-sub, .rs-steps-note, .rs-lock .btn, .rs-ring .dot { opacity: 1; }
  .rs-rule { transform: none; }
  .rs-ring circle, .rs-wave path { stroke-dashoffset: 0; }
  .reel-seg.is-now i::after { transform: scaleX(1); animation: none; }
}
