:root {
  --bg: #242422;
  --bg-soft: #2b2a27;
  --cream: #eee3c8;
  --cream-dim: #cfc3a5;
  --gold: #c9a86a;
  --teal: #6f9c85;
  --muted: #9b917d;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Mulish', 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream-dim);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Portada de entrada ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  transition: opacity 1.6s ease;
}
.gate.closing { opacity: 0; pointer-events: none; }

.gate-logo {
  width: min(300px, 62vw);
  margin-bottom: 1.6rem;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.025); opacity: 1; }
}

.gate-word {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 0.22em;
}
.gate-lang { font-size: 0.95rem; color: var(--muted); letter-spacing: 0.08em; }

.gate-meaning {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--cream-dim);
  margin-top: 0.4rem;
}

.gate-actions {
  margin-top: 2.6rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Botones ---------- */
.btn {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.35s ease;
  border: 1px solid var(--gold);
}
.btn-solid { background: var(--gold); color: var(--bg); }
.btn-solid:hover { background: var(--cream); border-color: var(--cream); }
.btn-ghost { background: transparent; color: var(--gold); }
.btn-ghost:hover { color: var(--cream); border-color: var(--cream); }

/* ---------- Selector de idioma ---------- */
.lang-toggle {
  position: fixed;
  top: 1.2rem;
  right: 1.4rem;
  z-index: 110;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 106, 0.5);
  background: rgba(36, 36, 34, 0.85);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}
.lang-toggle:hover { border-color: var(--cream); color: var(--cream); }

/* ---------- Hojas cayendo ---------- */
#leaves {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.site { position: relative; z-index: 2; }

/* ---------- Control de sonido ---------- */
.sound-toggle {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 106, 0.5);
  background: rgba(36, 36, 34, 0.85);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}
.sound-toggle:hover { border-color: var(--cream); color: var(--cream); }
.sound-toggle[hidden] { display: none; }
.sound-toggle svg[hidden] { display: none; }

/* ---------- Sitio ---------- */
.site { opacity: 0; transition: opacity 1.8s ease; }
.site.visible { opacity: 1; }

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}
.hero-logo { width: min(440px, 82vw); }
.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--muted);
  margin-top: 1rem;
  letter-spacing: 0.06em;
}

.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--gold);
  margin-top: 2.8rem;
  font-size: 1.1rem;
}
.ornament span { display: block; width: 70px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }

.section {
  max-width: 720px;
  margin: 0 auto;
  padding: 5.5rem 1.7rem;
}
.section-motif {
  display: block;
  width: 150px;
  height: 150px;
  margin: 0 auto 1.6rem;
  opacity: 0.9;
}

.section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.3rem;
  color: var(--cream);
  letter-spacing: 0.1em;
  margin-bottom: 1.8rem;
  text-align: center;
}
.section h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 1px;
  background: var(--gold);
  margin: 1.1rem auto 0;
}
.section p { margin-bottom: 1.2rem; }
.section .lead {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.6;
  color: var(--cream-dim);
}
.section strong { color: var(--gold); font-weight: 600; }
.section em { color: var(--cream); }

/* Pilares */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 2.4rem;
}
@media (max-width: 719px) {
  .pillars { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
}
.pillar {
  background: var(--bg-soft);
  border: 1px solid rgba(201, 168, 106, 0.22);
  border-radius: 10px;
  padding: 1.8rem 1.5rem;
}
.pillar h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-bottom: 0.7rem;
}
.pillar p { font-size: 0.93rem; margin: 0; color: var(--muted); }

/* Newsletter */
#newsletter { text-align: center; }
.news-form {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}
.news-form input[type="email"] {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--cream);
  background: var(--bg-soft);
  border: 1px solid rgba(201, 168, 106, 0.4);
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  min-width: min(320px, 78vw);
  outline: none;
  transition: border-color 0.3s ease;
}
.news-form input[type="email"]::placeholder { color: var(--muted); }
.news-form input[type="email"]:focus { border-color: var(--gold); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.news-msg {
  margin-top: 1.2rem;
  min-height: 1.4em;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}
.news-msg.success { color: var(--teal); }
.news-msg.error { color: #c98a6a; }

/* Contacto */
#contacto { text-align: center; }
.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 1.5rem 2.4rem;
  border-top: 1px solid rgba(201, 168, 106, 0.18);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.footer-note { font-family: var(--serif); font-style: italic; margin-top: 0.3rem; }

/* Aparición al hacer scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 560px) {
  .section { padding: 4rem 1.4rem; }
  .section h2 { font-size: 1.9rem; }
  .section .lead { font-size: 1.25rem; }
}
