/* ==========================================================================
   Section 6 · the result. Dark:
   real project screens enter from the left, circle the sentence on a tilted
   ellipse in 3D (passing behind it too) and leave on the right. The ring and
   the sentence share one 3D space, so a screen behind the sentence is hidden
   by it. Motion lives in js/s6.js. «במהירות» is chrome, on black.
   ========================================================================== */
.s6 { --ring-w: calc(440 * var(--u)); }
.s6__stage { background: var(--black); color: var(--soft-white); perspective: calc(1200 * var(--u)); }
.s6__ring { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.s6__img {
  position: absolute; left: calc(var(--ring-w) / -2); top: calc(var(--ring-w) * -.3125);
  width: var(--ring-w); aspect-ratio: 16 / 10; border-radius: calc(12 * var(--u)); object-fit: cover; display: block;
  box-shadow: 0 0 0 var(--hair) rgba(255,255,255,.12), 0 calc(30 * var(--u)) calc(70 * var(--u)) rgba(0,0,0,.6);
  opacity: 0; will-change: transform, opacity;
}
.s6__text {
  position: absolute; inset: 0; padding: 0 var(--m); pointer-events: none;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.s6__kicker { margin: 0; font-weight: 500; font-size: calc(22 * var(--u)); letter-spacing: .08em; color: var(--silver-dark); }
.s6__title { margin: calc(28 * var(--u)) 0 0; max-width: calc(900 * var(--u)); font-weight: 700; font-size: calc(96 * var(--u)); line-height: 1.12;
             text-shadow: 0 0 calc(40 * var(--u)) rgba(5,5,5,.9); }
.s6__title .w { display: inline-block; opacity: 0; filter: blur(8px); }
/* the chrome word is split too: each piece keeps the gradient */
.s6__title .w.hl-chrome { background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- phone: the 393 frames ------------------------------------------------- */
@media (max-width: 899px) {
  .s6 { --ring-w: calc(170 * var(--u)); }
  .s6__stage { perspective: calc(700 * var(--u)); }
  .s6__img { border-radius: calc(6 * var(--u)); }
  .s6__kicker { font-size: calc(14 * var(--u)); }
  .s6__title { margin-top: calc(14 * var(--u)); font-size: calc(38 * var(--u)); }
}

/* ---- touch phone: Safari repaints a blurred shadow, a blurred glow and a blur
   filter on every frame of the ring (80 to 117 ms a frame, measured 15.10 in
   WebKit); without them 26 ms. The screens keep their hairline, the words
   come in by opacity alone ------------------------------------------------- */
@media (max-width: 899px) and (pointer: coarse) {
  .s6__img { box-shadow: 0 0 0 var(--hair) rgba(255,255,255,.12); }
  .s6__title { text-shadow: none; }
  .s6__title .w { filter: none !important; }
}

/* ---- reduced motion: no ring; the sentence, then the screens in a grid ---- */
@media (prefers-reduced-motion: reduce) {
  .s6__stage { position: relative; padding: calc(160 * var(--u)) var(--m); perspective: none; }
  .s6__text { position: relative; inset: auto; padding: 0 0 calc(100 * var(--u)); }
  .s6__title .w { opacity: 1; filter: none; }
  .s6__ring { position: relative; left: auto; top: auto; width: auto; height: auto;
              display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(30 * var(--u)); }
  .s6__img { position: relative; left: auto; top: auto; width: 100%; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 899px) {
  .s6__stage { padding: calc(80 * var(--u)) calc(24 * var(--u)); }
  .s6__ring { grid-template-columns: 1fr 1fr; }
}
