/* =========================================================
   FESTHELDEN — BASE CSS
   Geteilte Grundlage von index.html, katalog.html, admin.html
   Brand: Pfälzer Weinberg — Gold / Olive / Cream
   Display: Billie Eilish (Script) · Body: Montserrat
========================================================= */

/* ---- DISPLAY FONT (self-hosted) ---- */
@font-face{
  font-family: "Billie Eilish";
  src: url("../fonts/billie-eilish.otf") format("opentype"),
       url("../fonts/billie-eilish.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   TOKENS
========================================================= */
:root{
  /* Gold (Primary) */
  --gold:        #ba8738;
  --gold-deep:   #8e6627;
  --gold-bright: #d09f4f;
  --gold-soft:   #f7eedc;
  --gold-mist:   #faf5ea;

  /* Olive / Dark (Secondary) */
  --dark:        #444526;
  --dark-deep:   #32331c;
  --dark-soft:   #5a5b30;

  /* Cream (Tertiary) */
  --cream:       #f5f1e8;
  --cream-deep:  #ebe5d3;
  --white:       #ffffff;

  /* Brand gradient */
  --gradient: linear-gradient(150deg, #4d4e2b 0%, #3a3b21 55%, #2c2d18 100%);

  /* Ink scale (warm, an Cream angepasst) */
  --ink-900: #2a2a1f;
  --ink-700: #4a4a3a;
  --ink-500: #6a6a5a;
  --ink-400: #9a9a8a;
  --ink-300: #c4c0b3;
  --ink-200: #e2ddcf;
  --ink-100: #f5f1e8;

  /* Lines */
  --line:        rgba(68,69,38,0.10);
  --line-strong: rgba(68,69,38,0.18);
  --line-dark:   rgba(255,255,255,0.12);

  /* Status (Ampel) */
  --green:      #5a7d3d;
  --green-soft: #ecf2e2;
  --orange:     #c87b18;
  --orange-soft:#fbeed3;
  --red:        #b8392a;
  --red-soft:   #f7dcd8;

  /* Fonts */
  --font-display:   "Billie Eilish", "Syne", system-ui, sans-serif;
  --font-body:      "Montserrat", system-ui, -apple-system, sans-serif;
  --font-highlight: "Billie Eilish", cursive; /* San Brainy Slot — File ausstehend */

  /* Layout */
  --maxw:  1280px;
  --pad-x: clamp(20px, 4vw, 56px);

  /* Radii */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows (gold/olive getönt, kein reines Schwarz) */
  --shadow-sm: 0 2px 10px -4px rgba(50,51,28,0.18);
  --shadow:    0 14px 40px -16px rgba(50,51,28,0.28);
  --shadow-lg: 0 30px 70px -28px rgba(50,51,28,0.40);
  --shadow-gold: 0 16px 40px -14px rgba(186,135,56,0.45);

  /* Easing */
  --ease: cubic-bezier(.16,1,.3,1);
}

/* =========================================================
   RESET
========================================================= */
*{ box-sizing: border-box; margin: 0; padding: 0 }
html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100% }
body{
  background: var(--white);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block }
a{ color: inherit; text-decoration: none }
button{ font-family: inherit; cursor: pointer; border: none; background: none; color: inherit }
input, textarea, select{ font-family: inherit }
::selection{ background: var(--gold); color: #fff }

/* Headings: Montserrat tight als sichere Default-Basis.
   Script-Display (Billie Eilish) wird gezielt via .display / Sektions-Selektoren gesetzt. */
h1,h2,h3,h4,h5,h6{
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink-900);
}

/* Script-Display Utility */
.display{
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.0;
}
.display em{ font-style: normal; color: var(--gold) }

/* =========================================================
   LAYOUT
========================================================= */
.container{
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section{ padding: clamp(72px, 10vw, 140px) 0 }

/* Custom scrollbar (dezent) */
*{ scrollbar-color: var(--ink-300) transparent }
::-webkit-scrollbar{ width: 11px; height: 11px }
::-webkit-scrollbar-thumb{ background: var(--ink-300); border-radius: 99px; border: 3px solid var(--white) }
::-webkit-scrollbar-thumb:hover{ background: var(--gold) }

/* =========================================================
   EYEBROW (sparsam einsetzen — max. 1 je 3 Sektionen)
========================================================= */
.eyebrow{
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before{
  content: "";
  width: 26px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}
.eyebrow.on-dark{ color: var(--gold-bright) }
.eyebrow.on-dark::before{ background: var(--gold-bright) }

/* =========================================================
   BUTTONS
========================================================= */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 15px 26px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: transform .3s var(--ease), background .25s var(--ease), box-shadow .3s var(--ease), color .2s, border-color .2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-body);
}
.btn svg{ width: 16px; height: 16px; flex-shrink: 0; transition: transform .3s var(--ease) }
.btn:hover svg{ transform: translateX(3px) }
.btn:active{ transform: translateY(1px) scale(.99) }

.btn-primary{
  background: var(--gold);
  color: #fff !important;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover{
  background: var(--gold-deep);
  transform: translateY(-2px);
  box-shadow: 0 22px 50px -14px rgba(186,135,56,0.55);
}
.btn-ghost{
  background: transparent;
  color: var(--ink-900);
  border: 1.5px solid var(--line-strong);
}
.btn-ghost:hover{
  border-color: var(--gold);
  color: var(--gold-deep);
  background: var(--gold-mist);
}
.btn-ghost-dark{
  background: rgba(255,255,255,0.04);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.28);
}
.btn-ghost-dark:hover{
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  background: rgba(255,255,255,0.08);
}
.btn-white{
  background: #fff;
  color: var(--gold-deep) !important;
  box-shadow: var(--shadow);
}
.btn-white:hover{ background: var(--cream); transform: translateY(-2px) }
.btn-green{ background: var(--green); color: #fff }
.btn-green:hover{ background: #4a6a30 }
.btn-danger{ background: var(--red); color: #fff }
.btn-danger:hover{ background: #9c2e21 }

.btn-xl{ padding: 19px 36px; font-size: 15px; border-radius: var(--radius) }
.btn-xl svg{ width: 18px; height: 18px }
.btn-sm{ padding: 8px 13px; font-size: 11px; border-radius: var(--radius-sm) }

/* =========================================================
   REVEAL ON SCROLL (IntersectionObserver setzt .in)
========================================================= */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
.reveal.in{ opacity: 1; transform: none }

.reveal-stagger > *{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.reveal-stagger.in > *{ opacity: 1; transform: none }
.reveal-stagger.in > *:nth-child(1){ transition-delay: .04s }
.reveal-stagger.in > *:nth-child(2){ transition-delay: .10s }
.reveal-stagger.in > *:nth-child(3){ transition-delay: .16s }
.reveal-stagger.in > *:nth-child(4){ transition-delay: .22s }
.reveal-stagger.in > *:nth-child(5){ transition-delay: .28s }
.reveal-stagger.in > *:nth-child(6){ transition-delay: .34s }
.reveal-stagger.in > *:nth-child(7){ transition-delay: .40s }
.reveal-stagger.in > *:nth-child(8){ transition-delay: .46s }

/* =========================================================
   WEIN-SVG SEKTION-AKZENTE (Ecken, rotiert, dezent)
   .wine-accent als positioniertes Element in relative Sektion
========================================================= */
.wine-accent{
  position: absolute;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  opacity: .30;
  z-index: 0;
}
.wine-accent.gold-filter{
  /* dunkle SVGs (wine-5/6) goldfärben */
  filter: brightness(0) saturate(100%) invert(58%) sepia(38%) saturate(640%) hue-rotate(2deg) brightness(94%) contrast(86%);
}

/* =========================================================
   LOADING SCREEN — Festhelden Script-Wordmark + Gold-Ring
========================================================= */
.loader{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
  overflow: hidden;
}
.loader::before{
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 50% 42%, rgba(208,159,79,0.16), transparent 70%);
  pointer-events: none;
}
.loader.is-hidden{ opacity: 0; visibility: hidden; pointer-events: none }
.loader-logo{
  position: relative;
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.loader-mark{
  font-family: var(--font-display);
  font-size: 50px;
  line-height: 1;
  color: #fff;
  position: relative;
  z-index: 2;
  animation: loaderPulse 1.7s ease-in-out infinite;
}
.loader-ring{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  border-right-color: var(--gold);
  animation: loaderSpin 1s linear infinite;
}
.loader-ring::after{
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
}
@keyframes loaderSpin{ to{ transform: rotate(360deg) } }
@keyframes loaderPulse{
  0%,100%{ opacity: 1; transform: scale(1) }
  50%{ opacity: .65; transform: scale(.93) }
}
.loader-slogan{
  position: relative; z-index: 2;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.04em;
  text-align: center;
}
.loader-slogan em{ color: var(--gold-bright); font-style: normal; font-weight: 700 }
.loader-text{
  position: relative; z-index: 2;
  font-size: 10.5px;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 700;
}

/* =========================================================
   STICKY QUICK CONTACT (rechte Flanke)
========================================================= */
.quick-contact{
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  animation: quickFadeIn .8s var(--ease) 1.1s forwards;
}
@keyframes quickFadeIn{ to{ opacity: 1 } }
.quick-contact-item{
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: all .25s var(--ease);
}
.quick-contact-item svg{ width: 18px; height: 18px; transition: transform .25s var(--ease) }
.quick-contact-item:hover{
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  transform: translateX(-4px);
  box-shadow: var(--shadow-gold);
}
.quick-contact-item:hover svg{ transform: scale(1.1) }
.quick-contact-label{
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--ink-900);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all .25s var(--ease);
}
.quick-contact-label::after{
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--ink-900);
}
.quick-contact-item:hover .quick-contact-label{ opacity: 1; transform: translateY(-50%) translateX(0) }

@media (max-width: 720px){
  .quick-contact{ right: 10px; gap: 8px }
  .quick-contact-item{ width: 42px; height: 42px }
  .quick-contact-item svg{ width: 16px; height: 16px }
  .quick-contact-label{ display: none }
}

/* =========================================================
   ATMOSPHÄRE — Foto-Hintergründe, Wein-Textur, Film-Grain, Parallax
========================================================= */

/* Film-Grain über die ganze Seite (filmische Tiefe) */
body::after{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Foto-Hintergrund mit Parallax (background-attachment: fixed nur Desktop) */
.bg-photo{
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
}
@media (min-width: 901px){
  .bg-photo.parallax{ background-attachment: fixed; }
}

/* Dunkles Sektions-Overlay über Foto (Olive-Verlauf für Lesbarkeit) */
.bg-photo::before{
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, rgba(44,45,24,0.92) 0%, rgba(50,51,28,0.86) 50%, rgba(26,27,14,0.95) 100%);
}

/* Goldene Wein-Akzente an den Rändern dunkler Sektionen (statt kachelnder Textur).
   Gespiegeltes Paar an den beiden OBEREN Ecken — gleiche Form, natürlich
   orientiert, links = Spiegelbild von rechts → ruhig, sauber, einheitlich. */
.leaf-frame{ position: relative; overflow: hidden; }
.leaf-frame::before,
.leaf-frame::after{
  content: "";
  position: absolute;
  width: clamp(150px, 16vw, 240px);
  aspect-ratio: 364 / 277;
  background: url("../wine-svgs/wine-1.svg") no-repeat center;
  background-size: contain;
  opacity: .4;
  pointer-events: none;
  z-index: 0;
}
/* LINKS unten — natürlich (steigt aus der Ecke auf) */
.leaf-frame::before{ left: 0; bottom: 0; }
/* RECHTS oben — gespiegelt (hängt aus der Ecke herab) */
.leaf-frame::after{ right: 0; top: 0; transform: scaleX(-1); }
.leaf-frame > *{ position: relative; z-index: 1; }
@media (max-width: 700px){
  .leaf-frame::before, .leaf-frame::after{ width: 120px; opacity: .32 }
}

/* Goldener Lichtschein als deko-Element */
.glow-spot{
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(208,159,79,0.28), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

/* =========================================================
   REDUCED MOTION
========================================================= */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-stagger > *{ opacity: 1 !important; transform: none !important }
  .bg-photo.parallax{ background-attachment: scroll !important }
  body::after{ display: none }
}
