/* THE-FIN: gemeinsame Gestaltung für Startseite und Unterseiten (Tokens, Basis, Header, Footer, Bausteine). */
/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --paper: #FAF5F2;
  --brand: #BD775F;

  --bg: oklch(0.975 0.006 80);
  --bg-2: oklch(0.955 0.010 75);
  --bg-3: oklch(0.935 0.014 72);
  --ink: oklch(0.205 0.012 60);
  --ink-2: oklch(0.355 0.012 60);
  --ink-3: oklch(0.520 0.010 65);
  --ink-4: oklch(0.720 0.008 70);
  --rule: oklch(0.880 0.010 70);
  --rule-2: oklch(0.820 0.012 68);
  --accent: oklch(0.545 0.045 55);
  --accent-soft: oklch(0.930 0.018 60);
  --accent-ink: oklch(0.380 0.040 55);
  --brand-soft: oklch(0.930 0.030 45);

  /* Dunkle Flächen (Angebote, Kontakt) */
  --dk: #2E2E2D;
  --dk-2: #373735;
  --dk-3: #42413F;
  --dk-ink: #FAF5F2;
  --dk-ink-2: oklch(0.86 0.008 78);
  --dk-ink-3: oklch(0.72 0.010 76);
  --dk-rule: oklch(0.43 0.006 70);

  --btn-bg: var(--ink);
  --btn-ink: var(--paper);
  --header-bg: oklch(0.975 0.006 80 / 0.78);
  --glow: color-mix(in oklch, var(--brand) 24%, transparent);
  --lift: 0 1px 0 oklch(0.2 0.012 60 / 0.03), 0 30px 60px -36px oklch(0.25 0.03 50 / 0.35);
  --err: #A63A28;
  --grain-opacity: .05;

  --f: "Albert Sans", "Helvetica Neue", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --max: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.22, .8, .24, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #C98670;
  --bg: oklch(0.175 0.010 65);
  --bg-2: oklch(0.205 0.012 65);
  --bg-3: oklch(0.250 0.014 65);
  --ink: oklch(0.930 0.006 80);
  --ink-2: oklch(0.780 0.008 78);
  --ink-3: oklch(0.650 0.010 76);
  --ink-4: oklch(0.470 0.010 75);
  --rule: oklch(0.300 0.012 70);
  --rule-2: oklch(0.400 0.014 70);
  --accent: oklch(0.690 0.052 58);
  --accent-soft: oklch(0.280 0.032 58);
  --accent-ink: oklch(0.820 0.046 62);
  --brand-soft: oklch(0.290 0.040 45);
  --dk: oklch(0.215 0.012 65);
  --dk-2: oklch(0.250 0.013 65);
  --dk-3: oklch(0.290 0.014 65);
  --dk-ink: oklch(0.930 0.006 80);
  --dk-ink-2: oklch(0.780 0.008 78);
  --dk-ink-3: oklch(0.650 0.010 76);
  --dk-rule: oklch(0.340 0.012 70);
  --btn-bg: var(--paper);
  --btn-ink: #1B1612;
  --header-bg: oklch(0.175 0.010 65 / 0.78);
  --glow: color-mix(in oklch, var(--brand) 18%, transparent);
  --lift: 0 30px 60px -36px oklch(0 0 0 / 0.7);
  --err: #F0A08C;
  --grain-opacity: .06;
  color-scheme: dark;
}

/* Dunkle Fläche: Tokens lokal umschalten */
.on-dark {
  background: var(--dk); color: var(--dk-ink-2);
  --ink: var(--dk-ink); --ink-2: var(--dk-ink-2); --ink-3: var(--dk-ink-3); --ink-4: oklch(0.52 0.008 72);
  --rule: var(--dk-rule); --rule-2: oklch(0.50 0.008 70);
  --bg: var(--dk); --bg-2: var(--dk-2); --bg-3: var(--dk-3);
  --btn-bg: var(--paper); --btn-ink: #1B1612;
  --accent: var(--brand); --accent-soft: oklch(0.36 0.04 45); --accent-ink: oklch(0.84 0.05 58);
  --err: #F0A08C;
}

/* ── Basis ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 1.0625rem/1.65 var(--f);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Papierstruktur */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.22 0 0 0 0 0.16 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.site { hyphens: auto; overflow-wrap: break-word; overflow-x: clip; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--f); font-weight: 300; text-wrap: balance; hyphens: manual; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--btn-bg); color: var(--btn-ink); padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 500; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

.label {
  display: inline-flex; align-items: center; gap: 14px;
  font: 500 0.75rem/1.2 var(--f);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); hyphens: manual;
}
.label::before { content: ""; width: 28px; height: 1px; background: var(--brand); flex: none; }
.kicker { font: 500 .72rem/1.2 var(--f); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }

.h2 {
  font-weight: 300;
  font-size: clamp(2.25rem, 4.8vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.h2 em, .statement em { font-style: normal; color: var(--brand); }
.lede { font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.6; color: var(--ink-2); max-width: 34em; font-weight: 300; }

/* Bildmarke als Symbol */
.markico { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 16px;
  min-height: 56px; padding: 0 8px 0 26px;
  border-radius: 999px; border: 1px solid transparent;
  font: 500 1rem/1 var(--f);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.btn .chip-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: transform .45s var(--ease); }
.btn .chip-ico svg { width: 16px; height: 16px; }
.btn:hover .chip-ico { transform: rotate(-45deg); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary .chip-ico { background: var(--brand); color: #fff; }
.btn-primary:hover { background: color-mix(in oklch, var(--btn-bg) 88%, var(--brand)); }
.btn-ghost { border-color: var(--rule-2); color: var(--ink); background: transparent; }
.btn-ghost .chip-ico { border: 1px solid var(--rule-2); }
.btn-ghost:hover { border-color: var(--ink-3); background: color-mix(in oklch, var(--ink) 4%, transparent); }
.btn-plain { padding: 0 26px; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); text-decoration: none; padding-bottom: 4px; background: linear-gradient(var(--brand), var(--brand)) 0 100% / 100% 1px no-repeat; }
.link-arrow svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* Einblenden beim Scrollen (nur was unterhalb des ersten Bildschirms liegt) */
.reveal { transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.pre { opacity: 0; transform: translateY(28px); }

/* ── Header ─────────────────────────────────────────────── */
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  transition: background-color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  backdrop-filter: saturate(1.5) blur(18px);
  border-color: var(--rule);
}
.header-in { display: flex; align-items: center; gap: 24px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; border-radius: 10px; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-name { font: 600 1.3rem/1 var(--f); letter-spacing: 0; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a { position: relative; padding: 10px 14px; text-decoration: none; font-weight: 400; font-size: 0.95rem; color: var(--ink-2); transition: color .25s; border-radius: 999px; }
.nav a::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); transform: translateX(-50%) scale(0); transition: transform .35s var(--ease); }
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); }
.nav a[aria-current="true"]::after { transform: translateX(-50%) scale(1); }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule-2); background: transparent; color: var(--ink); cursor: pointer; transition: border-color .25s; flex: none; }
.icon-btn:hover { border-color: var(--ink-3); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-sun { display: none; }
.is-dark .theme-sun { display: block; }
.is-dark .theme-moon { display: none; }
.header .btn { min-height: 44px; font-size: .92rem; }
.header .btn-plain { padding: 0 20px; }
.menu-btn { display: none; }
.nav .btn { display: none; }
@media (max-width: 980px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .header .cta-desk { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-block: 1px solid var(--rule);
    padding: 8px var(--gutter) 24px;
    box-shadow: var(--lift);
  }
  .nav.open a { padding: 16px 0; font-size: 1.25rem; font-weight: 300; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav.open a::after { display: none; }
  .nav.open .btn { display: inline-flex; margin-top: 20px; justify-content: space-between; border-bottom: 0; font-size: 1rem; font-weight: 500; padding: 0 8px 0 24px; border-radius: 999px; min-height: 56px; }
}
/* Ohne JavaScript bleibt die Navigation sichtbar. */
html:not(.js) .nav { display: flex; flex-wrap: wrap; }
html:not(.js) .menu-btn, html:not(.js) #themeBtn { display: none; }

/* ── Kompass (Startseite und Unterseiten) ──────────────── */
.orbit-wrap { position: relative; aspect-ratio: 1; width: 100%; max-width: 580px; justify-self: end; }
.orbit-wrap::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 62% 38%, var(--glow), transparent 62%);
  filter: blur(24px);
}
.orbit { position: relative; width: 100%; height: 100%; display: block; overflow: visible; }
.orbit .o-line { fill: none; stroke: var(--rule-2); stroke-width: 1; }
.orbit .o-faint { fill: none; stroke: var(--rule); stroke-width: 1; }
.orbit .o-dash { fill: none; stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: 2 7; }
.orbit .tick { stroke: var(--ink-4); stroke-width: 1; }
.orbit .tick.major { stroke: var(--ink-3); stroke-width: 1.3; }
.orbit .spin { transform-box: view-box; transform-origin: 200px 200px; will-change: transform; }
.orbit .core { fill: var(--bg); stroke: var(--rule); stroke-width: 1; }
.orbit .satellite { fill: var(--brand); }
.orbit .sat-ring { fill: none; stroke: var(--brand); stroke-width: 1; opacity: .5; }
.orbit .cardinal { fill: var(--ink-3); font: 500 8.5px var(--f); letter-spacing: .16em; }
@media (prefers-reduced-motion: no-preference) {
  .orbit .spin-slow { animation: spin 140s linear infinite; }
  .orbit .spin-mid { animation: spin 36s linear infinite; }
  .orbit .spin-rev { animation: spin 90s linear infinite reverse; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.mark .ring { fill: none; stroke: var(--ink); stroke-width: 3.6; stroke-linecap: round; }
.mark .arrow { fill: var(--ink); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; transform-origin: 48px 52px; transition: transform .9s var(--ease); }
.mark .dot { fill: var(--brand); transform-box: fill-box; transform-origin: center; transition: transform .5s var(--ease), opacity .4s; }
.mark .dot.is-dim { opacity: .28; }
.mark .dot.is-on { transform: scale(1.5); }
.mark .halo { fill: none; stroke: var(--brand); stroke-width: .5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.mark .halo.is-on { animation: halo 2.2s var(--ease) infinite; }
@keyframes halo { 0% { transform: scale(.8); opacity: .7; } 100% { transform: scale(2.2); opacity: 0; } }

/* ── Abschnitte ─────────────────────────────────────────── */
.section { padding-block: clamp(88px, 12vw, 168px); }
.section-head { display: grid; gap: 22px; max-width: 54rem; }
.split-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px 72px; align-items: end; }
.split-head > p { font-weight: 300; font-size: 1.1rem; color: var(--ink-2); }
@media (max-width: 900px) { .split-head { grid-template-columns: 1fr; } }

/* ── FAQ ────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.faq-list { border-top: 1px solid var(--rule-2); }
.faq-list details { border-bottom: 1px solid var(--rule-2); }
.faq-list summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 36px; gap: 24px; align-items: center; padding: 28px 0; font: 300 clamp(1.2rem, 1.9vw, 1.55rem)/1.3 var(--f); color: var(--ink); letter-spacing: -0.02em; border-radius: 8px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list details p { padding: 0 60px 30px 0; max-width: 42em; color: var(--ink-2); }
.p-toggle { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule-2); display: grid; place-items: center; align-self: center; transition: transform .45s var(--ease), background-color .3s, border-color .3s, color .3s; color: var(--ink); }
.p-toggle svg { width: 12px; height: 12px; }
details[open] > summary .p-toggle { transform: rotate(45deg); background: var(--ink); border-color: var(--ink); color: var(--bg); }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } .faq-list details p { padding-right: 0; } }

/* ── Footer ─────────────────────────────────────────────── */
.footer { padding-block: clamp(72px, 9vw, 120px) calc(32px + env(safe-area-inset-bottom, 0px)); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.footer-claim { font: 300 clamp(3rem, 9vw, 8.4rem)/0.95 var(--f); letter-spacing: -0.055em; color: var(--ink); }
.footer-claim span { color: var(--brand); }
.footer-mark { width: clamp(72px, 9vw, 120px); height: clamp(72px, 9vw, 120px); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-top: clamp(48px, 6vw, 88px); padding-top: 36px; border-top: 1px solid var(--rule); }
.footer h4 { font: 500 .7rem/1.2 var(--f); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; }
.footer a { text-decoration: none; color: var(--ink-2); transition: color .25s; }
.footer a:hover { color: var(--brand); }
.footer .about p { max-width: 22em; font-weight: 300; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; font-size: .85rem; color: var(--ink-3); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer .about { grid-column: 1 / -1; } .footer-top { grid-template-columns: 1fr; } .footer-mark { display: none; } }

/* ── Unterseiten ────────────────────────────────────────── */
/* Aktuelle Seite in der Navigation */
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { transform: translateX(-50%) scale(1); }

/* Einstieg: Titel im Stil der Startseite, letzte Wendung in Kupfer; Grafik nur auf breiten Bildschirmen */
.page-hero { position: relative; padding-block: clamp(24px, 5vw, 64px) clamp(40px, 6vw, 80px); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.page-hero-copy { display: grid; gap: 30px; align-content: center; justify-items: start; padding-block: clamp(16px, 4vw, 48px); }
.page-hero-title { font-weight: 300; font-size: clamp(2.75rem, 6.2vw, 6rem); line-height: 1.0; letter-spacing: -0.045em; }
.page-hero-title em { font-style: normal; color: var(--brand); }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.page-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .92rem; color: var(--ink-3); }
.page-hero .orbit-wrap { max-width: 500px; }
.page-hero--compact { padding-bottom: clamp(16px, 3vw, 40px); }
.page-hero--compact .page-hero-grid { grid-template-columns: minmax(0, 1fr); }
.page-hero--compact .page-hero-copy { max-width: 60rem; }
.page-hero--compact .page-hero-title { font-size: clamp(2.3rem, 4.8vw, 4.2rem); line-height: 1.05; letter-spacing: -0.035em; }
@media (max-width: 900px) { .page-hero-grid { grid-template-columns: minmax(0, 1fr); } .page-hero .page-hero-art { display: none; } }
@media (max-width: 420px) { .page-hero-actions .btn { white-space: normal; line-height: 1.25; } }

/* Dunkle, abgerundete Fläche wie der Angebotsbereich der Startseite (zusammen mit .on-dark) */
.band-dark { position: relative; border-radius: clamp(24px, 3vw, 40px); margin-inline: clamp(8px, 1.4vw, 20px); overflow: hidden; }
.band-dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 85% 0%, color-mix(in oklch, var(--brand) 16%, transparent), transparent 70%),
    radial-gradient(40% 40% at 0% 100%, color-mix(in oklch, var(--brand) 8%, transparent), transparent 70%);
}
.band-dark > .wrap { position: relative; }

/* Helle Karte mit runden Ecken (Gegenstück zu den Angebotskarten) */
.tile { position: relative; padding: clamp(24px, 2.6vw, 36px); border: 1px solid var(--rule-2); border-radius: 24px; background: color-mix(in oklch, var(--ink) 2%, transparent); transition: border-color .4s var(--ease), background-color .4s var(--ease); }
a.tile { display: block; text-decoration: none; }
a.tile:hover { border-color: var(--ink-3); background: color-mix(in oklch, var(--ink) 4%, transparent); }

/* Abschluss: Gesprächsangebot als dunkle Karte wie der Kontaktbereich der Startseite */
.cta-section { padding-top: 0; }
.cta-card { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 88px); align-items: end; padding: clamp(24px, 5.5vw, 88px); border-radius: clamp(24px, 3vw, 40px); }
.cta-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(55% 60% at 0% 0%, color-mix(in oklch, var(--brand) 18%, transparent), transparent 70%); }
.cta-card > * { position: relative; }
.cta-card-body { display: grid; gap: 24px; justify-items: start; }
.cta-card-body > p { font-weight: 300; font-size: 1.1rem; max-width: 34em; }
.cta-card-body > .cta-card-contact { font-weight: 400; font-size: .95rem; color: var(--ink-3); }
.cta-card-contact a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--brand), var(--brand)) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease); padding-bottom: 2px; }
.cta-card-contact a:hover { background-size: 100% 1px; }
@media (max-width: 860px) { .cta-card { grid-template-columns: minmax(0, 1fr); align-items: start; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal.pre { opacity: 1; transform: none; }
}
