/* Hero featured-work card deck (matches extraordinary-apps showcase pattern) */
.studio-hero .hero-composition {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 28px 40px;
  align-items: center;
  min-height: 0;
  overflow: visible;
}

.studio-hero .hero-copy {
  position: relative;
  z-index: 4;
  min-width: 0;
  max-width: 100%;
}

/* Prevent the huge nowrap headline from crushing the slider column */
.studio-hero .hero-copy h1 {
  white-space: normal;
  max-width: 12ch;
  font-size: clamp(48px, 5.6vw, 92px);
  line-height: 1.02;
}

.hero-visual.hero-project-showcase {
  min-width: 0;
  min-height: 520px;
  position: relative;
  z-index: 1;
  align-self: center;
  padding-top: 8px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  isolation: isolate;
  /* Disable legacy static product-orbit chrome when using the deck */
  background: none;
  display: block !important;
  padding: 10px 0 !important;
}

.hero-visual.hero-project-showcase:before,
.hero-visual.hero-project-showcase:after {
  display: none;
}

.hero-card-deck {
  position: relative;
  height: 415px;
  width: 100%;
  max-width: 100%;
  perspective: 1100px;
  overflow: visible;
}

.hero-project-card {
  position: absolute;
  width: 280px;
  height: 410px;
  left: 50%;
  top: 0;
  margin-left: -140px;
  border-radius: 18px;
  border: 1px solid #d7e5c859;
  box-shadow: inset 0 0 0 4px #ffffff04, 0 24px 70px #00000055;
  padding: 24px 25px;
  transform-style: flat;
  transition: transform 1s cubic-bezier(.2, .8, .2, 1), opacity .8s;
  overflow: hidden;
  backface-visibility: hidden;
  background: #191b2a;
  color: #f5f5ee;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

.hero-project-card:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, #ffffff08 45%, transparent 58%);
  pointer-events: none;
  opacity: 0;
}

.hero-project-card[data-position='previous']:after,
.hero-project-card[data-position='next']:after {
  opacity: 1;
}

/* Active card stays flat — translateZ/filter is what was blurring the type */
.hero-project-card[data-position='active'] {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  z-index: 3;
  filter: none;
  pointer-events: auto;
}

.hero-project-card[data-position='previous'] {
  transform: translate3d(-72px, 8px, 0) rotateY(14deg) scale(.9);
  opacity: .42;
  z-index: 1;
  filter: none;
  pointer-events: none;
}

.hero-project-card[data-position='next'] {
  transform: translate3d(72px, 8px, 0) rotateY(-14deg) scale(.9);
  opacity: .42;
  z-index: 2;
  filter: none;
  pointer-events: none;
}

.hero-project-card[data-position='hidden'] {
  transform: translate3d(0, 0, 0) scale(.84);
  opacity: 0;
  z-index: 0;
  filter: none;
  pointer-events: none;
}

.hero-project-card[data-position='active'] h2,
.hero-project-card[data-position='active'] p,
.hero-project-card[data-position='active'] a,
.hero-project-card[data-position='active'] .hero-card-top {
  transform: translateZ(0);
}

.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 7px;
  letter-spacing: .12em;
  color: #ced4dc;
}

.hero-card-spark {
  color: var(--lime, #d5f64b);
  font-size: 23px;
  line-height: 1;
}

.hero-card-category {
  font-size: 7px;
  letter-spacing: .1em;
  margin-top: 24px;
  color: #bdc6db;
  line-height: 1.5;
}

.hero-project-card h2 {
  font-size: 28px;
  letter-spacing: -.05em;
  margin-top: 8px;
  color: #f5f5ee;
}

.hero-project-card p.hero-card-line {
  font-size: 10px;
  line-height: 1.6;
  margin-top: 11px;
  color: #c2c7d6;
  max-width: 210px;
  min-height: 32px;
}

.hero-project-card img {
  height: 180px;
  width: 100%;
  object-fit: contain;
  margin-top: 10px;
  filter: drop-shadow(0 15px 15px #0003);
}

.hero-project-card > a {
  position: absolute;
  bottom: 22px;
  left: 25px;
  right: 25px;
  border-top: 1px solid #ffffff26;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 13px;
  font-size: 10px;
  color: #e5eadf;
  z-index: 1;
}

.hero-project-card > a > span {
  color: var(--lime, #d5f64b);
  font-size: 19px;
}

.hero-project-card > a:hover {
  color: var(--lime, #d5f64b);
}

.hero-project-card.purple {
  background: radial-gradient(ellipse at 45% 100%, #56417b99, transparent 70%), #191b2a;
}

.hero-project-card.orange {
  background: radial-gradient(ellipse at 45% 100%, #7f603699, transparent 70%), #292820;
}

.hero-project-card.blue {
  background: radial-gradient(ellipse at 45% 100%, #27628799, transparent 70%), #17242b;
}

.hero-project-card.reflex {
  background: radial-gradient(ellipse at 45% 100%, #2f6b4f99, transparent 70%), #142018;
}

.hero-project-card.ai {
  background: radial-gradient(ellipse at 45% 100%, #3a5f8a99, transparent 70%), #151c28;
}

.hero-project-card.teddy {
  background: radial-gradient(ellipse at 45% 100%, #8a4d5e99, transparent 70%), #24161c;
}

.hero-carousel-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 2;
}

.hero-carousel-controls > button {
  width: 32px;
  height: 32px;
  background: #11161f80;
  border: 1px solid #ffffff26;
  border-radius: 50%;
  color: #b6becb;
  font-size: 13px;
  display: grid;
  place-items: center;
  padding: 0;
}

.hero-carousel-controls > button:hover {
  color: var(--lime, #d5f64b);
  border-color: var(--lime, #d5f64b);
}

.hero-rotation-toggle[aria-pressed='true'] {
  color: var(--lime, #d5f64b);
  background: #d7fb3512;
}

.hero-project-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 420px;
}

.hero-project-tabs button {
  padding: 9px 10px;
  border-radius: 5px;
  border: 1px solid #ffffff18;
  background: #11161f80;
  color: #a6b0bd;
  font-size: 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.hero-project-tabs button[aria-pressed='true'] {
  border-color: #d7fb3566;
  color: #e1e9c4;
  background: #d7fb3512;
}

.hero-showcase-caption {
  text-align: center;
  font-size: 8px;
  margin-top: 14px;
  letter-spacing: .015em;
  color: #7c8799;
}

.hero-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (min-width: 1600px) {
  .studio-hero .hero-copy h1 {
    font-size: 100px;
  }

  .hero-card-deck {
    height: 490px;
  }

  .hero-project-card {
    width: 340px;
    height: 485px;
    margin-left: -170px;
    padding: 28px;
  }

  .hero-project-card img {
    height: 235px;
  }

  .hero-project-card h2 {
    font-size: 40px;
  }

  .hero-card-category {
    margin-top: 30px;
  }

  .hero-project-card[data-position='previous'] {
    transform: translate3d(-90px, 8px, 0) rotateY(14deg) scale(.9);
  }

  .hero-project-card[data-position='next'] {
    transform: translate3d(90px, 8px, 0) rotateY(-14deg) scale(.9);
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .studio-hero .hero-composition {
    gap: 20px;
    min-height: 620px;
  }

  .studio-hero .hero-copy h1 {
    font-size: clamp(42px, 5.2vw, 64px);
    max-width: 11ch;
  }

  .hero-project-card {
    width: 230px;
    height: 370px;
    margin-left: -115px;
    padding: 18px;
  }

  .hero-card-deck {
    height: 375px;
  }

  .hero-project-card img {
    height: 160px;
  }

  .hero-project-card h2 {
    font-size: 26px;
  }

  .hero-project-card[data-position='previous'] {
    transform: translate3d(-48px, 6px, 0) rotateY(12deg) scale(.9);
  }

  .hero-project-card[data-position='next'] {
    transform: translate3d(48px, 6px, 0) rotateY(-12deg) scale(.9);
  }

  .hero-project-tabs {
    max-width: 240px;
  }

  .hero-project-tabs button {
    padding: 8px 6px;
    font-size: 7px;
  }
}

@media (max-width: 900px) {
  .studio-hero .hero-composition {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 18px;
  }

  .studio-hero .hero-copy h1 {
    max-width: none;
    font-size: clamp(48px, 10vw, 78px);
  }

  .hero-visual.hero-project-showcase {
    overflow: visible;
    max-width: 520px;
    margin-inline: auto;
  }
}

@media (max-width: 760px) {
  .hero-visual.hero-project-showcase {
    padding-top: 24px;
    max-width: 500px;
    margin-inline: auto;
    overflow: visible;
  }

  .hero-card-deck {
    height: 370px;
  }

  .hero-project-card {
    width: 245px;
    height: 365px;
    margin-left: -122.5px;
    padding: 20px;
  }

  .hero-project-card[data-position='active'] {
    transform: translate3d(0, 0, 0) scale(1);
  }

  .hero-project-card[data-position='previous'] {
    transform: translate3d(-52px, 6px, 0) rotateY(12deg) scale(.88);
  }

  .hero-project-card[data-position='next'] {
    transform: translate3d(52px, 6px, 0) rotateY(-12deg) scale(.88);
  }

  .hero-card-category {
    margin-top: 19px;
  }

  .hero-project-card h2 {
    font-size: 29px;
  }

  .hero-project-card img {
    height: 155px;
  }

  .hero-project-card > a {
    left: 20px;
    right: 20px;
    bottom: 18px;
    font-size: 9px;
  }

  .hero-project-card p.hero-card-line {
    font-size: 9px;
    margin-top: 9px;
    min-height: 29px;
  }

  .hero-carousel-controls {
    margin-top: 20px;
  }

  .hero-project-tabs {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-project-card {
    transition: none;
  }

  .hero-rotation-toggle {
    display: none;
  }
}
