/*
 * Shared hero component for content-led subpages.
 *
 * Brand and Quality use the full editorial variant with a three-item index.
 * Products uses the compact variant and keeps its own category navigation.
 * Product-detail intentionally keeps its commerce-specific first view.
 */
.subpage-hero {
  --subhero-height: min(780px, calc(100svh - var(--header-height)));
  --subhero-min-height: 650px;
  --subhero-index-height: 136px;
  --subhero-fg: var(--color-heading);
  --subhero-statement: #0c3452;
  --subhero-accent: var(--color-primary);
  --subhero-lead: #496273;
  --subhero-index-bg: rgba(248, 252, 253, 0.93);
  --subhero-index-line: rgba(137, 165, 183, 0.32);
  --subhero-index-title: var(--color-heading);
  --subhero-index-copy: #728497;
  --subhero-index-hover: rgba(0, 140, 246, 0.08);
  position: relative;
  height: var(--subhero-height);
  min-height: var(--subhero-min-height);
  overflow: hidden;
  color: var(--subhero-fg);
}

.subpage-hero--dark {
  --subhero-fg: #fff;
  --subhero-statement: #fff;
  --subhero-accent: #62e6db;
  --subhero-lead: #c2d6e4;
  --subhero-index-bg: rgba(5, 25, 45, 0.88);
  --subhero-index-line: rgba(169, 208, 225, 0.22);
  --subhero-index-title: #fff;
  --subhero-index-copy: #94afc0;
  --subhero-index-hover: rgba(98, 230, 219, 0.09);
}

.subpage-hero__media,
.subpage-hero__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.subpage-hero__media {
  object-fit: cover;
}

.subpage-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: clamp(74px, 8vh, 112px);
  padding-bottom: calc(var(--subhero-index-height) + 36px);
}

.subpage-hero__content {
  width: min(720px, 58%);
}

.subpage-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--subhero-accent);
  font-family: var(--font-utility);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.subpage-hero__eyebrow::before {
  width: 42px;
  height: 1px;
  flex: 0 0 auto;
  background: currentColor;
  content: "";
}

.subpage-hero .subpage-hero__heading {
  margin-top: 23px;
}

.subpage-hero__title,
.subpage-hero__statement {
  display: block;
}

.subpage-hero .subpage-hero__title {
  color: var(--subhero-fg);
  font-size: clamp(68px, 6.2vw, 116px);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.96;
}

.subpage-hero .subpage-hero__statement {
  margin-top: 32px;
  color: var(--subhero-statement);
  font-size: clamp(36px, 3.2vw, 58px);
  font-weight: 520;
  letter-spacing: -0.05em;
  line-height: 1.26;
}

.subpage-hero .subpage-hero__lead {
  max-width: 600px;
  margin-top: 24px;
  color: var(--subhero-lead);
  font-size: 17px;
  line-height: 1.9;
}

.subpage-hero__index {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: var(--subhero-index-height);
  border-top: 1px solid var(--subhero-index-line);
  background: var(--subhero-index-bg);
  backdrop-filter: blur(14px);
}

.subpage-hero__index-inner {
  display: grid;
  min-height: var(--subhero-index-height);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subpage-hero .subpage-hero__index-link {
  display: grid;
  min-width: 0;
  align-content: center;
  padding: 24px 38px;
  border-left: 1px solid var(--subhero-index-line);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.subpage-hero .subpage-hero__index-link:last-child {
  border-right: 1px solid var(--subhero-index-line);
}

.subpage-hero .subpage-hero__index-link:hover,
.subpage-hero .subpage-hero__index-link:focus-visible {
  background: var(--subhero-index-hover);
}

.subpage-hero__index-link > span {
  color: var(--subhero-accent);
  font-family: var(--font-utility);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.subpage-hero__index-link > strong {
  margin-top: 4px;
  color: var(--subhero-index-title);
  font-family: var(--font-utility);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.subpage-hero__index-link > small {
  margin-top: 4px;
  color: var(--subhero-index-copy);
  font-size: 12px;
}

html[lang="en"] .subpage-hero .subpage-hero__title {
  font-size: clamp(64px, 5.9vw, 110px);
}

html[lang="en"] .subpage-hero .subpage-hero__statement {
  font-size: clamp(34px, 3vw, 54px);
}

/* Product listing: same typography and media skeleton, without an index band. */
.subpage-hero--compact {
  --subhero-height: clamp(500px, 35.416667vw, 680px);
  --subhero-min-height: 500px;
  --subhero-index-height: 0px;
  --subhero-accent: #69c4ff;
}

.subpage-hero--compact .subpage-hero__inner {
  align-items: center;
  padding-block: 64px;
}

.subpage-hero--compact .subpage-hero__content {
  width: min(700px, 53vw);
}

.subpage-hero .subpage-hero__heading--single {
  color: var(--subhero-fg);
  font-size: clamp(52px, 4.5vw, 86px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

@media (max-width: 1399.98px) {
  .subpage-hero__content {
    width: min(660px, 62%);
  }
}

@media (max-width: 1199.98px) {
  .subpage-hero:not(.subpage-hero--compact) {
    --subhero-height: 700px;
    --subhero-min-height: 650px;
  }

  .subpage-hero__content {
    width: min(700px, 70%);
  }
}

@media (max-width: 991.98px) {
  .subpage-hero:not(.subpage-hero--compact) {
    --subhero-height: 700px;
    --subhero-min-height: 700px;
  }

  .subpage-hero__content {
    width: 78%;
  }

  .subpage-hero .subpage-hero__index-link {
    padding-inline: 24px;
  }

  .subpage-hero--compact {
    --subhero-height: 590px;
    --subhero-min-height: 590px;
  }

  .subpage-hero--compact .subpage-hero__content {
    width: min(650px, 78%);
  }
}

@media (max-width: 767.98px) {
  .subpage-hero:not(.subpage-hero--compact) {
    --subhero-height: 690px;
    --subhero-min-height: 690px;
    --subhero-index-height: 112px;
  }

  .subpage-hero__inner {
    padding-top: 62px;
    padding-bottom: calc(var(--subhero-index-height) + 20px);
  }

  .subpage-hero__content,
  .subpage-hero--compact .subpage-hero__content {
    width: 100%;
  }

  .subpage-hero__eyebrow {
    font-size: 10px;
  }

  .subpage-hero .subpage-hero__title,
  html[lang="en"] .subpage-hero .subpage-hero__title {
    font-size: clamp(58px, 18vw, 86px);
  }

  .subpage-hero .subpage-hero__statement,
  html[lang="en"] .subpage-hero .subpage-hero__statement {
    margin-top: 26px;
    font-size: clamp(32px, 9vw, 43px);
  }

  .subpage-hero .subpage-hero__lead {
    max-width: 94%;
    font-size: 14px;
    line-height: 1.8;
  }

  .subpage-hero .subpage-hero__index-link {
    padding: 18px 12px;
  }

  .subpage-hero__index-link > strong {
    font-size: 13px;
    letter-spacing: 0.03em;
  }

  .subpage-hero__index-link > small {
    font-size: 10px;
    line-height: 1.45;
  }

  .subpage-hero--compact {
    --subhero-height: 560px;
    --subhero-min-height: 560px;
  }

  .subpage-hero--compact .subpage-hero__inner {
    padding-block: 54px;
  }

  .subpage-hero .subpage-hero__heading--single {
    font-size: clamp(46px, 13vw, 66px);
  }
}

@media (max-width: 575.98px) {
  .subpage-hero:not(.subpage-hero--compact) {
    --subhero-height: 660px;
    --subhero-min-height: 660px;
  }

  .subpage-hero__inner {
    padding-top: 48px;
  }

  .subpage-hero .subpage-hero__heading {
    margin-top: 18px;
  }

  .subpage-hero .subpage-hero__title {
    font-size: 52px;
  }

  html[lang="en"] .subpage-hero .subpage-hero__title {
    max-width: 320px;
    font-size: 46px;
    line-height: 1.02;
  }

  .subpage-hero .subpage-hero__statement {
    font-size: 31px;
  }

  html[lang="en"] .subpage-hero .subpage-hero__statement {
    font-size: 28px;
  }

  .subpage-hero .subpage-hero__lead {
    max-width: min(350px, 100%);
    font-size: 13px;
    line-height: 1.75;
  }

  .subpage-hero__index-inner {
    width: 100%;
    max-width: none;
  }

  .subpage-hero .subpage-hero__index-link {
    padding-inline: 8px;
  }

  .subpage-hero__index-link > span {
    font-size: 9px;
  }

  .subpage-hero__index-link > strong {
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    letter-spacing: 0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .subpage-hero__index-link > small {
    display: none;
  }

  .subpage-hero--compact {
    --subhero-height: 540px;
    --subhero-min-height: 540px;
  }

  .subpage-hero .subpage-hero__heading--single {
    font-size: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .subpage-hero__index-link {
    transition: none;
  }
}
