/* ---------------------------------------------------------------
   ZDKG — Design System
   Primary: Aptos (if /static/fonts/Aptos*.woff2 provided)
   Fallback: Inter (body) + Fraunces (display), both self-hosted
   --------------------------------------------------------------- */

/* --- Self-hosted web fonts --- */
/* Fraunces — display serif (OFL). Variable axes: opsz, wght, SOFT, WONK. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/Fraunces-Variable.woff2") format("woff2-variations"),
       url("/static/fonts/Fraunces-Variable.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/Fraunces-Italic-Variable.woff2") format("woff2-variations"),
       url("/static/fonts/Fraunces-Italic-Variable.woff2") format("woff2");
}

/* Inter — body sans (OFL). Variable weight axis. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/Inter-Variable.woff2") format("woff2-variations"),
       url("/static/fonts/Inter-Variable.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/Inter-Italic-Variable.woff2") format("woff2-variations"),
       url("/static/fonts/Inter-Italic-Variable.woff2") format("woff2");
}

/* Aptos — Microsoft corporate font. User preference; not OFL, drop into
   /static/fonts/ when available. CSS fails gracefully to Inter otherwise. */
@font-face {
  font-family: "Aptos";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/Aptos.woff2") format("woff2"),
       url("/static/fonts/Aptos.ttf") format("truetype");
}
@font-face {
  font-family: "Aptos";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/Aptos-Bold.woff2") format("woff2"),
       url("/static/fonts/Aptos-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Aptos";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/Aptos-Italic.woff2") format("woff2"),
       url("/static/fonts/Aptos-Italic.ttf") format("truetype");
}
@font-face {
  font-family: "Aptos Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/Aptos-Display.woff2") format("woff2"),
       url("/static/fonts/Aptos-Display.ttf") format("truetype");
}

:root {
  /* Palette */
  --ink: #0b0f19;
  --ink-soft: #1a2234;
  --paper: #fafaf7;
  --paper-warm: #f5f2eb;
  --cream: #e9e4d7;
  --emerald: #047857;
  --emerald-deep: #064e3b;
  --emerald-glow: #a7f3d0;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --accent: #b88f3b;  /* warm editorial gold */

  /* Type — Aptos is primary (if the TTFs/WOFF2s are installed in
     /static/fonts/); Inter is the everyday fallback, Fraunces stays the
     editorial display face. */
  --f-display: "Aptos Display", "Aptos", "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --f-body: "Aptos", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --max-w: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.08; }
h1 em, h2 em { font-style: italic; color: var(--emerald-deep); font-variation-settings: "SOFT" 100; }
p { margin: 0; }
::selection { background: var(--emerald-glow); color: var(--emerald-deep); }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  background: rgba(250, 250, 247, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--stone-200); }
.mark { text-decoration: none; }
.mark-glyph {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-variation-settings: "WONK" 1;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.site-header nav a {
  text-decoration: none;
  font-size: 0.94rem;
  color: var(--stone-600);
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.site-header nav a:hover { color: var(--ink); }
.btn-sm {
  padding: 0.5rem 0.95rem;
  background: var(--ink);
  color: var(--paper) !important;
  border-radius: 999px;
  font-size: 0.86rem !important;
  transition: background 0.2s var(--ease);
}
.btn-sm:hover { background: var(--emerald-deep); }

/* --- Hero --- */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 9rem) var(--gutter) clamp(5rem, 12vw, 10rem);
  position: relative;
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 14ch;
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 400;
}
.hero h1 em {
  font-weight: 400;
  font-style: italic;
  color: var(--emerald-deep);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.lede {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.55;
  max-width: 52ch;
  color: var(--stone-600);
  margin-bottom: 2.5rem;
  font-weight: 400;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 4rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.3s var(--ease);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 10px 30px -12px rgba(11, 15, 25, 0.45);
}
.btn-primary:hover { background: var(--emerald-deep); transform: translateY(-1px); }
.btn-primary:hover svg { transform: translateX(2px); }
.btn-primary svg { transition: transform 0.25s var(--ease); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--stone-300);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--stone-100); }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 0.75rem;
  align-items: center;
  font-size: 0.83rem;
  color: var(--stone-500);
  font-family: var(--f-body);
  letter-spacing: 0.02em;
}
.hero-meta .dot { opacity: 0.4; }

/* Hero editorial glyph in the background */
.hero::before {
  content: "Z";
  position: absolute;
  font-family: var(--f-display);
  font-weight: 200;
  font-size: clamp(18rem, 45vw, 42rem);
  line-height: 0.8;
  right: -6vw;
  top: 8%;
  color: var(--cream);
  opacity: 0.5;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  z-index: -1;
  pointer-events: none;
  letter-spacing: -0.05em;
  user-select: none;
}

/* --- Leistungen --- */
.leistungen {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(5rem, 10vw, 9rem) var(--gutter);
}
.leistungen .eyebrow { color: var(--emerald-glow); }
.section-head {
  max-width: var(--max-w);
  margin: 0 auto 4.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 3rem;
}
.section-head h2 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 300;
  max-width: 18ch;
  color: var(--paper);
}
.section-head h2 em { color: var(--emerald-glow); }
.section-lede {
  max-width: 52ch;
  color: var(--stone-300);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 1.5rem;
}
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: 1.2fr 1fr;
    align-items: end;
  }
  .section-head .section-lede { margin-top: 0; }
}

.service-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
}
@media (min-width: 900px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service {
  padding: 2.5rem 2rem 2.25rem;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background 0.3s var(--ease);
}
.service:hover { background: var(--ink-soft); }
.idx {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 2rem;
  color: var(--emerald-glow);
  letter-spacing: 0.02em;
}
.service h3 {
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--paper);
}
.service p {
  color: var(--stone-300);
  line-height: 1.6;
  flex: 1;
}
.service-link {
  margin-top: 0.5rem;
  color: var(--emerald-glow);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  align-self: flex-start;
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease);
}
.service-link:hover { border-bottom-color: var(--emerald-glow); }

/* --- Haltung / Pullquote --- */
.haltung {
  background: var(--paper-warm);
  padding: clamp(5rem, 10vw, 9rem) var(--gutter);
}
.pull-container {
  max-width: 1080px;
  margin: 0 auto clamp(3.5rem, 7vw, 6rem);
}
.pull {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 4.5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 300;
  color: var(--ink);
  max-width: 22ch;
  position: relative;
}
.pull::before {
  content: "“";
  position: absolute;
  left: -0.4em;
  top: -0.1em;
  font-size: 1.7em;
  color: var(--emerald);
  font-weight: 300;
  line-height: 1;
  font-variation-settings: "SOFT" 100;
}
.pull em {
  font-style: italic;
  color: var(--emerald-deep);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.pull .punct { color: var(--accent); font-style: normal; }

.philosophy-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.75rem;
}
@media (min-width: 760px) { .philosophy-grid { grid-template-columns: repeat(3, 1fr); gap: 3.5rem 3rem; } }
.philosophy-grid h3 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.65rem;
  padding-top: 1rem;
  border-top: 1.5px solid var(--ink);
  font-family: var(--f-body);
  letter-spacing: -0.01em;
}
.philosophy-grid p {
  color: var(--stone-600);
  font-size: 1rem;
  line-height: 1.65;
}

/* --- Kontakt --- */
.kontakt {
  background: var(--paper);
  padding: clamp(5rem, 10vw, 10rem) var(--gutter);
  text-align: center;
}
.kontakt-inner {
  max-width: 780px;
  margin: 0 auto;
}
.kontakt h2 {
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  font-weight: 300;
  margin-bottom: 1.5rem;
  line-height: 1.05;
}
.kontakt .eyebrow { margin-bottom: 1rem; }
.kontakt .section-lede { margin: 0 auto 2.75rem; color: var(--stone-600); }
.mail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 400;
  padding: 0.35em 0;
  border-bottom: 2px solid var(--ink);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), gap 0.25s var(--ease);
  letter-spacing: -0.015em;
}
.mail-link:hover {
  color: var(--emerald-deep);
  border-bottom-color: var(--emerald);
  gap: 1.1rem;
}
.mail-link svg {
  opacity: 0.6;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.mail-link:hover svg { opacity: 1; transform: translateX(4px); }
.kontakt-alt {
  margin-top: 2.5rem;
  color: var(--stone-500);
  font-size: 0.97rem;
}
.kontakt-alt a {
  color: var(--emerald);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.kontakt-alt a:hover { color: var(--emerald-deep); }

/* --- Footer --- */
.site-footer {
  background: var(--ink);
  color: var(--stone-300);
  padding: 3rem var(--gutter) 2.5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  gap: 2rem 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .footer-inner { grid-template-columns: 2fr 1.4fr 1fr; align-items: start; } }
.footer-brand .mark-glyph {
  font-size: 1.4rem;
  color: var(--paper);
  display: block;
  margin-bottom: 0.5rem;
}
.footer-brand p {
  font-size: 0.92rem;
  color: var(--stone-300);
  max-width: 34ch;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.92rem;
}
.footer-nav a {
  color: var(--stone-300);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer-nav a:hover { color: var(--emerald-glow); }
.copy {
  font-size: 0.82rem;
  color: var(--stone-500);
  font-family: var(--f-body);
}

/* --- Reveal-on-scroll motion --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
