/**
 * Hero Section Component Styles
 */

/* -------------------------------------------------------
 * Component-scoped custom properties — mobile base
 * ------------------------------------------------------- */
:root {
  --hero-padding-top: 40px;
  --hero-padding-bottom: 40px;
  --hero-padding-left: var(--spacing-300);
  --hero-padding-right: var(--spacing-300);
}

.hero-section {
  --hero-bg: var(--ambience-200);
  --hero-text-color: var(--trust);
  --hero-min-height: 45rem; /* 720px */
  --hero-image-aspect-ratio: 4 / 3;
}


.hero-section--illustration {
  --hero-bg: var(--attitude);
}

.hero-section--content_dark {
  --hero-bg: var(--trust);
  --hero-text-color: var(--white);
}

.hero-section--large:not(.slider .hero-section--large) {
  --hero-min-height: 57.5rem; /* 920px */
  --hero-image-aspect-ratio: 1 / 1;
}

/* -------------------------------------------------------
 * Layout
 * ------------------------------------------------------- */
.hero-section {
  background-color: var(--hero-bg);
  color: var(--hero-text-color);
  overflow: hidden;
  min-height: var(--hero-min-height);
  width: 100%;
}

.hero-section__text-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-grow: 1;
  padding: var(--hero-padding-top) var(--hero-padding-right) var(--hero-padding-bottom) var(--hero-padding-left);
}

.hero-section__labels {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: var(--spacing-300);
}

/* -------------------------------------------------------
 * Headline
 * ------------------------------------------------------- */
.hero-section__headline {
  color: var(--hero-text-color);
  margin-bottom: var(--spacing-300);

  .hero-section--content_dark & {
    color: var(--ambience); /* Special case: headlines on trust */

    .bosch-highlight {
      color: var(--trust);
    }
  }
  &.heading {
    margin-block: 0;
  }
}

.hero-section--content_light .hero-section__headline,
.hero-section--content_dark .hero-section__headline {
  letter-spacing: var(--h2-letter-spacing, -0.021em);
}

.hero-section__headline .highlight {
  background-color: var(--attitude, #ffa0fa);
  padding: 0 4px;
}

.hero-section--illustration {
  .hero-section__headline--handwritten {
    &,
    .letter {
      font-family: "Written by Artist", sans-serif;
      font-weight: 400;
      line-height: 1.2;
      letter-spacing: 44px;
    }
    .word {
      display: inline-block;
      white-space: nowrap;
    }
    .letter {
      display: inline-block;
      will-change: transform, opacity;
    }
  }
}


/* -------------------------------------------------------
 * Body text + CTA wrapper
 * ------------------------------------------------------- */
.hero-section__body-cta {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* -------------------------------------------------------
 * Teaser text
 * ------------------------------------------------------- */
.hero-section__teaser {
  font-size: var(--text-paragraph-m);
  line-height: 1.5;
  letter-spacing: -0.22px;
  margin-top: var(--spacing-400);
  max-width: 35rem;

  p {
    margin: 0;
  }
}

.hero-section--illustration .hero-section__cta {
  background-color: var(--white, #ffffff);
  color: var(--trust, #550a2d);
}
.hero-section--illustration .hero-section__cta:hover {
  background-color: var(--ambience, #ebe6e1);
}

.hero-section--content_light .hero-section__cta {
  background-color: var(--trust, #550a2d);
  color: var(--white, #ffffff);
}
.hero-section--content_light .hero-section__cta:hover {
  background-color: var(--trust-500, #440824);
}

.hero-section--content_dark .hero-section__cta {
  background-color: var(--white, #ffffff);
  color: var(--trust, #550a2d);
}
.hero-section--content_dark .hero-section__cta:hover {
  background-color: var(--ambience, #ebe6e1);
}

/* -------------------------------------------------------
 * Right column (media)
 * ------------------------------------------------------- */
.hero-section__media {
  position: relative;
  overflow: hidden;

  aspect-ratio: var(--hero-image-aspect-ratio);

  /* counteract image meta */
  .media__image-wrap {
    position: initial;
  }

  /* ensure hover area fills the full media column at all screen sizes */
  .image,
  .image__media,
  .media,
  .media__image-wrap {
    height: 100%;
  }

  &, & *:not(.contextual, .contextual *) {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .media__credits-overlay {
    display: none;
  }
}


/* -------------------------------------------------------
 * Tablet (≥ 768px) — side-by-side, compact desktop values
 * ------------------------------------------------------- */
@media (min-width: 768px) {
  :root {
    --hero-padding-top: 48px;
    --hero-padding-bottom: 48px;
    --hero-padding-left: 40px;
    --hero-padding-right: 40px;
  }

  .hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch
  }

  .hero-section--illustration .hero-section__headline--handwritten {
    font-size: 72px;
  }

}

/* -------------------------------------------------------
 * Desktop (≥ 1200px)
 * ------------------------------------------------------- */
@media (min-width: 1200px) {
  :root {
    --hero-padding-top: 64px;
    --hero-padding-bottom: 80px;
    --hero-padding-left: 64px;
    --hero-padding-right: 64px;
  }

  .hero-section__text-col {
    padding-right: 48px;
  }

  .hero-section--illustration .hero-section__headline--handwritten {
    font-size: 100px;
  }

}

/* -------------------------------------------------------
 * Desktop large (≥ 1440px)
 * ------------------------------------------------------- */
@media (min-width: 1440px) {
  :root {
    --hero-padding-left: var(--spacing-1250);
    --hero-padding-right: var(--spacing-1250);
  }

  .hero-section {
    --hero-padding-top: var(--spacing-1000);
    --hero-padding-bottom: var(--spacing-1000);
  }

  .hero-section--large:not(.slider .hero-section--large) {
    --hero-padding-top: var(--spacing-1500);
    --hero-padding-bottom: var(--spacing-800);
  }

  .hero-section__text-col {
    padding-right: var(--spacing-1250);
  }
}

/* -------------------------------------------------------
 * Desktop XL (≥ 1920px) — original design spec
 * ------------------------------------------------------- */
@media (min-width: 1920px) {

  .hero-section--illustration .hero-section__headline--handwritten {
    font-size: 140px;
  }
}


