/* work-cards.css — work-shots landing + animated ficha cards */

:root {
  --duration-instant: 120ms;
  --duration-quick:   240ms;
  --duration-base:    480ms;
  --duration-slow:    720ms;
  --duration-cinema:  2400ms;

  --ease-out-quint:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out-quad: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-standard:    cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-soft:    cubic-bezier(0.16, 1, 0.3, 1);

  --stagger-tight:    40ms;
  --stagger-base:     70ms;
  --stagger-loose:    140ms;

  --reveal-offset:    24px;

  --ws-bg: #050505;
  --ws-fg: #ffffff;
  --ws-muted: rgba(255, 255, 255, 0.64);
  --ws-line: rgba(255, 255, 255, 0.18);
  --ws-accent: #cff1ff;
  --ws-max: 1120px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-instant: 0ms;
    --duration-quick:   0ms;
    --duration-base:    0ms;
    --duration-slow:    0ms;
    --duration-cinema:  0ms;
    --stagger-tight:    0ms;
    --stagger-base:     0ms;
    --stagger-loose:    0ms;
    --reveal-offset:    0px;
  }
}

@font-face {
  font-family: 'Gelion';
  src: url('../font/gelion-regular.woff2') format('woff2'), url('../font/gelion-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gelion';
  src: url('../font/gelion-medium.woff2') format('woff2'), url('../font/gelion-medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gelion';
  src: url('../font/gelion-thin.woff2') format('woff2'), url('../font/gelion-thin.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gelion';
  src: url('../font/gelion-bold.woff2') format('woff2'), url('../font/gelion-bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gelion';
  src: url('../font/gelion-light.woff2') format('woff2'), url('../font/gelion-light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
/* Inter (latin, variable 400–700) — UI type used by the client apps recreated in the fichas */
@font-face {
  font-family: 'Inter';
  src: url('../font/inter-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ws-bg);
  color: var(--ws-fg);
  font-family: 'Gelion', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }

.ws-page {
  min-height: 100vh;
  padding: 32px 20px 120px;
}

.ws-shell {
  width: min(var(--ws-max), 100%);
  margin: 0 auto;
}

/* ---------- header ---------- */
.ws-header {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
}

.ws-kicker {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ws-muted);
}

.ws-title {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.ws-lede {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 200;
  color: var(--ws-muted);
}

.ws-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ws-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ws-filter-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ws-muted);
  margin-right: 4px;
}

.ws-chip {
  appearance: none;
  border: 0.5px solid var(--ws-line);
  background: transparent;
  color: var(--ws-fg);
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition:
    background var(--duration-quick) var(--ease-standard),
    border-color var(--duration-quick) var(--ease-standard),
    opacity var(--duration-quick) var(--ease-standard);
}

.ws-chip:hover { border-color: rgba(255, 255, 255, 0.42); }

.ws-chip[aria-pressed="true"] {
  background: rgba(207, 241, 255, 0.12);
  border-color: rgba(207, 241, 255, 0.55);
  color: var(--ws-accent);
}

.ws-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ws-muted);
  margin-bottom: 18px;
  transition: color var(--duration-quick) var(--ease-standard);
}

.ws-back:hover { color: var(--ws-fg); }

.ws-back svg { width: 18px; height: 18px; }

/* ---------- grid ---------- */
.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}

.ws-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: transform var(--duration-quick) var(--ease-out-quint);
}

.ws-card:hover {
  transform: translateY(-2px);
}

.ws-card__thumb {
  position: relative;
  aspect-ratio: 1 / 2;
  background: #0a0a12;
  overflow: hidden;
  border-radius: 14px;
}

.ws-card__thumb > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ws-card__thumb--stub::after {
  content: 'soon';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.8);
}

.ws-card__body { padding: 0 0 14px; } /* text aligns with the shot's left edge */

.ws-card__client {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ws-muted);
}

.ws-card__title {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.ws-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.ws-tag {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0;
  color: var(--ws-muted);
}

/* ---------- detail / ficha chrome ---------- */
.ws-detail { display: grid; gap: 24px; }

.ws-ficha {
  --ficha-accent: var(--ws-accent);
  width: min(560px, 100%);
  margin: 0 auto;
  color: var(--ficha-accent);
}

.ws-ficha__head {
  display: grid;
  grid-template-columns: clamp(76px, 12vw, 116px) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 18px;
  row-gap: 0;
  align-items: center;
  margin-bottom: 18px;
}

.ws-ficha__badge {
  grid-row: 1 / -1;
  grid-column: 1;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.ws-ficha__badge img,
.ws-ficha__badge svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
}

.ws-ficha__title {
  grid-row: 1;
  grid-column: 2;
  margin: 0 0 6px;
  font-size: calc(clamp(21px, 5vw, 42px) * var(--fit, 1));
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  padding-bottom: 8px;
  border-bottom: 0.5px solid color-mix(in srgb, currentColor 22%, transparent);
}

.ws-ficha__subtitle {
  grid-row: 2;
  grid-column: 2;
  margin: 8px 0 0;
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 200;
  line-height: 1.45;
  color: color-mix(in srgb, currentColor 72%, transparent);
  padding-bottom: 12px;
  border-bottom: 0.5px solid color-mix(in srgb, currentColor 22%, transparent);
}

.ws-ficha__tags {
  grid-row: 3;
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* vertical ~2×1 chrome: portrait shell around landscape comp */
.ws-shot {
  --shot-bg: #04013f;
  --shot-lockup: #cff1ff;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 2;
  max-height: min(112vh, 1120px);
  border-radius: 16px;
  overflow: hidden;
  background: var(--shot-bg);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 0 0.5px rgba(255, 255, 255, 0.08) inset;
}

.ws-shot__stage {
  position: absolute;
  inset: 0;
  container-type: size;
}

.ws-shot__comp {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 1440px;
  height: 1080px;
  transform: translate(-50%, -50%) scale(var(--shot-scale, 0.34));
  transform-origin: center center;
  will-change: transform, opacity;
}

/* cascade layers */
.ws-shot__bg {
  position: absolute;
  inset: 0;
  background: var(--shot-bg);
  opacity: 0;
}

.ws-shot__logo {
  z-index: 2; /* lockup stays above the UI layer (fichas may paint full-bleed backgrounds) */
  /* Figma lockup: mark 70 · 27 · word 178 · 36 · plus 28 · 42 · client — top 128 of 1080 */
  position: absolute;
  left: 50%;
  top: 128px;
  height: 70px;
  transform: translateX(-50%) scale(0.88);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.ws-shot__logo-mark {
  width: 70px;
  height: 70px;
  flex: none;
}

.ws-shot__logo-word {
  width: 178.35px;
  height: 35.97px;
  margin-left: 22px; /* Figma: word at x 92.65 (measured 519 on export) */
  flex: none;
}

.ws-shot__logo-plus {
  position: relative;
  width: 28px;
  height: 28px;
  margin-left: 35px; /* Figma: plus at x 306 */
  flex: none;
  display: block;
  color: var(--shot-lockup);
  overflow: visible;
  /* 1px lines, non-scaling stroke so the plus survives the grid scale (Figma's export only looks
     dimmer where the line straddles two pixel rows) */
}

.ws-shot__logo-client {
  position: relative;
  top: -12.5px; /* Figma text box 105–196 vs mark 128–198 */
  margin-left: 33px; /* Figma: client at x 369 (measured 801 on export) */
  font-family: 'Gelion', system-ui, sans-serif;
  font-size: 76px;
  font-weight: 500;
  letter-spacing: -0.035em; /* matches the export glyph advance (Figma reports -1.35px but renders tighter) */
  line-height: normal;
  color: var(--shot-lockup);
  white-space: nowrap;
}

.ws-shot__ui {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transform: translateY(40px);
}

.ws-shot__ui--dom {
  width: 1440px;
  height: 1080px;
  overflow: hidden;
}

.ws-shot__ui--dom img { display: block; }

.ws-shot__ui--svg > svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.ws-shot__ui > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  clip-path: inset(22% 0 0 0);
}

/* animated state */
.ws-shot.is-ready .ws-shot__bg {
  animation: ws-fade-in var(--duration-cinema) var(--ease-out-quint) forwards;
}

.ws-shot.is-ready .ws-shot__logo {
  animation: ws-logo-pop var(--duration-slow) var(--ease-out-soft) forwards;
  animation-delay: calc(var(--duration-base) * 0.5);
}

.ws-shot.is-ready .ws-shot__ui {
  animation: ws-slide-up var(--duration-slow) var(--ease-out-quint) forwards;
  animation-delay: var(--duration-base);
}

@keyframes ws-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ws-logo-pop {
  from { opacity: 0; transform: translateX(-50%) scale(0.72); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes ws-slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* static export mode */
body.is-static-export {
  background: var(--shot-bg, #04013f);
  padding: 0;
}

body.is-static-export .ws-page {
  padding: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
}

body.is-static-export .ws-shell,
body.is-static-export .ws-header,
body.is-static-export .ws-ficha__head,
body.is-static-export .ws-back,
body.is-static-export .ws-nav {
  display: none !important;
}

body.is-static-export .ws-shot {
  width: 1440px;
  height: 1080px;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

body.is-static-export .ws-shot__comp {
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
}

body.is-static-export .ws-shot__bg,
body.is-static-export .ws-shot__logo,
body.is-static-export .ws-shot__ui {
  opacity: 1;
  transform: none;
  animation: none !important;
}

body.is-static-export .ws-shot__logo {
  transform: translateX(-50%); /* keep the lockup centred (matches ws-logo-pop end state) */
}

body.is-static-export .ws-shot__ui > img {
  object-fit: cover;
  object-position: center;
}

body.is-static-export .ws-shot__ui--dom img { clip-path: none; }

/* stub detail */
.ws-stub {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 48px 24px;
  border: 0.5px dashed var(--ws-line);
  border-radius: 16px;
  text-align: center;
  color: var(--ws-muted);
}

.ws-stub h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--ws-fg);
}

.ws-empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--ws-muted);
  border: 0.5px dashed var(--ws-line);
  border-radius: 14px;
}

/* bottom nav */
.ws-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 20px 24px;
  background: linear-gradient(180deg, transparent, rgba(5, 5, 5, 0.92) 40%);
  pointer-events: none;
}

.ws-nav__inner {
  width: min(var(--ws-max), 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
}

.ws-nav a {
  font-size: 14px;
  color: var(--ws-muted);
}

.ws-nav a:hover { color: var(--ws-fg); }

@media (max-width: 767px) {
  .ws-page { padding: 24px 16px 100px; }
  .ws-ficha__head {
    grid-template-columns: clamp(62px, 17vw, 84px) minmax(0, 1fr);
    column-gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-shot__bg,
  .ws-shot__logo,
  .ws-shot__ui {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .ws-shot__logo {
    transform: translateX(-50%) !important;
  }
}

/* grid cards render the coded ficha (lazy); bitmap thumbs are comparison-only */
.ws-card__thumb .ws-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

/* ---------- vertical format (1080×1920) ----------
   sensa · web "shots" templates: the 1440×1080 comp is reframed inside a portrait canvas
   (translate + scale set inline by work-cards.js), with the social footer from sensa · social-01:
   separator 2px @16% · "client  tagline" Gelion 32/1.2 −2% (semibold + light) · sensa mark 96px,
   text block 63px from the sides, 64px from the bottom. */
.ws-shot--vertical {
  aspect-ratio: 9 / 16;
}

.ws-shot__comp--vertical {
  width: 1080px;
  height: 1920px;
  top: 50%;
  overflow: hidden;
  background: var(--shot-bg);
}

.ws-shot__frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 1440px;
  height: 1080px;
  transform-origin: 0 0;
}

.ws-shot__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 400px; /* low fade (feedback 25-sep): canvas 1520 → 1920, ~90% under the footer line */
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--shot-bg) 0%, transparent) 0%,
    color-mix(in srgb, var(--shot-bg) 50%, transparent) 30%,
    color-mix(in srgb, var(--shot-bg) 90%, transparent) 57%,
    var(--shot-bg) 66%);
}

/* masters' bubble gradient: a soft accent glow rising behind the footer */
.ws-shot__glow {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -420px;
  height: 900px;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--shot-lockup) 18%, transparent) 0%, transparent 100%);
}

/* client wordmark (replaces the "sensa + client" lockup) */
.ws-shot__word {
  position: absolute;
  left: 50%;
  top: 292px;
  z-index: 3;
  transform: translate(-50%, -50%);
  font-family: 'Gelion', system-ui, sans-serif;
  font-size: 112px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: var(--shot-lockup);
  pointer-events: none;
}

.ws-shot__word--logo {
  top: 900px;
}

/* sketches: outline wordmarks scattered over the canvas */
.ws-shot__sketches {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.ws-sketch {
  position: absolute;
  font-family: 'Gelion', system-ui, sans-serif;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--shot-lockup);
  opacity: .5;
}

.ws-sketch:nth-child(3n+1) { opacity: .3; }
.ws-sketch:nth-child(4) { opacity: .85; -webkit-text-stroke-width: 2px; }

/* wireframes: the same UI drawn as outlines */
.ws-shot--wireframes .ws-shot__ui svg * {
  fill: none !important;
  stroke: var(--shot-lockup) !important;
  stroke-width: 1px !important;
  stroke-opacity: .7 !important;
  vector-effect: non-scaling-stroke;
  filter: none !important;
}
.ws-shot--wireframes .ws-shot__ui svg image,
.ws-shot--wireframes .ws-shot__ui img { opacity: 0 !important; }
.ws-shot--wireframes .ws-shot__ui svg mask *,
.ws-shot--wireframes .ws-shot__ui svg clipPath * { fill: #fff !important; stroke: none !important; }

/* social footer — sensa · social-01 (540×960) ×2: line at 1748 (2px, 16%), label 64/1.2 Gelion
   light + medium with its cap height 64px under the line, sensa mark 96px 32px from the bottom */
.ws-shot__footer {
  position: absolute;
  left: 64px;
  right: 64px;
  top: 1748px;
  bottom: 0;
  z-index: 4;
  color: var(--shot-lockup);
  pointer-events: none;
}

.ws-shot__footer-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.16;
}

.ws-shot__footer-label {
  position: absolute;
  left: 0;
  top: 64px;
  margin: 0;
  font-family: 'Gelion', system-ui, sans-serif;
  font-size: 64px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: pre;
  color: currentColor;
  text-box: trim-both cap alphabetic;
}

.ws-shot__footer-label b {
  font-weight: 500;
}

.ws-shot__footer-mark {
  position: absolute;
  right: -16px;
  top: 44px;
  width: 96px;
  height: 96px;
  display: block;
}

.ws-shot__footer-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ws-shot--vertical.is-ready .ws-shot__footer {
  animation: ws-fade-in var(--duration-slow) var(--ease-out-quint) forwards;
  animation-delay: var(--duration-base);
}

body.ws-format-vertical .ws-card__thumb {
  aspect-ratio: 9 / 16;
}

body.is-static-export .ws-shot--vertical {
  width: 1080px;
  height: 1920px;
}

body.is-static-export .ws-shot--vertical .ws-shot__comp--vertical {
  transform: translate(-50%, -50%) scale(1);
}

body.is-static-export .ws-shot__footer {
  animation: none !important;
  opacity: 1;
}

/* detail: the rest of the series under the main shot */
.ws-series {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.ws-series .ws-shot { border-radius: 10px; }

/* ---------- landscape format: a real 4:3 card (the whole 1440×1080 comp, full background) ---------- */
.ws-shot--landscape {
  aspect-ratio: 4 / 3;
  max-height: none;
}

.ws-shot--landscape .ws-shot__comp {
  top: 50%;
}

body.ws-format-landscape .ws-card__thumb {
  aspect-ratio: 4 / 3;
}

body.ws-format-landscape .ws-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

body.ws-format-landscape .ws-ficha {
  width: min(1120px, 100%);
}

body.ws-format-landscape .ws-ficha__head {
  width: min(560px, 100%);
}

/* ---------- simplified index (feedback 25-sep): horizontal scrolls ---------- */
.ws-header { gap: 14px; margin-bottom: 20px; }
.ws-title { font-size: clamp(30px, 4.4vw, 48px); }
.ws-toolbar {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 18px;
  margin: 0 -20px;
  padding: 2px 20px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ws-toolbar::-webkit-scrollbar { display: none; }
.ws-filter-group { flex-wrap: nowrap; flex: none; }
.ws-filter-group[data-filter="format"] { order: 1; }
.ws-filter-group[data-filter="series"] { order: 2; }
.ws-filter-group[data-filter="discipline"] { order: 3; }
.ws-filter-group[data-filter="project"] { order: 4; }
.ws-chip { white-space: nowrap; }

.ws-rows { display: grid; gap: 34px; }
.ws-row__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.ws-row__title { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.ws-row__count { font-size: 12px; color: var(--ws-muted); }
.ws-row__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 20px;
  margin: 0 -20px;
  padding: 0 20px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ws-row__track::-webkit-scrollbar { display: none; }
.ws-row__track .ws-card {
  flex: none;
  width: clamp(150px, 17vw, 220px);
  scroll-snap-align: start;
  gap: 8px;
  padding: 0;
  color: inherit;
}
body.ws-format-landscape .ws-row__track .ws-card { width: clamp(260px, 34vw, 400px); }
.ws-row__track .ws-card__thumb { border-radius: 12px; }
.ws-row__track .ws-card__title { margin: 0; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; color: var(--ws-muted); }
.ws-row__track .ws-card:hover .ws-card__title { color: var(--ws-fg); }

/* detail: the rest of the series as a horizontal strip too */
.ws-series {
  display: flex;
  grid-template-columns: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.ws-series::-webkit-scrollbar { display: none; }
.ws-series__item { flex: none; width: calc((100% - 30px) / 4); min-width: 130px; scroll-snap-align: start; }

@media (max-width: 767px) {
  .ws-toolbar, .ws-row__track { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .ws-row__track { scroll-padding: 0 16px; }
  .ws-row__track .ws-card { width: 42vw; }
  body.ws-format-landscape .ws-row__track .ws-card { width: 78vw; }
  .ws-series__item { width: 40%; }
}
/* the scrolls bleed to the right edge of the viewport (left edge stays on the column) */
.ws-toolbar, .ws-row__track { margin-right: calc(50% - 50vw); padding-right: 20px; }
@media (max-width: 767px) { .ws-toolbar, .ws-row__track { margin-right: -16px; padding-right: 16px; } }

/* ---------- brand · construction (feedback 25-sep): grid lines draw in, the logo is traced, then filled ---------- */
.ws-cons { position: absolute; inset: 0; z-index: 2; color: var(--shot-lockup); pointer-events: none; }
.ws-cons__grid { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ws-cons__grid line, .ws-cons__grid circle {
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
  animation: wsConsGuide 8s cubic-bezier(.65, 0, .35, 1) infinite both;
}
.ws-cons__logo { position: absolute; }
.ws-cons__svg { display: block; overflow: visible; }
.ws-cons__svg path, .ws-cons__svg rect, .ws-cons__svg circle, .ws-cons__svg polygon {
  stroke: currentColor; stroke-width: .35; stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0;
  animation: wsConsLogo 8s cubic-bezier(.65, 0, .35, 1) infinite both;
}
.ws-cons__word { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ws-cons__word text {
  font-family: 'Gelion', system-ui, sans-serif; font-weight: 500; letter-spacing: -0.035em;
  fill: currentColor; fill-opacity: 0; stroke: currentColor; stroke-width: 2; stroke-dasharray: 2600; stroke-dashoffset: 2600;
  animation: wsConsWord 8s cubic-bezier(.65, 0, .35, 1) infinite both;
}
@keyframes wsConsGuide {
  0% { stroke-dashoffset: 1; opacity: 0; } 3% { opacity: .3; } 22% { stroke-dashoffset: 0; opacity: .3; }
  86% { stroke-dashoffset: 0; opacity: .3; } 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes wsConsLogo {
  0%, 16% { stroke-dashoffset: 1; fill-opacity: 0; stroke-opacity: 1; opacity: 1; }
  52% { stroke-dashoffset: 0; fill-opacity: 0; stroke-opacity: 1; }
  64% { fill-opacity: 1; stroke-opacity: 1; } 72% { fill-opacity: 1; stroke-opacity: 0; opacity: 1; }
  88% { fill-opacity: 1; stroke-opacity: 0; opacity: 1; } 100% { fill-opacity: 1; stroke-opacity: 0; opacity: 0; }
}
@keyframes wsConsWord {
  0%, 16% { stroke-dashoffset: 2600; fill-opacity: 0; stroke-opacity: 1; opacity: 1; }
  52% { stroke-dashoffset: 0; fill-opacity: 0; stroke-opacity: 1; }
  64% { fill-opacity: 1; stroke-opacity: 1; } 72% { fill-opacity: 1; stroke-opacity: 0; opacity: 1; }
  88% { fill-opacity: 1; stroke-opacity: 0; opacity: 1; } 100% { fill-opacity: 1; stroke-opacity: 0; opacity: 0; }
}

/* ---------- product · wireframe → final (loop): outlines draw in, the final UI fades in over them ---------- */
.ws-shot--build .ws-shot__ui { transform: none !important; }
.ws-shot--build .ws-shot__ui:not(.ws-shot__wire) { animation: wsBuildFinal 8s ease-in-out infinite both !important; }
.ws-shot.ws-shot--build .ws-shot__ui.ws-shot__wire { z-index: 2; animation: wsBuildWire 8s ease-in-out infinite both !important; }
.ws-shot--build .ws-shot__wire svg * {
  fill: none !important; stroke: var(--shot-lockup) !important; stroke-width: 1px !important; stroke-opacity: .7 !important;
  stroke-dasharray: 1; stroke-dashoffset: 1; filter: none !important;
  animation: wsBuildDraw 8s cubic-bezier(.65, 0, .35, 1) infinite both;
}
.ws-shot--build .ws-shot__wire svg image, .ws-shot--build .ws-shot__wire img { opacity: 0 !important; }
.ws-shot--build .ws-shot__wire svg mask *, .ws-shot--build .ws-shot__wire svg clipPath * { fill: #fff !important; stroke: none !important; animation: none; }
@keyframes wsBuildDraw { 0% { stroke-dashoffset: 1; } 34% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
@keyframes wsBuildWire { 0%, 40% { opacity: 1; } 52% { opacity: 0; } 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes wsBuildFinal { 0%, 34% { opacity: 0; } 48% { opacity: 1; } 88% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* ---------- clips: a case-study prototype live in the vertical card ---------- */
.ws-clip__frame {
  position: absolute; left: 0; top: 0; width: 450px; height: 800px; border: 0;
  transform: scale(2.4); transform-origin: 0 0; pointer-events: none; background: var(--shot-bg);
}
.ws-clip__scrim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 360px; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--shot-bg) 0%, transparent) 0%, color-mix(in srgb, var(--shot-bg) 85%, transparent) 45%, var(--shot-bg) 62%);
}
.ws-shot--clip .ws-shot__glow, .ws-shot--clip .ws-shot__fade { display: none; }
.ws-shot--clip .ws-shot__footer { animation: none; opacity: 1; }
/* desktop screens: 1440×900 at ×0.75, centred in the band above the footer */
.ws-clip--d .ws-clip__frame { width: 1440px; height: 900px; transform: translateY(536px) scale(.75); }
/* the detail column never grows with the strip's content (it scrolls instead) */
.ws-detail { grid-template-columns: minmax(0, 1fr); }
.ws-ficha { min-width: 0; }
.ws-series { min-width: 0; max-width: 100%; }
.ws-page { overflow-x: clip; }

/* ---------- section titles open the series (feedback 25-sep) ---------- */
.ws-row__open {
  display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer;
}
.ws-row__open svg { width: 16px; height: 16px; opacity: .45; transition: transform var(--duration-quick) var(--ease-out-quint), opacity var(--duration-quick) ease; }
.ws-row__open:hover svg, .ws-row__open:focus-visible svg { opacity: 1; transform: translateX(3px); }
.ws-row__open:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; border-radius: 2px; }
.ws-row__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 18px 12px;
}
body.ws-format-landscape .ws-row__grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.ws-row__grid .ws-card { gap: 8px; padding: 0; color: inherit; }
.ws-row__grid .ws-card__title { margin: 0; font-size: 14px; font-weight: 500; color: var(--ws-muted); }
@media (max-width: 767px) { .ws-row__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- performance: thumbnails skip the SVG filters (drop shadows) and off-screen rows skip layout ---------- */
.ws-card__thumb .ws-shot svg [filter], .ws-series__item .ws-shot svg [filter] { filter: none !important; }
.ws-row { content-visibility: auto; contain-intrinsic-size: auto 480px; }
.ws-card__thumb:empty, .ws-series__item:empty { background: color-mix(in srgb, #fff 4%, transparent); }
.ws-series__item { aspect-ratio: 9 / 16; }

/* ---------- mobile: horizontal scrolling of the lists (chips and rows) ---------- */
.ws-row__track, .ws-toolbar, .ws-series {
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.ws-card { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: none) { .ws-card:hover { transform: none; } }

/* Rows never grow to their content width: the track is the scroller (fixes no horizontal scroll on phones). */
.ws-rows { grid-template-columns: minmax(0, 1fr); }
.ws-row { min-width: 0; }
.ws-ficha__code { margin: 0 0 4px; font: 500 12px/1 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .05em; opacity: .55; }
