:root {
  --bg: #0a0a0b;
  --surface: #131315;
  --surface-2: #1b1b1e;
  --border: rgba(255,255,255,.08);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --orange: #f39c1f;
  --ember: #e0582a;
  --red: #b3202e;
  --brand: linear-gradient(100deg, var(--orange), var(--ember) 55%, var(--red));
  --wa: #25d366;
  --radius: 20px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 28px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: hidden;
  background: var(--bg); color: var(--text);
  font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: "Chakra Petch", Inter, sans-serif; line-height: 1.08; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.grad-text { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 13px/1 "Chakra Petch", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--brand); border-radius: 2px; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px; border-radius: 14px; border: 0; cursor: pointer;
  font: 600 17px/1 Inter, sans-serif; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: scale(.98); }
.btn-wa { background: var(--wa); color: #052e14; box-shadow: 0 10px 30px -10px rgba(37,211,102,.6); }
.btn-wa:hover { box-shadow: 0 14px 40px -8px rgba(37,211,102,.75); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: var(--text); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }

/* ---------- Header ---------- */
header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  transition: background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
  padding-top: env(safe-area-inset-top);
}
header.scrolled { background: rgba(10,10,11,.78); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-color: var(--border); }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; }
header .logo img { height: 34px; width: auto; }
header nav { display: none; gap: 28px; font-size: 15px; color: #d4d4d8; }
header nav a:hover { color: #fff; }
header .call {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(10,10,11,.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
header .call:hover { background: rgba(255,255,255,.1); }
header .call svg { color: var(--orange); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 900px); display: flex; align-items: flex-end;
  padding: calc(110px + env(safe-area-inset-top)) 0 clamp(40px, 7vw, 80px);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; transform: scale(1.04); animation: zoom 18s ease-out forwards; }
@keyframes zoom { to { transform: scale(1); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,10,11,.55) 0%, rgba(10,10,11,.15) 30%, rgba(10,10,11,.75) 62%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10,10,11,.85) 0%, rgba(10,10,11,.35) 60%, rgba(10,10,11,.1) 100%);
}
.hero::after { /* brillo de baliza */
  content: ""; position: absolute; z-index: -1; width: 70vmax; height: 70vmax; left: -25vmax; bottom: -40vmax;
  background: radial-gradient(closest-side, rgba(224,88,42,.32), transparent);
  pointer-events: none;
}
.hero-content { max-width: 640px; }
.badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 13px 7px 11px;
  border-radius: 999px; background: rgba(10,10,11,.5); border: 1px solid rgba(37,211,102,.35);
  color: #86efac; font-size: 14px; font-weight: 500; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 0 rgba(37,211,102,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
.hero h1 { font-size: clamp(36px, 7.4vw, 76px); font-weight: 700; margin-top: 20px; text-shadow: 0 2px 30px rgba(0,0,0,.5); }
.hero p.lead { color: #d4d4d8; font-size: clamp(17px, 2.2vw, 20px); margin: 18px 0 30px; max-width: 36ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.stats {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0;
  margin-top: 36px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px;
}
.stat { padding-right: clamp(16px, 4vw, 40px); margin-right: clamp(16px, 4vw, 40px); border-right: 1px solid rgba(255,255,255,.12); }
.stat:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.stat b { display: block; font: 700 clamp(22px, 3.4vw, 30px)/1 "Chakra Petch", sans-serif; }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 13.5px; line-height: 1.3; }

/* ---------- Cinta ---------- */
.ticker { border-block: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: slide 32s linear infinite; }
.ticker-track span {
  display: inline-flex; align-items: center; gap: 22px; padding: 16px 11px;
  font: 600 15px/1 "Chakra Petch", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #d4d4d8; white-space: nowrap;
}
.ticker-track span::after { content: ""; width: 7px; height: 7px; transform: rotate(45deg); background: var(--brand); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
section { padding: clamp(64px, 10vw, 112px) 0; }
.sec-head { max-width: 640px; margin-bottom: clamp(28px, 5vw, 44px); }
.sec-head h2 { font-size: clamp(30px, 4.6vw, 46px); margin-top: 14px; }
.sec-head p { color: var(--muted); margin: 14px 0 0; font-size: 17px; }
.sec-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: clamp(28px, 5vw, 44px); }
.sec-row .sec-head { margin-bottom: 0; }

.grid { display: grid; gap: 14px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 28px); transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.card:hover { border-color: rgba(243,156,31,.35); transform: translateY(-3px); background: #161618; }
.icon {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(243,156,31,.18), rgba(179,32,46,.18));
  border: 1px solid rgba(243,156,31,.25); color: var(--orange);
}
.card h3 { font-size: 22px; font-weight: 700; }
.card p { color: var(--muted); margin: 8px 0 0; font-size: 15.5px; }

.more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--orange); font-weight: 600; font-size: 15px; }
.more:hover { color: #ffb84d; }
.grid-4 .more::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.section-more { margin-top: 22px; text-align: center; }

/* Páginas internas */
.hero-sub {
  position: relative; overflow: hidden;
  padding: calc(116px + env(safe-area-inset-top)) 0 clamp(44px, 7vw, 72px);
  background: radial-gradient(700px 380px at 12% 0%, rgba(224,88,42,.24), transparent 70%);
}
.hero-sub h1 { font-size: clamp(34px, 6vw, 60px); margin-top: 16px; max-width: 18ch; }
.hero-sub .lead { color: #d4d4d8; font-size: clamp(17px, 2.2vw, 20px); margin: 16px 0 28px; max-width: 46ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.page-body { padding-top: 0; }
.page-grid { display: grid; gap: clamp(24px, 4vw, 48px); align-items: start; }
.prose p { color: #d4d4d8; font-size: 17px; margin: 0 0 16px; max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; color: #d4d4d8; font-size: 17px; }
.prose li { display: flex; gap: 10px; align-items: flex-start; }
.prose li svg { color: var(--orange); margin-top: 5px; }
.page-photo { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.page-photo img { width: 100%; height: 100%; object-fit: cover; }
.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.related a { padding: 10px 15px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 15px; font-weight: 500; }
.related a:hover { border-color: rgba(243,156,31,.4); }

/* Galería */
.gallery { columns: 2 160px; column-gap: 12px; }
.gallery button {
  display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0; background: var(--surface);
  border-radius: 16px; overflow: hidden; cursor: zoom-in; break-inside: avoid; position: relative;
}
.gallery img { width: 100%; height: auto; transition: transform .5s ease, filter .3s ease; filter: saturate(.92); }
.gallery button::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--border); pointer-events: none; }
.gallery button:hover img { transform: scale(1.04); filter: saturate(1.05); }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100dvh; margin: 0; }
.lightbox::backdrop { background: rgba(5,5,6,.92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(94vw, 1100px); max-height: 82dvh; width: auto; height: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb-btn {
  position: fixed; z-index: 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-close { top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-count { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 14px; }

/* Pasos */
.step .n { font: 700 14px/1 "Chakra Petch", sans-serif; letter-spacing: .14em; position: absolute; top: clamp(22px, 3vw, 28px); right: clamp(22px, 3vw, 28px); color: rgba(255,255,255,.22); }

/* Cobertura */
.coverage { display: grid; gap: 14px; }
.coverage .card:hover { transform: none; }
.coverage ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.coverage li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.coverage li svg { color: var(--orange); margin-top: 3px; }
.coverage li strong { color: var(--text); font-weight: 600; }
.pays { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; font-weight: 500; }
.pill svg { color: var(--orange); }

/* CTA final */
.final {
  position: relative; isolation: isolate; overflow: hidden; text-align: center;
  border-radius: 28px; padding: clamp(56px, 9vw, 96px) 22px; border: 1px solid var(--border);
}
.final > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 300px at 50% 0%, rgba(224,88,42,.35), transparent 70%), linear-gradient(180deg, rgba(10,10,11,.78), rgba(10,10,11,.9)); }
.final h2 { font-size: clamp(30px, 5.2vw, 52px); margin-top: 14px; }
.final p { color: #d4d4d8; margin: 16px auto 30px; max-width: 46ch; font-size: 17px; }
.final .ctas { justify-content: center; }
.final .eyebrow::after { content: ""; width: 22px; height: 2px; background: var(--brand); border-radius: 2px; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 36px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14.5px; }
footer .wrap { display: grid; gap: 22px; }
footer img { height: 30px; width: auto; }
.links { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.links a { display: inline-flex; align-items: center; gap: 8px; }
.links a:hover { color: var(--text); }

/* Barra de contacto (celular) */
.mbar {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(10,10,11,.85); border-top: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transform: translateY(110%); transition: transform .35s ease;
}
.mbar.show { transform: none; }
.mbar .btn { min-height: 52px; font-size: 16px; padding: 0 18px; }

/* Botón flotante WhatsApp (escritorio) */
.fab {
  position: fixed; z-index: 50; right: 22px; bottom: 22px;
  width: 62px; height: 62px; border-radius: 50%; display: none; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 12px 30px -6px rgba(0,0,0,.6), 0 0 0 0 rgba(37,211,102,.5);
  animation: ring 2.6s infinite; transition: transform .15s ease;
}
.fab:hover { transform: scale(1.06); }
@keyframes ring { 70% { box-shadow: 0 12px 30px -6px rgba(0,0,0,.6), 0 0 0 16px rgba(37,211,102,0); } 100% { box-shadow: 0 12px 30px -6px rgba(0,0,0,.6), 0 0 0 0 rgba(37,211,102,0); } }

/* Aparición suave al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 639px) {
  .hero-bg img { object-position: 50% 20%; }
  .grid-4 .card { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; }
  .grid-4 .card .icon { grid-row: span 3; margin-bottom: 0; }
  .grid-4 .card p { margin-top: 4px; }
}
@media (max-width: 767px) {
  footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}
@media (max-width: 430px) {
  .hero .ctas .btn { width: 100%; }
  .hero-sub .ctas .btn { width: 100%; }
  .hero .ctas .btn-ghost { display: none; }   /* el teléfono ya está arriba y en la barra inferior */
  .final .ctas .btn { width: 100%; }
  header .call span { display: none; }
  .stat span { font-size: 12.5px; }
}
@media (max-width: 359px) {
  .btn { font-size: 15.5px; padding: 0 16px; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .stat:nth-child(2) { border-right: 0; margin-right: 0; padding-right: 0; }
}
@media (min-width: 640px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .gallery { columns: 3; }
  footer .wrap { grid-template-columns: auto 1fr; align-items: center; }
  .links { justify-content: flex-end; }
}
@media (min-width: 768px) {
  .mbar { display: none; }
  .fab { display: grid; }
}
@media (min-width: 960px) {
  .page-grid { grid-template-columns: 1.1fr 1fr; }
  header nav { display: flex; }
  .hero { align-items: center; padding-bottom: 90px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .gallery { columns: 4; }
  .coverage { grid-template-columns: 1.25fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
