/* ==========================================================================
   Hey Hobel – Kellerwerkstatt
   Design-Tokens stammen aus dem Figma-Design-System (Variablen: Primitives
   + Semantic Dunkel). Werte hier 1:1 übernommen.
   ========================================================================== */

/* ---------- Schriften (selbst gehostet, siehe scripts/vendor.mjs) ---------- */
@font-face { font-family: "Archivo"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/archivo-600.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/archivo-700.woff2") format("woff2"); }
@font-face { font-family: "Space Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/space-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Space Mono"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/space-mono-700.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/public-sans-400.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  /* Primitives */
  --graphit-900: #23211e;
  --graphit-800: #2a2723;
  --graphit-700: #3b362f;
  --graphit-600: #4a423a;
  --grau-400: #9a9083;
  --grau-300: #b5ac9e;
  --eiche-100: #f2ede4;
  --eiche-500: #c9a87c;
  --eiche-700: #6b4e32;
  --wald-600: #2f5a44;

  /* Semantic (Dunkel) */
  --bg-base: var(--graphit-900);
  --bg-raised: var(--graphit-800);
  --line: var(--graphit-700);
  --text-primary: var(--eiche-100);
  --text-secondary: var(--grau-300);
  --text-muted: var(--grau-400);
  --mark: var(--eiche-500);

  /* Status-Punkt: im Figma #2f5a44; auf dem dunklen Grund etwas heller,
     damit er sichtbar bleibt (Kontrast-Punkt aus dem Design-Feedback). */
  --status: #4f8f6d;

  /* Typografie */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-body: "Public Sans", system-ui, sans-serif;

  /* Layout */
  --page-pad: 40px;
  --section-gap: 80px;
  --max: 1440px;

  /* Schnittkante (Fase) – Gestaltungsmotiv aus dem Logo */
  --cut-lg: 48px;
  --cut-md: 36px;
  --cut-sm: 10px;
}

@media (max-width: 720px) {
  :root { --page-pad: 20px; --section-gap: 56px; --cut-lg: 32px; --cut-md: 28px; }
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 10;
  background: var(--mark); color: var(--bg-base);
  font: 700 12px/16px var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 16px; transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Wiederkehrende Textstile ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 12px; line-height: 16px;
  letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .16em; text-transform: uppercase; color: var(--mark); }
.eyebrow--sm { font-size: 10px; line-height: 17px; }
.h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 4.2vw, 46px); line-height: 1;
  letter-spacing: -0.03em; text-transform: uppercase; text-wrap: balance;
}
.h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 3vw, 34px); line-height: 36px;
  letter-spacing: -0.03em; text-transform: uppercase;
}
.h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 24px; line-height: 28px;
  letter-spacing: -0.025em; text-transform: uppercase;
}
.lead { color: var(--text-secondary); max-width: 600px; }
.meta { font-family: var(--font-mono); font-size: 12px; line-height: 18px; letter-spacing: .14em; color: var(--text-muted); }

/* ---------- Header ---------- */
.site-header { background: var(--bg-raised); border-bottom: 1px solid var(--line); }
.site-header__inner {
  max-width: var(--max); margin: 0 auto; padding: 24px var(--page-pad);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
}
.logo img { width: 168px; height: 48px; }
.nav { display: flex; gap: 24px; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; line-height: 16px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-secondary);
  padding: 8px 0; transition: color .2s;
}
.nav a:hover { color: var(--text-primary); }
.nav a[aria-current] { color: var(--text-primary); }
.nav a[aria-current]::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-primary);
}

/* ---------- Seitenrahmen ---------- */
.page {
  max-width: var(--max); margin: 0 auto;
  padding: var(--section-gap) var(--page-pad);
  display: flex; flex-direction: column; gap: var(--section-gap);
}

/* ---------- Buttons (Komponente "Button": Primary / Secondary) ---------- */
.btn-group { display: flex; flex-wrap: wrap; gap: 16px; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 12px 16px;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; line-height: 12px;
  letter-spacing: 1.5px; text-transform: uppercase; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%);
  transition: background-color .2s, color .2s;
}
.btn--primary { background: var(--mark); color: var(--bg-base); }
.btn--primary:hover { background: #d8bb92; }
.btn--secondary { color: var(--mark); }
.btn--secondary::after {
  /* Outline als Ring (äußere minus innere Kontur), folgt damit auch der Fase.
     Innere Fase um 1px·(√2−1) ≈ 0.414px verschoben, damit die Diagonale gleich stark ist. */
  content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--mark);
  clip-path: polygon(evenodd,
    0 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 0,
    1px 1px, 1px calc(100% - 1px),
    calc(100% - var(--cut-sm) - 0.414px) calc(100% - 1px),
    calc(100% - 1px) calc(100% - var(--cut-sm) - 0.414px),
    calc(100% - 1px) 1px, 1px 1px);
}
.btn--secondary:hover { background: rgba(201, 168, 124, .1); }

/* ---------- Platzhalter-Bilder (Komponente "Image") ---------- */
.ph {
  position: relative;
  background: repeating-linear-gradient(135deg, #ddd1b9 0 9px, #d4c7ac 9px 18px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
.ph::after {
  content: attr(data-label);
  position: absolute; left: 16px; bottom: 16px; right: calc(var(--cut) + 8px);
  font: 400 11px/14px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--eiche-700);
}
.ph--16x9 { --cut: var(--cut-lg); aspect-ratio: 16 / 9; }
.ph--1x1 { --cut: var(--cut-md); aspect-ratio: 1 / 1; }

/* ---------- Stage (Hero) ---------- */
.stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: center; }
.stage__text { display: flex; flex-direction: column; gap: 32px; }
.headlines { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
}

/* ---------- Karten ---------- */
.card-grid { display: flex; flex-direction: column; gap: 16px; }
.section-intro {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; row-gap: 56px; padding-top: 16px; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; gap: 12px; }
a.card .ph { transition: filter .25s; }
a.card:hover .ph { filter: brightness(1.06); }
.card__body { display: flex; flex-direction: column; gap: 8px; }
.card__name { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 22px; letter-spacing: -0.02em; }
.card__meta { white-space: pre-line; }
.card__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.card__price { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-secondary); }
.label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; line-height: 18px; letter-spacing: .14em; }
.label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--status); flex: none; }
.label--ref::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-muted); }

/* ---------- Ablauf ---------- */
.process { display: flex; flex-direction: column; gap: 32px; }
.process__head { display: flex; flex-direction: column; gap: 8px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.step { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--mark); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Teaser ---------- */
.teaser {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px;
  background: var(--bg-raised); border: 1px solid var(--line);
}
.teaser__content { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 32px; }
@media (max-width: 900px) {
  .teaser { grid-template-columns: 1fr; gap: 0; }
  .teaser__content { padding: 24px; }
}

/* ---------- Unterseiten (Platzhalter) ---------- */
.prose { display: flex; flex-direction: column; gap: 24px; max-width: 720px; }
.notice {
  border: 1px solid var(--line); background: var(--bg-raised);
  padding: 16px 20px; color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 12px; line-height: 18px; letter-spacing: .1em;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-raised); border-top: 1px solid var(--line); }
.site-footer__inner {
  max-width: var(--max); margin: 0 auto; padding: 32px var(--page-pad);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { text-decoration: underline; text-underline-offset: 3px; }
.footer-col a:hover { color: var(--text-primary); }
@media (max-width: 900px) { .site-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ---------- Text-Animation (GSAP) ----------
   Zielelemente sind bis zur Animation unsichtbar (kein Aufblitzen des Rohtexts).
   Die Klasse .js-anim setzt ein Inline-Skript im <head> – nur ohne
   "Bewegung reduzieren". Fallback: nach 3 s wird alles trotzdem sichtbar,
   falls GSAP nicht lädt. */
.js-anim [data-split],
.js-anim [data-fade] {
  visibility: hidden;
  animation: reveal-fallback 0s linear 3s forwards;
}
@keyframes reveal-fallback { to { visibility: visible; } }
