:root{
  --bg: #F7F5F0;
  --bg-alt: #F0EBE1;
  --ink: #241012;
  --ink-soft: #4A3538;
  --muted: #756A63;
  --wine: #5C0E1A;
  --wine-deep: #3E0912;
  --gold: #C98A2C;
  --gold-light: #E0AC55;
  --cream: #F3E6C9;
  --line: #DED5C6;
  --radius: 2px;
}
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
#sobre, #servicios, #por-que-elegirnos, #como-trabajamos, #contacto{ scroll-margin-top:76px; }
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:'Inter',sans-serif; font-size:16px; line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{ font-family:'Space Grotesk',sans-serif; margin:0; color:var(--ink); font-weight:600; letter-spacing:-0.015em; }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
img,svg{ display:block; max-width:100%; }
.wrap{ max-width:1120px; margin:0 auto; padding:0 32px; }
@media (max-width:640px){ .wrap{ padding:0 20px; } }

/* Header */
header{
  position:sticky; top:0; z-index:50;
  background:rgba(92,14,26,0.97); backdrop-filter:blur(6px);
  border-bottom:1px solid var(--wine-deep);
}
/* Barra de admin de WordPress (solo visible logueado) */
.admin-bar header{ top:32px; }
@media (max-width:782px){ .admin-bar header{ top:46px; } }
@media (max-width:600px){ .admin-bar header{ top:0; } }

.header-inner{ display:flex; align-items:center; justify-content:space-between; padding:18px 0; gap:20px; }
.logo-mark{ padding:6px 0; flex-shrink:0; }
.logo-mark img{ height:34px; width:auto; display:block; }
@media (max-width:640px){ .logo-mark{ margin-left:6px; } }

.nav{ display:none; align-items:center; gap:28px; margin:0 auto; }
.nav a{ font-size:14px; color:var(--cream); opacity:0.9; font-weight:500; white-space:nowrap; }
.nav a:hover{ opacity:1; color:var(--gold-light); }
@media (min-width:900px){ .nav{ display:flex; } }

.header-actions{ display:flex; align-items:center; gap:16px; }

.menu-toggle{
  display:flex; align-items:center; justify-content:center;
  width:38px; height:38px; background:transparent; border:1px solid rgba(243,230,201,0.35);
  border-radius:var(--radius); cursor:pointer; flex-shrink:0;
}
.menu-toggle svg{ width:18px; height:18px; color:var(--cream); }
@media (min-width:900px){ .menu-toggle{ display:none; } }

.mobile-menu{
  display:none; flex-direction:column; background:var(--wine-deep);
  border-top:1px solid rgba(243,230,201,0.2);
}
.mobile-menu.open{ display:flex; }
@media (min-width:900px){ .mobile-menu{ display:none !important; } }
.mobile-menu a{
  padding:15px 32px; font-size:15px; color:var(--cream); border-bottom:1px solid rgba(243,230,201,0.12);
}
.mobile-menu a:last-child{ border-bottom:none; }
.mobile-menu a.mobile-wa{ color:var(--gold-light); font-weight:600; }

.btn-wa{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--gold); color:var(--wine-deep); font-size:14.5px; font-weight:600;
  padding:11px 20px; border-radius:var(--radius); border:1px solid var(--gold);
  transition:background .15s ease;
}
.btn-wa:hover{ background:var(--gold-light); }
.btn-wa svg{ width:16px; height:16px; }
@media (max-width:899px){ .btn-wa{ display:none; } }

/* Hero */
.hero{ position:relative; padding:76px 0 88px; overflow:hidden; }
.hero::before{
  content:""; position:absolute; inset:0; z-index:0;
  background-image:
    linear-gradient(rgba(247,245,240,0.93), rgba(247,245,240,0.93)),
    url("../img/hero.jpg");
  background-size:cover; background-position:center 30%;
}
.hero-grid{ position:relative; z-index:1; display:grid; grid-template-columns:1.15fr 1fr; gap:56px; align-items:center; }
@media (max-width:860px){ .hero-grid{ grid-template-columns:1fr; gap:44px; } }

.eyebrow-line{ display:flex; align-items:center; gap:12px; margin-bottom:22px; }
.eyebrow-line .rule{ width:34px; height:2px; background:var(--gold); }
.eyebrow-line span{ font-size:13.5px; color:var(--wine); font-weight:500; }

.hero h1{ font-size:44px; line-height:1.14; letter-spacing:-0.01em; max-width:11.5ch; }
@media (max-width:520px){ .hero h1{ font-size:33px; } }

.hero-sub{ margin-top:20px; font-size:17.5px; color:var(--ink-soft); max-width:46ch; }

.checks{ margin-top:26px; display:flex; flex-direction:column; gap:10px; }
.check-item{ display:flex; align-items:center; gap:10px; font-size:15px; color:var(--ink-soft); }
.check-item svg{ width:15px; height:15px; flex-shrink:0; color:var(--gold); }

.hero-ctas{ margin-top:34px; display:flex; gap:14px; flex-wrap:wrap; }
.btn-primary{
  background:var(--wine); color:#fff; padding:14px 26px; font-size:15px; font-weight:500;
  border-radius:var(--radius); border:1px solid var(--wine);
}
.btn-primary:hover{ background:var(--wine-deep); }
.btn-ghost{
  padding:14px 22px; font-size:15px; font-weight:500; color:var(--ink);
  border:1px solid var(--line); border-radius:var(--radius);
}
.btn-ghost:hover{ border-color:var(--wine); color:var(--wine); }

/* Hero visual panel */
.hero-panel{
  background:var(--wine); position:relative; overflow:hidden;
  padding:38px 30px; min-height:340px; display:flex; flex-direction:column; justify-content:space-between;
}
.hero-panel::before{
  content:""; position:absolute; inset:0; opacity:.14;
  background-image:
    linear-gradient(var(--gold-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold-light) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero-panel::after{
  content:""; position:absolute; right:-40px; bottom:-40px; width:220px; height:220px;
  border:1px solid rgba(224,172,85,0.35); border-radius:50%;
}
.panel-stat{ position:relative; z-index:1; }
.panel-stat .num{ font-family:'Space Grotesk'; font-size:64px; color:var(--gold-light); line-height:1; font-weight:700; }
.panel-stat .label{ margin-top:8px; font-size:14px; color:var(--cream); max-width:22ch; }
.panel-quote{
  position:relative; z-index:1; border-top:1px solid rgba(243,230,201,0.25); padding-top:20px;
  font-size:14.5px; color:var(--cream); line-height:1.55;
}
.panel-quote b{ color:#fff; font-weight:600; }

/* Sections generic */
section{ padding:74px 0; }
.section-head{ max-width:52ch; margin-bottom:40px; }
.section-head .rule{ width:34px; height:2px; background:var(--gold); margin-bottom:16px; }
.section-head h2{ font-size:30px; letter-spacing:-0.01em; }
.section-head p{ margin-top:14px; color:var(--muted); font-size:15.5px; }

/* Sobre GrupoCEB */
.about{ background:var(--bg-alt); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.about-inner{ display:grid; grid-template-columns:0.9fr 1.5fr; gap:48px; }
@media (max-width:800px){ .about-inner{ grid-template-columns:1fr; gap:26px; } }
.about-hook{ font-family:'Space Grotesk'; font-size:22px; color:var(--wine); line-height:1.35; border-left:2px solid var(--gold); padding-left:20px; }
.about-body p{ font-size:16px; color:var(--ink-soft); }
.about-body p + p{ margin-top:16px; }
.about-body strong{ color:var(--ink); font-weight:600; }

/* Servicios */
.services-grid{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:1px; background:var(--line); border:1px solid var(--line); }
@media (max-width:900px){ .services-grid{ grid-template-columns:1fr; } }
.service-card{ background:var(--bg); padding:36px 34px; }
.service-card .idx{ font-size:13px; color:var(--gold); font-weight:600; letter-spacing:0.02em; }
.service-card h3{ font-size:22px; margin-top:14px; }
.service-card p{ margin-top:12px; color:var(--muted); font-size:15px; max-width:38ch; }

/* Por qué elegirnos */
.why-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:36px; }
@media (max-width:760px){ .why-grid{ grid-template-columns:1fr; gap:28px; } }
.why-item{ border-top:2px solid var(--wine); padding-top:18px; }
.why-item h3{ font-size:18.5px; font-weight:600; }
.why-item p{ margin-top:10px; color:var(--muted); font-size:14.5px; }

/* Cómo trabajamos */
.steps{ background:var(--bg-alt); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.steps-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:0; position:relative; }
@media (max-width:760px){ .steps-row{ grid-template-columns:1fr; gap:30px; } }
.steps-row::before{
  content:""; position:absolute; top:19px; left:8%; right:8%; height:1px; background:var(--line);
}
@media (max-width:760px){ .steps-row::before{ display:none; } }
.step{ position:relative; padding-right:24px; }
.step .num{
  width:38px; height:38px; border-radius:50%; background:var(--wine); color:var(--gold-light);
  display:flex; align-items:center; justify-content:center; font-family:'Space Grotesk'; font-weight:700; font-size:16px;
  position:relative; z-index:1;
}
.step h3{ margin-top:18px; font-size:17.5px; }
.step p{ margin-top:8px; color:var(--muted); font-size:14.5px; max-width:30ch; }

/* Contacto */
.contact-grid{ display:grid; grid-template-columns:1.1fr 0.9fr; gap:0; border:1px solid var(--line); }
@media (max-width:820px){ .contact-grid{ grid-template-columns:1fr; } }
.contact-form{ padding:46px 44px; background:var(--bg); }
.contact-form h2{ font-size:27px; }
.contact-form > p{ margin-top:12px; color:var(--muted); font-size:15px; max-width:42ch; }
.form-grid{ margin-top:30px; display:grid; grid-template-columns:1fr 1fr; gap:16px 18px; }
@media (max-width:480px){ .form-grid{ grid-template-columns:1fr; } }
.field{ display:flex; flex-direction:column; gap:7px; }
.field.full{ grid-column:1 / -1; }
.field label{ font-size:13px; color:var(--ink-soft); font-weight:500; }
.field input, .field select, .field textarea{
  font-family:'Inter'; font-size:14.5px; padding:11px 12px; border:1px solid var(--line);
  border-radius:var(--radius); background:var(--bg); color:var(--ink); outline:none;
}
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--wine); }
.field textarea{ resize:vertical; min-height:88px; }
.form-submit{
  margin-top:8px; width:100%; background:var(--wine); color:#fff; padding:14px; font-size:15px;
  font-weight:500; border:none; border-radius:var(--radius); cursor:pointer;
}
.form-submit:hover{ background:var(--wine-deep); }

/* Agregado WP: honeypot anti-spam */
.hp-field{ position:absolute !important; left:-9999px !important; width:1px; height:1px; overflow:hidden; }

.contact-side{
  background:var(--wine); color:var(--cream); padding:46px 40px; display:flex; flex-direction:column; justify-content:space-between;
}
.contact-side h3{ color:#fff; font-size:19px; }
.contact-block{ margin-top:22px; }
.contact-block .label{ font-size:12.5px; color:var(--gold-light); letter-spacing:0.02em; margin-bottom:6px; }
.contact-block .value{ font-size:15px; color:var(--cream); line-height:1.5; }
.contact-side .wa-cta{
  margin-top:34px; display:inline-flex; align-items:center; gap:10px; background:var(--gold);
  color:var(--wine-deep); font-weight:600; padding:13px 20px; border-radius:var(--radius); font-size:14.5px;
}
.contact-side .wa-cta svg{ width:16px; height:16px; }

/* Footer */
footer{ background:var(--wine); border-top:1px solid var(--wine-deep); padding:34px 0; }
.footer-inner{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; }
.footer-inner .f-logo-img{ height:26px; width:auto; }
.footer-inner .f-meta{ font-size:13.5px; color:var(--cream); opacity:0.85; }
@media (max-width:600px){ .footer-inner{ flex-direction:column; align-items:flex-start; text-align:left; } .footer-inner .f-meta{ text-align:left; } }

/* ==========================================================================
   Animación de entrada (fade-in suave al hacer scroll)
   Solo se oculta si hay JS (clase .js en <html>) y el usuario no pidió
   reducir movimiento.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference){
  .js .reveal{
    opacity:0; transform:translateY(18px);
    transition:opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1);
    transition-delay:calc(var(--d, 0) * 110ms);
    will-change:opacity, transform;
  }
  .js .reveal.is-visible{ opacity:1; transform:none; }
}

/* ==========================================================================
   Burbuja de WhatsApp (estilo Joinchat, sin plugin)
   ========================================================================== */
.wa-bubble{
  --wa-green:#25D366; --wa-green-dark:#1EBE5A;
  position:fixed; right:24px; bottom:24px; z-index:60;
  display:flex; flex-direction:column; align-items:flex-end; gap:14px;
  font-family:'Inter',sans-serif;
  pointer-events:none; /* el contenedor no bloquea clics sobre la página */
}
.wa-fab{ pointer-events:auto; }
@media (max-width:640px){ .wa-bubble{ right:16px; bottom:16px; } }

.wa-fab{
  position:relative; width:60px; height:60px; border-radius:50%; border:none; cursor:pointer;
  background:var(--wa-green); color:#fff; display:flex; align-items:center; justify-content:center;
  box-shadow:0 6px 20px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.12);
  transition:transform .2s ease, background .2s ease;
  animation:wa-in .5s cubic-bezier(.2,.65,.3,1) .6s both;
}
.wa-fab:hover{ background:var(--wa-green-dark); transform:scale(1.06); }
.wa-fab:focus-visible{ outline:3px solid var(--gold-light); outline-offset:3px; }
.wa-fab svg{ width:32px; height:32px; }
.wa-fab::before{
  content:""; position:absolute; inset:0; border-radius:50%; background:var(--wa-green);
  z-index:-1; opacity:0;
}
.wa-bubble.has-notice .wa-fab::before{ animation:wa-pulse 2s ease-out 2; }

.wa-badge{
  position:absolute; top:-2px; right:-2px; min-width:20px; height:20px; padding:0 6px;
  border-radius:10px; background:#E5303A; color:#fff; font-size:12px; font-weight:600; line-height:20px; text-align:center;
  box-shadow:0 0 0 2px #fff;
  opacity:0; transform:scale(0); transition:opacity .25s ease, transform .25s cubic-bezier(.3,1.6,.5,1);
}
.wa-bubble.has-notice .wa-badge{ opacity:1; transform:scale(1); }

.wa-box{
  width:340px; max-width:calc(100vw - 32px); background:#fff; border-radius:16px; overflow:hidden;
  box-shadow:0 12px 40px rgba(36,16,18,.22), 0 2px 8px rgba(36,16,18,.12);
  transform-origin:bottom right; opacity:0; transform:translateY(12px) scale(.96); visibility:hidden; pointer-events:none;
  transition:opacity .25s ease, transform .25s cubic-bezier(.2,.65,.3,1), visibility 0s linear .25s;
}
.wa-bubble.is-open .wa-box{
  opacity:1; transform:none; visibility:visible; pointer-events:auto;
  transition:opacity .25s ease, transform .25s cubic-bezier(.2,.65,.3,1), visibility 0s;
}
.wa-box-head{ display:flex; align-items:center; gap:12px; padding:14px 14px 14px 16px; background:var(--wine); color:#fff; }
.wa-box-avatar{ width:40px; height:40px; border-radius:50%; overflow:hidden; flex-shrink:0; box-shadow:0 0 0 2px rgba(243,230,201,.35); }
.wa-box-avatar img{ width:100%; height:100%; object-fit:cover; }
.wa-box-title{ display:flex; flex-direction:column; line-height:1.3; flex:1; min-width:0; }
.wa-box-title strong{ font-family:'Space Grotesk',sans-serif; font-size:16px; font-weight:600; }
.wa-box-title span{ font-size:12.5px; color:var(--cream); opacity:.85; }
.wa-box-close{
  width:32px; height:32px; border-radius:50%; border:none; background:transparent; color:var(--cream);
  display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0;
}
.wa-box-close:hover{ background:rgba(243,230,201,.12); }
.wa-box-close svg{ width:18px; height:18px; }

.wa-box-body{
  padding:22px 18px 26px; background-color:#EFE7DD;
  background-image:radial-gradient(rgba(92,14,26,.06) 1px, transparent 1px); background-size:14px 14px;
}
.wa-msg{
  position:relative; display:inline-block; max-width:85%;
  background:#fff; color:var(--ink); font-size:14.5px; line-height:1.5;
  padding:10px 14px; border-radius:0 10px 10px 10px; box-shadow:0 1px 1px rgba(0,0,0,.08);
}
.wa-msg::before{
  content:""; position:absolute; top:0; left:-8px; width:0; height:0;
  border-top:0 solid transparent; border-right:8px solid #fff; border-bottom:10px solid transparent;
}
.wa-bubble.is-open .wa-msg{ animation:wa-msg-in .35s cubic-bezier(.2,.65,.3,1) .15s both; }

.wa-box-cta{
  margin:14px; display:flex; align-items:center; justify-content:center; gap:8px;
  background:var(--wa-green); color:#fff; font-weight:600; font-size:15px;
  padding:12px 18px; border-radius:999px; transition:background .2s ease;
}
.wa-box-cta:hover{ background:var(--wa-green-dark); }
.wa-box-cta svg{ width:18px; height:18px; }

@keyframes wa-in{ from{ opacity:0; transform:scale(.6); } to{ opacity:1; transform:none; } }
@keyframes wa-pulse{ 0%{ opacity:.5; transform:scale(1); } 100%{ opacity:0; transform:scale(1.6); } }
@keyframes wa-msg-in{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }

@media (prefers-reduced-motion: reduce){
  .wa-fab, .wa-bubble.is-open .wa-msg, .wa-bubble.has-notice .wa-fab::before{ animation:none; }
  .wa-box, .wa-bubble.is-open .wa-box{ transition:none; }
}

/* ==========================================================================
   Formulario: estado "enviando" + popup de resultado
   ========================================================================== */
.form-submit{ position:relative; display:flex; align-items:center; justify-content:center; gap:10px; }
.form-submit[disabled]{ cursor:progress; opacity:.85; }
.form-submit.is-loading::before{
  content:""; width:16px; height:16px; border-radius:50%;
  border:2px solid rgba(255,255,255,.35); border-top-color:#fff; animation:cf-spin .7s linear infinite;
}
@keyframes cf-spin{ to{ transform:rotate(360deg); } }

.cf-modal{
  position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; padding:20px;
  visibility:hidden; opacity:0; transition:opacity .25s ease, visibility 0s linear .25s;
}
.cf-modal.is-open{ visibility:visible; opacity:1; transition:opacity .25s ease, visibility 0s; }
.cf-modal-overlay{ position:absolute; inset:0; background:rgba(36,16,18,.62); backdrop-filter:blur(3px); }
.cf-modal-card{
  position:relative; width:100%; max-width:440px; background:var(--bg); border-top:4px solid var(--gold);
  border-radius:var(--radius); padding:40px 34px 32px; text-align:center;
  box-shadow:0 24px 60px rgba(36,16,18,.35);
  transform:translateY(16px) scale(.97); transition:transform .3s cubic-bezier(.2,.65,.3,1);
}
.cf-modal.is-open .cf-modal-card{ transform:none; }
.cf-modal-card:focus{ outline:none; }
.cf-modal-icon{
  width:64px; height:64px; margin:0 auto 20px; border-radius:50%;
  display:none; align-items:center; justify-content:center;
}
.cf-modal-icon svg{ width:32px; height:32px; }
.cf-icon-ok{ background:var(--wine); color:var(--gold-light); }
.cf-icon-error{ background:#F6E3E3; color:var(--wine); }
.cf-modal h3{ font-size:23px; line-height:1.25; }
.cf-modal p{ margin-top:12px; color:var(--ink-soft); font-size:15px; line-height:1.6; }
.cf-modal-actions{ margin-top:26px; display:flex; flex-direction:column; gap:10px; }
.cf-btn{
  display:flex; align-items:center; justify-content:center; gap:8px; width:100%;
  padding:13px 20px; font-size:15px; font-weight:500; border-radius:var(--radius); cursor:pointer;
}
.cf-btn svg{ width:18px; height:18px; }
.cf-btn-primary{ background:var(--wine); color:#fff; }
.cf-btn-primary:hover{ background:var(--wine-deep); }
.cf-btn-wa{ background:var(--gold); color:var(--wine-deep); font-weight:600; }
.cf-btn-wa:hover{ background:var(--gold-light); }

/* Mostrar solo los textos del estado actual */
.cf-modal .cf-ok, .cf-modal .cf-error{ display:none; }
.cf-modal[data-state="ok"] span.cf-ok, .cf-modal[data-state="error"] span.cf-error{ display:inline; }
.cf-modal[data-state="error"] a.cf-error{ display:flex; }
.cf-modal[data-state="ok"] .cf-icon-ok, .cf-modal[data-state="error"] .cf-icon-error{ display:flex; }
.cf-modal[data-state="ok"] .cf-icon-ok{ animation:cf-pop .45s cubic-bezier(.3,1.6,.5,1) .1s both; }
@keyframes cf-pop{ from{ transform:scale(.4); opacity:0; } to{ transform:none; opacity:1; } }

body.cf-lock{ overflow:hidden; }
@media (max-width:480px){ .cf-modal-card{ padding:34px 22px 24px; } .cf-modal h3{ font-size:21px; } }
@media (prefers-reduced-motion: reduce){
  .cf-modal, .cf-modal-card{ transition:none; } .cf-modal[data-state="ok"] .cf-icon-ok{ animation:none; }
}
