/* ==========================================================================
   Demanda Valech — Hoja de estilos
   Paleta cálida y editorial, pensada para legibilidad en adultos mayores.
   ========================================================================== */

:root{
  --cream:        #F8F2E7;
  --cream-alt:     #F1E8D8;
  --ink:          #2B2420;
  --ink-soft:     #55493F;
  --terracotta:   #7A2E22;
  --terracotta-d: #5E2018;
  --gold:         #B5822A;
  --navy:         #23342F;
  --line:         #E0D3BC;
  --white:        #FFFFFF;

  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max: 1180px;
  --radius: 16px;
  color-scheme: light;
}

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

html{
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body{
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.narrow{ max-width: 800px; }

h1, h2, h3{
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 600;
}
h1{ font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2{ font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3{ font-size: 1.25rem; margin-bottom: .35em; }

p{ margin: 0 0 1em; }

a{ color: var(--terracotta); }

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--terracotta);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  z-index: 999;
}
.skip-link:focus{ left: 0; }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover{ transform: translateY(-2px); }
.btn-primary{
  background: var(--terracotta);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(122,46,34,.28);
}
.btn-primary:hover{ background: var(--terracotta-d); }
.btn-outline{
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover{ background: var(--ink); color: var(--white); }
.btn-lg{ padding: 17px 32px; font-size: 1.08rem; }

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,242,231,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo{
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.logo-img{
  height: 44px;
  width: auto;
  display: block;
}

.main-nav{
  display: flex;
  gap: 26px;
  align-items: center;
}
.main-nav a{
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .98rem;
  font-weight: 500;
}
.main-nav a:hover{ color: var(--terracotta); }

.nav-cta{ padding: 11px 22px; font-size: .95rem; }

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span{
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-nav{
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--line);
}
.mobile-nav a{
  padding: 12px 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn{ margin-top: 14px; }

body.nav-open .mobile-nav{ display: flex; }

@media (max-width: 880px){
  .main-nav, .nav-cta{ display: none; }
  .nav-toggle{ display: flex; }
}

/* ---------- Hero ---------- */
.hero{
  padding: 76px 0 64px;
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(181,130,42,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(122,46,34,.10), transparent 55%),
    var(--cream);
  border-bottom: 1px solid var(--line);
}
.hero-inner{ max-width: 880px; }
.eyebrow{
  display: inline-block;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--terracotta);
  background: rgba(122,46,34,.08);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: .92rem;
  margin-bottom: 20px;
}
.hero-lead{
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 640px;
}
.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 28px 0 34px;
}
.trust-row{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 0;
  margin: 0;
  font-weight: 600;
  color: var(--navy);
  font-size: .98rem;
}
.trust-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-size: .72rem;
  margin-right: 6px;
}

/* ---------- Sections ---------- */
.section{ padding: 72px 0; }
.section-alt{ background: var(--cream-alt); }
.kicker{
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
  font-size: .85rem;
  color: var(--terracotta);
  margin-bottom: 10px;
}
.section-lead{
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 640px;
}
.prose p{ font-size: 1.08rem; color: var(--ink-soft); }
.prose strong{ color: var(--ink); }
.prose ul{ margin: 0 0 1.4em; padding-left: 0; list-style: none; }
.prose li{
  font-size: 1.08rem;
  color: var(--ink-soft);
  padding-left: 30px;
  position: relative;
  margin-bottom: .6em;
}
.prose li::before{
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.prose .updated{
  color: var(--ink-soft);
  font-size: .95rem;
  margin-bottom: 2em;
}
.legal-header{ padding: 64px 0 8px; }
.legal-header .kicker{ margin-bottom: 6px; }

/* Cards */
.cards-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.info-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.info-icon{
  display: inline-flex;
  width: 48px; height: 48px;
  color: var(--terracotta);
  margin-bottom: 16px;
}
.info-icon svg{ width: 100%; height: 100%; }
.info-card p{ color: var(--ink-soft); margin-bottom: 0; }

/* Steps */
.steps{
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.step{
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.step-num{
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--cream);
  font-family: var(--font-serif);
  font-weight: 700;
}
.step h3{ margin-bottom: 4px; }
.step p{ margin: 0; color: var(--ink-soft); }

.callout{
  margin-top: 20px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: rgba(181,130,42,.12);
  border: 1px solid rgba(181,130,42,.35);
}
.callout p{ margin: 0; color: var(--ink); }
.callout-muted{
  background: rgba(35,52,47,.06);
  border-color: rgba(35,52,47,.18);
}

/* Team */
.team-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.team-card{
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: left;
}
.team-avatar{
  display: block;
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: linear-gradient(135deg, var(--terracotta), var(--gold));
  box-shadow: 0 0 0 4px var(--white), 0 0 0 5px var(--line);
  margin-bottom: 18px;
}
.team-card-pending{ opacity: .75; }
.team-card-pending .team-avatar{ background: var(--line); color: var(--ink-soft); }
.team-card figcaption p{ color: var(--ink-soft); margin: 0 0 .8em; font-size: .98rem; line-height: 1.65; }
.team-card figcaption p:last-child{ margin-bottom: 0; }
.team-role{
  color: var(--terracotta) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .8rem !important;
}

/* FAQ */
.faq-list{ margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.faq-item{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 22px;
}
.faq-item summary{
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-item summary::-webkit-details-marker{ display: none; }
.faq-item summary::after{
  content: "+";
  position: absolute;
  right: 0; top: 14px;
  font-size: 1.4rem;
  color: var(--terracotta);
  font-weight: 400;
}
.faq-item[open] summary::after{ content: "–"; }
.faq-item p{ color: var(--ink-soft); padding-bottom: 18px; margin: 0; }

/* Form section */
.section-form{ background: var(--cream-alt); }
.form-actions{ margin: 28px 0 8px; }
.form-hint{ color: var(--ink-soft); margin-top: 12px; font-size: .95rem; }
.form-embed-card{
  margin-top: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(43,36,32,.10);
}
.form-embed-card iframe{ width: 100%; border: 0; display: block; }

/* Contact */
.contact-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.contact-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.contact-card:hover{ transform: translateY(-3px); box-shadow: 0 14px 28px rgba(43,36,32,.10); }
.contact-icon{ width: 34px; height: 34px; color: var(--terracotta); margin-bottom: 4px; }
.contact-icon svg{ width: 100%; height: 100%; }
.contact-label{ font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 700; }
.contact-value{ font-weight: 600; font-size: 1.02rem; }
.contact-card-static{ cursor: default; }
.contact-card-static:hover{ transform: none; box-shadow: none; }

/* Footer */
.site-footer{
  background: var(--navy);
  color: #DCE3E0;
  padding: 44px 0 30px;
}
.footer-inner{ text-align: center; }
.footer-brand{
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
}
.footer-logo-img{
  height: 46px;
  width: auto;
  display: block;
  background: var(--cream);
  padding: 10px 16px;
  border-radius: 10px;
}
.footer-note{ font-size: .95rem; margin-bottom: 14px; }
.footer-note a{ color: #E9CB8E; }
.footer-copy{ font-size: .82rem; color: #9FADA8; margin: 0; }

/* WhatsApp floating button */
.whatsapp-float{
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
  z-index: 90;
  padding: 12px;
}
.whatsapp-float svg{ width: 100%; height: 100%; }

/* ---------- Hero entrance (CSS-only, no JS dependency) ---------- */
/* Contenido visible por defecto: si la animación no corre por algún motivo,
   el texto igual se ve desde el primer instante (regla base opacity:1). */
.hero-anim{
  opacity: 1;
  animation: heroFadeUp .7s ease both;
}
@keyframes heroFadeUp{
  from{ opacity: 0; transform: translateY(14px); }
  to{ opacity: 1; transform: none; }
}

/* ---------- Scroll reveal ---------- */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: none;
}
/* Defensive net: if JS fails or hasn't run yet, content must still be readable */
.reveal[data-split]{ opacity: 1; transform: none; }
.no-js .reveal, .reveal.no-anim{ opacity: 1 !important; transform: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .cards-grid, .team-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  body{ font-size: 17px; }
  .hero{ padding: 56px 0 48px; }
  .section{ padding: 52px 0; }
  .contact-grid{ grid-template-columns: 1fr; }
  .hero-actions{ flex-direction: column; }
  .hero-actions .btn{ width: 100%; }
  .step{ flex-direction: column; }
}
