/* =========================================================
   CARD REELS — styles for prototype/reel.js
   The reel covers the card's media area. The device frame and caption are sized with container units;
   inside the device, the stage is drawn at the app's real pixel size and scaled to fit by reel.js.
   ========================================================= */
.c-reel {
  position: absolute; inset: 0; z-index: 2; overflow: hidden; container-type: size;
  font-family: var(--font-sans);
  background: #1b1a20;
}
.c-project-card:hover .c-reel__phone, .c-project-card:focus-visible .c-reel__phone,
.c-project-card:hover .c-reel__browser, .c-project-card:focus-visible .c-reel__browser { transform: translateY(-1.5%); }

/* Devices */
.c-reel__phone {
  position: absolute; top: 6%; left: 60%; height: 88%; aspect-ratio: 360 / 788;
  padding: 1.1cqh; border-radius: 4.6cqh; background: #0a0a0c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 40px rgba(0, 0, 0, .55);
  transition: transform 600ms cubic-bezier(.2, .7, .2, 1);
}
.c-reel__phone .c-reel__view { border-radius: 3.6cqh; }
.c-reel__browser {
  position: absolute; top: 7%; left: 4%; width: 74%;
  display: flex; flex-direction: column; border-radius: 1.4cqh; overflow: hidden; background: #1b1a20;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 40px rgba(0, 0, 0, .55);
  transition: transform 600ms cubic-bezier(.2, .7, .2, 1);
}
.c-reel__bar { display: flex; gap: .9cqh; align-items: center; height: 5cqh; padding: 0 1.8cqh; background: #2a2831; }
.c-reel__bar i { width: 1.4cqh; height: 1.4cqh; border-radius: 50%; background: #ff5f57; }
.c-reel__bar i:nth-child(2) { background: #febc2e; }
.c-reel__bar i:nth-child(3) { background: #28c840; }
.c-reel__browser .c-reel__view { aspect-ratio: 1280 / 800; }
.c-reel__view { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0b0b0d; }

/* Stage and layers (positions, opacity and clips are set by reel.js) */
.c-reel__stage { position: absolute; left: 0; top: 0; overflow: hidden; transform-origin: 0 0; background: #0b0b0d; }
.c-reel__g, .c-reel__fill { position: absolute; inset: 0; transform-origin: 0 0; }
.c-reel__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.c-reel__count { position: absolute; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-reel__bar { position: absolute; transform-origin: 50% 100%; }
.c-reel__caret { position: absolute; }
.c-reel__ring { position: absolute; box-sizing: border-box; border: 3px solid; transform-origin: 50% 50%; pointer-events: none; }
.c-reel__ripple { position: absolute; border-radius: 50%; transform-origin: 50% 50%; pointer-events: none; }
.c-reel__spark { position: absolute; overflow: visible; }
.c-reel__spark polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.c-reel__rail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.c-reel__rail polyline { fill: none; stroke: rgba(178, 164, 238, .9); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.c-reel__sweep { position: absolute; overflow: hidden; border-radius: 4px; pointer-events: none; }
.c-reel__sweep i { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(178, 164, 238, .32), transparent); }
.c-reel__scan {
  position: absolute; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(178, 164, 238, .18) 70%, rgba(178, 164, 238, .35));
  border-bottom: 2px solid rgba(178, 164, 238, .95); box-shadow: 0 2px 12px rgba(178, 164, 238, .6);
}
.c-reel__cursor { position: absolute; left: 0; top: 0; width: 36px; height: 36px; margin: -3px 0 0 -5px; transform-origin: 5px 3px; pointer-events: none; }
.c-reel__cursor svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.c-reel__cursor path { fill: #fff; stroke: #111; stroke-width: 1.3; stroke-linejoin: round; }

/* Free reel (no device frame): the team scene, drawn from shapes on a 1280×720 stage */
.c-reel__free { position: absolute; inset: 0; transition: transform 600ms cubic-bezier(.2, .7, .2, 1); }
.c-reel__free .c-reel__view, .c-reel--free .c-reel__stage { background: transparent; }
.c-project-card:hover .c-reel__free, .c-project-card:focus-visible .c-reel__free { transform: translateY(-1.5%); }
.c-reel--free .c-reel__cap { left: 3%; bottom: 6%; width: 38%; }
.c-reel__t { position: absolute; box-sizing: border-box; color: #eceaf1; transform-origin: 50% 50%; }
.t-card { padding: 22px 24px; border-radius: 20px; background: rgba(27, 26, 32, .94); border: 2px solid rgba(157, 153, 168, .3); font-size: 26px; font-weight: 600; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.t-card--sketch { border-style: dashed; background: rgba(27, 26, 32, .7); }
.t-card--solid { border-color: color-mix(in srgb, #eceaf1 60%, transparent); }
.t-bar { border-radius: 6px; background: rgba(157, 153, 168, .3); }
.t-sketch { border: 2px dashed rgba(157, 153, 168, .55); border-radius: 10px; }
.t-block { border-radius: 8px; opacity: .9; }
.t-dot { border-radius: 50%; border: 3px solid #1b1a20; }
.t-arrow { height: 4px; border-radius: 2px; background: rgba(157, 153, 168, .65); transform-origin: 0 50%; }
.c-reel__t-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.c-reel__t-svg .t-track { fill: none; stroke: rgba(157, 153, 168, .18); stroke-width: 10; }
.c-reel__t-svg .t-arc { fill: none; stroke-width: 12; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.c-reel__t-svg .t-token { stroke: #eceaf1; stroke-width: 4; }
.t-hub { font-weight: 500; font-size: 60px; line-height: 70px; text-align: center; }
.t-label { font-size: 22px; line-height: 30px; color: #9d99a8; text-align: center; white-space: nowrap; }
.t-label--strong { font-size: 26px; font-weight: 600; text-align: left; }
.t-node { z-index: 2; display: grid; place-items: center; border-radius: 50%; font-size: 26px; font-weight: 700; color: #131216; box-shadow: 0 0 0 6px rgba(19, 18, 22, .6); }
.t-link { border-radius: 2px; transform-origin: 0 50%; }
.t-link--soft { background: rgba(157, 153, 168, .4); }
.t-link--pair { height: 6px !important; margin-top: -1px; background: #eceaf1; }
.t-pod { border-radius: 28px; background: color-mix(in srgb, #eceaf1 9%, rgba(27, 26, 32, .7)); border: 2px solid color-mix(in srgb, #eceaf1 35%, transparent); }
.t-tile { z-index: 2; border-radius: 8px; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.t-pass { z-index: 3; border-radius: 50%; background: #eceaf1; }
.t-link--guide { background: repeating-linear-gradient(90deg, rgba(157, 153, 168, .8) 0 10px, transparent 10px 18px); }
.t-label--sub { font-size: 20px; color: #9d99a8; }
.t-label--review { font-size: 21px; font-weight: 600; text-align: left; }
.t-label--center { text-align: center; }
.t-label--end { text-align: right; }
.t-label--sub { font-size: 18px; }
.c-reel__t-svg .t-arc--review { stroke-width: 8; }
.t-link--lead { background: rgba(253, 253, 252, .55); }
.t-q { z-index: 3; border-radius: 50%; background: #b2a4ee; }

/* Navigation: the van follows the route; the road already driven greys out behind it */
.c-reel__route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.c-reel__trail { fill: none; stroke: #9db3c9; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.c-reel__van circle { fill: #fff; stroke: #0a6fd8; stroke-width: 3.5; }
.c-reel__van path { fill: #0a6fd8; }

/* Caption: what the current screen shows */
.c-reel__cap {
  position: absolute; z-index: 4; display: flex; flex-direction: column; gap: .35em;
  padding: .8em .95em .75em; border-radius: .8em;
  background: rgba(19, 18, 22, .9); border: 1px solid rgba(157, 153, 168, .28); color: #eceaf1;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
  font-size: clamp(9px, 2.45cqw, 14px); line-height: 1.3;
  transition: opacity 200ms ease, transform 200ms ease;
}
.c-reel__cap.is-out { opacity: 0; transform: translateY(4px); }
.c-reel__cap b { font-size: 1.12em; font-weight: 700; }
.c-reel__cap span { color: #9d99a8; }
.c-reel__cap strong { display: none; font-weight: 500; font-size: 1.5em; line-height: 1.15; color: #eceaf1; white-space: nowrap; font-variant-numeric: lining-nums; }
.c-reel__cap.has-stat strong { display: block; }
.c-reel__cap.has-stat { border-color: color-mix(in srgb, #eceaf1 55%, transparent); }
.c-reel--phone .c-reel__cap { left: 5%; top: 50%; width: 47%; transform: translateY(-50%); }
.c-reel--phone .c-reel__cap.is-out { transform: translateY(calc(-50% + 4px)); }
.c-reel--browser .c-reel__cap { right: 3%; bottom: 7%; width: 40%; }
.c-reel__steps { display: flex; gap: .3em; margin: .35em 0 0; padding: 0; list-style: none; }
.c-reel__steps li { flex: 1; height: .25em; border-radius: 1em; background: rgba(157, 153, 168, .25); overflow: hidden; }
.c-reel__steps i { display: block; width: 0; height: 100%; background: #eceaf1; }

/* Narrow cards (phones): give the caption more room so the stat fits on one line */
@container (max-width: 420px) {
  .c-reel--browser .c-reel__cap { width: 47%; right: 2.5%; }
  .c-reel__cap strong { font-size: 1.3em; }
}

@media (prefers-reduced-motion: reduce) {
  .c-reel *, .c-reel__phone, .c-reel__browser { transition: none !important; }
}
