/* CEED — página demo. Los colores de marca se definen una sola vez aquí. */
:root {
  --azul: #0170B5;
  --azul-oscuro: #014a78;
  --lima: #C2F803;
  --naranja: #FC7F01;
  --magenta: #AA01A0;

  --tinta: #0c2233;
  --texto: #34495a;
  --suave: #6b7f8e;
  --papel: #ffffff;
  --tinte: #f1f6fa;
  --linea: #dfe8ef;
  --noche: #061826;

  --titulo: "Sora", system-ui, sans-serif;
  --cuerpo: "Inter", system-ui, sans-serif;
  --radio: 18px;
  --header: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--texto);
  font-family: var(--cuerpo);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4 { font-family: var(--titulo); color: var(--tinta); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
section[id], main [id] { scroll-margin-top: calc(var(--header) + 12px); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .8rem 1.4rem;
  border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; text-align: center;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--lima); outline-offset: 3px; }
.btn svg { width: 1.2em; height: 1.2em; }
.btn-primary { background: var(--azul); color: #fff; }
.btn-primary:hover { background: var(--azul-oscuro); }
.btn-orange { background: var(--naranja); color: #fff; }
.btn-orange:hover { background: #e06f00; }
.btn-lime { background: var(--lima); color: var(--tinta); }
.btn-lime:hover { background: #d4ff3a; }
.btn-outline { border-color: var(--azul); color: var(--azul); }
.btn-outline:hover { background: var(--azul); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-sm { min-height: 42px; padding: .55rem 1.05rem; font-size: .88rem; }

/* ---------- 1. Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  height: var(--header);
  display: flex; align-items: center; gap: 2rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linea);
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { width: 48px; height: 48px; }
.brand-name { font-family: var(--titulo); font-weight: 700; font-size: 1.3rem; color: var(--azul); letter-spacing: .04em; }
.desktop-nav { display: flex; gap: 2rem; margin-left: auto; }
.desktop-nav a { font-weight: 500; color: var(--texto); font-size: .95rem; position: relative; }
.desktop-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--azul); transform: scaleX(0); transition: transform .2s ease; }
.desktop-nav a:hover { color: var(--azul); }
.desktop-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.icon-wa { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #1a9e55; border: 1.5px solid var(--linea); transition: background-color .2s ease; }
.icon-wa:hover { background: #eafaf0; }
.icon-wa svg { width: 24px; height: 24px; }
.menu-toggle, .mobile-nav { display: none; }

/* ---------- 2. Hero con la secuencia ---------- */
.scroll-film { position: relative; height: 600vh; background: #050e12; }
.film-stage {
  position: sticky; top: var(--header);
  height: calc(100svh - var(--header));
  overflow: hidden; background: #050e12;
}
.film-frames { position: absolute; inset: 0; }
.film-frame {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: 0; pointer-events: none; user-select: none;
}
/* El frame que entra (is-active) se funde ENCIMA del que sale (is-under), que se queda al 100%. Nunca se asoma el fondo. */
.film-frame.is-under { opacity: 1; z-index: 1; }
.film-frame.is-active { opacity: 1; z-index: 2; }
.film-frame.is-active, .film-frame.is-under { transition: opacity .38s cubic-bezier(.2,.65,.2,1); will-change: opacity; }
.film-shade {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3,14,22,.72) 0%, rgba(3,14,22,.38) 38%, rgba(3,14,22,0) 62%),
    linear-gradient(0deg, rgba(3,14,22,.55) 0%, rgba(3,14,22,0) 40%);
}
.film-msg {
  position: absolute; z-index: 4;
  left: clamp(1.25rem, 6vw, 6rem); bottom: clamp(3.5rem, 12vh, 8rem);
  max-width: min(36rem, 100% - 2.5rem);
  color: #fff; opacity: 0; visibility: hidden;
  transform: translateY(12px);
}
.film-msg h1, .film-msg h2 { color: #fff; font-weight: 600; font-size: clamp(2.1rem, 4.4vw, 4rem); line-height: 1.06; }
.film-msg p { margin: 1.1rem 0 0; font-size: clamp(1rem, 1.3vw, 1.15rem); color: rgba(255,255,255,.88); max-width: 30rem; }
.film-msg .btn { margin-top: 1.6rem; }
.film-msg em { font-style: normal; color: var(--lima); }
.film-skip {
  position: absolute; z-index: 5; top: 1.1rem; right: clamp(1.25rem, 4vw, 3rem);
  color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 500;
  padding: .45rem .9rem; border-radius: 999px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.25);
}
.film-skip:hover { background: rgba(0,0,0,.45); }
.film-cue { position: absolute; z-index: 4; right: clamp(1.25rem, 4vw, 3rem); bottom: 1.6rem; margin: 0; color: rgba(255,255,255,.75); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.film-disclaimer { position: absolute; z-index: 4; left: clamp(1.25rem, 6vw, 6rem); bottom: .9rem; margin: 0; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.9); opacity: 0; pointer-events: none; }

/* ---------- 3. Franja de emergencias ---------- */
.urgent-strip { background: #fff4e8; border-bottom: 1px solid #ffe0bf; }
.urgent-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: 1rem 0; flex-wrap: wrap; }
.urgent-inner p { margin: 0; display: flex; align-items: center; gap: .7rem; font-weight: 600; color: var(--tinta); font-size: 1.05rem; }
.urgent-inner svg { width: 26px; height: 26px; color: var(--naranja); flex: none; }

/* ---------- 4. Franja de confianza ---------- */
.trust { background: var(--azul); color: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-grid > div { padding: 2rem 1rem; text-align: center; display: grid; gap: .2rem; }
.trust-grid > div + div { border-left: 1px solid rgba(255,255,255,.22); }
.trust strong { font-family: var(--titulo); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; color: var(--lima); }
.trust span { font-size: .95rem; color: rgba(255,255,255,.9); }

/* ---------- Secciones ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-tint { background: var(--tinte); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.section-head p:not(.eyebrow) { margin: 1rem 0 0; font-size: 1.08rem; }
.eyebrow { margin: 0 0 .9rem; display: inline-flex; align-items: center; gap: .6rem; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--azul); }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--magenta); }

/* ---------- 5. Servicios ---------- */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.service-card { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s ease, transform .25s ease; }
.service-card:hover { box-shadow: 0 18px 40px -22px rgba(1,74,120,.35); transform: translateY(-3px); }
.service-card img { aspect-ratio: 3 / 2; width: 100%; height: auto; object-fit: cover; }
.service-body { padding: 1.6rem 1.6rem 1.8rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.service-body h3 { font-size: 1.35rem; }
.service-body p { margin: 0; }
.service-body .btn { margin-top: auto; align-self: flex-start; }
.service-tag { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--azul); }
.service-card-urgent { border-color: #ffd2a6; background: #fffaf4; }
.service-card-urgent .service-tag { color: #c45f00; }

/* ---------- 6. Por qué CEED ---------- */
.reasons-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.reason { background: #fff; border-radius: var(--radio); padding: 1.8rem 1.5rem; border: 1px solid var(--linea); }
.reason svg { width: 40px; height: 40px; color: var(--azul); padding: 8px; border-radius: 12px; background: #e6f1f9; box-sizing: content-box; }
.reason h3 { font-size: 1.12rem; margin: 1.2rem 0 .5rem; }
.reason p { margin: 0; font-size: .97rem; }

/* ---------- 7. Especialistas ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.team-card { margin: 0; border-radius: var(--radio); overflow: hidden; background: var(--tinte); }
.team-card img { aspect-ratio: 4 / 5; width: 100%; height: auto; object-fit: cover; }
.team-card figcaption { padding: 1.1rem 1.3rem 1.3rem; display: grid; gap: .15rem; }
.team-card span { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--suave); font-weight: 600; }
.team-card strong { font-family: var(--titulo); font-size: 1.25rem; color: var(--tinta); }

/* ---------- 8. Antes y después ---------- */
.section-dark { background: var(--noche); color: rgba(255,255,255,.82); }
.section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: var(--lima); }
.compare-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.compare-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.compare-copy p:not(.eyebrow) { margin: 1rem 0 1.8rem; font-size: 1.08rem; }
.compare { position: relative; border-radius: var(--radio); overflow: hidden; aspect-ratio: 3 / 2; background: #000; user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; }
.compare-handle i { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.compare-handle i::before, .compare-handle i::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent; }
.compare-handle i::before { left: 8px; border-right-color: var(--azul); }
.compare-handle i::after { right: 8px; border-left-color: var(--azul); }
.compare-label { position: absolute; top: 1rem; padding: .3rem .75rem; border-radius: 999px; background: rgba(0,0,0,.5); color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: .06em; pointer-events: none; }
.compare-label-before { left: 1rem; }
.compare-label-after { right: 1rem; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.reviews-placeholder { margin-top: clamp(3rem, 6vw, 4.5rem); border: 1px dashed rgba(255,255,255,.3); border-radius: var(--radio); padding: 2.2rem 1.5rem; text-align: center; display: grid; justify-items: center; gap: .6rem; }
.reviews-placeholder svg { width: 34px; height: 34px; color: var(--lima); }
.reviews-placeholder p { margin: 0; font-family: var(--titulo); font-size: 1.15rem; color: #fff; }

/* ---------- 9. Sedes ---------- */
.sedes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.sede { border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.6rem 1.4rem; display: flex; flex-direction: column; gap: .35rem; background: #fff; }
.sede-city { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--magenta); }
.sede h3 { font-size: 1.2rem; }
.sede-addr { margin: .3rem 0 0; font-size: .95rem; }
.sede-pending { color: var(--suave); font-style: italic; }
.sede-tel { margin: 0; font-weight: 600; color: var(--tinta); }
.sede-actions { margin-top: auto; padding-top: 1rem; display: grid; gap: .5rem; }
.sede-actions .btn { width: 100%; }

/* ---------- 10. Llamada final ---------- */
.final-cta { background: linear-gradient(135deg, var(--azul) 0%, var(--azul-oscuro) 100%); color: rgba(255,255,255,.9); padding: clamp(4rem, 8vw, 6rem) 0; }
.final-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.final-copy h2 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); }
.final-copy p { font-size: 1.12rem; margin: 1rem 0 2rem; }
.final-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.final-photo img { border-radius: var(--radio); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }

/* ---------- 11. Pie de página ---------- */
.site-footer { background: var(--noche); color: rgba(255,255,255,.72); padding: 3.5rem 0 1.5rem; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.footer-brand img { width: 56px; height: 56px; margin-bottom: 1rem; }
.footer-brand p { margin: 0; max-width: 20rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a:hover { color: var(--lima); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.3rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; font-size: .8rem; }
.footer-bottom p { margin: 0; }
.footer-note { color: rgba(255,255,255,.5); }
.footer-credit { color: rgba(255,255,255,.32); font-size: .72rem; }

/* WhatsApp flotante (solo celular) */
.wa-float { display: none; }

/* ---------- Animación de aparición ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Tableta ---------- */
@media (max-width: 1080px) {
  .desktop-nav { gap: 1.3rem; }
  .reasons-grid { grid-template-columns: repeat(2, 1fr); }
  .sedes-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  :root { --header: 64px; }
  .site-header { gap: 1rem; }
  .brand img { width: 40px; height: 40px; }
  .desktop-nav, .header-cta, .icon-wa { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: grid; gap: 6px; width: 44px; height: 44px; place-content: center; border: 0; background: transparent; cursor: pointer; }
  .menu-toggle span:not(.sr-only) { display: block; width: 24px; height: 2px; background: var(--tinta); transition: transform .2s ease; }
  .menu-toggle.open span:nth-of-type(2) { transform: translateY(4px) rotate(45deg); }
  .menu-toggle.open span:nth-of-type(3) { transform: translateY(-4px) rotate(-45deg); }
  .mobile-nav { position: absolute; top: var(--header); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--linea); padding: .5rem 1.25rem 1.25rem; flex-direction: column; box-shadow: 0 20px 30px -20px rgba(0,0,0,.2); }
  .mobile-nav.open { display: flex; }
  .mobile-nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--linea); font-weight: 500; color: var(--tinta); }
  .mobile-nav .btn { margin-top: 1rem; }

  .scroll-film { height: 540vh; }
  .film-shade { background: linear-gradient(0deg, rgba(3,14,22,.82) 0%, rgba(3,14,22,.45) 45%, rgba(3,14,22,0) 72%); }
  .film-msg { bottom: 6.2rem; right: 1.25rem; }
  .film-msg h1, .film-msg h2 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .film-msg .btn { width: 100%; }
  .film-cue { display: none; }

  .trust-grid { grid-template-columns: 1fr; }
  .trust-grid > div { padding: 1.1rem 1rem; }
  .trust-grid > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.22); }
  .services-grid, .team-grid, .compare-layout, .final-grid, .footer-grid { grid-template-columns: 1fr; }
  .team-grid { gap: 1.25rem; }
  .urgent-inner .btn { width: 100%; }
  .final-actions .btn { width: 100%; }

  .wa-float { display: grid; place-items: center; position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45); }
  .wa-float svg { width: 30px; height: 30px; }
  .site-footer { padding-bottom: 5.5rem; }
}
@media (max-width: 560px) {
  .sedes-grid, .reasons-grid { grid-template-columns: 1fr; }
}
