/* ——— CASA MATRIZ — SISTEMA DE DISEÑO ——— */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --sans: 'DM Sans', 'Helvetica Neue', sans-serif;
  --bg: #FDFBF7;
  --bg-warm: #F6F2EB;
  --text: #1A1714;
  --text-secondary: #6B6358;
  --text-tertiary: #9C9487;
  --accent-vermillion: #C4391D;
  --accent-ultramarine: #1B3A8C;
  --accent-gold: #B8922F;
  --border: #E2DDD4;
  --border-light: #EDE9E2;
  --max-w: 1120px;
  --content-w: 720px;
}

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ——— NAV ——— */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253,251,247,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo {
  display: flex; align-items: center;
}
.nav-logo img {
  height: 32px; width: 32px; object-fit: contain;
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--text-secondary);
  letter-spacing: 0.01em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-cta {
  font-size: 0.8125rem !important; color: var(--bg) !important;
  background: var(--text); padding: 8px 18px; border-radius: 4px; transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }
.nav-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  width: 28px; height: 20px; position: relative;
}
.nav-menu-btn span {
  display: block; width: 100%; height: 1.5px; background: var(--text);
  position: absolute; left: 0; transition: all 0.3s;
}
.nav-menu-btn span:nth-child(1) { top: 0; }
.nav-menu-btn span:nth-child(2) { top: 9px; }
.nav-menu-btn span:nth-child(3) { top: 18px; }
.nav-mobile-menu {
  display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 99; padding: 2rem; flex-direction: column; gap: 0.25rem;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  display: block; padding: 1rem 0; font-size: 1.125rem;
  font-family: var(--serif); color: var(--text); border-bottom: 1px solid var(--border-light);
}
.nav-mobile-menu .nav-cta-mobile {
  display: inline-block; margin-top: 1.5rem; text-align: center;
  background: var(--text); color: var(--bg); padding: 14px 0; border-radius: 4px;
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 500; border-bottom: none;
}

/* ——— PAGE HEADER ——— */
.page-header {
  max-width: var(--max-w); margin: 0 auto; padding: 4rem 2rem 3rem; text-align: center;
}
.page-header-label {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 1rem;
}
.page-header h1 {
  font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 1rem;
}
.page-header-desc {
  max-width: 580px; margin: 0 auto;
  font-size: 1rem; color: var(--text-secondary); line-height: 1.7;
}
.page-header-divider {
  width: 48px; height: 1px; background: var(--border); margin: 2.5rem auto 0;
}

/* ——— SHARED COMPONENTS ——— */
.section-header {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2rem;
}
.section-title {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 500;
}
.section-link {
  font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); transition: color 0.2s;
}
.section-link:hover { color: var(--text); }
.tag {
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; display: inline-block;
}
.tag-bestiario { color: var(--accent-vermillion); }
.tag-grimorios { color: var(--accent-gold); }
.tag-museo { color: var(--accent-ultramarine); }
.tag-pantalla { color: var(--text-secondary); }
.tag-dossier { color: var(--accent-ultramarine); }
.arrow-icon {
  width: 14px; height: 14px; display: inline-block; vertical-align: middle;
}
.read-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.875rem; font-weight: 500; color: var(--text); transition: gap 0.2s;
}
.read-link:hover { gap: 10px; }
.placeholder-img {
  background: var(--bg-warm); border: 1px solid var(--border-light); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic; color: var(--text-tertiary); font-size: 0.8125rem;
}
.btn-primary {
  display: inline-block; font-size: 0.9375rem; font-weight: 500;
  color: var(--bg); background: var(--text); padding: 14px 36px;
  border-radius: 4px; transition: opacity 0.2s; letter-spacing: 0.01em;
  border: none; cursor: pointer; font-family: var(--sans);
}
.btn-primary:hover { opacity: 0.85; }
.btn-outline {
  display: inline-block; font-size: 0.875rem; font-weight: 500;
  color: var(--text); background: none; padding: 12px 28px;
  border-radius: 4px; border: 1px solid var(--border); transition: all 0.2s;
  cursor: pointer; font-family: var(--sans);
}
.btn-outline:hover { border-color: var(--text); }

/* ——— FOOTER ——— */
.footer {
  border-top: 1px solid var(--border-light); padding: 3rem 2rem 2rem;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem;
}
.footer-brand p {
  font-family: var(--serif); font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem;
}
.footer-brand-desc {
  font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.65;
}
.footer-subscribe {
  display: flex; gap: 0.5rem; margin-top: 1.25rem;
}
.footer-subscribe input {
  flex: 1; padding: 8px 12px; font-size: 0.8125rem; font-family: var(--sans);
  border: 1px solid var(--border); border-radius: 4px; background: var(--bg);
  color: var(--text); outline: none;
}
.footer-subscribe input:focus { border-color: var(--text-tertiary); }
.footer-subscribe button {
  padding: 8px 14px; font-size: 0.75rem; font-weight: 500; font-family: var(--sans);
  background: var(--text); color: var(--bg); border: none; border-radius: 4px; cursor: pointer;
}
.footer-col h4 {
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.625rem; }
.footer-col a { font-size: 0.875rem; color: var(--text-secondary); transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-col .external::after { content: ' ↗'; font-size: 0.75rem; color: var(--text-tertiary); }
.footer-bottom {
  max-width: var(--max-w); margin: 2.5rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.75rem; color: var(--text-tertiary);
}

/* ——— RESPONSIVE ——— */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: block; }
  .page-header { padding: 3rem 1.5rem 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .section-header { flex-direction: column; gap: 0.5rem; }
}

/* ——— ANIMATIONS ——— */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0; transform: translateY(16px);
    animation: fadeUp 0.6s ease forwards;
  }
  .fade-in:nth-child(2) { animation-delay: 0.08s; }
  .fade-in:nth-child(3) { animation-delay: 0.16s; }
  .fade-in:nth-child(4) { animation-delay: 0.24s; }
  @keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
}
