/* =====================================================================
   Lindens 3D Druck — Upgrade-Layer (5 Runden)
   Wird NACH dem seitenspezifischen <style> geladen und ergänzt diesen.
   Behält den alten Look — fügt Aurora, Theme, Reveals, Micro-Inter. hinzu.
   ===================================================================== */

/* ---------- Theme-Variablen ---------------------------------------- */
:root {
  --bg-page: #f7faf9;
  --bg-elev: #ffffff;
  --aurora-opacity: 0.9;
  --rev-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

/* DUNKLER MODUS — bewusst klar abgesetzt (Peters Beschwerde).
   Sehr tiefes, fast schwarzes Petrol-Schwarz statt eines lauwarmen
   Dunkelgrau. Auf Mobile eindeutig als "dunkel" erkennbar. */
html[data-theme="dark"] {
  --primary: #2fd9cf;
  --primary-deep: #04201e;
  --primary-focus: #43e6dc;
  --primary-on-dark: #5af0e6;
  --primary-soft: #0e2e2b;
  --primary-glow: rgba(67, 230, 220, 0.22);
  --accent-warm: #e3b888;

  --canvas: #061a18;
  --canvas-parchment: #0a2724;
  --canvas-cream: #0c2320;
  --surface-pearl: #0a2421;
  --surface-tile-1: #041513;
  --surface-tile-2: #051a17;
  --surface-tile-3: #03100f;
  --surface-black: #020c0b;

  --ink: #e9f5f3;
  --ink-strong: #f4fbfa;
  --ink-muted-80: #b9d4d0;
  --ink-muted-48: #7fa39e;
  --body-muted: #9bbcb7;
  --hairline: #1c3b37;

  --bg-page: #04100f;
  --bg-elev: #0a2421;
  --aurora-opacity: 1;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 16px 44px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--primary-focus);
  --shadow-image: 0 30px 60px rgba(0, 0, 0, 0.55);
  --shadow-image-dark: 0 30px 60px rgba(0, 0, 0, 0.7);
}

html { background: var(--bg-page); }
body {
  background: var(--bg-page) !important;
  color: var(--ink);
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Theme-abhängige Flächen sanft umfärben */
.hero, .trust-bar, .tile.light, .werkstatt, .wish-section, .page-header {
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Im Dark-Mode den hellen Hero-Hintergrund tauschen */
html[data-theme="dark"] .hero { background: transparent !important; }
html[data-theme="dark"] .process-section {
  background: linear-gradient(180deg, #061a18 0%, #04100f 100%) !important;
}
html[data-theme="dark"] .page-header {
  background: linear-gradient(180deg, var(--canvas-cream) 0%, transparent 80%) !important;
}
html[data-theme="dark"] .filter-bar { background: var(--canvas); }
html[data-theme="dark"] .global-nav {
  background: rgba(4, 19, 17, 0.86);
  border-bottom-color: rgba(67, 230, 220, 0.16);
}
html[data-theme="dark"] .sub-nav {
  background: rgba(8, 33, 30, 0.9);
}
html[data-theme="dark"] .store-card,
html[data-theme="dark"] .testimonial-card,
html[data-theme="dark"] .review-card {
  background: var(--bg-elev);
}
html[data-theme="dark"] .hero-badge { background: var(--primary-soft); }

/* Wunsch-Karte: im Dark-Mode keine harte weiße Fläche auf Schwarz.
   Sanfte, leicht erhöhte Petrol-Surface mit weichem Kontrast. */
html[data-theme="dark"] {
  --wish-card-bg: linear-gradient(135deg, #0d2a27 0%, #0a221f 100%);
}
html[data-theme="dark"] .wish-inner {
  border-color: rgba(67, 230, 220, 0.28);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

/* Process-Schritt-Icon: im Light-Mode weiß, im Dark-Mode dunkle
   Surface — sonst schwebt ein greller weißer Kreis im Dunkeln. */
html[data-theme="dark"] .process-step .step-icon {
  background: var(--bg-elev);
}
html[data-theme="dark"] .process-step .step-photo {
  border-color: rgba(67, 230, 220, 0.14);
}

/* Newsletter-Sektion: im Light-Mode ein türkiser Akzent-Block.
   Im Dark-Mode wäre voll gesättigtes Teal über die ganze Breite zu
   grell — daher eine ruhige tiefe Petrol-Fläche mit dezentem
   Teal-Schimmer. */
html[data-theme="dark"] .newsletter {
  background: linear-gradient(135deg, #0a2522 0%, #082c28 100%);
  border-top: 1px solid rgba(67, 230, 220, 0.14);
  border-bottom: 1px solid rgba(67, 230, 220, 0.14);
}
html[data-theme="dark"] .newsletter h2 { color: var(--ink-strong); }
html[data-theme="dark"] .newsletter p { color: var(--ink-muted-80); }
html[data-theme="dark"] .newsletter-form input {
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
html[data-theme="dark"] .newsletter-form input::placeholder {
  color: var(--ink-muted-48);
}
html[data-theme="dark"] .newsletter-form button {
  background: var(--primary-focus);
  color: var(--primary-deep);
}
html[data-theme="dark"] .newsletter-form button:hover {
  background: var(--primary-on-dark);
}

/* Etsy-CTA-Karte im Bewertungs-Grid (vorher Inline-Style mit
   hartem Teal-Gradient → theme-aware gemacht).
   Doppelte Klasse für Spezifitaet über die spätere .review-card-Regel. */
.review-card.review-card-cta {
  display: flex; flex-direction: column; justify-content: center;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-focus));
  color: #fff;
}
.review-card-cta .rcc-arrow { font-size: 32px; line-height: 1; margin-bottom: 10px; }
.review-card-cta strong { font-family: 'Fraunces', serif; font-size: 19px; }
.review-card-cta span { font-size: 13px; opacity: 0.9; margin-top: 4px; }
html[data-theme="dark"] .review-card.review-card-cta {
  background: linear-gradient(135deg, #0d2a27 0%, #0a221f 100%);
  color: var(--ink-strong);
  border: 1px solid rgba(67, 230, 220, 0.22);
}
html[data-theme="dark"] .review-card-cta .rcc-arrow,
html[data-theme="dark"] .review-card-cta strong {
  color: var(--primary-focus);
}
html[data-theme="dark"] .review-card-cta span {
  color: var(--ink-muted-80);
}

/* ---------- Aurora-Hintergrund (Runde 1) --------------------------- */
#aurora-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: var(--aurora-opacity);
  /* leichtes Weichzeichnen kaschiert die niedrige Render-Auflösung */
  filter: blur(38px) saturate(1.1);
  transition: opacity 0.5s ease;
}
@media (max-width: 560px) {
  #aurora-bg { filter: blur(30px) saturate(1.1); }
}

/* Aller Seiteninhalt liegt ÜBER dem Aurora-Canvas */
body > *:not(#aurora-bg) { position: relative; z-index: 1; }

/* Sticky-Sub-Nav darf NICHT von der Regel oben auf position:relative
   gekippt werden — sonst rutscht sie um top:70px nach unten und
   überlappt das Hero-Badge auf Mobile. */
.sub-nav { position: sticky !important; z-index: 99 !important; }

/* Damit der Aurora-Schimmer durchscheint, sind die großen
   Sektionsflächen leicht transluzent statt 100% deckend. */
.hero { background: rgba(250, 250, 250, 0.55); }
.trust-bar { background: rgba(255, 255, 255, 0.7); }
html[data-theme="dark"] .trust-bar { background: rgba(6, 26, 24, 0.72); }
.tile.light { background: rgba(255, 255, 255, 0.72); }
html[data-theme="dark"] .tile.light { background: rgba(6, 26, 24, 0.72); }
.werkstatt { background: rgba(255, 255, 255, 0.68); }
html[data-theme="dark"] .werkstatt { background: rgba(6, 26, 24, 0.7); }

@media (prefers-reduced-motion: reduce) {
  #aurora-bg { filter: blur(44px) saturate(1.05); }
}

/* ---------- Theme-Toggle-Button ------------------------------------ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background-color 0.18s var(--rev-ease),
              border-color 0.18s var(--rev-ease),
              transform 0.14s ease-out;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--primary-focus);
}
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .ico-sun { display: none; }
.theme-toggle .ico-moon { display: block; }
html[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
.theme-toggle:focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: 2px;
}

/* ---------- Scroll-Reveal (Runde 2) -------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--rev-ease), transform 0.7s var(--rev-ease);
  will-change: opacity, transform;
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
[data-reveal][data-reveal-delay="1"].is-revealed { transition-delay: 0.07s; }
[data-reveal][data-reveal-delay="2"].is-revealed { transition-delay: 0.14s; }
[data-reveal][data-reveal-delay="3"].is-revealed { transition-delay: 0.21s; }
[data-reveal][data-reveal-delay="4"].is-revealed { transition-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Nav-Shrink bei Scroll ---------------------------------- */
.global-nav { transition: padding 0.25s var(--rev-ease), background-color 0.3s ease; }
.global-nav.is-scrolled .nav-inner { padding-top: 9px; padding-bottom: 9px; }
.global-nav.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
.nav-inner { transition: padding 0.25s var(--rev-ease); }

/* ---------- Micro-Interactions (Runde 3) --------------------------- */
[data-magnetic] { transition: transform 0.22s var(--rev-ease); }
[data-tilt] { transition: transform 0.35s var(--rev-ease), box-shadow 0.35s var(--rev-ease); }

/* Press-Feedback für alle CTAs (instant feedback) */
.btn-primary:active,
.btn-secondary:active,
.wish-cta:active,
.btn-shop:active,
.sticky-mobile-cta:active,
.nav-links a.cta:active,
.sub-nav-links .price-cta:active,
.filter-chip:active {
  transform: scale(0.97);
}
.btn-primary, .btn-secondary, .wish-cta, .btn-shop,
.nav-links a.cta, .sub-nav-links .price-cta, .filter-chip {
  transition: background-color 0.18s var(--rev-ease),
              color 0.18s var(--rev-ease),
              border-color 0.18s var(--rev-ease),
              box-shadow 0.2s var(--rev-ease),
              transform 0.13s ease-out;
}

/* Karten-Glanz beim Hover (Runde 3) */
@media (hover: hover) and (pointer: fine) {
  .store-card { transition: transform 0.3s var(--rev-ease), box-shadow 0.3s var(--rev-ease), border-color 0.2s ease; }
  .store-card-img img { transition: transform 0.5s var(--rev-ease); }
  .gallery-item { transition: transform 0.3s var(--rev-ease), box-shadow 0.3s var(--rev-ease); }
}

/* Link-Unterstreichung animiert (Runde 3) */
.nav-links a:not(.cta),
.sub-nav-links a:not(.price-cta):not(.active),
.footer-top a {
  position: relative;
}

/* Fokus-Sichtbarkeit (Runde 4 — Politur) */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Galerie: Studio-Sektion Theme-fix ---------------------- */
html[data-theme="dark"] .gallery-item[style*="cursor:default"] {
  background: var(--canvas-parchment);
}

/* ---------- Reviews-Block (neu auf der Startseite) ----------------- */
.reviews-real {
  padding: 96px 24px;
  background: var(--canvas-cream);
  position: relative;
}
.reviews-real-inner { max-width: 1100px; margin: 0 auto; }
.reviews-real-head { text-align: center; margin-bottom: 44px; }
.reviews-real-head .eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--primary-focus); margin-bottom: 12px;
}
.reviews-real-head h2 {
  font-family: 'Fraunces', serif;
  font-size: 44px; font-weight: 600; line-height: 1.1;
  letter-spacing: -0.5px; margin: 0 0 14px; color: var(--ink-strong);
}
.reviews-real-head p {
  font-size: 16px; color: var(--ink-muted-80); margin: 0 auto;
  max-width: 540px; line-height: 1.5;
}
.reviews-score {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 22px; padding: 10px 20px;
  background: var(--bg-elev); border: 1px solid var(--hairline);
  border-radius: 9999px; box-shadow: var(--shadow-card);
}
.reviews-score .big {
  font-family: 'Fraunces', serif; font-size: 30px; font-weight: 600;
  color: var(--primary); line-height: 1;
}
.reviews-score .rs-stars { color: var(--accent-warm); font-size: 18px; letter-spacing: 2px; }
.reviews-score .rs-meta { font-size: 13px; color: var(--ink-muted-48); }
.reviews-real-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 900px) { .reviews-real-grid { grid-template-columns: 1fr; } }
.review-card {
  background: var(--bg-elev); border-radius: 18px; padding: 26px;
  box-shadow: var(--shadow-card); border: 1px solid transparent;
  transition: transform 0.3s var(--rev-ease), box-shadow 0.3s var(--rev-ease);
}
@media (hover: hover) and (pointer: fine) {
  .review-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
}
.review-card .rc-stars { color: var(--accent-warm); font-size: 15px; letter-spacing: 2px; margin-bottom: 12px; }
.review-card .rc-text {
  font-size: 15px; line-height: 1.62; color: var(--ink-muted-80); margin: 0 0 18px;
}
.review-card .rc-foot { display: flex; align-items: center; gap: 12px; }
.review-card .rc-av {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-focus));
  color: #fff; font-weight: 600; font-size: 14px; flex-shrink: 0;
}
html[data-theme="dark"] .review-card .rc-av { color: var(--primary-deep); }
.review-card .rc-name { font-size: 14px; font-weight: 600; color: var(--ink-strong); }
.review-card .rc-date { font-size: 12px; color: var(--ink-muted-48); }
.reviews-real .reviews-cta { text-align: center; margin-top: 36px; }

@media (max-width: 1068px) {
  .reviews-real-head h2 { font-size: 34px; }
}
@media (max-width: 640px) {
  .reviews-real { padding: 60px 18px; }
  .reviews-real-head h2 { font-size: 26px; }
  .review-card { padding: 22px; }
}

/* ---------- Mobile-Feinschliff (Runde 5) --------------------------- */
@media (max-width: 640px) {
  /* Nav: Logo links, Links scrollbar in der Mitte, Actions fix rechts */
  .nav-inner { gap: 8px; }
  .nav-logo { flex-shrink: 0; }
  .nav-links {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    max-width: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-actions { flex-shrink: 0; }
  .theme-toggle { width: 34px; height: 34px; }
  .theme-toggle svg { width: 16px; height: 16px; }
  /* Reveals auf Mobile etwas kürzer — weniger Scroll-Verzögerung */
  [data-reveal] { transform: translateY(16px); }
}

/* Tablet-Zwischenstufe — Nav bleibt vollständig */
@media (min-width: 641px) and (max-width: 860px) {
  .nav-links a { padding: 8px 9px; font-size: 12px; }
}

/* Bild-Lazy-Fade — verhindert harten Pop-in (Runde 5) */
.store-card-img, .gallery-item, .tile-image, .werkstatt-image, .hero-image {
  background-color: var(--canvas-parchment);
}

/* Hero-Logo: weiches Frame statt hartem JPEG-Kasten (Runde 4) */
.hero-logo-display img {
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(10, 48, 48, 0.16);
}
html[data-theme="dark"] .hero-logo-display img {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  /* das JPEG hat hellen Hintergrund — im Dark-Mode minimal abdunkeln,
     damit es nicht als greller Block wirkt */
  filter: brightness(0.97) saturate(1.04);
}

/* Reduzierte Bewegung — alle Hover-Transforms entschärfen */
@media (prefers-reduced-motion: reduce) {
  [data-magnetic], [data-tilt] { transition: none !important; }
  .store-card, .gallery-item, .review-card { transition: box-shadow 0.2s ease !important; }
}
