/*
 * Homepage hero — authoritative responsive layer.
 * Base components live in styles.css; all hero-specific composition belongs here.
 */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding: clamp(7.5rem, 10vh, 9rem) 0 clamp(4rem, 7vh, 6rem);
  overflow: hidden;
  background: var(--night);
  color: var(--white);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
}

/* Porträt links: echter Raum-Hintergrund, läuft nach rechts weich in --night aus. */
.hero::before {
  z-index: 0;
  inset: 0 auto 0 0;
  width: 120dvh;
  max-width: 100%;
  background-image: url("assets/oguzhan-atmaca-hero.webp?v=5");
  background-position: left top;
  background-size: cover;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, 0.03) 8%, rgba(0, 0, 0, 0.12) 16%, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.55) 34%, rgba(0, 0, 0, 0.8) 42%, #000 52%);
  mask-image: linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, 0.03) 8%, rgba(0, 0, 0, 0.12) 16%, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.55) 34%, rgba(0, 0, 0, 0.8) 42%, #000 52%);
}

.hero::after {
  z-index: 1;
  background: linear-gradient(0deg, rgba(7, 28, 32, 0.5) 0%, rgba(7, 28, 32, 0) 26%);
}

.hero .hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.hero .hero-copy {
  position: relative;
  top: auto;
  width: min(50%, 40rem);
  min-width: 0;
  max-width: 100%;
  margin: clamp(1rem, 4vh, 3rem) 0 0 auto;
  padding: 0;
}

.hero h1 {
  max-width: 16ch;
  margin: 0;
  color: var(--white);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: var(--type-display-hero);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.04;
  overflow-wrap: normal;
  text-wrap: balance;
}

.hero h1 .hero-title-line {
  display: inline;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

.hero h1 .hero-emphasis {
  display: block;
  color: var(--mint);
  font-style: normal;
}

.hero .hero-lead {
  width: 100%;
  max-width: 56ch;
  margin: var(--space-lg) 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.6;
}

.hero .hero-actions {
  width: 100%;
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero .button {
  min-height: 56px;
  padding: 0.85rem 1.5rem;
}

.hero .button-primary {
  border: 1px solid var(--mint);
  background: var(--mint);
  color: var(--night);
  box-shadow: 0 14px 32px rgba(3, 18, 21, 0.24);
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.hero .button-primary span {
  transition: transform 180ms ease;
}

.hero .button-primary:hover,
.hero .button-primary:focus-visible {
  border-color: var(--white);
  background: var(--white);
  color: var(--night);
  box-shadow: 0 18px 38px rgba(3, 18, 21, 0.3);
}

.hero .button-primary:hover span,
.hero .button-primary:focus-visible span {
  transform: translate(0.15rem, -0.15rem);
}

.hero .button-secondary {
  width: auto;
  min-height: 56px;
  padding: 0.85rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
}

.hero .button-secondary:hover,
.hero .button-secondary:focus-visible {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* Use the same native anchor alignment as the other sections. */
.approach-scroll#vorgehen {
  min-height: calc(100svh - 84px);
  padding-block: var(--section-space);
  scroll-margin-top: 0;
  box-shadow: 0 -2px 0 var(--night);
}

@media (max-width: 64rem) {
  /*
   * Mobil: Foto beginnt unter der Kopfzeile, damit der Kopf frei bleibt.
   * --hero-face ist die Strecke vom Bildanfang bis unter das Kinn; der Text beginnt direkt darunter.
   */
  .hero {
    --hero-header: 4.5rem;
    --hero-face: min(76vw, 50svh);
    min-height: 100svh;
    align-items: end;
    padding: calc(var(--hero-header) + var(--hero-face) + var(--space-sm)) 0 var(--space-xl);
  }

  .hero::before {
    inset: var(--hero-header) auto auto 50%;
    width: min(100%, calc(var(--hero-face) * 1.306));
    height: calc(var(--hero-face) + 6rem);
    transform: translateX(-50%);
    background-image: url("assets/oguzhan-atmaca-hero-mobil.webp?v=5");
    background-position: center top;
    background-size: cover;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 calc(var(--hero-face) - 1.5rem), rgba(0, 0, 0, 0.5) calc(var(--hero-face) + 1.5rem), transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 calc(var(--hero-face) - 1.5rem), rgba(0, 0, 0, 0.5) calc(var(--hero-face) + 1.5rem), transparent 100%);
  }

  .hero::after {
    background: none;
  }

  .hero .hero-copy {
    width: min(100%, 46rem);
    margin: 0;
  }

  .hero h1 {
    max-width: 17ch;
  }
}

/* Tablet: Foto ist schmaler als der Bildschirm und läuft deshalb auch seitlich aus. */
@media (min-width: 42.5625rem) and (max-width: 64rem) {
  .hero::before {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%), linear-gradient(180deg, #000 0%, #000 calc(var(--hero-face) - 1.5rem), rgba(0, 0, 0, 0.5) calc(var(--hero-face) + 1.5rem), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%), linear-gradient(180deg, #000 0%, #000 calc(var(--hero-face) - 1.5rem), rgba(0, 0, 0, 0.5) calc(var(--hero-face) + 1.5rem), transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
}

@media (max-width: 42.5rem) {
  /*
   * Handy: Foto oben über die volle Breite, Kopf weit oben, Schultern sichtbar.
   * --hero-photo ist die Höhe des Fotos; die Überschrift beginnt --hero-overlap höher
   * auf dem auslaufenden Oberkörper, damit Titel und Button auf den ersten Bildschirm passen.
   */
  .hero {
    --hero-photo: min(92vw, 52svh);
    --hero-overlap: 3rem;
    align-items: start;
    padding-top: calc(var(--hero-header) + var(--hero-photo) - var(--hero-overlap));
  }

  .hero::before {
    inset: var(--hero-header) 0 auto 0;
    width: auto;
    height: calc(var(--hero-photo) + 4rem);
    transform: none;
    background-position: center -10vw;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 calc(var(--hero-photo) - 6.5rem), rgba(0, 0, 0, 0.4) calc(var(--hero-photo) - 2rem), transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 calc(var(--hero-photo) - 6.5rem), rgba(0, 0, 0, 0.4) calc(var(--hero-photo) - 2rem), transparent 100%);
  }

  /*
   * Eine Mittelachse wie beim Abschluss am Seitenende: Überschrift, Button und Einleitung
   * stehen zentriert unter dem Porträt. Der Button folgt direkt auf die Überschrift,
   * damit er ohne Scrollen erreichbar ist, und ist nur so breit wie sein Text.
   */
  .hero .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero h1 {
    max-width: 100%;
    font-size: var(--type-display-hero);
    letter-spacing: -0.03em;
    line-height: 1.07;
    hyphens: manual;
  }

  .hero .hero-lead {
    order: 3;
    max-width: 100%;
    margin-top: var(--space-xl);
    font-size: 1rem;
    line-height: 1.58;
    overflow-wrap: normal;
  }

  .hero .hero-actions {
    order: 2;
    align-items: center;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
  }

  .hero .button,
  .hero .button-secondary {
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 0.8rem 1.5rem;
    font-size: clamp(0.86rem, 3.8vw, 0.94rem);
    white-space: normal;
  }
}

@media (max-width: 37.5rem) {
  .approach-scroll#vorgehen {
    min-height: calc(100svh - 72px);
  }
}


@media (prefers-reduced-motion: reduce) {
  .hero .button-primary,
  .hero .button-primary span {
    transition-duration: 0ms;
  }
}

/* Keep every homepage section on one consistent, slightly tighter top rhythm. */
main > section:not(.hero) {
  padding-top: var(--section-space);
}
