/* ---------------------------
   GLOBAL THEME VARIABLES
--------------------------- */
:root {
  --bg: #0b0a0d;
  --bg-alt: #141217;
  --text: #f1f1f1;
  --text-muted: #b7b7b7;
  --accent: #b38d64;
  --accent-dark: #8f6f4a;
  --max-width: 1100px;
  --radius: 12px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
}

/* ---------------------------
   RESET
--------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------------------------
   LAYOUT BASICS
--------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.4rem;
}

section {
  padding: 4rem 0;
}

section h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

section p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 700px;
}

/* ---------------------------
   HEADER / NAV
--------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 9, 12, 0.4);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.4rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===== MOBILE NAV (Name + Links in einer Zeile, schlank) ===== */
@media (max-width: 768px) {
  .nav-container {
    padding: 0.45rem 1rem;
  }

  .brand {
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    white-space: nowrap;   /* kein Umbruch */
  }

  .nav-links {
    gap: 0.8rem;
    font-size: 0.78rem;
  }
}

/* ---------------------------
   BUTTONS
--------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #d6aa6c);
  color: #1a120a;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
}

/* ---------------------------
   HERO + TRAILER
--------------------------- */

/* Section-Hintergrund wieder statisch, Trailer ist oben als Bild/Video */
#hero {
  background: linear-gradient(to bottom, #151218 0%, #0b0a0d 100%);
  padding: 0 0 3rem;
  box-sizing: border-box;
}

/* Trailer oben – full width auf allen Geräten */
.hero-trailer {
  position: relative;

  /* Fullwidth-Trick */
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;

  /* Mobile / Default: ganz normal UNTER der Navi */
  margin-top: 0;
  margin-bottom: 2rem;

  display: flex;
  justify-content: center;
}

.hero-trailer-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}
/* HERO – Hintergrundbild */
#hero {
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      to bottom,
      rgba(11, 10, 13, 0.82),
      rgba(11, 10, 13, 0.92)
    ),
    url("../images/backgrounds/bg-hero.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.75;
  z-index: 0;
  pointer-events: none;
}

/* Inhalt über das Bild */
#hero .container,
#hero .hero-inner,
#hero .hero-trailer {
  position: relative;
  z-index: 2;
}


/* Desktop: Trailer full-width + leicht unter die Navi geschoben */
@media (min-width: 900px) {
  .hero-trailer {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;

    margin-top: -3.5rem;  /* hier wieder leicht unter die Navi „ziehen“ */
    margin-bottom: 3rem;
  }

  .hero-trailer-img {
    border-radius: 0;
  }
}

/* Inhalt: Text + Rotator darunter */
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}

.hero-text {
  text-align: center;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}

.hero-tagline {
  margin-top: 0.6rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Rotator-Bereich */
.hero-rotator {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 460px; /* verhindert Springen */
  justify-content: flex-start;
}

.hero-image-wrapper {
  max-width: 320px;
  width: 100%;
  position: relative;
}

/* Bild: Schatten + Schweben + Opacity-Transition für Fade */
.hero-image {
  width: 100%;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 0 20px rgba(255, 255, 255, 0.12))
    drop-shadow(0 10px 30px rgba(0, 0, 0, 0.7));
  animation: bottle-float 6s ease-in-out infinite;
  transition: opacity 0.5s ease;
}

/* Text unter der Flasche */
.hero-meta {
  text-align: center;
  margin-top: 1rem;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: opacity 0.5s ease;
}

.hero-meta h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.hero-meta p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 260px;
  margin-inline: auto;
}

/* Fade-Klasse – genau die, die wir im JS benutzen */
.hero-image.is-fading,
.hero-meta.is-fading {
  opacity: 0;
}

/* kleines Schweben der Flasche */
@keyframes bottle-float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* Desktop: Text links, Rotator rechts */
@media (min-width: 800px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-text {
    text-align: left;
    max-width: 420px;
  }
}

/* ---------------------------
   STORY
--------------------------- */
#story {
  background: #0e0d11;
}

#story .container {
  max-width: 760px;
}

#story p {
  margin-bottom: 1.6rem;
  line-height: 1.8;
}
#story h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.4rem;
}

#story h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.8;
}

/* ---------------------------
   KONTAKT & FORMULAR
--------------------------- */

#kontakt {
  background: #0b0a0d;
  padding: 4rem 0;
}

#kontakt h2 {
  color: var(--accent);
  margin-bottom: 1rem;
}

#kontakt p {
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
  margin-top: 1.5rem;
}

.contact-form label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #141217;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 8px;
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 6px rgba(179, 141, 100, 0.6);
}

.contact-form button {
  margin-top: 1rem;
}

.contact-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  margin-bottom: 0.4rem;
}

.contact-error {
  font-size: 0.85rem;
  color: #ff8585;
  margin-top: 0.4rem;
  display: none; /* wird per JS auf block gesetzt */
}

/* Erfolgsmeldung nach Formular-Submit – Toast oben */
.contact-success {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  background: rgba(72, 187, 120, 0.14);
  border: 1px solid rgba(72, 187, 120, 0.9);
  color: #e6fff0;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  display: none;
}

/* sichtbar */
.contact-success.is-visible {
  display: block;
}

/* Grid für die Sorten */
.contact-fieldset {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 1rem 1rem 0.8rem;
  margin-top: 0.5rem;
}

.contact-fieldset legend {
  padding: 0 0.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.contact-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

@media (min-width: 600px) {
  .contact-options {
    grid-template-columns: 1fr 1fr;
  }
}

/* Zeile = Text links, fixes Dropdown rechts */
.contact-option {
  display: grid;
  grid-template-columns: 1fr 64px; /* Text | feste Spalte für Select */
  align-items: center;
  gap: 0.5rem;
}

.contact-option-name {
  font-size: 0.95rem;
  color: var(--text);
}

/* Dropdown für Menge – überall gleich groß */
.qty-select {
  width: 64px;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  background: #141217;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: var(--text);
  appearance: none;
  text-align: center;
}

.contact-note {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-note a {
  color: var(--accent);
  font-weight: 500;
}

/* ---------------------------
   FOOTER
--------------------------- */
footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

button[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(11, 10, 13, 0.95);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: none; /* JS toggles */
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.65);

  /* FIX: ALWAYS ON TOP */
  z-index: 99999;
}

.back-to-top:hover {
  border-color: var(--accent);
}


/* optional: etwas kleiner auf ganz kleinen Screens */
@media (max-width: 480px) {
  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
}


/* ============================
   BRAND-KÜRZEL FÜR KLEINE SCREENS (z.B. iOS)
   -> zeigt "Tawny Tavern" statt "The Tawny Tavern"
============================ */
@media (max-width: 480px) {
  .brand {
    /* Original-Text unsichtbar machen */
    font-size: 0;
  }

  .brand::after {
    content: "Tawny Tavern";
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: var(--font-serif);
    color: var(--accent);
    display: inline-block;
  }

  .nav-links {
    gap: 0.9rem;
  }
} /* 👈 WICHTIG: Media-Query hier schließen! */

/* ============================
   IMPRESSUM + DATENSCHUTZ – MODAL
============================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay.is-visible {
  display: flex;
}

.modal-dialog {
  position: relative;
  background: #0e0d11;
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem 1.6rem;
  max-width: 520px;
  width: calc(100% - 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85);

  /* NEU: Scrollbar, wenn Inhalt höher als Bildschirm */
  max-height: 80vh;
  overflow-y: auto;
}

@media (max-width: 480px) {
  .modal-dialog {
    padding: 1.4rem 1.2rem 1.2rem;
    max-height: 85vh;
  }
}

/* Tabs oben im Modal */
.modal-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 0.4rem;
}

.modal-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-tab.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(179, 141, 100, 0.1);
}

/* Inhalt der Tabs */
.modal-tab-content {
  display: none;
}

.modal-tab-content.is-active {
  display: block;
}

.modal-dialog h2 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: var(--font-serif);
}

.modal-dialog p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.modal-dialog a {
  color: var(--accent);
}

/* Close-Button oben rechts im Modal */
.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--accent);
}

/* Footer-Link als Button stylen */
.footer-link-button {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.3rem;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}

.footer-link-button:hover {
  text-decoration: underline;
}
/* ============================
   SECTION BACKGROUNDS
============================ */

/* STORY – Weinreben / Korb */
#story {
  position: relative;
  overflow: hidden;
  background: #0e0d11; /* Fallback-Farbe */
}

#story::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      to bottom,
      rgba(11, 10, 13, 0.85),
      rgba(11, 10, 13, 0.95)
    ),
    url("../images/backgrounds/bg-story.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
}

/* Inhalt über das Bild legen */
#story .container {
  position: relative;
  z-index: 1;
}
/* KONTAKT – Douro-Terrassen */
#kontakt {
  position: relative;
  overflow: hidden;
  background: #0b0a0d; /* Fallback */
}

#kontakt::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      to bottom,
      rgba(11, 10, 13, 0.9),
      rgba(11, 10, 13, 0.96)
    ),
    url("../images/backgrounds/bg-douro.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.85;
  z-index: 0;
  pointer-events: none;
}

#kontakt .container {
  position: relative;
  z-index: 1;
}
/* FOOTER – Fasskeller */
footer {
  position: relative;
  overflow: hidden;
  background: #08070a;
}

footer::before {
  content: "";
  position: absolute;
  inset: -10px 0 0; /* leicht größer, damit nichts durchblitzt */
  background-image: linear-gradient(
      to top,
      rgba(8, 7, 10, 0.95),
      rgba(8, 7, 10, 0.9)
    ),
    url("../images/backgrounds/bg-cellar.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
}

footer p {
  position: relative;
  z-index: 1;
}
@media (min-width: 900px) {
  #hero::before,
  #story::before,
  #kontakt::before,
  footer::before {
    background-attachment: fixed;
  }
}


