/* ============================================================
   main.css — Estilos Globales Públicos
   Impromtus Ad Mortem | Fase 3
   Estética: Gothic Cathedral — dark, elegante, misterioso
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cinzel+Decorative:wght@400;700&family=Raleway:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg-deep:       #080808;
  --bg-body:       #0c0c0c;
  --bg-surface:    #131313;
  --bg-card:       #181818;
  --bg-card-hover: #1f1f1f;

  --text-primary:  #e2e2e2;
  --text-secondary:#a0a0a0;
  --text-muted:    #5a5a5a;

  --wine:          #7a1a2e;
  --wine-light:    #9e2540;
  --wine-glow:     rgba(122,26,46,0.25);
  --gold:          #c9a84c;
  --gold-light:    #e0bc6a;
  --gold-glow:     rgba(201,168,76,0.15);

  --border:        rgba(255,255,255,0.06);
  --border-gold:   rgba(201,168,76,0.3);

  --nav-h:         72px;
  --radius:        4px;
  --radius-lg:     8px;

  --font-display:  'Cinzel', serif;
  --font-deco:     'Cinzel Decorative', serif;
  --font-body:     'Raleway', sans-serif;

  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.45, 0, 0.55, 1);

  --grain-opacity: 0.035;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Grain overlay global */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: var(--grain-opacity);
  pointer-events: none;
  z-index: 9999;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--wine); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--wine-light); }

/* ── Selección de texto ─────────────────────────────────── */
::selection { background: var(--wine); color: #fff; }

/* ═══════════════════════════════════════════════════════════
   NAVEGACIÓN
   ═══════════════════════════════════════════════════════════ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background 0.4s var(--ease-out), border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(8, 8, 8, 0.96);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0.9);
  transition: filter 0.3s;
}

.nav-logo:hover img { filter: brightness(1.1); }

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1.3;
}

.nav-logo-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 300;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 14px; right: 14px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-social a {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: all 0.25s;
}

.nav-social a:hover {
  color: var(--gold);
  border-color: var(--border-gold);
  background: var(--gold-glow);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--text-secondary);
  transition: all 0.3s var(--ease-out);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(8,8,8,0.98);
  border-bottom: 1px solid var(--border);
  padding: 24px 32px 32px;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
  z-index: 999;
  backdrop-filter: blur(16px);
}

.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.nav-mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

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

/* ═══════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════ */
.page-content {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ═══════════════════════════════════════════════════════════
   PAGE HERO (interno — no landing)
   ═══════════════════════════════════════════════════════════ */
.page-hero {
  position: relative;
  padding: 100px 0 70px;
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 100%, rgba(122,26,46,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 50% 0%, rgba(201,168,76,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.1s forwards;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  line-height: 1.15;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.2s forwards;
}

.page-hero p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 16px auto 0;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.35s forwards;
}

.page-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 24px auto 0;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.45s forwards;
}

/* ═══════════════════════════════════════════════════════════
   SECCIÓN
   ═══════════════════════════════════════════════════════════ */
.section { padding: 90px 0; }
.section-sm { padding: 60px 0; }
.section-lg { padding: 120px 0; }

.section-header {
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-title em {
  font-style: normal;
  color: var(--gold);
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-top: 14px;
  font-weight: 300;
  line-height: 1.8;
}

.section-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--wine), var(--gold));
  margin-top: 20px;
}

/* ═══════════════════════════════════════════════════════════
   BOTONES
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::before { opacity: 1; }

.btn-gold {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.25);
  color: #111;
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-wine {
  background: var(--wine);
  color: #fff;
  border-color: var(--wine);
}

.btn-wine:hover {
  background: var(--wine-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(122,26,46,0.3);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding: 10px 0;
}

.btn-ghost:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}

.card:hover {
  border-color: rgba(201,168,76,0.2);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

/* ═══════════════════════════════════════════════════════════
   ANIMACIONES
   ═══════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
  50%       { box-shadow: 0 0 0 8px rgba(201,168,76,0.08); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ═══════════════════════════════════════════════════════════
   SEPARADORES DECORATIVOS
   ═══════════════════════════════════════════════════════════ */
.ornament {
  text-align: center;
  color: var(--wine);
  font-size: 1.2rem;
  letter-spacing: 0.4em;
  margin: 12px 0;
  opacity: 0.6;
}

.hr-gold {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.badge-gold   { background: rgba(201,168,76,0.12); color: var(--gold); border: 1px solid rgba(201,168,76,0.2); }
.badge-wine   { background: rgba(122,26,46,0.15);  color: #d4607a;     border: 1px solid rgba(122,26,46,0.3); }
.badge-silver { background: rgba(255,255,255,0.05);color: var(--text-secondary); border: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 70px 0 32px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 200px;
  background: radial-gradient(ellipse, rgba(122,26,46,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.footer-brand img {
  width: 48px;
  filter: brightness(0.7);
  margin-bottom: 16px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.footer-brand-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
  font-weight: 300;
  max-width: 260px;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: all 0.25s;
}

.footer-social a:hover {
  color: var(--gold);
  border-color: var(--border-gold);
  background: var(--gold-glow);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.2s;
  font-weight: 300;
}

.footer-col ul li a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.footer-admin-link {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-admin-link:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   FORMULARIO DE CONTACTO
   ═══════════════════════════════════════════════════════════ */
.contact-form .form-group { margin-bottom: 20px; }

.contact-form label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

.contact-form textarea { resize: vertical; min-height: 140px; line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .nav-links, .nav-social { display: none; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .container, .container-wide { padding: 0 20px; }
  .section { padding: 64px 0; }
  .section-lg { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .page-hero { padding: 72px 0 52px; }
  .btn { padding: 12px 24px; font-size: 0.64rem; }
}

@media (max-width: 480px) {
  .footer-bottom { flex-direction: column; text-align: center; }
}
