/* ============================================
   THEEQUEST — Unterseiten Stylesheet
   ============================================ */

:root {
  --paper: #f4efe3;
  --paper-soft: #ede6d3;
  --paper-warm: #e4dbc0;
  --ink: #1c1a15;
  --ink-soft: #5f584a;
  --ink-mute: #918874;
  --gold: #b8914a;
  --gold-deep: #8f6f33;
  --gold-light: #d0a862;
  --midnight: #0d1628;
  --deep-night: #050810;
  --hairline: rgba(28, 26, 21, 0.12);
  --hairline-gold: rgba(208, 168, 98, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans Pro', Georgia, serif;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER =====
   100%-Senior-Loesung gegen In-App-Browser-Bugs (Telegram, Instagram, Facebook, LinkedIn):
   position: fixed bleibt (kein Layout-Sprung), aber 5-fach defensive Haertung gegen
   backdrop-filter-Containing-Block-Bug in iOS Safari und Mobile-Renderern. */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  background: rgba(244, 239, 227, 0.95);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
  transition: background 0.4s ease;
  /* 5-fach defensive Haertung gegen Mobile-Browser-Quirks
     1. translateZ(0)   – erzwingt GPU-Layer, eigener Containing-Block
     2. will-change      – Engine-Hint, eigene Compositor-Schicht
     3. contain          – isoliert Layout-/Style-Vererbung
     4. isolation        – neuer Stacking-Context, faengt backdrop-filter-Bug ein
     5. backface-hidden  – fixiert Render-Plane gegen iOS-Safari-Sub-Pixel-Drift */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  contain: layout style;
  isolation: isolate;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Durchscheinender Header wie Startseite: transparenter, sobald Blur unterstützt wird */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header { background: rgba(244, 239, 227, 0.82); }
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.site-header .brand img {
  height: 42px;
  width: auto;
  transition: filter 0.4s ease;
}

.site-header .brand .wordmark {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.24em;
  color: var(--ink);
  text-transform: uppercase;
}

.site-header .nav {
  display: flex;
  gap: 38px;
  align-items: center;
}

.site-header .nav a {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.site-header .nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.35s ease;
}

.site-header .nav a:not(.nav-cta):hover::after { width: 100%; }

.nav-cta {
  padding: 12px 22px;
  background: var(--gold);
  color: var(--paper) !important;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.nav-cta:hover {
  background: var(--gold-deep);
}

/* ===== Hamburger-Toggle (nur Mobile sichtbar) ===== */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.3s ease;
}

/* Auf Danke-Seite (dunkler Header) sind Striche hell */
body.page-danke .nav-toggle span { background: var(--paper); }

/* ===== Mobile-Overlay-Menu ===== */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--midnight);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0s linear 0s;
}

.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.mobile-menu-close span {
  position: absolute;
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--paper);
}

.mobile-menu-close span:first-child { transform: rotate(45deg); }
.mobile-menu-close span:last-child { transform: rotate(-45deg); }

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-align: center;
}

.mobile-menu-nav a {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-menu-nav a:hover { color: var(--gold-light); }

@media (max-width: 768px) {
  .site-header { padding: 14px 22px; }
  .site-header .nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header .brand img { height: 36px; }
  .site-header .brand .wordmark { display: none; }
}

/* ===== HERO TITEL UNTERSEITE ===== */
.legal-hero {
  padding: 160px 40px 60px;
  text-align: center;
  background: var(--paper);
}

.legal-hero .eyebrow {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  display: block;
}

.legal-hero h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.015em;
  max-width: 800px;
  margin: 0 auto;
}

.legal-hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

/* ===== INHALT ===== */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 40px 120px;
}

.legal-content h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.2;
  color: var(--ink);
  margin: 56px 0 20px;
  letter-spacing: -0.005em;
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.3;
  color: var(--ink);
  margin: 36px 0 14px;
}

.legal-content p {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 18px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 24px 24px;
  padding: 0;
}

.legal-content li {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.3s ease;
}

.legal-content a:hover {
  color: var(--gold);
}

.legal-content strong {
  font-weight: 600;
  color: var(--ink);
}

.legal-content blockquote {
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 24px;
  margin: 24px 0;
  font-style: italic;
  color: var(--ink-soft);
}

.legal-content hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 48px 0;
}

.legal-content .note {
  background: var(--paper-soft);
  border-left: 3px solid var(--gold);
  padding: 20px 24px;
  margin: 28px 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.legal-content th,
.legal-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
}

.legal-content th {
  background: var(--paper-soft);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== ZURÜCK-LINK ===== */
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-back:hover { color: var(--gold-deep); }
.legal-back::before { content: '←'; }

/* ===== FOOTER (verkürzt für Unterseiten) ===== */
footer {
  background: var(--deep-night);
  color: var(--paper);
  padding: 60px 40px 40px;
  border-top: 1px solid rgba(208, 168, 98, 0.25);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
}

.footer-brand img {
  height: 42px;
  width: auto;
  margin-bottom: 24px;
}

.footer-brand p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(244, 239, 227, 0.85);
  max-width: 340px;
}

.footer-brand .claim {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--gold-light);
  letter-spacing: 0.05em;
  margin-top: 14px;
}

footer h4 {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 20px;
}

footer a {
  display: block;
  color: rgba(244, 239, 227, 0.85);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  transition: color 0.3s ease;
  font-weight: 400;
}

footer a:hover { color: var(--gold-light); }

.footer-social {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(208, 168, 98, 0.35);
  border-radius: 50%;
  color: var(--gold-light);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--paper);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-bottom {
  max-width: 1280px;
  margin: 50px auto 0;
  padding-top: 32px;
  border-top: 1px solid rgba(208, 168, 98, 0.18);
  text-align: center;
}

.footer-bottom p {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(244, 239, 227, 0.7);
  margin-bottom: 6px;
}

@media (max-width: 968px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ===== DANKE-SEITE SPEZIAL ===== */

/* Body und Header im Dark-Mode (nur auf Danke-Seite) */
body.page-danke {
  background: var(--midnight);
}

body.page-danke .site-header {
  background: rgba(13, 22, 40, 0.92);
  border-bottom: 1px solid var(--hairline-gold);
}

body.page-danke .site-header .brand .wordmark {
  color: var(--paper);
}

body.page-danke .site-header .nav a {
  color: var(--paper);
}

.danke-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 110px 40px 30px;
  text-align: center;
  background: var(--midnight);
}

.danke-hero .eyebrow {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 18px;
  display: block;
}

.danke-hero h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  color: var(--paper);
  margin-bottom: 24px;
  max-width: 800px;
}

.danke-hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-light);
}

.danke-hero p {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.7;
  color: rgba(244, 239, 227, 0.85);
  max-width: 560px;
  margin: 0;
}

/* Calendly-Embed-Sektion auf Midnight */
.danke-calendly {
  background: var(--midnight);
  padding: 30px 40px 80px;
}

.danke-calendly-inner {
  max-width: 900px;
  margin: 0 auto;
}

.danke-footer-link {
  text-align: center;
  margin-top: 60px;
}

.danke-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--gold);
  color: var(--paper);
  text-decoration: none;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: all 0.35s ease;
  border: 1px solid var(--gold);
}

.danke-button:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  color: var(--paper);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .danke-hero { padding: 80px 24px 20px; }
  .danke-calendly { padding: 20px 16px 60px; }
  .danke-footer-link { margin-top: 40px; }
  .calendly-inline-widget { height: 680px !important; }
}

/* Newsletter im Footer */
.footer-newsletter {
  max-width: 1280px;
  margin: 60px auto 0;
  padding-top: 50px;
  border-top: 1px solid rgba(208, 168, 98, 0.18);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.footer-newsletter-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.4;
  color: var(--gold-light);
  margin: 0;
}

.footer-newsletter-eyebrow {
  display: block;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.4;
  color: var(--gold-light);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 0;
}

.footer-newsletter-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid rgba(208, 168, 98, 0.4);
  background: rgba(244, 239, 227, 0.04);
  min-width: 380px;
}

.footer-newsletter-form input[type="email"],
.footer-newsletter-form input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  background: transparent;
  border: none;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 14px;
  color: var(--paper);
  font-weight: 400;
}

.footer-newsletter-form input[type="email"]::placeholder,
.footer-newsletter-form input[type="text"]::placeholder {
  color: rgba(244, 239, 227, 0.5);
}

.footer-newsletter-form input[type="email"]:focus,
.footer-newsletter-form input[type="text"]:focus {
  outline: none;
  background: rgba(244, 239, 227, 0.08);
}

.footer-newsletter-form input[type="text"][name="VORNAME"] {
  flex: 0.6;
  border-right: 1px solid rgba(184, 145, 74, 0.5);
}

.footer-newsletter-form input[type="email"][name="EMAIL"] {
  flex: 1.4;
}

.footer-newsletter-form button {
  background: var(--gold);
  color: var(--paper);
  border: none;
  padding: 14px 24px;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap;
}

.footer-newsletter-form button:hover {
  background: var(--gold-deep);
}

.footer-newsletter-note {
  grid-column: 1 / -1;
  margin-top: 18px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(244, 239, 227, 0.85);
  line-height: 1.6;
}

.footer-newsletter-note a {
  display: inline;
  padding: 0;
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 768px) {
  .footer-newsletter {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-newsletter-form {
    min-width: 0;
    width: 100%;
    flex-direction: column;
  }
  .footer-newsletter-form input[type="email"],
.footer-newsletter-form input[type="text"] {
    font-size: 16px;
    padding: 18px 20px;
  }
  .footer-newsletter-form input[type="text"][name="VORNAME"] {
    flex: 0 0 auto;
    border-right: none;
    border-bottom: 1px solid rgba(184, 145, 74, 0.35);
  }
  .footer-newsletter-form input[type="email"][name="EMAIL"] {
    flex: 0 0 auto;
  }
  .footer-newsletter-form button {
    width: 100%;
    padding: 18px 24px;
    font-size: 12px;
    min-height: 54px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Form-Success · Hintergrund-Submit-Pattern für Brevo-Forms (Phase C)
   Wird sichtbar erst nach erfolgreicher Submission, sonst display:none.
   ═══════════════════════════════════════════════════════════════ */
.form-success {
  display: none;
  margin-top: 18px;
  padding: 16px 22px;
  background: rgba(184, 145, 74, 0.12);
  border-left: 2px solid var(--gold);
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  text-align: left;
}

form.is-submitted {
  flex-wrap: wrap;
}

form.is-submitted .form-success {
  display: block;
  width: 100%;
  flex-basis: 100%;
  margin-top: 0;
  animation: form-success-in 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Felder durch die Erfolgsmeldung ersetzen statt sie zu behalten — kein Layout-Sprung */
form.is-submitted > *:not(.form-success) {
  display: none;
}

@keyframes form-success-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Erfolgs-Box im dunklen Footer: heller Text statt Ink, sonst unlesbar */
.footer-newsletter-form .form-success {
  background: rgba(244, 239, 227, 0.08);
  border-left-color: var(--gold-light);
  color: var(--paper);
}
