/* ============================================================
   main.css — Shared styles: reset, header, footer, utilities
   ============================================================ */

/* ── Self-hosted fonts ─────────────────────────────────────── */
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/dmsans-italic-300-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/dmsans-italic-300-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                 U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/fonts/dmsans-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/fonts/dmsans-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                 U+FFFD;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/sora-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/sora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                 U+FFFD;
}

/* ── CSS Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ── CSS Variables (overridden per theme) ───────────────────── */
:root {
  --header-height: 64px;
  --max-width: 1100px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.16);
  --transition: 0.2s ease;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--logo-color);
  letter-spacing: -0.02em;
  transition: opacity var(--transition);
}

.site-logo:hover {
  opacity: 0.8;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ── Nav ────────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--nav-color);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-color);
}

/* ── Language Switcher ──────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--lang-switcher-bg);
  border-radius: 100px;
  padding: 3px;
}

.lang-btn {
  font-family: 'Sora', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--lang-btn-color);
  padding: 0.3rem 0.6rem;
  border-radius: 100px;
  transition: background var(--transition), color var(--transition);
}

.lang-btn:hover {
  background: var(--lang-btn-hover-bg);
}

.lang-btn--active {
  background: var(--lang-btn-active-bg) !important;
  color: var(--lang-btn-active-color) !important;
}

/* ── Hamburger (mobile) ─────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.hamburger:hover {
  background: var(--nav-hover-bg);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--nav-color);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav drawer ──────────────────────────────────────── */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}

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

.mobile-nav .nav-link {
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
}

.mobile-nav .lang-switcher {
  align-self: flex-start;
}

/* ── Main content ───────────────────────────────────────────── */
main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: 2rem 1.5rem;
  color: var(--footer-color);
  font-size: 0.875rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--logo-color);
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.7;
}

.footer-heart {
  color: var(--primary);
  font-style: normal;
}

/* ── Cookie banner ─────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 680px;
  background: var(--surface, #1e1e2e);
  color: var(--text, #e0e0e0);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.875rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 9999;
  font-size: 0.875rem;
  line-height: 1.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#cookie-banner.cookie-banner--hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(120%);
  pointer-events: none;
}
#cookie-banner p {
  flex: 1;
  margin: 0;
}
#cookie-banner a {
  color: var(--primary, #a78bfa);
  text-decoration: underline;
  white-space: nowrap;
}
#cookie-banner-close {
  flex-shrink: 0;
  background: var(--primary, #a78bfa);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
#cookie-banner-close:hover {
  opacity: 0.85;
}
@media (max-width: 480px) {
  #cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

/* ── Utilities ──────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav,
  .header-right .lang-switcher {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
