/* ════════════════════════════════════════════════════════════════
   GOLDSCHMIEDE STECKENSTEIN — LICHTFASSUNG
   Design-Tokens + geteiltes Layout-/Motion-System (BAUAUFTRAG.md §4/§5)
   ════════════════════════════════════════════════════════════════ */

:root{
  --color-bg:#0c0a07;
  --color-bg-soft:#161209;
  --color-bg-warm:#1f1006;
  --color-fg:#f3ead9;
  --color-muted:#b9ac8f;
  --color-gold:#c9a24d;
  --color-gold-light:#e8cf94;
  --color-gold-deep:#8a6a2c;
  --color-line:rgba(201,162,77,.22);
  --radius-sm:.3rem; --radius:.6rem; --radius-lg:1.1rem;
  --shadow:0 20px 60px rgb(0 0 0/.55); --shadow-glow:0 0 44px rgb(201 162 77/.16);
  --space-xs:.5rem; --space-sm:1rem; --space-md:1.5rem; --space-lg:2.5rem; --space-xl:4rem; --space-2xl:6rem;
  --text-eyebrow:.8rem; --text-body:1.0625rem; --text-lead:clamp(1.15rem,1.4vw,1.35rem);
  --text-h4:clamp(1.15rem,1.4vw,1.35rem); --text-h3:clamp(1.25rem,2.2vw,1.6rem);
  --text-h2:clamp(1.5rem,3.5vw,2.25rem); --text-h1:clamp(2rem,5vw,3.5rem);
  --lh-tight:1.08; --lh-snug:1.25; --lh-body:1.6;
  --tracking-tight:-.02em; --tracking-label:.14em;
  --dur:.4s; --ease-out:cubic-bezier(.16,1,.3,1); --focus:#e8cf94;
  --glowHue:28; --glowX:24%; --glowY:82%; --glowX2:78%; --glowY2:26%; --glowA:.55;
  color-scheme: dark;
}
html[data-theme="light"]{
  --color-bg:#faf6ee; --color-bg-soft:#f1e9d8; --color-bg-warm:#f6ead2;
  --color-fg:#1c1509; --color-muted:#6b5c3f;
  --color-gold:#a9803a; --color-gold-light:#8a6a2c; --color-gold-deep:#6b4f20;
  --color-line:rgba(138,106,44,.28);
  --shadow:0 20px 50px rgb(90 70 30/.16); --shadow-glow:0 0 40px rgb(169 128 58/.14);
  color-scheme: light;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; background:var(--color-bg); color:var(--color-fg);
  font-family:"Source Sans 3",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:var(--text-body); line-height:var(--lh-body);
  -webkit-font-smoothing:antialiased; overflow-x:clip;
  transition:background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
h1,h2,h3,h4{ font-family:"Playfair Display",serif; font-weight:600; line-height:var(--lh-tight); letter-spacing:var(--tracking-tight); margin:0; }
h1{ font-size:var(--text-h1); font-weight:700; }
h2{ font-size:var(--text-h2); }
h3{ font-size:var(--text-h3); font-weight:600; }
h4{ font-size:var(--text-h4); font-weight:600; }
p{ margin:0; max-width:65ch; }
a{ color:inherit; }
img{ max-width:100%; height:auto; display:block; }
:focus-visible{ outline:2px solid var(--focus); outline-offset:2px; }
.sr-only{ position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0; }

.wrap{ max-width:78rem; margin-inline:auto; padding-inline:1.25rem; }
@media(min-width:768px){ .wrap{ padding-inline:2rem; } }

.eyebrow{
  display:inline-flex; align-items:center; gap:.5rem; font-size:var(--text-eyebrow); font-weight:600;
  letter-spacing:var(--tracking-label); text-transform:uppercase; color:var(--color-gold);
}
.eyebrow::before{ content:""; width:1.4rem; height:1px; background:var(--color-gold); display:inline-block; }
.lead{ font-size:var(--text-lead); font-weight:500; color:var(--color-muted); max-width:52ch; }
.muted{ color:var(--color-muted); }
.italic-accent{ font-style:italic; color:var(--color-gold-light); }

section{ position:relative; padding-block:4rem; }
@media(min-width:768px){ section{ padding-block:7rem; } }
.section-head{ margin-bottom:2.5rem; max-width:44rem; }
.section-head.center{ margin-inline:auto; text-align:center; }

/* ── Facet-Signatur (wiederkehrendes Element, REF-A) ─────────────── */
.facet-divider{ width:100%; height:14px; display:block; opacity:.55; }
.facet-divider path{ stroke:var(--color-gold); stroke-width:1; fill:none; }
.facet-corner{ position:absolute; width:34px; height:34px; opacity:.65; pointer-events:none; }
.facet-corner path{ stroke:var(--color-gold); stroke-width:1.2; fill:none; }
.facet-corner.tl{ top:0; left:0; }
.facet-corner.tr{ top:0; right:0; transform:scaleX(-1); }
.facet-corner.bl{ bottom:0; left:0; transform:scaleY(-1); }
.facet-corner.br{ bottom:0; right:0; transform:scale(-1,-1); }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn{
  display:inline-flex; align-items:center; gap:.6rem; padding:.85rem 1.6rem; border-radius:var(--radius-sm);
  font-weight:600; font-size:.95rem; letter-spacing:.02em; text-decoration:none; cursor:pointer; border:1px solid transparent;
  transition:transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .3s, color .3s, border-color .3s;
  will-change:transform;
}
.btn-primary{ background:var(--color-gold); color:#160f04; }
.btn-primary:hover,.btn-primary:focus-visible{ background:var(--color-gold-light); box-shadow:var(--shadow-glow); transform:translateY(-2px); }
.btn-ghost{ background:transparent; color:var(--color-fg); border-color:var(--color-line); }
.btn-ghost:hover,.btn-ghost:focus-visible{ border-color:var(--color-gold); color:var(--color-gold-light); transform:translateY(-2px); }

/* ── Header / Nav ─────────────────────────────────────────────────── */
.site-header{
  position:fixed; inset:0 0 auto 0; z-index:100; padding-block:1.1rem;
  color:#fff; background:transparent; transition:background .4s var(--ease-out), padding .4s, box-shadow .4s, border-color .4s;
  border-bottom:1px solid transparent;
}
.site-header.scrolled{
  background:color-mix(in srgb, var(--color-bg) 88%, transparent); backdrop-filter:blur(14px);
  color:var(--color-fg); padding-block:.75rem; border-color:var(--color-line); box-shadow:0 8px 30px rgb(0 0 0/.25);
}
html[data-theme="light"] .site-header{ color:#fff; }
html[data-theme="light"] .site-header.scrolled{ color:var(--color-fg); }
.site-header__row{ display:flex; align-items:center; justify-content:space-between; gap:1.5rem; }
.brand{ display:inline-flex; align-items:center; gap:.65rem; text-decoration:none; color:inherit; flex:none; }
.brand svg{ width:32px; height:32px; flex:none; }
.brand-word{ font-family:"Playfair Display",serif; font-weight:600; font-size:1.05rem; letter-spacing:.04em; white-space:nowrap; }
.nav{ display:none; align-items:center; gap:2rem; }
@media(min-width:900px){ .nav{ display:flex; } }
.nav a{ text-decoration:none; font-size:.92rem; font-weight:600; letter-spacing:.02em; color:inherit; opacity:.86; position:relative; padding-block:.2rem; }
.nav a::after{ content:""; position:absolute; left:0; right:100%; bottom:-2px; height:1px; background:var(--color-gold); transition:right .35s var(--ease-out); }
.nav a:hover, .nav a[aria-current="page"]{ opacity:1; }
.nav a:hover::after, .nav a[aria-current="page"]::after{ right:0; }
.nav-cta{ display:none; }
@media(min-width:900px){ .nav-cta{ display:inline-flex; } }
.theme-toggle{
  width:38px; height:38px; border-radius:999px; border:1px solid var(--color-line); background:transparent; color:inherit;
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer; flex:none;
}
.theme-toggle svg{ width:18px; height:18px; }
.burger{ display:inline-flex; width:42px; height:42px; align-items:center; justify-content:center; border-radius:999px; border:1px solid var(--color-line); background:transparent; color:inherit; cursor:pointer; }
@media(min-width:900px){ .burger{ display:none; } }
.burger svg{ width:20px; height:20px; }

.mobile-menu{
  position:fixed; inset:0; z-index:99; background:var(--color-bg); color:var(--color-fg);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2rem;
  opacity:0; visibility:hidden; transition:opacity .4s var(--ease-out);
}
.mobile-menu.is-open{ opacity:1; visibility:visible; }
.mobile-menu a{ font-family:"Playfair Display",serif; font-size:1.9rem; text-decoration:none; color:inherit; }
.mobile-menu .btn{ margin-top:1rem; }

/* ── Hintergrund-Reise (fixed, scroll-gekoppelt, REF-C Pflicht) ──── */
.bg-scene{ position:fixed; inset:0; z-index:-2; pointer-events:none; overflow:hidden; }
.bg-scene__glow{
  position:absolute; inset:-15%;
  background:
    radial-gradient(58% 58% at var(--glowX) var(--glowY), hsl(var(--glowHue) 72% 46% / var(--glowA)), transparent 68%),
    radial-gradient(46% 46% at var(--glowX2) var(--glowY2), hsl(calc(var(--glowHue) + 16) 60% 42% / .32), transparent 62%);
  animation:bgBreathe 14s ease-in-out infinite;
}
@keyframes bgBreathe{ 0%,100%{ transform:scale(1); opacity:1; } 50%{ transform:scale(1.055); opacity:.86; } }
.bg-scene__facets{ position:absolute; inset:-10%; opacity:.1; width:120%; height:120%; }
.bg-scene__facets path{ stroke:var(--color-gold); stroke-width:.6; fill:none; }
html[data-theme="light"] .bg-scene__glow{ opacity:.5; }

/* ── Karten ───────────────────────────────────────────────────────── */
.grid-cards{ display:grid; grid-template-columns:1fr; gap:1.5rem; }
@media(min-width:640px){ .grid-cards{ grid-template-columns:repeat(2,1fr); } }
.card{
  background:var(--color-bg-soft); border:1px solid var(--color-line); border-radius:var(--radius-lg);
  overflow:hidden; display:flex; flex-direction:column; box-shadow:var(--shadow); text-decoration:none; color:inherit;
  transition:transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s;
}
.card:hover, .card:focus-visible{ transform:translateY(-6px); border-color:var(--color-gold); box-shadow:var(--shadow), var(--shadow-glow); }
.card__media{ aspect-ratio:4/3; overflow:hidden; }
.card__media img{ width:100%; height:100%; object-fit:cover; transition:transform .8s var(--ease-out); }
.card:hover .card__media img{ transform:scale(1.06); }
.card__body{ padding:1.5rem; display:flex; flex-direction:column; gap:.6rem; flex:1; }
.card__body h3{ font-size:1.2rem; }
.card__body p{ font-size:.96rem; color:var(--color-muted); }
.card__link{ margin-top:auto; font-size:.85rem; font-weight:600; color:var(--color-gold); letter-spacing:.02em; }

/* ── Bild-Reveal "löst sich auf + zoomt rein" (REF-C §3) ─────────── */
[data-img-resolve]{
  clip-path:inset(10% round 1.2rem); transform:scale(1.06); opacity:.4; border-radius:1.2rem; overflow:hidden;
  transition:clip-path 1.1s cubic-bezier(.22,.61,.21,1), transform 1.2s cubic-bezier(.22,.61,.21,1), opacity .9s;
}
[data-img-resolve].in{ clip-path:inset(0 round 1.2rem); transform:scale(1); opacity:1; }
.arch-frame{ position:relative; border-radius:1.4rem 1.4rem .6rem .6rem; overflow:hidden; box-shadow:var(--shadow); }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer{ background:var(--color-bg-soft); border-top:1px solid var(--color-line); padding-block:4rem 2rem; }
.footer-grid{ display:grid; grid-template-columns:1fr; gap:2.5rem; padding-bottom:2.5rem; border-bottom:1px solid var(--color-line); }
@media(min-width:768px){ .footer-grid{ grid-template-columns:1.2fr 1fr 1fr; gap:2rem; } }
.footer-grid h4{ font-size:.85rem; text-transform:uppercase; letter-spacing:var(--tracking-label); color:var(--color-gold); margin-bottom:1rem; }
.footer-grid ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.6rem; }
.footer-grid a{ text-decoration:none; color:var(--color-muted); font-size:.94rem; }
.footer-grid a:hover{ color:var(--color-gold-light); }
.footer-bottom{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1rem; padding-top:1.75rem; margin-bottom:15px; }
.footer-links{ display:flex; flex-wrap:wrap; gap:1.25rem; }
.footer-links a{ font-size:.85rem; color:var(--color-muted); text-decoration:none; }
.footer-links a:hover{ color:var(--color-gold-light); }
.demo-note{ font-size:.78rem; color:var(--color-muted); opacity:.7; max-width:60ch; margin-top:1rem; }

/* ── Loading-Animation ────────────────────────────────────────────── */
.loader{ position:fixed; inset:0; z-index:9999; background:var(--color-bg); display:flex; align-items:center; justify-content:center; transition:opacity .6s var(--ease-out), visibility .6s; }
.loader svg{ width:64px; height:64px; }
.loader path{ stroke:var(--color-gold); stroke-width:1.4; fill:none; stroke-dasharray:240; stroke-dashoffset:240; animation:loaderDraw 1.1s var(--ease-out) forwards; }
@keyframes loaderDraw{ to{ stroke-dashoffset:0; } }
.loader.is-hidden{ opacity:0; visibility:hidden; pointer-events:none; }

/* ── Seitenübergang (Fade beim internen Link-Klick) ──────────────── */
.page-veil{ position:fixed; inset:0; z-index:9998; background:var(--color-bg); opacity:0; pointer-events:none; transition:opacity .5s var(--ease-out); }
.page-veil.is-active{ opacity:1; }

/* ── Reveal-Utilities ─────────────────────────────────────────────── */
[data-reveal] > *{ display:block; }
[data-split]{ display:inline-block; }
.word{ display:inline-block; white-space:nowrap; }
.char{ display:inline-block; will-change:transform; }

/* ── Reduced-Motion (dämpfen, nicht killen — REF-C/F) ────────────── */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto!important; }
  .marquee,[data-parallax],[data-depth]{ animation:none!important; }
  .bg-scene__glow{ animation-duration:90s!important; }
  .loader{ transition-duration:.2s; }
}

/* ── CDN-/GSAP-Fail-Safe ──────────────────────────────────────────── */
.no-anim [data-reveal] > *, .no-anim [data-split], .no-anim [data-depth], .no-anim [data-img-resolve]{
  opacity:1!important; transform:none!important; clip-path:none!important;
}
.no-anim .loader{ display:none; }
