/* Homepage only. Each square frame follows its native plugin's proportions. */
.studio-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: #0a0c0d;
  padding: 52px var(--gutter) 0;
}

/* Graphite studio backdrop with soft red light matching the brand accent. */
.studio-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url('/assets/img/hero-studio-red.webp') center / cover no-repeat;
  opacity: .85;
}

.studio-hero__stage,
.studio-hero__controls {
  max-width: 1440px;
  margin-inline: auto;
}

.studio-hero__carousel {
  display: grid;
  grid-template-columns: minmax(44px, 1fr) minmax(0, 1440px) minmax(44px, 1fr);
  column-gap: clamp(12px, 2vw, 40px);
  align-items: center;
}

.studio-hero__stage {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
}

.studio-hero__slide {
  display: grid;
  grid-area: 1 / 1;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  align-items: center;
  opacity: 1;
}

/* Keep every slide in the shared grid so the tallest copy reserves the stage
   height. Inactive slides remain invisible and inert, without moving the dots. */
.studio-hero__slide[hidden] {
  display: grid !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.studio-hero__copy {
  min-width: 0;
  padding: 24px clamp(28px, 4vw, 64px) 24px 0;
}

.studio-hero__product {
  margin: 0 0 24px;
  color: #b2b5b3;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
}

.studio-hero__title {
  min-height: 2.08em;
  margin: 0 0 26px;
  color: var(--frost-white, #eff5f8);
  font-size: clamp(42px, 4.45vw, 68px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: var(--tracking-display);
}

.studio-hero__description {
  max-width: 26rem;
  min-height: 5.1em;
  margin: 0;
  color: #a9adae;
  font-size: 16px;
  line-height: 1.7;
}

.studio-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

.studio-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 200px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--frost-white, #eff5f8);
  border-radius: 999px;
  background: var(--frost-white, #eff5f8);
  color: #101112;
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
}

.studio-hero__cta:hover {
  border-color: var(--frost-white, #eff5f8);
  background: var(--frost-white, #eff5f8);
  color: #101112;
}

.studio-hero__cta svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.studio-hero__trial {
  padding-block: 12px;
  color: #d0ceca;
  font-size: var(--fs-ui);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: #656867;
}

.studio-hero__trial:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.studio-hero__formats {
  margin: 20px 0 0;
  color: #a9adae;
  font-size: var(--fs-caption);
}
.studio-hero__formats span { margin-inline: 7px; }

.studio-hero__photo {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid #303434;
  box-shadow: 0 18px 42px -12px rgb(0 0 0 / .65), 0 4px 12px rgb(0 0 0 / .28), 0 0 64px 6px rgb(219 51 46 / .13);
  border-radius: 12px;
  background: #000;
}
/* The poster's explicit HTML dimensions reserve its natural height before it
   loads. Keeping it in flow makes the border hug every editor without gutters. */
.studio-hero__photo img {
  display: block;
  width: 100%;
  height: auto;
}
.studio-hero__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.studio-hero__video { opacity: 0; pointer-events: none; }
.studio-hero__video[data-playing="true"] { opacity: 1; }

.studio-hero__controls {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  margin-top: 16px;
  padding-bottom: 12px;
}

.studio-hero__arrow {
  display: grid;
  grid-row: 1;
  place-items: center;
  justify-self: center;
  width: clamp(44px, 4vw, 64px);
  height: 112px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--frost-white, #eff5f8);
  opacity: .65;
  cursor: pointer;
}
.studio-hero__arrow--prev { grid-column: 1; }
.studio-hero__arrow--next { grid-column: 3; }
.studio-hero__arrow svg { width: 32px; height: 80px; pointer-events: none; }
.studio-hero__arrow:hover,
.studio-hero__arrow:focus-visible { opacity: 1; color: var(--accent-hover); }
.studio-hero__arrow[hidden] { visibility: hidden; pointer-events: none; }

/* Reserve the navigation row before enhancement, including on a slow load.
   The buttons only become visible and interactive once the carousel is ready. */
.studio-hero__controls[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
}

.studio-hero__products {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  align-items: center;
  justify-content: center;
}

.studio-hero__select {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.studio-hero__select::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #626767;
  content: "";
}
.studio-hero__select[aria-pressed="true"]::after {
  width: 9px;
  height: 9px;
  background: var(--frost-white, #eff5f8);
}
.studio-hero__select:hover::after { background: var(--frost-white, #eff5f8); }
.studio-hero :is(button, a):focus-visible {
  outline: 2px solid var(--frost-white, #eff5f8);
  outline-offset: 4px;
}
.studio-hero__select:focus-visible { outline-offset: -2px; }

@media (prefers-reduced-motion: no-preference) {
  /* Run once at page load, independently of the carousel's slide fades.
     Hidden slides stay in the grid, so selecting them does not replay this. */
  .studio-hero__copy {
    animation: studio-hero-copy-in 650ms cubic-bezier(.22, 1, .36, 1) 60ms backwards;
  }
  .studio-hero__photo {
    animation: studio-hero-photo-in 850ms cubic-bezier(.22, 1, .36, 1) 140ms backwards;
  }
  @keyframes studio-hero-copy-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes studio-hero-photo-in {
    from { opacity: 0; transform: translateY(24px) scale(.985); }
    to { opacity: 1; transform: none; }
  }
  .studio-hero[data-enhanced] .studio-hero__slide {
    transition: opacity 360ms ease, visibility 0s;
  }
  /* Keep the outgoing frame visible until its fade finishes. JS makes it
     inert immediately; CSS also handles interrupted or reversed transitions. */
  .studio-hero[data-enhanced] .studio-hero__slide[hidden] {
    transition-delay: 0s, 360ms;
  }
  .studio-hero__video {
    transition: opacity 140ms ease-out;
  }
}

@media (max-width: 999px) {
  .studio-hero { padding-top: 36px; }
  .studio-hero::before { background-position: 64% center; opacity: .55; }
  .studio-hero__carousel {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    column-gap: 0;
  }
  .studio-hero__stage { grid-column: 1 / -1; }
  .studio-hero__arrow { grid-row: 2; width: 44px; height: 44px; }
  .studio-hero__arrow svg { width: 16px; height: 32px; }
  .studio-hero__slide { grid-template-columns: minmax(0, 1fr); }
  .studio-hero__copy { padding: 0 0 32px; }
  .studio-hero__product { margin-bottom: 18px; }
  .studio-hero__title { font-size: clamp(36px, 7.5vw, 68px); margin-bottom: 22px;  letter-spacing: var(--tracking-display);  line-height: 1.1; }
  .studio-hero__description { max-width: 35rem; min-height: 3.4em; }
  .studio-hero__actions { margin-top: 24px; }
  .studio-hero__formats { margin-top: 16px; }
  .studio-hero__controls {
    grid-column: 2;
    margin-top: 8px;
    padding-bottom: 8px;
  }
}

@media (max-width: 479px) {
  .studio-hero__select { width: 28px; }
  .studio-hero__title { font-size: clamp(34px, 9vw, 44px);  letter-spacing: var(--tracking-display);  line-height: 1.1; }
  .studio-hero__description { min-height: 5.1em; font-size: 15px; }
  .studio-hero__actions { gap: 12px 20px; }
  .studio-hero__cta { min-width: 192px; gap: 18px; font-size: var(--fs-ui); padding-inline: 14px; }
  .studio-hero__trial { font-size: var(--fs-ui); }
}
