/* Editorial hero layout inspired by the supplied lower-third reference. */
@media (min-width: 768px) {
  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex {
    justify-content: flex-end !important;
    overflow: hidden !important;
    padding: 7.5rem clamp(2.75rem, 5.5vw, 6.75rem)
      clamp(2.75rem, 5.25vh, 4.5rem) !important;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: minmax(0, 1.36fr) minmax(18.75rem, 0.64fr);
    grid-template-areas:
      "brand copy"
      "meta copy"
      "title actions";
    align-items: end;
    column-gap: clamp(2.5rem, 5vw, 6.5rem);
    row-gap: 0.8rem;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div
    > img {
    grid-area: brand;
    height: clamp(1.9rem, 2.5vw, 2.6rem) !important;
    margin: 0 0 0.35rem !important;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div
    > h1 {
    grid-area: title;
    align-self: end;
    max-width: none;
    margin: 0 !important;
    font-size: clamp(3.25rem, 4.7vw, 5.25rem) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.055em !important;
    text-wrap: balance;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div
    > h1
    > span
    > span {
    white-space: nowrap;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div
    > h2 {
    grid-area: copy;
    align-self: end;
    width: 100%;
    max-width: 25rem !important;
    margin: 0 !important;
    font-size: clamp(1.05rem, 1.5vw, 1.45rem) !important;
    line-height: 1.28 !important;
    color: rgb(255 255 255 / 0.84) !important;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div
    > p {
    grid-area: meta;
    margin: 0 0 0.3rem !important;
    font-size: 0.625rem !important;
    line-height: 1.4 !important;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div
    > div {
    grid-area: actions;
    align-self: end;
    margin: 0 !important;
    gap: 0.75rem !important;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div
    > div
    button {
    padding: 0.8rem 1.35rem !important;
    white-space: nowrap;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex {
    padding-right: 2.5rem !important;
    padding-left: 2.5rem !important;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div {
    grid-template-columns: minmax(0, 1.1fr) minmax(15rem, 0.9fr);
    column-gap: 1.75rem;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div
    > h1 {
    font-size: clamp(2.3rem, 4.4vw, 3rem) !important;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div
    > h2 {
    font-size: 1rem !important;
  }

  astro-island[component-url*="StudioHeroSection"]
    section
    > div
    > div
    > div.absolute.inset-0.z-10.flex
    > div
    > div {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  section#hero.md\:hidden > div > div > div.absolute.inset-0.z-10 {
    justify-content: flex-end !important;
    padding: 7rem 1.65rem 1.75rem !important;
  }

  section#hero.md\:hidden .hero-mobile-logo {
    height: 2rem !important;
    margin: 0 0 0.85rem !important;
  }

  section#hero.md\:hidden h1 {
    max-width: 100%;
    margin: 0 !important;
    font-size: clamp(2.4rem, 10.3vw, 2.8rem) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.05em !important;
  }

  section#hero.md\:hidden .hero-mobile-subtitle {
    max-width: 21rem;
    margin-top: 1rem !important;
    font-size: 0.93rem !important;
    line-height: 1.4 !important;
  }

  section#hero.md\:hidden .hero-mobile-eyebrow {
    margin: 0.75rem 0 0 !important;
    font-size: 0.56rem !important;
    line-height: 1.35 !important;
  }

  section#hero.md\:hidden .hero-mobile-actions {
    width: min(100%, 21rem);
    margin-top: 1.15rem !important;
    gap: 0.65rem !important;
  }

  section#hero.md\:hidden .hero-mobile-actions a {
    min-height: 2.8rem;
    padding-top: 0.7rem !important;
    padding-bottom: 0.7rem !important;
  }
}

/* Portal-style hero CTAs adapted from the supplied ignition-button reference. */
.hero-portal-button {
  position: relative !important;
  isolation: isolate;
  width: clamp(8.5rem, 11vw, 10rem) !important;
  min-width: 0 !important;
  height: clamp(3.35rem, 4.5vw, 3.65rem) !important;
  min-height: 0 !important;
  padding: 0.35rem !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 1.25rem !important;
  color: #faf5ff !important;
  background: linear-gradient(180deg, #503766 0%, #17111f 55%, #37234b 100%) !important;
  box-shadow:
    0 1.25rem 2.75rem rgb(61 25 95 / 0.32),
    0 0.2rem 0.65rem rgb(0 0 0 / 0.38),
    inset 0 1px 0 rgb(255 255 255 / 0.15) !important;
  transform-origin: center;
  transition:
    transform 300ms cubic-bezier(0.34, 1.4, 0.5, 1),
    box-shadow 300ms ease !important;
  -webkit-tap-highlight-color: transparent;
}

.hero-portal-button::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0.35rem;
  pointer-events: none;
  border-radius: 0.9rem;
  box-shadow:
    inset 0 2px 8px rgb(0 0 0 / 0.9),
    inset 0 0 0 1px rgb(255 255 255 / 0.035);
}

.hero-portal-button:hover {
  color: #faf5ff !important;
  transform: translateY(-2px) !important;
  box-shadow:
    0 1.7rem 3.4rem rgb(126 54 205 / 0.38),
    0 0.25rem 0.8rem rgb(0 0 0 / 0.42),
    inset 0 1px 0 rgb(255 255 255 / 0.17) !important;
}

.hero-portal-button:active {
  transform: translateY(1px) scale(0.985) !important;
}

.hero-portal-button:focus-visible {
  outline: 2px solid #b47cff !important;
  outline-offset: 5px !important;
}

.hero-portal-canvas {
  position: absolute;
  z-index: 1;
  inset: 0.35rem;
  display: block;
  width: calc(100% - 0.7rem) !important;
  height: calc(100% - 0.7rem) !important;
  max-width: none;
  border-radius: 0.9rem;
  background: #080510;
}

.hero-portal-label {
  position: relative;
  z-index: 3;
  display: block;
  pointer-events: none;
  color: #faf5ff;
  font-family: Inter, "DM Sans", sans-serif;
  font-size: clamp(0.55rem, 0.72vw, 0.64rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.17em;
  text-indent: 0.17em;
  text-transform: uppercase;
  text-shadow:
    0 0 0.9rem rgb(198 154 255 / 0.72),
    0 1px 0.4rem rgb(0 0 0 / 0.92);
  white-space: nowrap;
}

.hero-portal-button[data-portal-variant="secondary"] {
  filter: saturate(0.82) brightness(0.94);
}

.hero-portal-button[data-portal-variant="primary"] {
  color: #24152f !important;
  background: linear-gradient(180deg, #ffffff 0%, #f5effb 58%, #e8dcf3 100%) !important;
  box-shadow:
    0 1.25rem 2.75rem rgb(55 24 84 / 0.24),
    0 0.2rem 0.65rem rgb(0 0 0 / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.95) !important;
}

.hero-portal-button[data-portal-variant="primary"]::after {
  box-shadow:
    inset 0 2px 8px rgb(52 25 72 / 0.2),
    inset 0 0 0 1px rgb(76 37 105 / 0.1);
}

.hero-portal-button[data-portal-variant="primary"]:hover {
  color: #170d20 !important;
  box-shadow:
    0 1.7rem 3.4rem rgb(126 54 205 / 0.32),
    0 0.25rem 0.8rem rgb(0 0 0 / 0.22),
    inset 0 1px 0 rgb(255 255 255 / 1) !important;
}

.hero-portal-button[data-portal-variant="primary"] .hero-portal-canvas {
  background: #fbf7ff;
}

.hero-portal-button[data-portal-variant="primary"] .hero-portal-label {
  color: #24152f;
  text-shadow:
    0 0 0.9rem rgb(126 54 205 / 0.28),
    0 1px 0 rgb(255 255 255 / 0.95);
}

.hero-portal-button[data-portal-variant="primary"][data-portal-fallback="true"]::before {
  background: #fbf7ff;
}

.hero-portal-button[data-portal-fallback="true"]::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0.35rem;
  border-radius: 0.9rem;
  background: #100817;
}

@media (max-width: 767px) {
  section#hero.md\:hidden .hero-portal-button {
    width: min(100%, 13.25rem) !important;
    height: 3.75rem !important;
    padding: 0.38rem !important;
  }

  section#hero.md\:hidden .hero-portal-button::after,
  section#hero.md\:hidden .hero-portal-canvas {
    inset: 0.38rem;
    border-radius: 0.95rem;
  }

  section#hero.md\:hidden .hero-portal-canvas {
    width: calc(100% - 0.76rem) !important;
    height: calc(100% - 0.76rem) !important;
  }

  section#hero.md\:hidden .hero-portal-label {
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-portal-button {
    transition: none !important;
  }
}
