/* R4: a large frame against layered royal-blue light. */
.frames {
  isolation: isolate;
  background:
    radial-gradient(ellipse 58% 95% at 28% 35%, rgba(69,139,255,.96) 0%, rgba(28,98,247,.75) 32%, rgba(13,49,191,.2) 67%, transparent 85%),
    linear-gradient(116deg, #06134f 0%, #1040c4 25%, #0d55e4 43%, #0829b0 65%, #030c44 100%);
}
.frames::before {
  z-index: -1;
  inset: -18% -12%;
  clip-path: none;
  background:
    radial-gradient(ellipse 42% 68% at 31% 46%, rgba(151,195,255,.24), transparent 74%),
    linear-gradient(114deg, transparent 29%, rgba(114,172,255,.28) 29.2%, rgba(170,207,255,.13) 42%, transparent 42.2%),
    linear-gradient(114deg, transparent 47%, rgba(222,238,255,.2) 47.05%, rgba(222,238,255,.2) 47.18%, transparent 47.3%);
  animation: blue-light-drift 19s ease-in-out infinite alternate;
}
.frames::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 24% at 24% 92%, rgba(91,154,255,.4), transparent 74%),
    radial-gradient(ellipse 50% 55% at 44% -12%, rgba(206,227,255,.22), transparent 72%),
    linear-gradient(180deg, transparent 72%, rgba(0,5,45,.5));
}
.frames .frame-ghost {
  z-index: 1;
  color: rgba(226,239,255,.095);
  -webkit-text-stroke: 1px rgba(226,239,255,.22);
  opacity: 1;
  letter-spacing: -.035em;
}
.frames .frame-description { z-index: 5; }
.frames .frame-controls {
  position: relative;
  z-index: 8;
  border-top-color: rgba(225,239,255,.38);
  background: linear-gradient(100deg, rgba(3,10,66,.76), rgba(5,28,121,.42) 65%, rgba(2,7,39,.8));
  backdrop-filter: blur(16px);
  box-shadow: 0 -20px 50px rgba(1,7,58,.12);
}
.frames .frame-tabs button:not([aria-selected="true"]) { text-shadow: 0 2px 10px rgba(0,8,55,.25); }
.frames .frame-arrows button { background: rgba(5,15,74,.25); }
.frames .frame-arrows button:hover { background: white; }

@media (min-width: 1101px) {
  .frames { padding-top: 62px; padding-bottom: 30px; }
  .frames > .section-top { z-index: 4; margin-bottom: 0; pointer-events: none; }
  .frames .display-title { font-size: 80px; line-height: 1.04; margin-top: 14px; max-width: 300px; white-space: pre-line; }
  .frames .eyebrow { font-size: 16px; }
  .frames .frame-stage { min-height: 0; overflow: visible; }
  .frame-stage[data-frame-index] #frame-image.pose-art {
    z-index: 3;
    width: auto;
    height: clamp(700px, 78svh, 850px);
    max-width: 68%;
    max-height: none;
    top: auto;
    bottom: 0;
    left: 11%;
    transform: none;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(22px 18px 0 rgba(0,9,74,.22)) drop-shadow(0 0 35px rgba(145,193,255,.18));
  }
  .frames .frame-description { width: 34%; top: 15%; }
  .frames .frame-description h3 { font-size: 104px; }
  .frames .frame-ghost { top: 6%; left: -5%; font-size: clamp(270px, 21vw, 410px); }
  .frames .frame-slash {
    z-index: 2;
    left: 53%;
    top: 2%;
    height: 80%;
    width: 9px;
    background: linear-gradient(180deg, rgba(236,246,255,.9), rgba(168,211,255,.35));
    box-shadow: 0 0 35px rgba(155,201,255,.35);
  }
  .frames .frame-counter { z-index: 4; bottom: 3%; }
  .frames .frame-controls { padding: 15px 18px 13px; margin: 0 -18px; }
}
@media (min-width: 1101px) and (max-height: 980px) {
  .frames { padding-top: 42px; padding-bottom: 24px; }
  .frames .display-title { font-size: 60px; }
  .frame-stage[data-frame-index] #frame-image.pose-art { height: clamp(450px, calc(100svh - 238px), 720px); left: 10%; bottom: 4px; }
  .frames .frame-description { top: 16%; }
  .frames .frame-description h3 { font-size: 84px; }
  .frames .frame-ghost { font-size: 21vw; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .frames .frame-ghost { font-size: 26vw; }
  .frame-stage[data-frame-index] #frame-image.pose-art { width: 70%; height: 94%; left: -6%; }
}
@media (max-width: 760px) {
  .frames { background: radial-gradient(ellipse 110% 55% at 35% 25%, #347eff 0%, #1357e3 40%, transparent 83%), linear-gradient(165deg,#072c9c,#0014ab 60%,#030c44); }
  .frame-stage[data-frame-index] #frame-image.pose-art { width: 116%; height: 61%; left: -8%; top: -1%; }
  .frames .frame-controls { padding: 15px 0 0; background: rgba(1,11,71,.42); }
}
@keyframes blue-light-drift { from { transform: translate(-2%, -1%); } to { transform: translate(2%, 1.5%); } }
html.reduce-motion .frames::before { animation: none; }
