/* =========================================================
   CLAUDE – Hero, Märkte, Menschen, Footer, Intro (Runde 6)
   Nutzt ausschließlich Tokens aus styles.css :root.
   Grundsatz: Ohne JS/GSAP ist alles sichtbar. Startzustände setzt nur JS.
   ========================================================= */

/* ---------- Gemeinsame Helfer ---------- */
.ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ln > span { display: inline-block; }

.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Header blendet beim Runterscrollen aus, beim Hochscrollen ein */
.site-header { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.site-header.is-hidden { transform: translateY(-100%); }

/* =========================================================
   INTRO / PRELOADER (Kronkorken mit 21 Zacken, 1964 → 2026)
   ========================================================= */
.intro { display: none; }
html.is-loading .intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--ink);
  color: var(--bg);
}
html.is-loading body { overflow: hidden; }
.intro__cap { width: 92px; height: 92px; }
.intro__cap path { fill: var(--red); }
.intro__cap circle { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 1.2; }
.intro__year {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(64px, 11vw, 160px);
  line-height: .85;
  font-feature-settings: "tnum" 1;
}
.intro__label { margin: 0; font: 500 12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: #8E857A; }
/* =========================================================
   HERO – Video in der Bierkiste (Draufsicht, 5 × 4 Fächer)
   Passt immer in genau einen Bildschirm.
   ========================================================= */
.hx {
  --crate-ratio: 1.32;               /* echte 20er-Kiste ≈ 400 × 300 mm */
  position: relative;
  display: grid;
  grid-template-columns: var(--gutter) repeat(12, minmax(0, 1fr)) var(--gutter);
  grid-template-rows: auto minmax(0, 1fr) auto;
  column-gap: 16px;
  height: calc(100vh - 76px);
  height: calc(100svh - 76px);
  min-height: 560px;
  padding-top: 22px;
  overflow: hidden;
}
.hx__top {
  grid-column: 2 / 14;
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
}
.hx__top .kicker { margin: 0; }

/* Slot = Zielposition der Kiste (rechts, echtes Kistenformat) */
.hx__slot, .hx__crate {
  grid-column: 5 / 14;
  grid-row: 2;
  justify-self: end;
  align-self: stretch;
  height: 100%;
  max-width: 100%;
  aspect-ratio: var(--crate-ratio);
  min-height: 0;
}
.hx__crate {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 3.8% / 5%;
  background: var(--ink);
}
.hx__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hx__shade { position: absolute; inset: 0; z-index: 1; background: var(--ink); opacity: 0; pointer-events: none; }

/* Die Kiste (SVG wird in claude.js passgenau gezeichnet) */
.hx__kiste {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.hx__kiste svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, .5));
}

.hx__covers {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
}
.hx__covers i { background: var(--bg); transform-origin: 50% 0; }

.hx__title {
  grid-column: 2 / 10;
  grid-row: 2 / 4;
  align-self: end;
  position: relative;
  z-index: 5;
  margin: 0 0 clamp(16px, 2.2vw, 32px);
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 850;
  font-size: clamp(52px, min(11vw, 15vh), 184px);
  font-size: clamp(52px, min(11vw, 15svh), 184px);
  line-height: .86;
  letter-spacing: -.012em;
  text-transform: uppercase;
  pointer-events: none;
}
/* Etiketten-Streifen: Zeilen liegen auf Kalkstein-Bändern */
.hx__title .ln > span { background: var(--bg); padding: .03em .1em 0 0; }
.hx__title .ln--red > span { color: var(--red); }

.hx__side {
  grid-column: 10 / 14;
  grid-row: 3;
  align-self: end;
  position: relative;
  z-index: 5;
  padding: 20px 0 clamp(16px, 2.2vw, 32px);
}
.hx__side .lead { font-size: 16px; line-height: 1.5; margin-bottom: 18px; max-width: 30em; }
.hx__ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* Vollbild-Modus (Desktop mit GSAP): Video füllt den Bildschirm, schrumpft beim Scrollen in die Kiste */
.hx.is-fx {
  height: 100vh;
  height: 100svh;
  margin-top: -76px;                 /* liegt unter der Kopfzeile */
  padding-top: calc(76px + 22px);
}
.hx.is-fx .hx__crate {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  aspect-ratio: auto;
  grid-area: auto;
  justify-self: stretch;
  align-self: stretch;
  z-index: 0;
  will-change: clip-path;
  border-radius: 0;
}
.hx.is-fx .hx__shade { opacity: .45; }
.hx.is-fx .hx__kiste { inset: auto; opacity: 0; }
.hx.is-fx .hx__title .ln > span { background: transparent; color: var(--bg); }
.hx.is-fx .hx__title .ln--red > span { color: var(--red); }
.hx.is-fx .hx__top { position: relative; z-index: 5; }
.hx.is-fx .hx__top .kicker { color: var(--bg); }
.hx.is-fx .hx__top .kicker--red { color: #FF5A4E; }
.hx.is-fx .hx__side { color: var(--bg); }
.hx.is-fx .hx__side .btn--ghost { border-color: var(--bg); color: var(--bg); }

/* Mittlere Breiten: Text unter die Kiste, Kiste größer */
@media (max-width: 1180px) and (min-width: 901px) {
  .hx__slot, .hx__crate { grid-column: 4 / 14; }
  .hx__title { grid-column: 2 / 11; }
  .hx__side { grid-column: 9 / 14; }
}

/* Handy & Tablet hochkant: alles untereinander, Kiste über volle Breite */
@media (max-width: 900px) {
  .hx {
    grid-template-columns: var(--gutter) minmax(0, 1fr) var(--gutter);
    grid-template-rows: auto auto auto auto;
    column-gap: 0;
    height: auto;
    min-height: 0;
    padding-top: 16px;
  }
  .hx__top { grid-column: 2; flex-direction: column; gap: 4px; padding-bottom: 14px; }
  .hx__slot { display: none; }
  .hx__crate {
    grid-column: 2;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
    height: auto;
    aspect-ratio: var(--crate-ratio);
  }
  .hx__title { grid-column: 2; grid-row: 3; margin: -0.5em 0 0; font-size: clamp(48px, 16.5vw, 120px); }
  .hx__side { grid-column: 2; grid-row: 4; padding: 18px 0 32px; }
}

/* Öffnungsleiste: Status-Klassen gelten auch für Markt-Status */
.mk__status.is-open .dot { background: var(--open); box-shadow: 0 0 0 3px rgba(47, 125, 79, .18); }
.mk__status.is-break .dot { background: #C9861E; }
.mk__status.is-closed .dot { background: var(--line); }

/* =========================================================
   MÄRKTE – Sticky-Bühne links, Märkte scrollen rechts
   ========================================================= */
.mk { padding-top: var(--space-l); }
.mk__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 16px;
  margin-bottom: var(--space-s);
}
.mk__head .kicker { grid-column: 1 / -1; margin-bottom: 20px; }
.mk__title {
  grid-column: 1 / 10;
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 850;
  font-size: clamp(56px, 9.4vw, 150px);
  line-height: .86;
  text-transform: uppercase;
}
.mk__title .ln:last-child > span { font-stretch: 112%; font-weight: 300; font-size: .62em; text-transform: none; letter-spacing: -.02em; }
.mk__intro { grid-column: 10 / 13; align-self: end; margin: 0; color: var(--ink-2); font-size: 16px; }

.mk__body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 16px;
  align-items: start;
}
.mk__stage {
  grid-column: 1 / 8;
  position: sticky;
  top: 96px;
  height: calc(100vh - 128px);
  max-height: 760px;
}
.mk__frame {
  position: relative;
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
}
.mk__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(100% 0 0 0);
  transform: scale(1.12);
  transition: clip-path 1s cubic-bezier(.7, 0, .2, 1), transform 1.4s cubic-bezier(.2, .7, .2, 1);
}
.mk__frame img.is-active { clip-path: inset(0 0 0 0); transform: scale(1); z-index: 1; }
.mk__frame img.was-active { clip-path: inset(0 0 0 0); z-index: 0; }
.mk__counter {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 4;
  padding: 12px 18px 10px;
  background: var(--bg);
  font: 500 13px var(--font-mono);
  color: var(--ink-2);
}
.mk__counter b {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: 44px;
  line-height: .8;
  color: var(--ink);
  vertical-align: -6px;
}

.mk__list { grid-column: 9 / 13; margin: 0; padding: 0; list-style: none; }
.mk__item {
  min-height: min(78vh, 720px);
  padding: 8px 0 56px;
  border-top: 1.5px solid var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: .38;
  transition: opacity .5s;
}
.mk__item.is-active { opacity: 1; }
.mk__item:last-child { min-height: 0; padding-bottom: 72px; }
.mk__thumb { display: none; }
.mk__no { margin: 8px 0 28px; font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.mk__name {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 850;
  font-size: clamp(48px, 5.6vw, 92px);
  line-height: .88;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.mk__status { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font: 500 14px var(--font-mono); }
.mk__desc { color: var(--ink-2); margin-bottom: 26px; }
.mk__facts { display: flex; flex-wrap: wrap; gap: 14px 40px; font-size: 15px; margin-bottom: 22px; }
.mk__facts p { margin: 0; line-height: 1.5; }
.mk__facts a { font-family: var(--font-mono); font-weight: 500; text-decoration: none; }
.mk__facts a:hover { color: var(--red-dark); }
.mk__item .textlink { align-self: flex-start; }

.hours { font: 400 13px/1.7 var(--font-mono); font-feature-settings: "tnum" 1; border-collapse: collapse; }
.hours td { padding: 0; vertical-align: top; }
.hours td:first-child { padding-right: 14px; color: var(--ink-2); }

.services-line {
  margin-top: var(--space-s);
  padding: 20px 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: var(--hair);
  font: 400 13px/1.6 var(--font-mono);
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 32px;
}
.services-line li::before { content: "✓ "; color: var(--red-dark); }

@media (max-width: 900px) {
  .mk__head, .mk__body { display: block; }
  .mk__intro { margin-top: 20px; }
  .mk__title .ln:last-child > span { font-size: .7em; }
  .mk__stage { display: none; }
  .mk__item { opacity: 1; min-height: 0; padding: 0 0 48px; border-top: 0; }
  .mk__thumb { display: block; width: calc(100% + 2 * var(--gutter)); max-width: none; margin: 0 calc(-1 * var(--gutter)) 18px; aspect-ratio: 16 / 10; object-fit: cover; }
  .mk__no { margin: 0 0 12px; }
}

/* =========================================================
   MENSCHEN
   ========================================================= */
.ppl { padding-block: var(--space-l); }
.ppl .kicker { margin-bottom: 20px; }
.ppl__title {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 850;
  font-size: clamp(56px, 9.4vw, 150px);
  line-height: .86;
  text-transform: uppercase;
  margin-bottom: var(--space-s);
}
.ppl__title em { font-style: normal; color: var(--red); }
.ppl__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 16px;
  align-items: start;
}
.ppl__photo { grid-column: 1 / 8; margin: 0; }
.ppl__mask { overflow: hidden; aspect-ratio: 3 / 2.1; }
.ppl__mask img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.ppl__photo figcaption { margin-top: 10px; font: 400 12px/1.4 var(--font-mono); color: var(--ink-2); }
.ppl__second { width: 58%; margin: 40px 0 0 auto; }
.ppl__second img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ppl__second p { margin-top: 10px; font: 400 12px/1.4 var(--font-mono); color: var(--ink-2); }
.ppl__text { grid-column: 9 / 13; }
.ppl__intro { font-size: 18px; line-height: 1.5; margin-bottom: 32px; }

.person {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1.5px solid var(--ink);
}
.person img { width: 104px; height: 128px; object-fit: cover; object-position: 50% 20%; filter: grayscale(1) contrast(1.05); transition: filter .4s; }
.person:hover img { filter: grayscale(0); }
.person h3 { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; }
.person .role { font-size: 14px; color: var(--ink-2); margin: 6px 0 12px; }
.person .contact { font: 500 15px/1.6 var(--font-mono); margin: 0; }
.person .contact a { text-decoration: none; }
.person .contact a:first-child { color: var(--red-dark); font-size: 18px; }
.person .contact a:hover { color: var(--red); }

.leads { margin-top: 12px; padding-top: 22px; border-top: 1.5px solid var(--ink); font-size: 15px; }
.leads h4 { font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.leads li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dotted var(--line); }
.leads li span:last-child { color: var(--ink-2); text-align: right; }

@media (max-width: 900px) {
  .ppl__grid { display: block; }
  .ppl__photo { margin-bottom: 36px; }
}

/* =========================================================
   FOOTER – Ziffern steigen einzeln auf
   ========================================================= */
.footer-phone { overflow: hidden; }
.footer-phone .d { display: inline-block; }
