/* ============ STUDIOX — Studio section (REBUILT FLAT, 2026-12-01) ============
   Rebuilt from zero after three optimisation rounds failed to cure
   the section's scroll lag on a real GPU. The DESIGN is pixel-faithful
   to the previous build (Parlo-style: dot field + perspective grid
   floor, rotating text drum, Fluctuate wordmark, centred headline
   block) — only the skeleton changed:

   FLAT STRUCTURE — the section has exactly three layers:
     1. #studioxBg — ONE static canvas: black fill, dot field, grid
        floor, horizon hairline AND the soft centre halo are all
        painted into this single bitmap, once (redrawn on resize
        only). No second background div, no stage wrapper.
     2. .studiox-content — the wordmark + headline block.
     3. The drum — the only animated element, inside the content.
   Nothing in this file creates a 3D rendering context outside the
   drum's own small ring scene: no perspective / preserve-3d on the
   section or any wrapper, no stacked full-size layers, no filters,
   no backdrop-filters, no masks (the drum's edge fade is painted by
   two static gradient overlays, as before). The Services overlap
   seam (rounded top corners, negative margin, seam shadow) lives in
   smooth.css and is untouched. */

#studio.studiox-section {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 800px;
  background: #000;
  overflow: hidden;
  font-family: 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: normal;
}

/* ---------- layer 1: the single static background canvas ---------- */
#studioxBg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}

/* ---------- layer 2: content ---------- */
.studiox-content {
  position: relative; z-index: 2;
  height: 100%;
  box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 0 24px;
  /* Composition (settled 2026-12-01): the headline block's centre
     sits on the section's vertical centre. The flex column centres
     the whole group (wordmark + gap + block); the bottom padding
     compensates for the wordmark + gap above the block, so the
     BLOCK — not the group — is what lands dead centre. Wordmark
     height = width x 174/947 (600px -> 110.2px). */
  padding-bottom: calc(110.2px + clamp(44px, 10vh, 120px));
}
.studiox-wordmark {
  width: 600px; height: auto;
  margin-top: 0;
  user-select: none; -webkit-user-drag: none;
}
.studiox-hero-block {
  display: flex; flex-direction: column; align-items: center;
  width: 100%;
  /* The wordmark -> block gap (90px at a 900px-tall viewport). */
  margin-top: clamp(44px, 10vh, 120px);
}

/* ===================== ROTATING TEXT DRUM =====================
   The drum keeps its OWN small 3D chain (ring-scene perspective ->
   ring-pos/tilt preserve-3d -> drum). It is ~760x118px on screen —
   the only 3D context in the section, by design. */
.studiox-ring-scene {
  position: relative;
  width: min(760px, 92vw);
  height: 118px;
  overflow: hidden;
  perspective: 1100px;
}
/* Edge fades: static gradient overlays over the black backdrop —
   pixel-identical to a mask, with no mask pass on the animating
   drum layer. */
.studiox-ring-fade {
  position: absolute; top: 0; bottom: 0; width: 24%;
  pointer-events: none; z-index: 2;
}
.studiox-ring-fade-l { left: 0; background: linear-gradient(to right, #000 0%, rgba(0,0,0,0) 100%); }
.studiox-ring-fade-r { right: 0; background: linear-gradient(to left, #000 0%, rgba(0,0,0,0) 100%); }
.studiox-ring-pos {
  position: absolute; left: 50%; top: 296px;   /* drum centre sits below the visible band; only the far arc shows */
  width: 0; height: 0;
  transform-style: preserve-3d;
}
.studiox-ring-tilt {
  position: absolute; left: 0; top: 0;
  transform-style: preserve-3d;
  transform: rotateX(-68deg);
}
.studiox-drum {
  position: absolute; left: 0; top: 0;
  width: 0; height: 0;
  transform-style: preserve-3d;
  will-change: transform;
  animation: studiox-drumspin 48s linear infinite;
}
@keyframes studiox-drumspin { to { transform: rotateY(360deg); } }
.studiox-drum .studiox-ch {
  position: absolute; left: 0; top: 0;
  font-size: 15px; font-weight: 600;
  letter-spacing: .14em;
  color: #ececec;
  white-space: pre;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-origin: center center;
}
/* The drum pauses while the section is off-screen (.studiox-offview)
   and while the user is actively scrolling (.studiox-scrolling) —
   both classes are driven by the studiox script in index.html. Its
   look, speed and geometry never change. */
#studio.studiox-offview .studiox-drum,
#studio.studiox-scrolling .studiox-drum { animation-play-state: paused; }

/* ===================== COPY ===================== */
.studiox-title {
  margin: 6px 0 0;
  font-size: clamp(36px, 3.6vw, 60px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.07;
  color: #fff;
  text-align: center;
}
.studiox-sub {
  margin: 22px 0 0;
  max-width: 660px;
  font-size: 16.5px; font-weight: 400;
  line-height: 1.55;
  color: #a3a3a3;
  text-align: center;
}
.studiox-cta {
  margin-top: 30px;
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
}
.studiox-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
  white-space: nowrap;
}
.studiox-btn .studiox-chev { font-weight: 400; letter-spacing: -.08em; transform: translateY(-.5px); }
.studiox-btn-outline {
  color: #f5f5f5;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.30);
}
.studiox-btn-outline:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.5); }
.studiox-btn-solid { background: #fff; color: #000; border: 1px solid #fff; }
.studiox-btn-solid:hover { background: #e6e6e6; }

/* ===================== TABLET / MOBILE =====================
   <=820px: the section is 82svh with a 680px floor (692px at
   390x844) — partway between the old full-height and the round-4
   cut. The gap above the block tightens to 5vh (42px at 844px
   tall); the centre compensation follows it. */
@media (max-width: 820px) {
  #studio.studiox-section { height: 82svh; min-height: 680px; }
  .studiox-content { padding-bottom: calc(110.2px + 5vh); }
  .studiox-hero-block { margin-top: 5vh; }
}
@media (max-width: 640px) {
  .studiox-content { padding-bottom: calc(57.3px + 5vh); }  /* wordmark 312px -> 57.3px tall */
  .studiox-wordmark { width: 312px; }
  .studiox-ring-scene { height: 86px; transform: scale(.60); margin-bottom: -26px; }
  .studiox-title { font-size: clamp(31px, 8.6vw, 40px); }
  .studiox-sub { font-size: 15px; max-width: 340px; }
  .studiox-cta { gap: 10px; margin-top: 26px; }
  .studiox-btn { padding: 12px 20px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .studiox-drum { animation: none; }
}
