/* =========================================================
   LAS HISTORIAS IMPORTAN — Hoja de estilos
   Paleta: crema, terracota, vino apagado, beige, verde oliva
   ========================================================= */

:root {
  /* Colores */
  --crema: #F7F1E7;
  --beige: #ECE1CD;
  --terracota: #C1694F;
  --terracota-oscuro: #A6543C;
  --vino: #5F2430;
  --vino-oscuro: #4A1B25;
  --oliva: #E3C33A;
  --verde: #4F9153;
  --rosa: #A6543C;
  --naranja: #DE7C1F;
  --tinta: #2E2620;
  --tinta-suave: #6B5F53;
  --blanco: #FFFDF9;

  /* Tipografía */
  --font-display: 'Lora', 'Georgia', serif;
  --font-body: 'Karla', 'Segoe UI', sans-serif;

  /* Espaciado */
  --seccion-py: clamp(3.5rem, 8vw, 6.5rem);
  --radio: 14px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--tinta);
  background: var(--crema);
  line-height: 1.65;
  font-size: 17px;
}

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

a { color: inherit; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow { max-width: 720px; }
.center { text-align: center; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--vino);
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--tinta); }

.eyebrow {
  font-family: var(--font-body);
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--terracota-oscuro);
  font-weight: 600;
  margin-bottom: 0.8em;
  font-size: 0.95rem;
}

.eyebrow-light { color: var(--beige); }
.text-light, .text-light p { color: var(--crema); }

.section-lead {
  font-size: 1.1rem;
  color: var(--tinta-suave);
  max-width: 60ch;
}

.center .section-lead { margin-left: auto; margin-right: auto; }

.hint {
  font-size: 0.95rem;
  margin-top: 1.2rem;
  color: var(--beige);
}

.brand-highlight {
  color: var(--naranja);
  font-weight: 700;
}

.closing-note {
  margin-top: 1.6rem;
  font-style: italic;
}

/* Corrección de especificidad: dentro de secciones oscuras, el texto debe verse claro,
   sin importar qué otras clases (como .section-lead o .hint) tenga el párrafo */
.text-light.section-lead,
.text-light.hint,
.section-wine .section-lead,
.section-wine .hint {
  color: var(--crema);
}

/* =================== ENCABEZADO =================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 231, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(95, 36, 48, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark { display: block; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--vino);
}

.site-nav {
  display: flex;
  gap: 1.6rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--tinta-suave);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--terracota-oscuro); }

@media (max-width: 640px) {
  .site-nav { display: none; }
}

/* =================== BOTONES =================== */

.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--terracota);
  color: var(--blanco);
}
.btn-primary:hover { background: var(--terracota-oscuro); }

.btn-secondary {
  background: transparent;
  border-color: var(--vino);
  color: var(--vino);
}
.btn-secondary:hover { background: var(--vino); color: var(--crema); }

.btn-light {
  background: var(--crema);
  color: var(--vino);
}
.btn-light:hover { background: var(--blanco); }

/* =================== HERO / PORTADA =================== */

.hero {
  position: relative;
  padding: clamp(4rem, 12vw, 7rem) 0 clamp(4.5rem, 10vw, 8rem);
  background-image:
    linear-gradient(100deg, rgba(30, 20, 16, 0.82) 0%, rgba(30, 20, 16, 0.6) 45%, rgba(30, 20, 16, 0.25) 80%),
    url('hero-bg.jpg');
  background-size: cover;
  background-position: center 60%;
  overflow: hidden;
}

.hero-inner {
  display: block;
}

.hero-text { max-width: 620px; }

.eyebrow-on-photo {
  color: var(--naranja);
}

.text-on-photo {
  color: var(--blanco);
}

.text-on-photo-soft {
  color: rgba(255, 253, 249, 0.88);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--naranja);
  max-width: 34ch;
}

.hero-copy {
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.6rem;
}

.btn-on-photo {
  border-color: var(--crema);
  color: var(--crema);
}
.btn-on-photo:hover { background: var(--crema); color: var(--vino); }

@media (max-width: 860px) {
  .hero-text { text-align: center; margin: 0 auto; }
  .hero-subtitle, .hero-copy { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
}

/* =================== SECCIONES GENERALES =================== */

.section {
  padding: var(--seccion-py) 0;
}

.section-cream { background: var(--crema); }
.section-beige { background: var(--beige); }

.section-wine {
  background: var(--vino);
  background-image: linear-gradient(160deg, var(--vino) 0%, var(--vino-oscuro) 100%);
}

/* =================== ACENTOS DIBUJADOS A MANO =================== */

.squiggle {
  display: block;
  margin: 0.4rem 0 1.2rem;
}

.sprout {
  display: inline-block;
  margin: -0.6rem 0 1.2rem;
}

.center .squiggle { margin-left: auto; margin-right: auto; }

.doodle-accent {
  width: 130px;
  height: auto;
  opacity: 0.85;
  margin: 0 0 1.5rem;
}

.doodle-accent-right {
  transform: scaleX(-1) rotate(-6deg);
}

@media (min-width: 700px) {
  .doodle-accent-right {
    float: right;
    margin: -1.6rem 0 1rem 1.5rem;
  }
}

@media (max-width: 699px) {
  .doodle-accent { display: none; }
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.check-list li {
  position: relative;
  padding-left: 1.8rem;
  color: var(--tinta-suave);
  font-size: 1.05rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--verde);
}

/* =================== TARJETAS (sección 3) =================== */

.card-grid {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.card {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 1.8rem 1.6rem;
  border: 1px solid rgba(95, 36, 48, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(95, 36, 48, 0.08);
}

.card h3 {
  color: var(--vino);
  margin-bottom: 0.4em;
  font-size: 1.15rem;
}

.card p {
  color: var(--tinta-suave);
  font-size: 0.98rem;
  margin: 0;
}

@media (max-width: 860px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* =================== FACILITADORA (sección 5) =================== */

.facilitator-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 3rem;
  align-items: center;
}

.photo-placeholder {
  aspect-ratio: 4 / 5;
  border-radius: var(--radio);
  background: var(--beige);
  border: 2px dashed rgba(95, 36, 48, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--terracota-oscuro);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
}

.facilitator-photo-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radio);
}

@media (max-width: 760px) {
  .facilitator-grid { grid-template-columns: 1fr; text-align: center; }
  .photo-placeholder { max-width: 280px; margin: 0 auto; }
  .facilitator-text .section-lead { margin-left: auto; margin-right: auto; }
}

/* =================== FORMULARIO (sección 6) =================== */

.join-form {
  margin-top: 2rem;
  background: var(--blanco);
  border-radius: var(--radio);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border: 1px solid rgba(95, 36, 48, 0.08);
}

.hidden-field { display: none; }

.form-row {
  margin-bottom: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--vino);
}

.optional {
  font-weight: 400;
  color: var(--tinta-suave);
  font-style: italic;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  border: 1.5px solid rgba(95, 36, 48, 0.2);
  background: var(--crema);
  color: var(--tinta);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 3px solid var(--oliva);
  outline-offset: 1px;
}

.form-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
}

.form-checkbox label { font-weight: 500; color: var(--tinta); }

.form-success {
  margin-top: 1.5rem;
  background: var(--beige);
  border-left: 4px solid var(--oliva);
  padding: 1.2rem 1.4rem;
  border-radius: 8px;
}

.form-success p { margin: 0; color: var(--tinta); }

/* =================== CONTACTO (sección 7) =================== */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.8rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 2rem;
  font-size: 1.05rem;
}

.contact-list a {
  text-decoration: none;
  color: var(--terracota-oscuro);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.contact-list a:hover { border-color: var(--terracota-oscuro); }

/* =================== PIE DE PÁGINA =================== */

.site-footer {
  background: var(--vino-oscuro);
  color: var(--crema);
  padding: 2.6rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0;
  color: var(--crema);
}

.footer-copy {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: rgba(247, 241, 231, 0.75);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 1.5rem;
  padding: 0;
  margin: 0;
  justify-content: flex-end;
}

/* =================== FRASE ESTILO MOSAICO DE PISO =================== */

.floor-quote {
  display: flex;
  justify-content: center;
  padding: 1rem 0 2.4rem;
}

.floor-quote-tile {
  position: relative;
  width: min(340px, 82vw);
  aspect-ratio: 1;
  clip-path: polygon(50% 2%, 98% 50%, 50% 98%, 2% 50%);
  background-color: var(--crema);
  background-image:
    linear-gradient(45deg, var(--terracota) 25%, transparent 25%, transparent 75%, var(--terracota) 75%),
    linear-gradient(45deg, var(--terracota) 25%, transparent 25%, transparent 75%, var(--terracota) 75%);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.8rem;
}

.floor-quote-tile::before {
  content: "";
  position: absolute;
  inset: 14%;
  background: var(--crema);
  clip-path: polygon(50% 2%, 98% 50%, 50% 98%, 2% 50%);
}

.floor-quote-tile p {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  color: var(--vino);
  font-size: 0.95rem;
  line-height: 1.35;
  margin: 0;
  max-width: 20ch;
}

.floor-quote-author {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-style: italic;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  color: var(--terracota-oscuro);
}

@media (max-width: 480px) {
  .floor-quote-tile { padding: 1.6rem; }
  .floor-quote-tile p { font-size: 1rem; }
}

.footer-links a {
  text-decoration: none;
  color: var(--crema);
  font-size: 0.9rem;
  opacity: 0.85;
}

.footer-links a:hover { opacity: 1; text-decoration: underline; }

/* =================== BOTÓN FLOTANTE WHATSAPP =================== */

.whatsapp-float {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--oliva);
  color: var(--crema);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(46, 38, 32, 0.25);
  z-index: 60;
  transition: transform 0.2s ease;
}

.whatsapp-float:hover { transform: scale(1.07); }

/* =================== ANIMACIONES SUTILES AL DESPLAZARSE =================== */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover, .card:hover, .whatsapp-float:hover {
    transform: none;
  }
}

/* Foco visible para accesibilidad de teclado */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--oliva);
  outline-offset: 2px;
}
