/* ============================================================
   RUHEBAND — Theme nach brand/brand-tokens.md + formance-System
   (formance-components.md: Container-Raster, Reveal-Animationen,
   Sticky-Shrink-Header, Karten-Hover, Band-Motiv als Geste).
   Farben/Typo/Spacing leben NUR in :root-Custom-Properties.
   ============================================================ */
/* ===================== FONTS — SELF-HOSTED (Ruling 2026-09-08: nie Google Fonts) ===================== */
@font-face { font-family: 'Newsreader'; font-weight: 300; font-style: normal; font-display: swap; src: url('/assets/fonts/newsreader-300.ttf') format('truetype'); }
@font-face { font-family: 'Newsreader'; font-weight: 300; font-style: italic; font-display: swap; src: url('/assets/fonts/newsreader-300-italic.ttf') format('truetype'); }
@font-face { font-family: 'Newsreader'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/newsreader-400.ttf') format('truetype'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/hanken-400.ttf') format('truetype'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fonts/hanken-600.ttf') format('truetype'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 700; font-style: normal; font-display: swap; src: url('/assets/fonts/hanken-700.ttf') format('truetype'); }

:root {
  /* Palette — Ruheband Brand Guide */
  --color-bg: #F7F3EC;             /* Papier */
  --color-surface: #ffffff;        /* Karten */
  --color-tint: #ECE3D4;           /* Sand */
  --color-greige: #D8CCB8;         /* Linien */
  --color-border: #E7DECF;         /* Kartenränder */
  --color-border-hover: #D8CCB8;
  --color-ink: #2B2823;            /* Tinte */
  --color-ink-muted: #6b6358;
  --color-ink-soft: #8a8175;
  --color-label: #b0a48f;
  --color-sage: #8E9C82;
  --color-sage-deep: #6E7E63;
  --color-sage-light: #9DB39A;
  --color-accent: #9C5A3C;         /* Terrakotta */
  --color-accent-hover: #82492F;
  --color-accent-soft: #C68A6B;
  --color-deep: #2E4A45;           /* Waldgrün */
  --color-silver: #EDE7DB;
  --color-on-deep: #D7D2C5;

  --gradient-hero: linear-gradient(180deg, #2E4A45 0%, #2E4A45 100%);

  /* Typografie */
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --max-width: 1100px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;
  --space-7: 7rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 70px; }
::selection { background: var(--color-accent); color: var(--color-bg); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }

/* ===================== RASTER ===================== */
/* EIN Container, EINE linke Kante — alle Sektionen hängen daran. */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

/* ===================== ANIMATIONS-SYSTEM =====================
   Gate: <html class="js-anim"> (Inline-Script im <head>).
   Reveal: .rv wird per IntersectionObserver .is-visible. */
@keyframes rb-draw { from { stroke-dashoffset: var(--len, 1600); } to { stroke-dashoffset: 0; } }
@keyframes rb-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rb-rule { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }

.js-anim .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease);
}
.js-anim .rv.is-visible { opacity: 1; transform: none; }
.js-anim .rv-d1 { transition-delay: 80ms; }
.js-anim .rv-d2 { transition-delay: 160ms; }
.js-anim .rv-d3 { transition-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  .js-anim .rv { opacity: 1; transform: none; transition: none; }
  .js-anim .hero-content { animation: none; }
  .hero-band path { animation: none; stroke-dashoffset: 0; }
  .js-anim .wave-across path { transition: none; stroke-dashoffset: 0; }
  .page-head .rule { animation: none; }
}

/* ===================== NAV (sticky, shrink, Logo-Swap) ===================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-greige);
  transition: box-shadow 0.2s ease;
}
.site-nav.is-scrolled { box-shadow: 0 2px 14px rgba(43, 40, 35, 0.07); }
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: padding 0.2s ease;
}
.site-nav.is-scrolled .nav-inner { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-ink);
}
.nav-brand .brand-word {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  line-height: 1;
}
.site-nav.is-scrolled .brand-word { display: none; }
.nav-links { display: flex; gap: var(--space-3); margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--color-ink-muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--color-accent); }
.lang-switch {
  display: flex;
  gap: var(--space-1);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--color-label);
}
.lang-switch a { text-decoration: none; color: var(--color-ink-muted); }
.lang-switch a.active { color: var(--color-accent); }
.nav-toggle { display: none; }

/* ===================== EYEBROW (mit Band-Strich) ===================== */
.eyebrow {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-sage);
  margin: 0 0 var(--space-3);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: 0.22em;
}

/* ===================== HERO ===================== */
.hero {
  background: var(--color-deep);
  color: var(--color-bg);
  position: relative;
  overflow: hidden;
}
.hero .container { position: relative; }
.hero-inner { padding-top: var(--space-6); padding-bottom: var(--space-5); }
.hero-inner--compact { padding-top: var(--space-5); padding-bottom: var(--space-4); }
.js-anim .hero-content { animation: rb-rise 0.9s ease both; }
.hero .eyebrow { color: var(--color-sage-light); }
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.2vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
/* Punkt-zu-Punkt-Band: DAS dynamische Hero-Element — feste Endpunkte,
   die Linie schwingt sanft (rAF in site.js). Unter dem Titel, mischt sich
   nicht mit ihm. */
.hero-band {
  display: block;
  width: min(880px, 96%);
  height: auto;
  margin: 14px 0 18px;
  overflow: visible;
}
.hero-band path {
  fill: none;
  stroke: url(#bandGrad);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 2600;
  --len: 2600;
  animation: rb-draw 1.8s 0.3s ease both;
}
.hero-band circle { fill: url(#bandGrad); }
.hero .lede {
  color: var(--color-on-deep);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 46ch;
  margin: 0;
}

/* ===================== SEKTIONEN =====================
   Flächen-Rhythmus: Papier ↔ Sand im Wechsel — die Tonwechsel
   ersetzen Trennlinien (keine Borders zwischen Sektionen). */
.section { padding: var(--space-6) 0; }
.section--tint { background: var(--color-tint); }
.section h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-4);
  max-width: 24ch;
  text-wrap: balance;
}
.section-lede { color: var(--color-ink-muted); max-width: 52ch; margin: 0 0 var(--space-3); }

/* Dunkles Band (Waldgrün) — auf der Startseite nur Hero + Footer */
.section--deep {
  background: var(--color-deep);
  color: var(--color-on-deep);
}
.section--deep h2 { color: var(--color-bg); }
.section--deep .eyebrow { color: var(--color-sage-light); }
.section--deep .eyebrow::before { background: var(--color-accent-soft); }

/* Die Welle als verbindendes Element: läuft in «Kernpunkte» quer über
   die ganze Seite und HINTER den drei Karten durch. */
.section--tint,
.section--deep { position: relative; overflow: hidden; }
.section--tint .container,
.section--deep .container { position: relative; }
.wave-across {
  position: absolute;
  left: 0;
  right: 0;
  top: 55%;
  transform: translateY(-50%);
  width: 100%;
  height: clamp(90px, 12vw, 160px);
  opacity: 0.55;
  pointer-events: none;
}
.wave-across path {
  fill: none;
  stroke: var(--color-greige);
  stroke-width: 3;
  stroke-linecap: round;
}
.js-anim .wave-across path {
  stroke-dasharray: 3400;
  stroke-dashoffset: 3400;
  transition: stroke-dashoffset 2.4s var(--ease) 0.2s;
}
.js-anim .wave-across.is-visible path { stroke-dashoffset: 0; }

/* Rechtsbündige Sektions-Köpfe (wechselseitiges Textverhalten) */
.sec-head--right { text-align: right; }
.sec-head--right h2 { margin-left: auto; }
.sec-head--right .eyebrow::before { display: none; }
.sec-head--right .eyebrow::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-left: 10px;
  vertical-align: 0.22em;
}

/* Rechts positionierter Inhaltsblock (Kontakt) */
.contact-col { max-width: 640px; margin-left: auto; }

/* ===================== SPLIT (Text + Bild, alternierend) ===================== */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--flip > :first-child { order: 2; }
.split-media { margin: 0; }
.split-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}
.split-media--wide img { aspect-ratio: 3 / 2; }
.split-media--top img { object-position: 50% 12%; }
.split-media figcaption {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-label);
  margin-top: 10px;
}

/* ===================== PROSE ===================== */
.prose { max-width: 62ch; }
.prose--wide { max-width: none; }
.prose p { margin: 0 0 var(--space-2); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 600; }
.prose ul { margin: 0 0 var(--space-2); padding-left: 1.2rem; }
.prose li { margin-bottom: 0.3rem; }
.prose h2 {
  font-size: 1.4rem;
  margin: var(--space-4) 0 var(--space-1);
  max-width: none;
}

/* ===================== PHILOSOPHIE (Tags + Essenz) ===================== */
.factor-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  align-content: start;
}
@keyframes rb-wander { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.factor-tags li {
  border: 1px solid var(--color-greige);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.88rem;
  color: var(--color-ink-muted);
  background: linear-gradient(120deg,
    rgba(142, 156, 130, 0.10) 0%,
    rgba(198, 138, 107, 0.13) 50%,
    rgba(142, 156, 130, 0.10) 100%);
  background-size: 220% 100%;
  animation: rb-wander 9s ease-in-out infinite alternate;
}
.factor-tags li:nth-child(2n) { animation-delay: -3s; }
.factor-tags li:nth-child(3n) { animation-delay: -6s; }
@media (prefers-reduced-motion: reduce) {
  .factor-tags li { animation: none; }
}
.section--tint .factor-tags li { border-color: #CBBBA0; }
.essence {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  color: var(--color-accent);
  margin: var(--space-4) 0 0;
}

/* ===================== KARTEN (Kernpunkte) — mit Hover-Lift ===================== */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pillar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px 28px 26px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(43, 40, 35, 0.02);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.pillar:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(43, 40, 35, 0.08);
  border-color: var(--color-border-hover);
}
.pillar .pillar-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--color-accent);
  margin: 0 0 14px;
}
.pillar h3 { font-weight: 600; font-size: 1.05rem; margin: 0 0 8px; }
.pillar p { font-size: 0.92rem; color: var(--color-ink-soft); line-height: 1.6; margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .pillar { transition: none; }
  .pillar:hover { transform: none; }
}

/* ===================== SCHRITTE (Arbeitsweise) ===================== */
.steps { margin-top: var(--space-2); }
.step {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  border-top: 1px solid var(--color-greige);
  padding: var(--space-3) 0;
}
.step-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-accent);
  flex: none;
  width: 2.2rem;
}
.step h3 { font-weight: 600; font-size: 1.05rem; margin: 0 0 6px; }
.step p { margin: 0; color: var(--color-ink-muted); font-size: 0.95rem; }

/* ===================== FÜR WEN (Do / Don't) — mit Hover-Lift ===================== */
.dodont {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.dodont-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.dodont-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex: none;
}
.dodont-badge.is-do { background: var(--color-sage-deep); }
.dodont-badge.is-dont { background: var(--color-accent); }
.dodont-col ul { list-style: none; margin: 0; padding: 0; }
.dodont-col li {
  border-top: 1px solid var(--color-greige);
  padding: 13px 0 13px 30px;
  position: relative;
  font-size: 0.97rem;
}
.dodont-col li:last-child { border-bottom: 1px solid var(--color-greige); }
.dodont-col li::before {
  content: "\2713";
  position: absolute;
  left: 3px;
  top: 13px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-sage-deep);
}
.dodont-col ul.is-muted li { color: var(--color-ink-soft); }
.dodont-col ul.is-muted li::before {
  content: "\00d7";
  color: var(--color-accent-soft);
  font-size: 1rem;
  top: 11px;
}

/* ===================== FORMULAR ===================== */
.contact-form { max-width: 640px; }
.field { margin-bottom: var(--space-2); }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}
.btn {
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  background: var(--color-accent);
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms var(--ease);
}
.btn:hover { background: var(--color-accent-hover); transform: translateY(-1px); }
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-banner {
  border-radius: 12px;
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  border: 1px solid;
  max-width: 640px;
}
.form-banner.is-success { background: #eef2ea; border-color: #b8c5ad; color: #3d4a35; }
.form-banner.is-error { background: #f7ebe4; border-color: #d9b8a5; color: #7a3c22; }

/* ===================== RECHTSSEITEN ===================== */
.page-head { padding: var(--space-6) 0 0; }
.page-head .rule {
  width: 28px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-bottom: var(--space-2);
  animation: rb-rule 0.9s var(--ease) both;
}
.page-head h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: var(--space-1) 0;
}
.page-head .stand { color: var(--color-ink-soft); font-size: 0.9rem; margin: 0; }

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--color-deep);
  color: var(--color-on-deep);
  padding: var(--space-5) var(--space-3);
  text-align: center;
  font-size: 0.85rem;
}
.site-footer a { color: var(--color-silver); }
.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: var(--space-2) 0;
}
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.site-footer .footer-meta { color: var(--color-sage-light); font-size: 0.8rem; margin: 0; }
.site-footer .footer-claim {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.15rem;
  color: var(--color-silver);
  margin: 0 0 var(--space-2);
}

/* ===================== FRAGEBOGEN ===================== */
.fb-col { max-width: 720px; }

/* (Altbestand, ungenutzt) */
.section-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}
.section-narrow h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.2rem);
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
.section-narrow code {
  font-size: 0.85em;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0 0.3em;
}

/* ===================== MOBILE ===================== */
@media (max-width: 800px) {
  .split,
  .dodont,
  .pillars { grid-template-columns: 1fr; }
  .split { gap: var(--space-3); }
  .split--flip > :first-child { order: 0; }
}
@media (max-width: 720px) {
  .nav-toggle {
    display: block;
    margin-left: auto;
    background: none;
    border: 0;
    padding: 0.4rem;
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-ink);
    margin: 5px 0;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-greige);
    padding: var(--space-2) var(--space-3);
  }
  .nav-links.is-open { display: flex; }
  .hero-inner { padding-top: var(--space-5); padding-bottom: var(--space-4); }
}
