/* ===== LiberMagis – Nouveau style ===== */

:root {
  --bg: #0c0b10;
  --bg-card: #16141f;
  --bg-card-hover: #1e1b2a;
  --gold: #c9a227;
  --gold-light: #e8d5a3;
  --text: #e6e2d9;
  --text-muted: #9c968a;
  --border: rgba(201, 162, 39, 0.2);
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cormorant Garamond", Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

.background-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(90, 50, 140, 0.12), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(50, 30, 80, 0.15), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  width: min(1080px, 92%);
  margin-inline: auto;
}

/* ===== Header ===== */
.site-header {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(12, 11, 16, 0.92);
  backdrop-filter: blur(14px);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: 0.03em;
}

.logo-mark {
  color: var(--gold);
  font-size: 1rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.05rem;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--gold-light);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gold-light);
  transition: 0.25s;
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  padding: 4.2rem 0 2.5rem;
  text-align: center;
}

.hero-title {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.3;
  color: var(--gold);
  margin: 0 auto 1.35rem;
  max-width: 780px;
}

.hero-subtitle {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.18rem;
  color: var(--text-muted);
  text-align: justify;
}

/* ===== Categories ===== */
.section {
  padding: 2.2rem 0 4.5rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  display: block;
}

.category-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(201, 162, 39, 0.4);
  transform: translateY(-3px);
}

.category-icon {
  font-size: 1.5rem;
  margin-bottom: 0.9rem;
}

.category-card h3 {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.category-card p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: justify;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3.2rem 0 2.8rem;
}

.footer-about {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.footer-title {
  font-family: "Cinzel", serif;
  font-size: 1.45rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.footer-about p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-align: justify;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(12, 11, 16, 0.97);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.2rem 1.2rem;
    gap: 0.9rem;
    display: none;
    margin-left: 0;
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero {
    padding: 3rem 0 1.8rem;
    text-align: left;
  }

  .hero-title {
    text-align: left;
    max-width: 100%;
  }

  .hero-subtitle {
    text-align: left;
  }

  .footer-about {
    text-align: left;
  }

  .footer-about p,
  .category-card p {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.7rem;
  }
}