/* ============================================================
   DigitalSandbox — homepage ("Studio homepage" mock, ui_kits/
   digitalsandbox-site in the design library). Poster hero +
   motorized conveyor shelf + index ledger + studio strip.
   Requires css/design-system.css (tokens, components, site chrome).
   ============================================================ */

/* hero (poster) */
.dsx-hero { padding: 84px 0 0; text-align: center; }
.dsx-hero__h { font-family: var(--font-display); font-weight: 800; color: var(--text-strong);
  font-size: clamp(42px, 5.6vw, 68px); line-height: 1.03; letter-spacing: -0.032em;
  margin: 16px auto 0; max-width: 16ch; text-wrap: balance; }
.dsx-hero__sub { font-family: var(--font-sans); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6;
  color: var(--text-muted); max-width: 46ch; margin: 18px auto 0; text-wrap: pretty; }
.dsx-hero__cta { display: flex; gap: 12px; margin-top: 30px; justify-content: center; flex-wrap: wrap; }

/* conveyor shelf — icons ride a slow looping belt; each floats with its own
   bounce + tilt phase while its ground shadow and label stay baseline-locked */
.dsx-belt { position: relative; margin: 6px auto 0; max-width: 1720px; padding: 54px 0 42px;
  overflow: hidden; contain: paint;
  /* Icon/gap sizing: 174/30px floor, growing past 1440px viewports to fill
     larger screens. The belt box caps at 1720px so the looping half of the
     track (8 items ≥ 1872px) always out-spans it — otherwise a wide window
     outruns the track near the end of each cycle and the icons visibly snap
     back when the loop restarts. */
  --belt-icon: clamp(174px, calc(174px + (100vw - 1440px) * 0.12), 216px);
  --belt-gap: clamp(30px, calc(30px + (100vw - 1440px) * 0.04), 44px);
  background: repeating-linear-gradient(90deg, var(--sand-150) 0 1px, transparent 1px 64px),
              repeating-linear-gradient(0deg, var(--sand-150) 0 1px, transparent 1px 64px); }
/* The fade must reach solid --bg-page BEFORE the box edge (0.86 × 54% ≈ 46%
   from center vs the edge at 50%) so icons dissolve completely instead of
   being hard-clipped by overflow: hidden. */
.dsx-belt__fade { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 54% 90% at 50% 55%, transparent 42%, var(--bg-page) 86%); }
.dsx-belt__track { position: relative; display: flex; width: max-content;
  animation: dsx-belt 64s linear infinite; will-change: transform; }
.dsx-belt__item { flex: none; width: calc(var(--belt-icon) + var(--belt-gap) * 2);
  padding: 0 var(--belt-gap); display: flex; flex-direction: column;
  align-items: center; text-decoration: none; }
.dsx-belt__item:hover { text-decoration: none; }
.dsx-belt__well { height: calc(var(--belt-icon) + 16px); display: flex; align-items: flex-end; }
/* will-change promotes each icon + shadow to its own compositor layer so the
   blurred shadows rasterize once per icon — keeping the moving track cheap to
   paint and preventing blank "pop-in" tiles as the belt scrolls */
.dsx-belt__well img { width: var(--belt-icon); height: var(--belt-icon);
  border-radius: calc(var(--belt-icon) * 0.224); box-shadow: var(--shadow-xl);
  display: block; animation: dsx-float 5s ease-in-out infinite; will-change: transform; }
.dsx-belt__shadow { width: calc(var(--belt-icon) * 0.78); height: 17px; border-radius: var(--radius-pill); margin-top: 13px;
  background: radial-gradient(ellipse at center, rgba(26,24,21,.17), transparent 68%);
  animation: dsx-shad 5s ease-in-out infinite; will-change: transform, opacity; }
.dsx-belt__label { margin-top: 11px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
@keyframes dsx-belt { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes dsx-float { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-12px) rotate(2.5deg); } }
@keyframes dsx-shad { 0%, 100% { transform: scaleX(1); opacity: .95; } 50% { transform: scaleX(.78); opacity: .5; } }

/* per-slot float phase (8 slots per belt half) so no two icons bob in sync;
   slot n and its duplicate n+8 share a phase, keeping the -50% loop seamless */
.dsx-belt__item:nth-child(8n+1) img, .dsx-belt__item:nth-child(8n+1) .dsx-belt__shadow { animation-duration: 4.4s; animation-delay: -0.6s; }
.dsx-belt__item:nth-child(8n+2) img, .dsx-belt__item:nth-child(8n+2) .dsx-belt__shadow { animation-duration: 5.1s; animation-delay: -2.2s; }
.dsx-belt__item:nth-child(8n+3) img, .dsx-belt__item:nth-child(8n+3) .dsx-belt__shadow { animation-duration: 4.7s; animation-delay: -3.4s; }
.dsx-belt__item:nth-child(8n+4) img, .dsx-belt__item:nth-child(8n+4) .dsx-belt__shadow { animation-duration: 5.5s; animation-delay: -1.5s; }
.dsx-belt__item:nth-child(8n+5) img, .dsx-belt__item:nth-child(8n+5) .dsx-belt__shadow { animation-duration: 4.9s; animation-delay: -4.1s; }
.dsx-belt__item:nth-child(8n+6) img, .dsx-belt__item:nth-child(8n+6) .dsx-belt__shadow { animation-duration: 5.3s; animation-delay: -2.8s; }
.dsx-belt__item:nth-child(8n+7) img, .dsx-belt__item:nth-child(8n+7) .dsx-belt__shadow { animation-duration: 4.6s; animation-delay: -1.1s; }
.dsx-belt__item:nth-child(8n+8) img, .dsx-belt__item:nth-child(8n+8) .dsx-belt__shadow { animation-duration: 5.0s; animation-delay: -3.9s; }

@media (prefers-reduced-motion: reduce) {
  .dsx-belt__track, .dsx-belt__well img, .dsx-belt__shadow { animation: none !important; }
}

/* index ledger */
.dsx-index { padding: 38px 0 84px; scroll-margin-top: 84px; }
.dsx-index__row { display: grid; grid-template-columns: 34px 200px 1fr 150px 116px 20px;
  align-items: center; gap: 18px; padding: 17px 10px; border-top: 1px solid var(--border-subtle);
  text-decoration: none; position: relative; isolation: isolate; }
.dsx-index__row--last { border-bottom: 1px solid var(--border-subtle); }
/* hover wash fades out at both ends instead of rounding — the row borders stay
   flat edge to edge, and the tint reads as a highlight, not a pill */
.dsx-index__row::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, transparent, var(--accent-soft) 48px,
              var(--accent-soft) calc(100% - 48px), transparent);
  opacity: 0; transition: opacity var(--dur-base) var(--ease-out); pointer-events: none; }
.dsx-index__row:hover { text-decoration: none; }
.dsx-index__row:hover::before { opacity: 1; }
.dsx-index__num { font-family: var(--font-mono); font-size: 12px; color: var(--accent-text); }
.dsx-index__name { font-family: var(--font-display); font-weight: 800; font-size: 20px;
  letter-spacing: -0.02em; color: var(--text-strong); }
.dsx-index__tag { font-family: var(--font-sans); font-size: 14px; color: var(--text-muted); }
.dsx-index__meta { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-subtle); }
.dsx-index__arrow { width: 18px; height: 18px; color: var(--accent); }
.dsx-index__next { display: grid; grid-template-columns: 34px 1fr; gap: 18px; align-items: center;
  padding: 15px 10px; color: var(--text-subtle); font-family: var(--font-sans); font-size: 13.5px; }
.dsx-index__next b { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }

/* studio strip (inverse) */
.dsx-studio { background: var(--surface-inverse); color: var(--text-on-inverse); padding: 80px 0;
  scroll-margin-top: 68px; }
.dsx-studio__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
.dsx-studio__h { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.025em; color: var(--white); margin: 14px 0 18px; max-width: 18ch; }
.dsx-studio__copy p { font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  color: var(--sand-300); margin: 0 0 14px; }
.dsx-studio__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.dsx-studio__facts li { display: flex; flex-direction: column; gap: 2px;
  padding: 16px 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md); }
.dsx-studio__facts b { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--white); }
.dsx-studio__facts span { font-family: var(--font-sans); font-size: 14px; color: var(--sand-400); }

/* work section — the page's second act, between the app ledger and the studio
   strip. Tinted a step darker than the page and carrying the belt's workbench
   grid so it reads as its own surface; the shelf illustration extends the
   conveyor-belt story into the hire pitch. */
.dsx-hire { padding: 64px 0;
  background-color: var(--sand-100);
  border-top: 1px solid var(--border);
  background-image: repeating-linear-gradient(90deg, var(--sand-200) 0 1px, transparent 1px 64px),
                    repeating-linear-gradient(0deg, var(--sand-200) 0 1px, transparent 1px 64px); }
.dsx-hire__inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
/* matches .dsx-studio__h in size and weight — the two band headings read as a pair */
.dsx-hire__h { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.028em; margin: 10px 0 10px; }
.dsx-hire__copy p { font-family: var(--font-sans); font-size: 15.5px; line-height: 1.6;
  color: var(--text-muted); margin: 0 0 20px; max-width: 60ch; text-wrap: pretty; }
.dsx-hire__doors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 470px; }
.dsx-hire__door { display: flex; flex-direction: column; gap: 3px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px; text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.dsx-hire__door:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.dsx-hire__door b { font-family: var(--font-display); font-size: 15px; font-weight: 700;
  letter-spacing: -0.01em; color: var(--text-strong); }
.dsx-hire__door span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-subtle); }
.dsx-hire__art { width: 100%; max-width: 380px; height: auto; justify-self: end; }
.dsx-hire__art-cap { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; fill: var(--sand-500); }
.dsx-hire__art-num { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; fill: var(--sand-600); }
.dsx-hire__art-num--ink { fill: var(--sand-900); }
.dsx-hire__art-line { stroke: var(--sand-900); stroke-width: 1.25; stroke-linecap: round; }
.dsx-hire__f-top   { fill: var(--sand-50);  stroke: var(--sand-900); stroke-width: 1.25; stroke-linejoin: round; }
.dsx-hire__f-left  { fill: var(--sand-300); stroke: var(--sand-900); stroke-width: 1.25; stroke-linejoin: round; }
.dsx-hire__f-right { fill: var(--sand-500); stroke: var(--sand-900); stroke-width: 1.25; stroke-linejoin: round; }
.dsx-hire__f-ghost { fill: none; stroke: var(--sand-400); stroke-width: 1.25; stroke-dasharray: 4 5; stroke-linejoin: round; }

@media (max-width: 880px) {
  .dsx-index__row { grid-template-columns: 34px 1fr 116px 20px; }
  .dsx-index__tag, .dsx-index__meta:nth-of-type(4) { display: none; }
  .dsx-studio__inner { grid-template-columns: 1fr; gap: 32px; }
  .dsx-hire__inner { grid-template-columns: 1fr; gap: 36px; }
  .dsx-hire__art { justify-self: center; }
}
@media (max-width: 560px) {
  .dsx-hire__doors { grid-template-columns: 1fr; max-width: none; }
  .dsx-belt { --belt-icon: 150px; --belt-gap: 26px; }
}
