/* ===== Variables y reset ===== */
:root {
  --brown: #4a2f1f;        /* café cuero (como el logo) */
  --brown-dark: #2e1c12;   /* café oscuro */
  --brown-mid: #6b4a33;
  --gold: #a9833f;         /* dorado del logo */
  --gold-light: #c9a86a;
  --ink: #2a211b;          /* texto principal cálido */
  --muted: #6f6256;        /* texto secundario */
  --bg: #f5eddf;           /* beige cálido (fondo general) */
  --bg-alt: #ece1ce;       /* beige un poco más profundo */
  --line: #e6dccb;         /* líneas suaves */
  --radius: 14px;
  --shadow: 0 10px 30px rgba(74, 47, 31, 0.10);
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  font-size: 16px;
}
strong { font-weight: 600; color: var(--ink); }

h1, h2, h3 { font-family: "Cormorant", Georgia, serif; line-height: 1.15; color: var(--brown); font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 600; margin-bottom: .6rem; }
h3 { font-size: 1.35rem; font-weight: 600; }

p { color: var(--muted); }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: .6rem;
}

/* ===== Botones ===== */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .55s ease-out, color .55s ease-out, border-color .55s ease-out;
}
/* Hover de botones: solo cambio de tono, sin movimiento ni escalado */
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-light); }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(35,21,13,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.logo-text { display: none; }
.logo.logo-fallback .logo-text { display: inline; }
.logo-mark {
  background: var(--gold); color: var(--brown-dark);
  font-family: "Cormorant", serif; font-weight: 700;
  width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center; font-size: 1.1rem;
}
.logo-text { font-family: "Cormorant", serif; font-size: 1.3rem; font-weight: 600; color: #f3e9d8; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: .95rem; font-weight: 500; color: rgba(255,255,255,.85); transition: color .3s ease-out; }
.nav a:hover { color: var(--gold-light); }
.btn-nav { color: #fff !important; background: var(--gold); padding: 9px 18px; }
.btn-nav:hover { background: var(--gold-light); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: #fff; transition: .3s; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(176,141,79,.25), transparent 70%);
}
.hero-inner { padding: clamp(64px, 12vw, 130px) 24px; max-width: 760px; position: relative; z-index: 1; }
.hero-logo { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: 1.8rem; border: 2px solid rgba(201,168,106,.5); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero-sub { color: rgba(255,255,255,.82); font-size: 1.15rem; margin-bottom: 2rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Fondo del hero: cruce muy lento y tenue entre estatua y mazo */
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero-bg-gavel {
  opacity: 0; animation: heroCross 38s ease-in-out infinite;
  filter: brightness(1.6) saturate(1.25) contrast(1.03);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(46,28,18,.90) 0%, rgba(30,20,14,.84) 100%);
}
@keyframes heroCross {
  0%, 40%  { opacity: 0; }
  50%, 90% { opacity: 1; }
  100%     { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg-gavel { animation: none; }
}

/* ===== Secciones ===== */
.section { padding: clamp(56px, 9vw, 100px) 0; }
.section-alt { background: var(--bg-alt); }

/* Fondos jurídicos (velo degradado: más cubierto sobre el texto, más visible al lado) */
#nosotros {
  background-image: linear-gradient(100deg, rgba(245,237,223,.95) 0%, rgba(245,237,223,.90) 42%, rgba(245,237,223,.58) 100%),
                    url("images/bg-nosotros.jpg?v=3");
  background-size: cover; background-position: center;
}
#areas {
  background-image: linear-gradient(rgba(236,225,206,.92) 0%, rgba(236,225,206,.66) 100%),
                    url("images/bg-areas.jpg?v=3");
  background-size: cover; background-position: center;
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-intro { font-size: 1.08rem; }

.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }

/* Estadísticas */
.stats { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stats-3 { grid-template-columns: 1fr; }
.stats li {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-align: center;
}
.stat-num { display: block; font-family: "Cormorant", serif; font-size: 2.4rem; font-weight: 700; color: var(--gold); }
.stat-label { font-size: .9rem; color: var(--muted); }

/* Tarjetas de áreas */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(74,47,31,.18); }
.card-media {
  position: relative; height: 175px;
  background-size: cover; background-position: center;
  transition: transform .5s ease;
}
.card:hover .card-media { transform: scale(1.07); }
.card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(46,28,18,.10) 0%, rgba(46,28,18,.45) 100%);
}
.card-icon {
  position: absolute; left: 16px; bottom: 14px; z-index: 1;
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(46,28,18,.78); backdrop-filter: blur(2px);
  display: grid; place-items: center; font-size: 1.4rem;
  border: 1px solid rgba(201,168,106,.4);
}
.card-body { padding: 22px 24px 26px; }
.card-body h3 { margin-bottom: .5rem; }
.card-body p { font-size: .95rem; }

/* ===== Aparición progresiva al hacer scroll ===== */
body.reveal-on .card,
body.reveal-on .section-head,
body.reveal-on .commitment,
body.reveal-on .stats li {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
body.reveal-on .card.in,
body.reveal-on .section-head.in,
body.reveal-on .commitment.in,
body.reveal-on .stats li.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  body.reveal-on .card,
  body.reveal-on .section-head,
  body.reveal-on .commitment,
  body.reveal-on .stats li { opacity: 1 !important; transform: none !important; }
}

/* Bloque de compromiso */
.commitment {
  margin-top: 48px;
  background: var(--brown);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px clamp(28px, 5vw, 56px);
  text-align: center;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
}
.commitment::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(201,168,106,.22), transparent 60%);
}
.commitment h3 { color: var(--gold-light); margin-bottom: .6rem; font-size: 1.6rem; position: relative; }
.commitment p { color: rgba(255,255,255,.85); position: relative; margin: 0 auto; max-width: 720px; }
.commitment p + p { margin-top: 1rem; }

/* ===== Banda CTA ===== */
.cta-band {
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-dark) 100%);
  color: #fff; padding: clamp(36px, 6vw, 60px) 0; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px;
  border-radius: 50%; background: radial-gradient(circle, rgba(201,168,106,.22), transparent 70%);
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: .3rem; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Testimonios (carrusel) ===== */
.testimonials { max-width: 760px; margin: 0 auto; }
.testimonial-track { position: relative; }
.testimonial {
  margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(28px, 4vw, 44px); text-align: center;
  display: none;
}
.testimonial.active { display: block; animation: tFade .5s ease; }
@keyframes tFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.testimonial blockquote { margin: 0 0 1.2rem; font-size: 1.15rem; line-height: 1.6; color: var(--ink); font-style: italic; }
.testimonial figcaption { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.t-name { font-weight: 600; color: var(--brown); font-size: .9rem; }
.t-stars { color: var(--gold); letter-spacing: 2px; }
.testimonial-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.t-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--brown); font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
}
.t-btn:hover { background: var(--brown); color: #fff; transform: translateY(-2px); }
.t-dots { display: flex; gap: 8px; }
.t-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; padding: 0;
  transition: background .2s, transform .2s;
}
.t-dots button.active { background: var(--gold); transform: scale(1.25); }

/* ===== Redes sociales (footer) ===== */
.footer-social { display: flex; gap: 14px; }
.footer-social a { color: rgba(255,255,255,.75); display: grid; place-items: center; transition: color .2s, transform .2s; }
.footer-social a:hover { color: var(--gold-light); transform: translateY(-2px); }

/* ===== Contacto ===== */
.contact-grid { align-items: start; }
.contact-info { list-style: none; margin-top: 1.5rem; display: grid; gap: 16px; }
.contact-info li { display: flex; flex-direction: column; }
.ci-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 600; }
.contact-info a:hover { color: var(--gold); }

/* Botones directos de contacto */
.contact-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.btn-lg { padding: 16px 34px; font-size: 1.02rem; }
.btn-outline { background: transparent; border-color: var(--brown); color: var(--brown); }
.btn-outline:hover { background: var(--brown); color: #fff; }
.contact-info-row { margin-top: 0; grid-template-columns: repeat(4, 1fr); gap: 22px; max-width: 920px; margin-left: auto; margin-right: auto; }
.contact-info-row li { text-align: center; align-items: center; }

.contact-form {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--brown); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-family: inherit; font-size: .96rem; background: #fff;
  transition: border-color .2s, box-shadow .2s; color: var(--ink);
}
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a9833f' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176,141,79,.15);
}
.form-note { margin-top: 14px; color: #1a7a4a; font-weight: 600; font-size: .92rem; }

/* ===== Footer ===== */
.site-footer { background: var(--brown-dark); color: rgba(255,255,255,.7); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: .9rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.footer-social a svg { width: 22px; height: 22px; }
.site-footer a:hover { color: var(--gold-light); }

/* ===== Botón flotante WhatsApp ===== */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(37,211,102,.45);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* ===== Responsivo ===== */
@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    background: rgba(35,21,13,.98); flex-direction: column; align-items: stretch;
    gap: 0; padding: 12px 24px 24px; border-bottom: 1px solid rgba(255,255,255,.08);
    transform: translateY(-150%); transition: transform .3s ease; box-shadow: var(--shadow);
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .contact-info-row { grid-template-columns: 1fr; }
  .btn-nav { text-align: center; margin-top: 10px; border-bottom: 0 !important; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .grid-2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}

@media (min-width: 861px) and (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
