/* ═══════════════════════════════════════
   shared.css · st-groom.ch
   ═══════════════════════════════════════ */

:root {
  --black:    #0e0e0e;
  --charcoal: #1a1a1a;
  --dark:     #242424;
  --cream:    #f5f0e8;
  --gold:     #c9a84c;
  --gold-light:#e8c97a;
  --twint:    #009fe3;
  --twint-dark:#0079b8;
  --red:      #d94040;
  --green:    #2d8c5a;
  --muted:    #888888;
  --border:   rgba(255,255,255,0.08);
}

/* ── RESET ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--black);
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/*
  LAYER 1 – Logo invertiert als Hintergrund
  Das Logo ist schwarz/weiss → invert(1) macht es weiss/schwarz auf dunklem Grund.
  opacity sehr niedrig = dezentes Wasserzeichen über den ganzen Bildschirm.
*/
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url('assets/logo.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  /* invert: schwarzes Logo → wird zu weissem Logo auf schwarzem Grund */
  filter: invert(1);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

/*
  LAYER 2 – Noise-Textur on top
*/
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
/* Alle direkten Seiteninhalte müssen über den body::before/::after Layern liegen */
header, main, section, div, footer {
  position: relative;
  z-index: 1;
}

header {
  position: sticky;
  top: 0; z-index: 100;
  background: rgba(14,14,14,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ── LOGO ── */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

/* Real logo image — inverted so it appears cream/white on dark bg */
.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  /* invert the black logo to cream, then tint gold */
  filter: invert(1) sepia(0.35) saturate(1.4) hue-rotate(5deg) brightness(1.05);
  transition: filter 0.3s;
}

.logo:hover .logo-img {
  filter: invert(1) sepia(0.6) saturate(2) hue-rotate(5deg) brightness(1.1);
}

.logo-text {
  display: flex; flex-direction: column; gap: 3px;
}

.logo-name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.015em;
  line-height: 1;
  white-space: nowrap;
}

.logo-sub {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
}

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.775rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 50px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  position: relative;
}

nav a:hover { color: var(--cream); }

nav a.active {
  color: var(--gold);
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: 1px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
}

/* ── BURGER ── */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 2px;
}

.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── MOBILE NAV ── */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: rgba(14,14,14,0.98);
  border-top: 1px solid var(--border);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 14px 2.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--gold);
  background: rgba(201,168,76,0.05);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.legal-footer {
  background: var(--charcoal);
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 48px 2.5rem 28px;
}

.legal-footer-inner { max-width: 1280px; margin: 0 auto; }

.legal-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 36px;
}

.legal-brand strong {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  color: var(--cream);
  margin-bottom: 8px;
}

.legal-brand p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.8;
}

.legal-brand a { color: var(--gold); text-decoration: none; }
.legal-brand a:hover { text-decoration: underline; }

.legal-divider { border: none; border-top: 1px solid var(--border); margin: 0 0 24px; }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin-bottom: 20px;
}

.legal-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  cursor: pointer;
}

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

.legal-copy {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.7;
}

/* ══════════════════════════════════════
   LEGAL MODAL
══════════════════════════════════════ */
.legal-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(10px);
  padding: 20px;
}

.legal-modal-overlay.open { opacity: 1; pointer-events: all; }

.legal-modal {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 680px; max-width: 100%;
  max-height: 85vh; overflow-y: auto;
  transform: scale(0.96); transition: transform 0.3s;
}

.legal-modal-overlay.open .legal-modal { transform: scale(1); }

.legal-modal-header {
  position: sticky; top: 0;
  background: var(--charcoal);
  border-bottom: 1px solid var(--border);
  padding: 22px 30px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 1;
}

.legal-modal-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  color: var(--cream);
}

.legal-modal-body {
  padding: 30px;
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.8;
}

.legal-modal-body h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  color: var(--cream);
  margin: 22px 0 8px;
}

.legal-modal-body h3:first-child { margin-top: 0; }
.legal-modal-body p { margin-bottom: 12px; }
.legal-modal-body strong { color: var(--cream); }
.legal-modal-body ul { padding-left: 20px; margin-bottom: 12px; }
.legal-modal-body li { margin-bottom: 6px; }

/* ── CLOSE BUTTON ── */
.modal-close {
  width: 32px; height: 32px;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--cream);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.modal-close:hover { background: var(--red); border-color: var(--red); }

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--charcoal);
  border: 1px solid rgba(201,168,76,0.45);
  color: var(--cream);
  padding: 13px 24px;
  border-radius: 50px;
  font-size: 0.875rem; font-weight: 500;
  z-index: 600;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════ */
@keyframes fadeUp   { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
@keyframes pulse    { 0%,100%{opacity:1} 50%{opacity:0.4} }
@keyframes popIn    { 0%{transform:scale(0.5)} 70%{transform:scale(1.1)} 100%{transform:scale(1)} }
@keyframes spin     { to{transform:rotate(360deg)} }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 960px) {
  nav { display: none; }
  .nav-burger { display: flex; }
  .header-inner { padding: 0 1.4rem; }
}

@media (max-width: 600px) {
  .header-inner { height: 64px; }
  .legal-top { flex-direction: column; }
  .legal-links { gap: 10px 20px; }
}
