/* ============================================================
   TMF Tischlerei - Startseite v2 "Nach Maß"
   Gestaltungssystem: Werkzeichnung / Maßkette
   Schriften: Fraunces (Display) · Hanken Grotesk (Text)
              IBM Plex Mono (Maße, Labels) - selbst gehostet
   Farben: unverändert Markenpalette (Ziegel/Gold/Papier)
   ============================================================ */

/* ---------- Schriften (lokal, DSGVO-konform) ---------- */

@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('../assets/fonts/fraunces-v38-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('../assets/fonts/fraunces-v38-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic; font-weight: 500; font-display: swap;
  src: url('../assets/fonts/fraunces-v38-latin-500italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-v12-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-v12-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-v12-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-v20-latin-500.woff2') format('woff2');
}

/* ---------- Token-Überschreibung nur für die Startseite ---------- */

body.home {
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Hanken Grotesk', -apple-system, "Segoe UI", sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;
  font-family: var(--sans);
  font-size: 17px;
}

body.home h1, body.home h2, body.home h3 { font-family: var(--serif); }

/* Maßketten-Grundelement:  |—————— label ——————|  */
.mk {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-dark);
  white-space: nowrap;
}
.mk::before, .mk::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--accent);
  position: relative;
}
.mk.mk-left::before { display: none; }
.mk .tick { width: 1px; height: 11px; background: var(--accent); flex: none; }

/* ---------- Hero: Vollbild mit dunklem Overlay ---------- */

.hm-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 118px);
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.hm-hero-photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hm-hero-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* dunkles, halbtransparentes Overlay - links dichter für Lesbarkeit */
.hm-hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(26, 22, 17, 0.78) 0%, rgba(26, 22, 17, 0.55) 55%, rgba(26, 22, 17, 0.35) 100%);
}

.hm-hero-copy {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hm-plankopf {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(241, 228, 212, 0.72);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vh, 52px);
}
.hm-plankopf strong { color: #F1E4D4; font-weight: 500; }

.hm-hero h1 {
  font-size: clamp(3rem, 6.2vw, 5.4rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 10px;
  max-width: 15ch;
}
.hm-hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: #E4C084;
}

.hm-hero-mass {
  margin: 6px 0 26px;
  max-width: 380px;
}
.hm-hero .mk { color: #E9CD9C; }
.hm-hero .mk::before, .hm-hero .mk::after, .hm-hero .mk .tick { background: #D2A75D; }
.hm-hero .mk.mk-left::before { background: none; }

.hm-hero .lead {
  font-size: 1.12rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  max-width: 46ch;
  margin-bottom: 34px;
}

.hm-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }

.hm-hero-facts {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(241, 228, 212, 0.7);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.hm-hero-facts .dot { color: #D2A75D; }

/* Material-Callout auf dem Foto (Werkzeichnungs-Anmerkung) */
.hm-callout {
  position: absolute;
  right: 6%;
  bottom: 11%;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}
.hm-callout .leader {
  width: 74px; height: 46px;
  border-left: 1px solid #F1E4D4;
  border-bottom: 1px solid #F1E4D4;
  position: relative;
}
.hm-callout .leader::before {
  content: "";
  position: absolute; top: -3px; left: -4px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hm-callout span {
  background: rgba(30, 26, 20, 0.55);
  backdrop-filter: blur(3px);
  padding: 9px 14px;
  border: 1px solid rgba(241, 228, 212, 0.4);
}

/* Hero-Eingangssequenz */
@keyframes hmRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes hmDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hmFade { from { opacity: 0; } to { opacity: 1; } }

.hm-hero-copy > * { animation: hmRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hm-hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hm-hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
.hm-hero-copy > *:nth-child(3) { animation-delay: 0.3s; }
.hm-hero-copy > *:nth-child(4) { animation-delay: 0.4s; }
.hm-hero-copy > *:nth-child(5) { animation-delay: 0.5s; }
.hm-hero-copy > *:nth-child(6) { animation-delay: 0.6s; }
.hm-hero-mass.mk::before, .hm-hero-mass.mk::after {
  transform-origin: left;
  animation: hmDraw 0.9s 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hm-hero-photo img { animation: hmFade 1.2s 0.1s ease both; }
.hm-callout { animation: hmFade 0.8s 1s ease both; }

/* ---------- Maßleiste (Fakten als Bemaßung) ---------- */

.hm-massleiste {
  border-bottom: 1px solid var(--line);
  padding: 56px 0 50px;
  background: var(--bg);
}
.hm-massleiste-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.hm-massleiste-track::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 8px;
  height: 1px;
  background: var(--accent);
}
.hm-station { position: relative; padding-top: 26px; text-align: left; }
.hm-station::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 1px; height: 13px;
  background: var(--accent);
}
.hm-station .wert {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 600;
  color: var(--brand);
  display: block;
}
.hm-station .label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Sektionen (eigener Namensraum) ---------- */

.hm-section { padding: clamp(72px, 10vw, 120px) 0; }
.hm-section.tint { background: var(--bg-alt); }

.hm-head { margin-bottom: clamp(36px, 5vw, 64px); }
.hm-head .mk { max-width: 360px; margin-bottom: 22px; }
.hm-head h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--ink);
  max-width: 18ch;
}
.hm-head h2 em { font-style: italic; font-weight: 500; color: var(--brand); }
.hm-head p { margin-top: 1.1rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- Werkverzeichnis (Leistungen als Indexliste) ---------- */

.hm-servicelist { border-top: 1px solid var(--line); }

.hm-service {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 48px);
  padding: 26px 8px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  position: relative;
  transition: background 0.25s ease;
}
.hm-service:hover { background: rgba(190, 146, 67, 0.07); }

.hm-service .titel {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color 0.25s ease, transform 0.3s ease;
}
.hm-service:hover .titel { color: var(--brand); transform: translateX(10px); }

.hm-service .infos { min-width: 0; }
.hm-service .meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-dark);
  display: block;
  margin-bottom: 5px;
}
.hm-service .desc { font-size: 0.94rem; color: var(--ink-soft); }

.hm-service .thumb {
  width: 128px; height: 88px;
  overflow: hidden;
  border-radius: 3px;
  flex: none;
}
.hm-service .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.hm-service:hover .thumb img { transform: scale(1.08); }

.hm-service .pfeil {
  position: absolute;
  right: 12px; top: 24px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateX(-8px);
}
.hm-service:hover .pfeil { opacity: 1; transform: none; }

/* ---------- Produkt-Duo mit Maß-Chips ---------- */

.hm-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.hm-panel {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  isolation: isolate;
}
.hm-panel .bg {
  position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.hm-panel:hover .bg { transform: scale(1.045); }
.hm-panel .bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(185deg, rgba(30,26,20,0) 38%, rgba(30,26,20,0.82) 100%);
}
.hm-panel-body { padding: clamp(24px, 3vw, 40px); width: 100%; }
.hm-panel .chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.hm-panel .chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #F1E4D4;
  border: 1px solid rgba(241, 228, 212, 0.5);
  padding: 6px 12px;
  border-radius: 2px;
  background: rgba(30, 26, 20, 0.35);
  backdrop-filter: blur(2px);
}
.hm-panel h3 {
  color: #fff;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 600;
  margin-bottom: 8px;
}
.hm-panel p { color: rgba(255,255,255,0.88); font-size: 0.96rem; max-width: 46ch; }
.hm-panel .mehr {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #F1E4D4;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
}

/* ---------- Dennis / Werkstatt ---------- */

.hm-founder {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.hm-founder-img {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}
.hm-founder-img img { display: block; width: 100%; }
.hm-founder-img figcaption {
  position: absolute;
  left: 0; bottom: 0; right: 0;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #F1E4D4;
  background: linear-gradient(0deg, rgba(30,26,20,0.75), rgba(30,26,20,0));
}
.hm-founder blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 1.4rem 0 1.6rem;
  position: relative;
  padding-left: 26px;
}
.hm-founder blockquote::before {
  content: "";
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--accent);
}
.hm-founder .feature-list { margin-top: 1.4rem; }
.hm-founder .feature-list li { font-size: 0.98rem; }

/* ---------- Bauablauf (Prozess als Zeitstrahl) ---------- */

.hm-ablauf { position: relative; }
.hm-ablauf-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  position: relative;
  padding-top: 34px;
}
.hm-ablauf-track::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 8px;
  height: 1px;
  background: var(--accent);
}
/* Pfeilspitze am Ende des Zeitstrahls */
.hm-ablauf-track::after {
  content: "";
  position: absolute;
  right: -1px; top: 4.5px;
  width: 8px; height: 8px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  transform: rotate(45deg);
}
.hm-schritt { position: relative; }
.hm-schritt::before {
  content: "";
  position: absolute;
  left: 0; top: -26px;
  width: 1px; height: 13px;
  background: var(--accent);
}
.hm-schritt .nr {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--accent-dark);
  display: block;
  margin-bottom: 8px;
}
.hm-schritt h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--ink); }
.hm-schritt p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.55; }

.hm-ablauf-summe {
  margin-top: 44px;
  max-width: 480px;
}

/* ---------- Referenz-Galerie (asymmetrisch) ---------- */

.hm-galerie {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  gap: 16px;
}
.hm-galerie a {
  display: block;
  overflow: hidden;
  border-radius: 3px;
  position: relative;
}
.hm-galerie a:first-child { grid-column: span 2; grid-row: span 2; }
.hm-galerie img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hm-galerie a:hover img { transform: scale(1.05); }

/* ---------- Preis-Statement ---------- */

.hm-preis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.hm-preiszahl {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3.2rem, 6vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--brand);
}
.hm-preiszahl small {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: block;
  margin-top: 14px;
  text-transform: uppercase;
}
.hm-preis .mk { max-width: 320px; margin-top: 26px; }
.hm-preis-text p { color: var(--ink-soft); margin-bottom: 1rem; }
.hm-preis-text .btn { margin-top: 0.6rem; }

/* ---------- CTA-Band mit Jahresring-Echo ---------- */

.hm-cta {
  position: relative;
  background: var(--brand);
  color: #fff;
  padding: clamp(72px, 9vw, 110px) 0;
  overflow: hidden;
  isolation: isolate;
}
.hm-cta svg.ringe {
  position: absolute;
  right: -70px;
  bottom: -14px;
  width: 560px;
  height: auto;
  opacity: 0.18;
  z-index: -1;
}
@media (max-width: 760px) {
  .hm-cta svg.ringe { width: 380px; right: -110px; opacity: 0.12; }
}
.hm-cta h2 {
  color: #fff;
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 600;
  max-width: 20ch;
  margin-bottom: 1rem;
}
.hm-cta p { color: rgba(255,255,255,0.85); max-width: 56ch; margin-bottom: 2.2rem; }
.hm-cta .btn-primary { background: #fff; color: var(--brand); }
.hm-cta .btn-primary:hover { background: var(--bg); transform: translateY(-1px); }
.hm-cta .mono-note {
  display: block;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(241, 228, 212, 0.75);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hm-hero { min-height: 78vh; }
  .hm-ablauf-track { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .hm-ablauf-track::before, .hm-ablauf-track::after { display: none; }
  .hm-schritt::before { display: none; }
  .hm-schritt { border-top: 1px solid var(--accent); padding-top: 14px; }
  .hm-galerie { grid-auto-rows: 180px; }
}

@media (max-width: 760px) {
  .hm-duo, .hm-founder, .hm-preis { grid-template-columns: 1fr; }
  .hm-founder-img { max-width: 380px; }
  .hm-massleiste-track { grid-template-columns: 1fr 1fr; row-gap: 34px; }
  .hm-massleiste-track::before { display: none; }
  .hm-station { border-top: 1px solid var(--accent); padding-top: 16px; }
  .hm-station::before { display: none; }
  .hm-service { grid-template-columns: 1fr; gap: 10px; padding: 22px 4px; }
  .hm-service .thumb { width: 100%; height: 170px; order: -1; }
  .hm-service .pfeil { display: none; }
  .hm-galerie { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .hm-galerie a:first-child { grid-column: span 2; grid-row: span 2; }
  .hm-panel { min-height: 420px; }
  .hm-callout { display: none; }
}

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  .hm-hero-copy > *,
  .hm-hero-photo img,
  .hm-callout,
  .hm-hero-mass.mk::before,
  .hm-hero-mass.mk::after { animation: none; }
  .hm-service .titel, .hm-service .thumb img, .hm-panel .bg, .hm-galerie img { transition: none; }
}
