/* ==========================================================================
   ALBI HOME — ÜBER UNS (the page)
   Adds only what /ueber-uns needs on top of about.css:
     1. the page hero (the .about layout, on a page-hero backdrop)
     2. the glass stats panel
     3. the mirrored feature block with the gold check list

   about.css already owns the two-column grid, the trapezoid plate and its
   gold offset, so the hero here IS .about — this file re-dresses it rather
   than restating it.
   Depends on tokens.css + base.css + components.css + hero.css + about.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PAGE HERO
   The section head sits directly under a fixed header, so it carries more top
   padding than a mid-page section would — without it the eyebrow crowds the
   navbar the moment the header condenses on scroll.
   -------------------------------------------------------------------------- */
.about-hero {
  position: relative;
  padding-block: clamp(3rem, 5.5vw, 5.5rem) clamp(3.5rem, 6vw, 6rem);
  background-color: var(--bg-page);
  background-image: var(--about-scrim), url("../img/about-bg-1440.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;

  /* Lighter than the homepage section's .88 — this backdrop has no section
     above it to separate from, and at .88 the page opens almost flat black. */
  --about-scrim: linear-gradient(rgba(16, 18, 23, .82), rgba(16, 18, 23, .90));
}
@supports (background-image: image-set(url("x.webp") type("image/webp") 1x)) {
  .about-hero {
    background-image: var(--about-scrim), image-set(
      url("../img/about-bg-1440.webp") type("image/webp") 1x,
      url("../img/about-bg-1440.jpg")  type("image/jpeg") 1x);
  }
}
@media (max-width: 1023.98px) {
  .about-hero { background-image: var(--about-scrim), url("../img/about-bg-1024.jpg"); }
  @supports (background-image: image-set(url("x.webp") type("image/webp") 1x)) {
    .about-hero {
      background-image: var(--about-scrim), image-set(
        url("../img/about-bg-1024.webp") type("image/webp") 1x,
        url("../img/about-bg-1024.jpg")  type("image/jpeg") 1x);
    }
  }
}
@media (max-width: 719.98px) {
  .about-hero { background-image: var(--about-scrim), url("../img/about-bg-720.jpg"); }
  @supports (background-image: image-set(url("x.webp") type("image/webp") 1x)) {
    .about-hero {
      background-image: var(--about-scrim), image-set(
        url("../img/about-bg-720.webp") type("image/webp") 1x,
        url("../img/about-bg-720.jpg")  type("image/jpeg") 1x);
    }
  }
}

/* The page's own h1. It uses .about__title for the measure and the greedy
   wrap, so only the size needs restating — base.css would otherwise hand an
   h1 the 60px hero scale and run this heading to four lines in a 585px
   column. */
h1.about__title { font-size: var(--fs-h2); }

/* --------------------------------------------------------------------------
   2. THE STATS PANEL
   Same frosted glass as the homepage hero strip, so motion.css's pointer-
   tracked light works here with no extra code: it is keyed to .hero__features
   and this panel carries that class.

   Four cells with hairline rules between them. The rule is a border on the
   cell rather than a separate element, so a cell that wraps to the next row
   cannot leave an orphaned divider hanging in the gap.
   -------------------------------------------------------------------------- */
.stats {
  margin-top: clamp(2.5rem, 4.5vw, 4rem);
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1rem, 2vw, 2rem);
}

/* The glass strip is a flex row on the homepage; four equal stat columns want
   a grid, so the layout is restated here while the surface is inherited. */
.stats.hero__features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  padding-inline: clamp(0.5rem, 1.5vw, 1.5rem);
  border-left: 1px solid var(--border-subtle);
  text-align: center;
}
.stat:first-child { border-left: 0; }

.stat__value {
  color: var(--gold-400);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: var(--ls-display);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  /* Wide enough that "Jahre Erfahrung am Bau" stays on one line at 1440 —
     at 18ch it broke after "Erfahrung" while its neighbours sat on one, and
     the ragged row read as a bug rather than as a set. */
  max-width: 24ch;
  color: var(--text-primary);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  text-wrap: balance;
}

/* Two-up on tablet and phone. Four columns of a 40px numeral plus a wrapping
   label is unreadable much below 900. */
@media (max-width: 899.98px) {
  .stats.hero__features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6) 0;
  }
  /* The rule now has to reset on every ROW, not just the first cell. */
  .stat:nth-child(odd) { border-left: 0; }
}

@media (max-width: 479.98px) {
  .stat { gap: var(--space-2); padding-inline: var(--space-2); }
  .stat__label { font-size: var(--fs-xs); }
}

/* --------------------------------------------------------------------------
   3. THE MIRRORED FEATURE BLOCK
   The same two-column .about grid with the columns swapped: photograph left,
   copy right. Done with grid-column rather than by reordering the markup, so
   the reading order stays heading -> copy -> image for anyone not seeing the
   layout.
   -------------------------------------------------------------------------- */
.about-feature-section {
  background-color: var(--bg-page);
}

.about--mirror {
  grid-template-columns: minmax(0, 695fr) minmax(0, 585fr);
}
.about--mirror .about__media { grid-column: 1; grid-row: 1; }
.about--mirror .about__copy  { grid-column: 2; grid-row: 1; }

/* The plate drops BELOW this photograph instead of rising above it, so the
   two blocks are mirror images rather than the same figure twice.

   Set as variables, not as a transform: motion.css animates this element, and
   a running animation beats any declarative transform — writing the offset
   here directly looked correct until the reveal finished, then snapped back
   to the homepage direction. about.css reads these in both places. */
.about--mirror .about__media {
  --about-plate-y: calc(var(--about-offset) * 0.8);
}

/* And the trapezoid leans the other way, so the two blocks read as a pair
   rather than as the same shape used twice. */
.about--mirror .about__media {
  --about-clip: polygon(0 0, 89.83% 0, 100% 100%, 0 100%);
}

@media (max-width: 899.98px) {
  .about--mirror { grid-template-columns: minmax(0, 1fr); }
  /* Back to a single column: drop the explicit placement or both children
     land in row 1 on top of each other. */
  .about--mirror .about__media { grid-column: 1; grid-row: auto; }
  .about--mirror .about__copy  { grid-column: 1; grid-row: auto; }
}

/* --- The gold check list -------------------------------------------------
   A real <ul>: these are three parallel claims, not prose. */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-7);
}

.checklist__item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-primary);
  font-size: var(--fs-lead);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
}

/* The disc is CSS and the tick is the icon, so the two scale independently
   and the mark stays optically centred at any size. flex:none stops the disc
   being squashed into an ellipse when the label wraps to two lines. */
.checklist__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--grad-gold);
  color: var(--text-on-gold);
  box-shadow: var(--shadow-sm);
}
.checklist__mark .icon { width: 18px; height: 18px; }

@media (max-width: 767.98px) {
  .checklist { gap: var(--space-3); margin-top: var(--space-6); }
  .checklist__item { font-size: var(--fs-body); gap: var(--space-3); }
  .checklist__mark { width: 28px; height: 28px; }
  .checklist__mark .icon { width: 16px; height: 16px; }
}

/* --------------------------------------------------------------------------
   4. SECTION SEPARATION
   process/services/benefits carry their own backdrops and are written to sit
   between other sections, so nothing here needs to change except making sure
   the feature block does not collide with the section that follows it.
   -------------------------------------------------------------------------- */
.about-feature-section { padding-block: var(--section-y); }
