/* The cord fly-in: cubes assemble into the Live Cable over a giant wordmark, then the camera flies through its loop.
   At rest (phones, reduced motion, no script) it is the finished picture: the cord over the word, the line under it. */
.cordfly { background: #0a0a0b; overflow: clip; }
.cordfly > .sc__stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; display: grid; place-items: center; }
/* one screen, played by itself: no pinning, no scroll length */
/* #flyin outranks the site-wide content-fit rule (glowkit.css), which would collapse a stage whose children are all absolute */
main > section#flyin.cordfly { position: relative; height: 100vh !important; height: 100svh !important; min-height: 0 !important; padding: 0 !important; }
.cordfly > .sc__stage { height: 100%; }

/* the floor light and the red glow under the cord */
.cf__glow { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42% 30% at 50% 66%, rgb(224 36 47 / .55), transparent 70%),
    radial-gradient(70% 50% at 50% 100%, rgb(224 36 47 / .22), transparent 70%),
    radial-gradient(60% 45% at 50% 30%, #1a1b20, transparent 75%); }
.cf__flood { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 46%, #ff3b4a 0%, #b5141f 30%, #3a0509 62%, #0a0a0b 100%); }

/* the giant wordmark behind everything */
.cf__type { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 0.04em; pointer-events: none;
  font: 900 min(25vw, 380px)/0.8 var(--font-display); font-stretch: 112%; letter-spacing: -0.05em; text-transform: uppercase; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px rgb(255 255 255 / .14); }
.cf__type span { display: inline-block; will-change: transform; }
.cf__type .cf__fill { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 0.04em;
  color: #121215; -webkit-text-stroke: 0; z-index: -1; }

/* the cloud of cubes */
.cf__cubes { position: absolute; inset: 0; z-index: 3; pointer-events: none; perspective: 900px; perspective-origin: 50% 45%; }
.cf__cube { position: absolute; left: 50%; top: 46%; width: var(--s, 22px); height: var(--s, 22px); margin: calc(var(--s, 22px) / -2) 0 0 calc(var(--s, 22px) / -2);
  border-radius: 3px; will-change: transform, opacity; transform-style: preserve-3d;
  background: linear-gradient(140deg, #3a3b42, #0c0c0e 55%, #26272c);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 10px 22px -8px #000; }
.cf__cube.is-chrome { background: linear-gradient(140deg, #ffffff, #8a8e96 38%, #26282d 55%, #e9ecf0 78%, #6d727c); }
.cf__cube.is-red { background: linear-gradient(140deg, #ff5a68, #c41623 50%, #5a0a10); box-shadow: 0 0 18px rgb(255 43 61 / .45); }
.cordfly:not(.is-live) .cf__cubes { display: none; }

/* the cord */
.cf__cord { position: relative; z-index: 2; width: min(1500px, 118vw); aspect-ratio: 2.3 / 1; transform-origin: var(--loop-x, 49%) var(--loop-y, 44%); will-change: transform, opacity; }
.cf__cord > .frame { position: absolute; inset: 0; border-radius: 0; background: none; box-shadow: none; }
.cordfly:not(.is-live) .cf__cord { transform: scale(0.72); }

/* the line, under the cord */
.cf__copy { position: absolute; z-index: 5; left: 0; right: 0; bottom: clamp(40px, 9vh, 96px); text-align: center; padding: 0 24px; will-change: transform, opacity; }
.cf__copy h2 { font: 800 clamp(2rem, 4.6vw, 4.2rem)/1 var(--font-display); font-stretch: 108%; letter-spacing: -0.035em; color: #fff; }
.cf__copy p { margin: 14px auto 0; max-width: 46ch; color: #c9c9cd; font-size: clamp(1rem, 1.3vw, 1.15rem); }

@media (max-width: 767px) {
  .cf__cord { width: 150vw; }
  .cordfly:not(.is-live) .cf__cord { transform: translateY(-6vh) scale(0.78); }
  .cf__type { font-size: 17vw; }
}
@media (prefers-reduced-motion: reduce) { .cf__cube, .cf__cord, .cf__type span, .cf__copy { will-change: auto; } }
/* the real 3D scene: one canvas over the wordmark; while it runs, the 2D cubes and the cord picture step aside */
.cf__3d { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cf__3d > canvas { display: block; width: 100%; height: 100%; }
.cordfly.has-3d :is(.cf__cubes, .cf__cord, .cf__type, .cf__glow) { display: none; }/* the 3D canvas covers the section's own soft edges, so the stage draws them again above it (under the line) */
.cordfly > .sc__stage::after { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 calc(400px + var(--edge) * 1.3) var(--edge) -400px var(--edge-c),
              inset 0 calc(-400px - var(--edge) * 1.3) var(--edge) -400px var(--edge-c); }
