/* ============================================================
   legaci — Lavender Design System
   Light mode: soft white + lavender
   Dark mode: deep navy-purple + lavender
   Toggle via data-theme="dark" on <html>
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Cinzel:wght@600;700;800;900&family=Playfair+Display:wght@700;800;900&display=swap');

/* ── Custom Properties ───────────────────────────────────── */

:root {
  --bg-page:          #faf9ff;
  --bg-card:          #ffffff;
  --bg-card-hover:    #ffffff;
  --border-card:      #ede9fe;
  --border-card-2:    #ddd6fe;
  --border-card-hover:#7c3aed;
  --accent:           #7c3aed;
  --accent-2:         #a78bfa;
  --accent-hover:     #6d28d9;
  --accent-bg:        #f5f3ff;
  --accent-bg-2:      #ede9fe;
  --text-primary:     #1a0a2e;
  --text-secondary:   #4c1d95;
  --text-muted:       #5b21b6;
  --text-label:       #7c3aed;
  --nav-bg:           #ffffff;
  --nav-border:       #ede9fe;
  --nav-tab-bg:       #f5f3ff;
  --nav-tab-color:    #5b21b6;
  --input-bg:         #ffffff;
  --input-border:     #ddd6fe;
  --input-focus:      #7c3aed;
  --error-bg:         rgba(239,68,68,0.1);
  --error-text:       #dc2626;
  --success-bg:       rgba(34,197,94,0.1);
  --success-text:     #16a34a;
  --shadow-card:      0 2px 8px rgba(124,58,237,0.06);
  --shadow-card-hover:0 16px 48px rgba(124,58,237,0.15);
  --shadow-badge:     0 4px 12px rgba(124,58,237,0.35);
  --shadow-btn:       0 4px 12px rgba(124,58,237,0.4);
  --radius-card:      22px;
  --radius-badge:     6px;
  --transition:       0.2s ease;
}

[data-theme="dark"] {
  --bg-page:          #0c0a1e;
  --bg-card:          rgba(255,255,255,0.04);
  --bg-card-hover:    rgba(255,255,255,0.06);
  --border-card:      rgba(255,255,255,0.07);
  --border-card-2:    rgba(255,255,255,0.1);
  --border-card-hover:rgba(124,58,237,0.5);
  --accent:           #a78bfa;
  --accent-2:         #c4b5fd;
  --accent-hover:     #c4b5fd;
  --accent-bg:        rgba(124,58,237,0.12);
  --accent-bg-2:      rgba(124,58,237,0.08);
  --text-primary:     #ffffff;
  --text-secondary:   rgba(255,255,255,0.65);
  --text-muted:       rgba(255,255,255,0.4);
  --text-label:       rgba(196,181,253,0.8);
  --nav-bg:           rgba(12,10,30,0.97);
  --nav-border:       rgba(124,58,237,0.15);
  --nav-tab-bg:       rgba(124,58,237,0.08);
  --nav-tab-color:    rgba(196,181,253,0.9);
  --input-bg:         rgba(255,255,255,0.06);
  --input-border:     rgba(255,255,255,0.12);
  --shadow-card:      none;
  --shadow-card-hover:0 16px 48px rgba(124,58,237,0.12);
}

/* ── Reset ───────────────────────────────────────────────── */

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

/* ── Base ────────────────────────────────────────────────── */

html { font-size: 18px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ─────────────────────────────────────────────────── */

.nav {
  background: var(--nav-bg);
  border-bottom: 2px solid var(--nav-border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

.brand-logo {
  width: auto; height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}

[data-theme="dark"] .brand-logo {
  content: url('/assets/images/brand/logo-dark.png');
}


.brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px; font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  line-height: 1;
}

/* Nav center */
.nav-center {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-center-link {
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
}
.nav-center-link:hover { background: var(--accent-bg); color: var(--accent); text-decoration: none; }
.nav-center-link.active { color: var(--accent); }

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-link {
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--accent); text-decoration: none; }

.nav-btn-signin {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff; font-size: 0.85rem; font-weight: 700;
  padding: 7px 18px; border-radius: 10px;
  text-decoration: none; white-space: nowrap;
  transition: opacity 0.18s ease;
  box-shadow: 0 2px 10px rgba(124,58,237,0.3);
}
.nav-btn-signin:hover { opacity: 0.88; text-decoration: none; }

.theme-toggle {
  background: none;
  border: 1px solid var(--border-card-2);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  transition: all var(--transition);
  display: flex; align-items: center;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.icon-sun  { display: none; }
.icon-moon { display: inline; }
[data-theme="dark"] .icon-sun  { display: inline; }
[data-theme="dark"] .icon-moon { display: none; }

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border-card-2);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition);
}
.nav-hamburger:hover { border-color: var(--accent); color: var(--accent); }

/* Mobile dropdown menu */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--nav-bg);
  border-bottom: 2px solid var(--nav-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.75rem 1rem 1rem;
  flex-direction: column;
  gap: 2px;
}
.nav-mobile-menu.open { display: flex; }

.nav-mobile-link {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background var(--transition);
}
.nav-mobile-link:hover { background: var(--bg-card); text-decoration: none; }
.nav-mobile-link.active { color: var(--accent); }

.nav-mobile-divider {
  height: 1px;
  background: var(--border-card);
  margin: 0.5rem 0;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  border: none; font-family: inherit;
  transition: opacity var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; opacity: 0.88; }

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  box-shadow: 0 6px 20px rgba(124,58,237,0.38);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--accent);
  border: 1.5px solid var(--border-card-2);
}

/* ── Page layout ─────────────────────────────────────────── */

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 28px 4rem;
}

/* ── Footer ──────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border-card);
  background: var(--bg-card);
}

.site-footer-bottom {
  max-width: 1280px; margin: 0 auto;
  padding: 1.5rem 28px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
}

.site-footer-copy {
  font-size: 0.78rem; color: var(--text-muted); font-weight: 500;
}

.site-footer-links {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
}

.site-footer-links a {
  font-size: 0.78rem; color: var(--text-muted); font-weight: 500;
  text-decoration: none;
}
.site-footer-links a:hover { color: var(--accent); text-decoration: none; }

/* ── Cookie consent banner ───────────────────────────────── */

.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--bg-card);
  border-top: 1px solid var(--border-card-2);
  padding: 1rem 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(124,58,237,0.08);
}
.cookie-banner p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; flex: 1; min-width: 240px; }
.cookie-banner a { color: var(--accent); }
.cookie-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }

.cookie-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.45); align-items: center; justify-content: center;
}
.cookie-modal-overlay.open { display: flex; }
.cookie-modal {
  background: var(--bg-card); border-radius: 20px;
  padding: 2rem; max-width: 480px; width: 90%;
  border: 1px solid var(--border-card-2);
}
.cookie-modal h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.75rem; color: var(--text-primary); }
.cookie-modal p  { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.25rem; }
.cookie-modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-desktop-only { display: none !important; }
  .nav-center { display: none; }
  .nav-link { display: none; }

  .site-footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .site-footer-links { gap: 0.75rem; }
}
