/* Homepage — centered Brand Appart–inspired layout on portfolio tokens */

:root {
  --radius-stage: 28px;
  --radius-card: 24px;
  --max-width-stage: 1100px;
}

/* ---------------------------------- Hero ---------------------------------- */
/* Figma Website 2157×~1230 first screen (node 317:512) */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  /* Fixed nav overlays; title sits at Figma y≈119 from hero/viewport top */
  padding-top: var(--nav-height);
  padding-bottom: 6vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  overflow: hidden;
  --hero-float-w: clamp(148px, 17vw, 280px);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.hero-float {
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  width: var(--hero-float-w);
  height: auto;
  object-fit: contain;
  background: none;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--duration-reveal-long) var(--ease-out),
    transform var(--duration-reveal-long) var(--ease-out);
}

.hero.is-ready .hero-float {
  opacity: 1;
  transform: translateY(0);
}

/* Top: 10% smaller, no padding, 35% off the top edge, rotated 8°. */
.hero-float--top {
  top: 0;
  left: 50%;
  width: calc(var(--hero-float-w) * 0.9);
  padding-left: 0;
  transform: translateX(-50%) translateY(calc(-35% + 22px)) rotate(8deg);
  transform-origin: center center;
  transition-delay: 80ms;
}

.hero.is-ready .hero-float--top {
  transform: translateX(-50%) translateY(-35%) rotate(8deg);
}

/* Left pair — Poalim upper-left, +31.25% (25% then +5%), 9°, 15% off the left edge. */
.hero-float--left-top {
  left: 0;
  top: clamp(8px, 2vh, 28px);
  width: calc(var(--hero-float-w) * 1.3125);
  transform: translateX(-15%) translateY(22px) rotate(9deg);
  transform-origin: center center;
  transition-delay: 120ms;
}

.hero.is-ready .hero-float--left-top {
  transform: translateX(-15%) translateY(0) rotate(9deg);
}

.hero-float--left-bottom {
  left: clamp(-48px, -3.5vw, -8px);
  top: 58%;
  width: calc(var(--hero-float-w) * 1.067);
  transform: translateY(22px) rotate(-4deg);
  transform-origin: center center;
  transition-delay: 160ms;
}

.hero.is-ready .hero-float--left-bottom {
  transform: translateY(0) rotate(-4deg);
}

/* Right pair — top-right is 3% smaller, rotated, 25% off the right edge. */
.hero-float--right-top {
  left: auto;
  right: 0;
  top: 20%;
  width: calc(var(--hero-float-w) * 0.97);
  transform: translateX(25%) translateY(22px) rotate(6.75deg);
  transform-origin: center center;
  transition-delay: 140ms;
}

.hero.is-ready .hero-float--right-top {
  transform: translateX(25%) translateY(0) rotate(6.75deg);
}

.hero-float--right-bottom {
  left: auto;
  right: 0;
  top: 60%;
  width: calc(var(--hero-float-w) * 1.15);
  transform: translateX(15%) translateY(22px) rotate(-6deg);
  transform-origin: center center;
  transition-delay: 200ms;
}

.hero.is-ready .hero-float--right-bottom {
  transform: translateX(15%) translateY(0) rotate(-6deg);
}

.hero-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  /* Clear absolute Figma title (317:2322 sits at y≈119, ~200–400px tall) */
  padding-top: clamp(160px, 26vw, 360px);
  padding-bottom: clamp(28px, 5vh, 56px);
}

.hero-title {
  /* Figma 317:2322 — top of hero, #d6d6d6 @ 50%, behind floats */
  position: absolute;
  top: clamp(48px, 5.5vw, 119px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  margin: 0;
  width: 100vw;
  max-width: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 21.32vw, 460px);
  line-height: 0.88;
  letter-spacing: -0.07em;
  white-space: nowrap;
  text-align: center;
  color: var(--text-stats-bg);
  opacity: 0.5;
  overflow: visible;
  pointer-events: none;
}

.hero-lede {
  margin: clamp(36px, 5vh, 72px) auto 0;
  max-width: min(1351px, 62.6vw);
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 52px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.033em;
  text-align: center;
}

.hero-lede-muted {
  color: #7a7a7a;
  font-weight: 600;
}

.hero-lede-strong {
  color: var(--text-primary);
  font-weight: 800;
}

.hero-domains {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15em clamp(10px, 1vw, 20px);
  width: 100%;
  max-width: min(1351px, 62.6vw);
  margin-top: clamp(48px, 8vh, 96px);
  font-family: var(--font-display);
  font-size: clamp(15px, 1.8vw, 38px);
  line-height: 1;
  color: #555555;
  text-align: center;
}

.hero-domains:hover,
.hero-domains:focus-visible {
  opacity: 0.75;
}

.hero-domain {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 1em;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.hero-domain strong {
  font-weight: 600;
}

.hero-domain-compound {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
}

.hero-domain-amp {
  font-weight: 400;
}

.hero-domain-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 1em;
  font-size: 1em;
  font-weight: 700;
  line-height: 1;
  color: #272727;
  /* Asterisk glyphs sit high in the em box; nudge onto the text midline. */
  transform: translateY(0.12em);
}

.hero-domain-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(36px, 2.75vw, 59px);
  height: clamp(36px, 2.75vw, 59px);
}

.hero-domain-arrow img {
  width: 100%;
  height: auto;
  transform: rotate(45deg);
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--text-inverse);
  border: 1.5px solid var(--text-primary);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: transparent;
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-hairline);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--text-primary);
}

/* ------------------------ Shared media stages (video) --------------------- */

.media-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-stage);
  background: var(--bg-video);
  box-shadow: var(--shadow-video-card);
}

.media-stage--hero {
  max-width: var(--max-width-stage);
  margin-inline: auto;
  aspect-ratio: 16 / 10;
}

.media-stage--showcase {
  aspect-ratio: 16 / 10;
}

.media-poster,
.media-stage .media-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-poster {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.media-stage--hero .media-poster,
.media-stage--showcase .media-poster {
  position: absolute;
}

.media-stage .media-el {
  z-index: 1;
  background: var(--bg-video);
}

.media-play,
.media-mute {
  position: absolute;
  z-index: 3;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

.media-play {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(64px, 9vw, 120px);
  height: clamp(64px, 9vw, 120px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--duration-press) var(--ease-out),
    opacity var(--duration-base) ease;
}

.media-stage.is-playable .media-play {
  opacity: 1;
  pointer-events: auto;
}

.media-play img {
  width: 100%;
  height: 100%;
}

.media-play:hover,
.media-play:focus-visible {
  transform: translate(-50%, -50%) scale(1.08);
}

.media-stage.is-playing .media-play {
  opacity: 0;
}

.media-stage.is-playing:hover .media-play,
.media-stage.is-playing .media-play:focus-visible {
  opacity: 1;
}

.media-stage.is-playing .media-poster {
  opacity: 0;
}

.media-mute {
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: var(--text-inverse);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: none;
  align-items: center;
  justify-content: center;
}

.media-stage.has-video .media-mute {
  display: inline-flex;
}

.media-mute:hover,
.media-mute:focus-visible {
  background: rgba(0, 0, 0, 0.8);
}

/* --------------------------- Shared section chrome ------------------------ */

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: var(--gap-section-head);
  max-width: 40ch;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
  align-items: center;
  max-width: 36ch;
}

.section-title {
  font-weight: 800;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 0.95;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

.section-lede {
  font-family: var(--font-ui);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.45;
  color: var(--text-body);
}

/* ------------------------- Work stack (case studies) ---------------------- */
/* Brand Appart–style sticky card stack for Bingo / Playscape / Airobotics. */

.work-stack {
  position: relative;
  background-color: var(--color-white);
  --bg-page: var(--color-white);
  --text-primary: var(--color-black);
  --text-body: var(--color-body);
  --border-hairline: rgba(0, 0, 0, 0.08);
}

.work-stack-intro {
  padding-block: var(--pad-section-block) var(--gap-section-head);
  text-align: center;
}

.work-stack-title {
  margin: 0 auto;
  max-width: 22ch;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--text-primary);
}

.work-stack-track {
  position: relative;
  height: 320vh;
}

.work-stack-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  /* Fallback height for browsers without svh */
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding-inline: var(--space-side);
  padding-block: clamp(12px, 2vh, 20px) clamp(16px, 2.5vh, 28px);
  overflow: hidden;
  perspective: 1200px;
  box-sizing: border-box;
}

.work-stack-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #e8e8e8;
  box-sizing: border-box;
  z-index: 8;
}

.work-stack-switch-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-muted);
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.work-stack-switch-btn:hover,
.work-stack-switch-btn:focus-visible {
  color: var(--color-body);
}

.work-stack-switch-btn:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

.work-stack-switch-btn[aria-selected="true"] {
  color: var(--color-black);
  background: var(--color-white);
}

.work-stack-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.work-stack-list {
  position: relative;
  width: min(100%, 1180px);
  /* Front card shorter → rear peeks add less total stack height */
  height: min(72vh, 600px);
  height: min(72dvh, 600px);
  height: min(72svh, 600px);
  margin-inline: auto;
  transform-style: preserve-3d;
}

.work-stack-list:not(.is-active) {
  display: none;
}

.work-card--v2-solo .work-card-v2-mid {
  grid-template-columns: 1fr;
}

.work-card--v2-solo .work-card-v2-main {
  max-width: 42rem;
}

.work-stack-item {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  overflow: hidden;
  will-change: transform;
  transform-origin: center top;
  /* Solid strip = same as card pad-y; covers gallery in closed peeks */
  --stack-peek-pad: clamp(32px, 4vh, 48px);
}

.work-card-link {
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: inherit;
}

.work-card-link:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: -6px;
}

.work-stack-item::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: var(--stack-peek-pad);
  background: var(--work-card-bg, #000);
  border-radius: 0 0 inherit inherit;
  z-index: 5;
  pointer-events: none;
}

.work-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 3.2vw, 44px);
  height: 100%;
  padding: clamp(28px, 4vw, 48px);
  background: var(--work-card-bg, var(--color-black));
  color: var(--color-white);
  border-radius: inherit;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28);
}

.work-card-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  text-align: left;
}

.work-card-count {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0.72;
}

.work-card-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.work-card-desc {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(15px, 1.45vw, 18px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  max-width: 38ch;
}

.work-card-meta {
  margin: auto 0 0;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.work-card-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
}

.work-card-quote {
  margin: 0;
  padding: 0;
  border: 0;
}

.work-card-quote p {
  margin: 0 0 14px;
  font-family: var(--font-ui);
  font-size: clamp(13px, 1.2vw, 15px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.work-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.work-card-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.work-card-author-name,
.work-card-author-role {
  display: block;
  font-family: var(--font-ui);
}

.work-card-author-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-white);
}

.work-card-author-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.work-card-gallery {
  display: flex;
  gap: 10px;
  overflow: hidden;
  margin-top: auto;
  mask-image: linear-gradient(90deg, #000 70%, transparent 100%);
}

.work-card-gallery-item {
  flex: 0 0 auto;
  width: clamp(130px, 16vw, 180px);
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.work-card-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Work card v2 — canonical stack card (Figma 384:3599)
   Structure: title → body+stats | quote → gallery (3 shots, right bleed).
   Type scale into sticky card viewport (~1180×640 front card). */
.work-card--v2 {
  --v2-pad-x: clamp(28px, 3.8vw, 48px);
  --v2-pad-y: clamp(32px, 4vh, 48px);
  --v2-gap-after-title: clamp(18px, 2.4vh, 28px);
  --v2-gap-body-stats: clamp(22px, 2.8vh, 36px);
  --v2-gap-stats-gallery: clamp(20px, 2.6vh, 32px);

  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--v2-pad-y) var(--v2-pad-x);
  overflow: hidden;
}

.work-card-v2-head {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex-shrink: 0;
}

.work-card-v2-title {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--color-white);
  text-wrap: balance;
}

.work-card-v2-mid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(11rem, 0.85fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: start;
  min-width: 0;
  margin-top: var(--v2-gap-after-title);
  flex: 0 1 auto;
}

.work-card-v2-main {
  display: flex;
  flex-direction: column;
  gap: var(--v2-gap-body-stats);
  min-width: 0;
}

.work-card-v2-body {
  margin: 0;
  max-width: 54ch;
  display: flex;
  flex-direction: column;
  gap: 0.85em;
}

.work-card-v2-body p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.4;
  letter-spacing: -0.008em;
  color: #d2d2d2;
}

.work-card-v2-quote {
  margin: 0;
  padding-top: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.work-card-v2-quote-text {
  margin: 0;
  padding: 0;
  border: 0;
}

.work-card-v2-quote-text p {
  margin: 0;
  max-width: 30ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(13px, 1.15vw, 16px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #e1e1e1;
}

.work-card-v2-quote-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.work-card-v2-quote-author img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.work-card-v2-quote-author p {
  margin: 0;
  min-width: 0;
}

.work-card-v2-quote-name,
.work-card-v2-quote-role {
  display: block;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.work-card-v2-quote-name {
  font-weight: 700;
  font-size: clamp(14px, 1.25vw, 17px);
  color: #b1b1b1;
}

.work-card-v2-quote-role {
  font-weight: 600;
  font-size: clamp(12px, 1.1vw, 14px);
  color: #878787;
}

.work-card-v2-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(22px, 2.6vw, 40px);
  margin: 0;
  flex-shrink: 0;
}

.work-card-v2-stat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  min-width: 0;
}

.work-card-v2-stat dt {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a8a8a8;
  line-height: 1.2;
}

.work-card-v2-stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(16px, 1.55vw, 21px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #e8e8e8;
}

.work-card-v2-gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(14px, 1.5vw, 18px);
  /* Bleed past right padding so the 3rd shot peeks out (Figma 384:3599) */
  width: calc(100% + var(--v2-pad-x) + 32%);
  margin-inline-end: calc(-1 * var(--v2-pad-x));
  margin-top: auto;
  padding-top: var(--v2-gap-stats-gallery);
  flex: 0 0 auto;
  min-height: 0;
}

.work-card-v2-shot {
  flex: 0 0 auto;
  width: clamp(300px, 30vw, 420px);
  border-radius: 18px;
  overflow: hidden;
  background: #555;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  max-height: 220px;
}

.work-card-v2-gallery--percepto .work-card-v2-shot {
  /* Figma 442:8856 — vertical wash behind device mockups */
  background: linear-gradient(180deg, #37e3ec 0%, #00474a 100%);
}

.work-card-v2-gallery--hapoalim .work-card-v2-shot {
  /* Figma 442:9289 — Bank red wash behind portal/app mockups */
  background: linear-gradient(180deg, #ff0e0e 0%, #8f0000 100%);
}

.work-card-v2-gallery--copilot .work-card-v2-shot {
  /* Figma 444:18995 — blue wash behind Copilot.cx mockups */
  background: linear-gradient(180deg, #0354d6 0%, #0c1f68 100%);
}

.work-card-v2-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Keep full Figma composition (no crop) for device mockup frames */
.work-card-v2-shot--fit img {
  object-fit: contain;
}

/* Match Figma 442:8856 — devices inset ~9.5% from top, ~90% wide, chin clips bottom */
.work-card-v2-shot--inset-top {
  position: relative;
}

.work-card-v2-shot--inset-top img {
  position: absolute;
  left: 6.83%;
  top: 9.53%;
  width: 89.97%;
  height: auto;
  max-width: none;
  padding: 0;
  object-fit: contain;
  object-position: top center;
}

.work-card-v2-shot--video.media-stage {
  box-shadow: none;
  background: #033133;
}

.work-card-v2-shot--video .media-poster,
.work-card-v2-shot--video .media-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.work-card-v2-shot--video .media-poster {
  z-index: 0;
  transition: opacity var(--duration-base) ease;
}

.work-card-v2-shot--video .media-el {
  z-index: 1;
  opacity: 0;
  transition: opacity var(--duration-base) ease;
}

.work-card-v2-shot--video.is-playing .media-el {
  opacity: 1;
}

.work-card-v2-shot--video.is-playing .media-poster {
  opacity: 0;
}

.work-card-v2-shot--video .media-mute,
.work-card-v2-shot--video .media-play {
  display: none !important;
}

.work-card-v2-shot--lobby {
  background: #016df0;
}

.work-card-v2-shot--lobby img {
  object-fit: cover;
  object-position: center;
}

.work-stack.is-static .work-stack-track {
  height: auto;
}

.work-stack.is-static .work-stack-sticky {
  position: relative;
  height: auto;
  display: block;
  overflow: visible;
  perspective: none;
  padding-block: 0 var(--pad-section-block);
}

.work-stack.is-static .work-stack-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: auto;
  width: min(100%, 1180px);
}

.work-stack.is-static .work-stack-item {
  position: relative;
  inset: auto;
  transform: none !important;
}

/* ------------------------------- Showcase --------------------------------- */
/* Brand Appart–style sticky scroll: frame stays centered, grows on scroll. */

.showcase {
  position: relative;
  background: transparent;
}

.showcase-track {
  position: relative;
  /* Extra travel: grow on light, then hold full-screen dark */
  height: 280vh;
}

.showcase-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  width: 100%;
  display: grid;
  place-items: center;
  padding-inline: 0;
  overflow: hidden;
  z-index: 1;
}

.showcase-title {
  position: absolute;
  /* Sit just under the fixed nav — stable across mobile chrome / layout height */
  top: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  margin: 0;
  width: max-content;
  max-width: calc(100% - 2 * var(--space-side));
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 9vw, 160px);
  line-height: 0.88;
  letter-spacing: -0.055em;
  color: var(--text-stats-bg);
  text-align: center;
  pointer-events: none;
  will-change: opacity;
}

.showcase-viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  /* No side padding — padding here left-biases the growing frame.
     Inset comes from the frame’s own centered width. */
  padding-inline: 0;
}

.showcase-frame {
  position: relative;
  /* Regular card → full width is driven in JS (not transform:scale). */
  width: min(68vw, 920px);
  aspect-ratio: 16 / 9;
  max-height: 92svh;
  overflow: hidden;
  border-radius: 28px;
  background: var(--bg-video);
  transform: none;
  transform-origin: center center;
  margin-inline: auto;
  flex-shrink: 0;
  will-change: width, border-radius;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

html.is-showcase-theme .showcase-frame {
  box-shadow: none;
}

.showcase-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.showcase-embed {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

.showcase-frame.is-playing .showcase-embed {
  opacity: 1;
}

.showcase-frame.is-playing .showcase-poster {
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

/* Hover / focus timeline — Advance: scrub only when intended */
.showcase-scrub {
  position: absolute;
  left: clamp(12px, 2vw, 20px);
  right: clamp(12px, 2vw, 20px);
  bottom: clamp(12px, 2vw, 18px);
  z-index: 3;
  height: 28px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.showcase-frame:hover .showcase-scrub,
.showcase-frame:focus-within .showcase-scrub,
.showcase-frame.is-scrubbing .showcase-scrub {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@media (hover: none) {
  .showcase-frame.is-playing .showcase-scrub:not([hidden]) {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

.showcase-scrub-range {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.showcase-scrub-visual {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.showcase-scrub-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.9);
}

.showcase-scrub-range:focus {
  outline: none;
}

.showcase-scrub-range:focus-visible {
  outline: 2px solid var(--text-inverse);
  outline-offset: 3px;
  border-radius: 999px;
}

.showcase-scrub-range::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.showcase-scrub-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: var(--text-inverse);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform var(--duration-fast) var(--ease-out);
}

.showcase-scrub-range:hover::-webkit-slider-thumb,
.showcase-scrub-range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.12);
}

.showcase-scrub-range::-moz-range-track {
  height: 4px;
  border: 0;
  background: transparent;
}

.showcase-scrub-range::-moz-range-progress {
  height: 4px;
  background: transparent;
}

.showcase-scrub-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--text-inverse);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.showcase.is-static .showcase-frame {
  width: min(92vw, 1100px) !important;
  transform: none !important;
  border-radius: 16px !important;
}

/* ---------------------- Manager toolkit (bento tiles) --------------------- */
/* Screenshot + Brand Appart about: black image tiles, asymmetric grid */

.vision {
  position: relative;
  padding-block: var(--pad-section-block);
  background: var(--color-white);
  overflow-x: clip;
  overflow-y: visible;
}

.vision-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: var(--gap-section-head);
  text-align: center;
}

.vision-eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.074em;
  color: #515151;
}

.vision-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 11vw, 160px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

.vision-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "research research research research research research research agile agile agile agile agile"
    "workshop workshop workshop workshop workshop workshop workshop workshop workshop workshop workshop workshop"
    "teaching teaching teaching teaching teaching workflow workflow workflow workflow workflow workflow workflow";
  gap: clamp(12px, 1.6vw, 20px);
  /* layout-inline defaults to 1720px — align toolkit with work-stack cards */
  max-width: 1180px;
}

.vision-tile--research { grid-area: research; }
.vision-tile--agile { grid-area: agile; }
.vision-tile--workshop { grid-area: workshop; }
.vision-tile--teaching { grid-area: teaching; }
.vision-tile--workflow { grid-area: workflow; }

.vision-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
  color: var(--color-white);
  border-radius: clamp(18px, 2vw, 28px);
  opacity: 0;
  transform: translate3d(0, 56px, 0);
  transition:
    opacity 0.85s var(--ease-out),
    transform 1.1s cubic-bezier(0.22, 1.55, 0.36, 1);
}

/* Soft top scrim so label/desc stay readable on photos */
.vision-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(46%, 168px);
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.58) 0%,
    rgba(0, 0, 0, 0.22) 55%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

.vision-bento.is-static .vision-tile,
.vision-bento.is-in .vision-tile {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.vision-bento.is-in .vision-tile:nth-child(1) { transition-delay: 0s; }
.vision-bento.is-in .vision-tile:nth-child(2) { transition-delay: 0.08s; }
.vision-bento.is-in .vision-tile:nth-child(3) { transition-delay: 0.16s; }
.vision-bento.is-in .vision-tile:nth-child(4) { transition-delay: 0.24s; }
.vision-bento.is-in .vision-tile:nth-child(5) { transition-delay: 0.32s; }

.vision-tile-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: clamp(10px, 1.2vw, 18px);
  padding: clamp(16px, 2vw, 22px) clamp(16px, 2vw, 24px);
  pointer-events: none;
}

.vision-tile-label {
  flex: 0 0 auto;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-white);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.vision-tile-desc {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  min-width: 0;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.4vw, 20px);
  line-height: 1.388;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.vision-tile-desc-lead {
  font-weight: 300;
  color: inherit;
}

.vision-tile-desc-sub {
  font-weight: 200;
  color: inherit;
}

.vision-tile-media {
  position: relative;
  flex: 1 1 auto;
  margin: 0;
  width: 100%;
  min-height: 180px;
  overflow: hidden;
  border-radius: inherit;
  background: #e8e8e8;
  perspective: 900px;
}

.vision-tile--research .vision-tile-media,
.vision-tile--workflow .vision-tile-media {
  aspect-ratio: 16 / 10;
}

.vision-tile--agile .vision-tile-media,
.vision-tile--teaching .vision-tile-media {
  margin-inline: 0;
  aspect-ratio: 4 / 5;
  min-height: 240px;
}

.vision-tile--teaching .vision-tile-media {
  aspect-ratio: 3 / 4;
  min-height: 260px;
}

.vision-tile-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 0.9s var(--ease-out);
  will-change: transform;
}

/* Workshop carousel — user-driven only (no autoplay) */
.vision-tile--workshop::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 96px;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.5) 0%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

.vision-carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.vision-carousel-viewport {
  overflow: hidden;
  margin-inline: 0;
  border-radius: inherit;
  perspective: 900px;
}

.vision-tile--workshop .vision-carousel {
  border-radius: inherit;
  overflow: hidden;
}

.vision-carousel-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform var(--duration-reveal) var(--ease-out);
}

.vision-carousel-slide {
  flex: 0 0 100%;
  margin: 0;
  aspect-ratio: 21 / 9;
  min-height: 200px;
  overflow: hidden;
  background: #e8e8e8;
}

.vision-carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 0.9s var(--ease-out);
  will-change: transform;
}

.vision-carousel-controls {
  position: absolute;
  bottom: clamp(12px, 1.5vw, 18px);
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-inline: 16px;
}

.vision-carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: var(--color-white);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.vision-carousel-btn:hover,
.vision-carousel-btn:focus-visible {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.9);
}

.vision-carousel-btn:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 3px;
}

.vision-carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vision-carousel-dot {
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: transform var(--duration-fast) var(--ease-out);
}

.vision-carousel-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: background var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.vision-carousel-dot.is-active::after {
  background: var(--color-white);
  transform: translate(-50%, -50%) scale(1.15);
}

.vision-carousel-dot.is-active {
  transform: none;
}

.vision-carousel-dot:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 3px;
}

/* --------------------------------- Stats ---------------------------------- */
/* Figma “Me in numbers”: square tiles over large backdrop title + light grid */

.stats {
  position: relative;
  padding-block: var(--pad-section-block);
  overflow-x: clip;
  overflow-y: visible;
  background: var(--color-white);
}

.stats-overlap {
  position: relative;
  z-index: 1;
  display: block;
  /* Title peeks above; tiles clip only the lower edge of the wordmark */
  padding-top: clamp(52px, 6.5vw, 84px);
  padding-bottom: 0;
}

.stats-bg-text {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -18%);
  width: max-content;
  max-width: none;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 11vw, 168px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--text-stats-bg);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.stats-list {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.stat-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--color-black);
  border-radius: 16px;
  color: var(--text-inverse);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--color-white);
}

.stat-label {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(13px, 1.35vw, 18px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #b5b5b5;
}

/* ------------------------------ Testimonials ------------------------------ */
/* Brand Appart–style: large title + horizontal trust cards rail */

.testimonials {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-white);
  padding-block: var(--pad-section-block);
}

.testimonials-head {
  margin-bottom: var(--gap-section-head);
}

.testimonials-title {
  margin: 0;
  max-width: 12ch;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  text-align: left;
}

.testimonials-title-line {
  display: block;
}

.testimonials-rail {
  overflow-x: auto;
  overflow-y: hidden;
  padding-inline: var(--space-side);
  padding-bottom: 12px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  outline: none;
  background: var(--color-white);
  mask-image: none;
  -webkit-mask-image: none;
}

.testimonials-rail::-webkit-scrollbar {
  display: none;
}

.testimonials-rail.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.testimonials-rail:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 4px;
}

.testimonials-track {
  display: flex;
  gap: clamp(16px, 2vw, 24px);
  width: max-content;
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
}

.testimonials-track > li {
  flex: 0 0 auto;
  width: min(78vw, 520px);
  margin: 0;
}

.trust-card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100%;
  min-height: clamp(340px, 42vw, 420px);
  padding: clamp(28px, 3.5vw, 40px);
  background: var(--color-black);
  color: var(--color-white);
  border-radius: 24px;
  text-align: left;
  box-shadow: none;
}

.trust-card-quote {
  margin: 0;
  flex: 1 1 auto;
}

.trust-card-quote p {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
}

.trust-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.trust-card-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.trust-card-attrib {
  margin: 0;
  min-width: 0;
}

.trust-card-name,
.trust-card-role {
  display: block;
  font-family: var(--font-ui);
}

.trust-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-white);
}

.trust-card-role {
  margin-top: 2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.trust-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-white);
  transition: background var(--duration-press) var(--ease-out),
    border-color var(--duration-press) var(--ease-out),
    color var(--duration-press) var(--ease-out);
}

.trust-card-cta:hover,
.trust-card-cta:focus-visible {
  background: var(--color-white);
  border-color: var(--color-white);
  color: var(--color-black);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-cta);
  padding: 14px 22px;
  border: var(--border-width-cta) solid var(--border-cta);
  border-radius: 999px;
  font-family: var(--font-ui);
}

.cta-button span {
  font-size: var(--text-cta);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cta-button img {
  width: 14px;
  height: 14px;
}

.cta-button:hover,
.cta-button:focus-visible {
  background: var(--text-primary);
  color: var(--text-inverse);
}

/* ------------------------------- Let's Talk ------------------------------- */

.lets-talk {
  padding-block: var(--pad-lets-talk-y) var(--pad-lets-talk-bottom);
  text-align: center;
}

.lets-talk h2 {
  font-weight: 700;
  font-size: var(--text-lets-talk);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

.lets-talk a:hover,
.lets-talk a:focus-visible {
  opacity: 0.7;
}
