/*

Theme Name: Pro &ndash; Child Theme
Theme URI: https://theme.co/pro/
Author: Themeco
Author URI: https://theme.co/
Description: Make all of your modifications to Pro in this child theme.
Version: 1.0.0
Template: pro

*/

/* ==========================================================================
   Design Tokens — Treeamlife
   ========================================================================== */

:root {
  /* Colors */
  --color-green: #59f66a;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-gray: #ebebeb;

  /* Typography — Sizes */
  --text-h1: 160px;
  --text-cta: 120px;
  --text-h2: 90px;
  --text-big: 25px;
  --text-body: 15px;
  --text-small: 13px;

  /* Typography — Line Heights */
  --lh-h1: 0.94;
  --lh-cta: 1;
  --lh-h2: 0.94;
  --lh-big: 1.28;
  --lh-body: 1.47;
  --lh-small: 1.54;

  /* Spacing */
  --space-xs: 12.5px;
  --space-sm: 25px;
  --space-md: 50px;
  --space-lg: 75px;
  --space-xl: 100px;
  --space-2xl: 150px;
  --page-padding: 25px;
}

/* ==========================================================================
   Header — Logo (Shortcode [tl_logo])
   Volles Logo, der Schriftzug fährt beim Scrollen als Block nach oben aus
   dem Bildschirm. Mobil (< 767px) identisch, nur 25% kleiner.
   ========================================================================== */

.tl-logo {
  --tl-logo-width: 225px;
  --tl-logo-slide: 200px; /* Weg in SVG-Einheiten, ≈ 120px bei 225px Breite */
  --tl-logo-color: #00e655;
  --tl-logo-duration: 0.6s;
  --tl-logo-ease-out: cubic-bezier(0.5, 0, 0.75, 0); /* raus: beschleunigt */
  --tl-logo-ease-in: cubic-bezier(0.25, 1, 0.5, 1); /* rein: bremst ab */

  display: block;
  width: var(--tl-logo-width);
  color: var(--tl-logo-color);
  line-height: 0;
}

.tl-logo__svg {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  overflow: visible;
}

.tl-logo__type {
  transition: transform var(--tl-logo-duration) var(--tl-logo-ease-in);
}

/* Der Weg reicht, damit der Schriftzug oben komplett aus dem Viewport fährt */
.tl-scrolled .tl-logo__type {
  transform: translateY(calc(var(--tl-logo-slide) * -1));
  transition-timing-function: var(--tl-logo-ease-out);
}

/* Mobil: gleiches Logo samt Effekt, 25% kleiner.
   Der größere Slide-Weg gleicht die kleinere Darstellung aus, damit der
   Schriftzug auch hier ganz aus dem Bild fährt. max-width schützt vor
   Überlappung mit dem Burger auf sehr schmalen Displays. */
@media (max-width: 766px) {
  .tl-logo {
    --tl-logo-width: 168.75px; /* 225px − 25% */
    --tl-logo-slide: 270px;

    max-width: 100%;
  }

  /* Cornerstone deckelt den Logo-Container auf 50% der Leiste. Auf schmalen
     Displays bliebe das Logo dadurch kleiner als die gewünschten 25%. */
  #tl-nav .x-bar-container:has(> .tl-logo) {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-logo__type {
    transition: none;
  }
}

/* ==========================================================================
   Mobiles Menü — Sub-Indicator durch den Treeamlife-Pfeil ersetzen
   Cornerstone bietet dort nur Font-Awesome-Icons an, deshalb wird das
   Glyph ausgeblendet und der Pfeil als CSS-Maske eingesetzt.
   Die Maske übernimmt per currentColor die Farbe des Menüpunkts,
   inklusive Hover-Zustand.
   ========================================================================== */

.tl-nav-mob .x-anchor-sub-indicator::before {
  content: none;
}

.tl-nav-mob .x-anchor-sub-indicator {
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: url(assets/img/treeamlife-pfeil.svg) no-repeat center / contain;
  mask: url(assets/img/treeamlife-pfeil.svg) no-repeat center / contain;
}

/* ==========================================================================
   Home — Bild-Grid (schwarze Sektion)
   ========================================================================== */

.tl-image-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: var(--space-sm);
  width: 100%;
}

.tl-image-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bild links — Spalte 1-3, volle Höhe */
.tl-img-left {
  grid-column: 1 / 4;
  grid-row: 1 / 3;
}

/* Bild Mitte oben — Spalte 3-10 (8 Spalten, mittig), ragt 100px nach oben */
.tl-img-center-top {
  grid-column: 3 / 11;
  grid-row: 1;
  margin-top: calc(var(--space-xl) * -1);
  z-index: 1;
}

/* Bild rechts — Spalte 10-11, Spalte 12 bleibt frei */
.tl-img-right {
  grid-column: 10 / 12;
  grid-row: 2;
}

/* Bild Mitte unten — Spalte 6-9, ragt 200px nach unten */
.tl-img-center-bottom {
  grid-column: 6 / 10;
  grid-row: 2;
  margin-bottom: calc(var(--space-xl) * -2);
  z-index: 1;
}

/* Headline-Overlay */
.tl-grid-headline {
  grid-column: 1 / -1;
  grid-row: 1 / 3;
  place-self: center;
  text-align: center;
  color: var(--color-green);
  font-size: var(--text-h2);
  font-weight: 900;
  line-height: var(--lh-h2);
  z-index: 2;
  pointer-events: none;
  margin: 0;
}
