:root {
  --bg: #ffffff;
  --soft: #f3f4f6;
  --ink: #0e0f12;
  --ink-2: #5b606b;
  --line: #e4e6ea;
  --blue: #0a4cad;
  --blue-2: #083d8c;
  --dark: #0b0c0f;
  --dark-2: #16181d;
  --on-dark: #f5f6f8;
  --on-dark-2: #a3a8b3;
  --radius: 14px;
  --max: 1200px;
  --head: "Archivo", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --hairline: inset 0 0 0 1px rgba(14, 15, 18, .06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--body); font-feature-settings: "cv11", "ss01"; text-rendering: optimizeLegibility; color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--head); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--blue); color: #fff; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; font-family: var(--body); white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
.btn:active { transform: scale(.97); }
.btn .ph { font-size: 18px; }
.btn-blue { background: var(--blue); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 1px 2px rgba(10,76,173,.3), 0 6px 16px -6px rgba(10,76,173,.5); }
.btn-line, .btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* Navegación */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: border-color 200ms ease, box-shadow 200ms ease; }
.nav[data-scrolled] { border-bottom-color: var(--line); box-shadow: 0 8px 24px -18px rgba(14,15,18,.35); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand img { width: 40px; height: 40px; }
.brand-mark { display: none; }
.nav-links { display: flex; gap: 32px; list-style: none; padding: 0; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.nav-links a { position: relative; padding: 6px 0; transition: color 200ms ease; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 240ms var(--ease-out); }
.nav .btn { height: 42px; padding: 0 18px; }
@media (max-width: 900px) { .nav-links { display: none; } }
@media (max-width: 420px) { .nav .btn span { display: none; } .nav .btn { width: 42px; padding: 0; } }

/* Portada */
.hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: center; overflow: hidden; background: #eef0f2; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 85% 40%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.9) 38%, rgba(255,255,255,0) 58%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero-copy { max-width: 500px; padding: 72px 0; }
.tag, .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: .1em; }
.tag::before, .eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; }
.eyebrow { margin-bottom: 14px; }
.dark .eyebrow { color: #6f9be6; }
.hero h1 { margin-top: 18px; font-size: clamp(38px, 4.4vw, 56px); font-weight: 800; }
.hero p { margin-top: 20px; font-size: 19px; color: var(--ink-2); max-width: 42ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin-top: 24px; font-size: 14px; color: var(--ink-2); }
.hero-note li { display: inline-flex; align-items: center; gap: 6px; }
.hero-note .ph { color: var(--blue); font-size: 16px; }
@media (max-width: 800px) {
  .hero { flex-direction: column; align-items: stretch; min-height: 0; background: var(--bg); }
  .hero::before { display: none; }
  .hero-img { position: static; aspect-ratio: 16 / 10; height: auto; order: 2; }
  .hero-copy { padding: 40px 0 36px; }
}

/* Cifras */
.facts { background: var(--dark); color: var(--on-dark); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 36px 24px; border-left: 1px solid var(--dark-2); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact strong { display: block; font-variant-numeric: tabular-nums; font-family: var(--head); font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.fact span { color: var(--on-dark-2); font-size: 14px; }
@media (max-width: 800px) {
  .facts .wrap { grid-template-columns: 1fr 1fr; }
  .fact, .fact:first-child { padding: 24px 0; border-left: 0; border-top: 1px solid var(--dark-2); }
  .fact:nth-child(-n+2) { border-top: 0; }
}

/* Bloques */
.block { padding: 112px 0; }
.block.soft { background: var(--soft); }
.block.dark { background: var(--dark); color: var(--on-dark); }
.head { display: flex; align-items: end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.head h2, .block > .wrap > h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; max-width: 18ch; }
.head p { color: var(--ink-2); font-size: 17px; max-width: 40ch; }
.dark .head p { color: var(--on-dark-2); }
@media (max-width: 760px) { .block { padding: 72px 0; } }

/* Servicios */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--soft); isolation: isolate; }
.media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--hairline); pointer-events: none; }
.media img { transition: transform 700ms var(--ease-out); }
.card .media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.card .num { display: block; margin-top: 20px; font-size: 13px; font-weight: 600; color: var(--blue); letter-spacing: .08em; }
.card h3 { margin-top: 6px; font-size: 26px; font-weight: 700; }
.card p { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) { .trio { grid-template-columns: 1fr; gap: 48px; } .card .media img { aspect-ratio: 4 / 3; } }

/* Casa y bar */
.split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; margin-top: 56px; }
.split + .split { margin-top: 72px; }
.split .media { background: var(--dark-2); }
.split .media::after { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.split img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.split.reverse .media { order: 2; }
.split h3 { display: flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 700; }
.split h3 .ph { color: #5b8fe0; font-size: 28px; }
.split ul { list-style: none; padding: 0; margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; }
.split li { padding: 10px 0; border-bottom: 1px solid var(--dark-2); color: var(--on-dark); font-size: 15px; }
.certs { margin-top: 20px; color: var(--on-dark-2); font-size: 14px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse .media { order: 0; }
}

/* Marcas */
.brands { padding: 72px 0; border-bottom: 1px solid var(--line); }
.brands .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.brands h2 { font-size: 24px !important; max-width: none; }
.brand-row { display: flex; flex-wrap: wrap; gap: 12px 40px; font-family: var(--head); font-size: 26px; font-weight: 700; color: #9aa0ab; letter-spacing: -.02em; }
.brand-row .main { color: var(--ink); }

/* Condiciones */
.terms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.term { background: var(--bg); border-radius: var(--radius); padding: 28px; box-shadow: var(--hairline), 0 1px 2px rgba(14,15,18,.04); }
.term strong { display: block; font-variant-numeric: tabular-nums; font-family: var(--head); font-size: 34px; font-weight: 800; color: var(--blue); letter-spacing: -.03em; line-height: 1.1; }
.term small { font-size: 15px; color: var(--ink-2); font-weight: 500; }
.term h3 { margin-top: 18px; font-size: 18px; font-weight: 700; }
.term p { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
@media (max-width: 1000px) { .terms { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .terms { grid-template-columns: 1fr; } }

/* Zona */
.towns { list-style: none; padding: 0; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.towns button { font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--bg); padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease; }
.towns button:active { transform: scale(.96); }
.towns button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Contacto */
.contact { background: var(--soft); }
.contact .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.contact h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; }
.contact-info > p { margin-top: 12px; color: var(--ink-2); font-size: 17px; }
.direct { display: grid; gap: 10px; margin-top: 32px; }
.direct a { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--bg); border-radius: var(--radius); font-weight: 600; word-break: break-word; box-shadow: var(--hairline); transition: transform 160ms var(--ease-out), box-shadow 200ms ease; }
.direct a:active { transform: scale(.985); }
.direct a::after { content: "\2192"; margin-left: auto; color: var(--ink-2); transition: transform 200ms var(--ease-out); }
.direct .ph { font-size: 22px; color: var(--blue); flex-shrink: 0; }
.direct small { display: block; font-weight: 400; color: var(--ink-2); font-size: 13px; }
#cita { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: var(--bg); border-radius: 18px; padding: 32px; box-shadow: var(--hairline), 0 1px 2px rgba(14,15,18,.04), 0 24px 48px -32px rgba(14,15,18,.25); }
.full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; transition: border-color 160ms ease, box-shadow 160ms ease; }
.field input::placeholder, .field textarea::placeholder { color: #9aa0ab; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #cfd3da; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10,76,173,.14); }
.field[data-invalid] input:focus, .field[data-invalid] select:focus { box-shadow: 0 0 0 4px rgba(198,40,40,.12); }
.field[data-invalid] input, .field[data-invalid] select { border-color: #c62828; }
.error { font-size: 13px; color: #c62828; }
.error:empty { display: none; }
.form-help { display: flex; gap: 8px; font-size: 13px; color: var(--ink-2); }
.form-help .ph { font-size: 15px; margin-top: 2px; flex-shrink: 0; }
@media (max-width: 900px) { .contact .wrap { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 560px) { #cita { grid-template-columns: 1fr; padding: 20px; } }

/* Pie */
footer { background: var(--dark); color: var(--on-dark-2); font-size: 14px; padding: 32px 0; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a:hover { color: var(--on-dark); }

.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 28px; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 10px 24px -8px rgba(0,0,0,.3); opacity: 0; transform: scale(.9) translateY(8px); pointer-events: none; transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out); }
.wa-float[data-show] { opacity: 1; transform: none; pointer-events: auto; }
.wa-float:active { transform: scale(.94); }

.mobile-bar { display: none; }
@media (max-width: 700px) {
  .wa-float { display: none; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .mobile-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(11,12,15,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 12px 32px -12px rgba(0,0,0,.5); transform: translateY(calc(100% + 24px)); transition: transform 320ms var(--ease-out); }
  .mobile-bar[data-show] { transform: none; }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 999px; color: #fff; font-weight: 600; font-size: 15px; -webkit-tap-highlight-color: transparent; transition: transform 160ms var(--ease-out); }
  .mobile-bar a:first-child { background: var(--blue); }
  .mobile-bar a.wa { background: #25d366; color: #0b2e17; }
  .mobile-bar a:active { transform: scale(.97); }
  .mobile-bar .ph { font-size: 18px; }
}

/* Página legal */
.legal { padding: 56px 0 88px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: 36px; }
.legal h2 { font-size: 22px; margin-top: 40px; }
.legal p, .legal li { color: var(--ink-2); margin-top: 12px; }
.legal ul { padding-left: 20px; }
.legal mark { background: #e3ecfa; color: var(--ink); padding: 0 4px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Hover solo en dispositivos con ratón */
@media (hover: hover) and (pointer: fine) {
  .btn-blue:hover { background: var(--blue-2); }
  .btn-line:hover, .btn-ghost:hover { background: var(--ink); color: #fff; }
  .nav-links a:hover { color: var(--ink); }
  .nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
  .card:hover .media img, .split:hover .media img { transform: scale(1.035); }
  .towns button:hover { border-color: var(--ink); }
  .direct a:hover { box-shadow: inset 0 0 0 1px var(--ink); }
  .direct a:hover::after { transform: translateX(3px); color: var(--ink); }
  footer a { transition: color 200ms ease; }
}

/* Botón de envío: cambio de texto con desenfoque */
.submit .btn-label { display: inline-flex; align-items: center; gap: 8px; transition: filter 200ms ease, opacity 200ms ease; }
.submit[data-busy] .btn-label { filter: blur(2px); opacity: .6; }

/* Entrada de la portada (una vez, al cargar) */
[data-enter] > * { animation: enter 640ms var(--ease-out) both; }
[data-enter] > :nth-child(2) { animation-delay: 60ms; }
[data-enter] > :nth-child(3) { animation-delay: 120ms; }
[data-enter] > :nth-child(4) { animation-delay: 180ms; }
[data-enter] > :nth-child(5) { animation-delay: 240ms; }
.hero-img { animation: fade 900ms ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }

/* Aparición suave al hacer scroll (solo con JS) */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal][data-in] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-enter] > *, .hero-img { animation: fade 300ms ease both; }
  .js [data-reveal] { transform: none; transition: opacity 300ms ease; }
  .media img, .mobile-bar, .wa-float { transition: opacity 200ms ease; }
  .card:hover .media img, .split:hover .media img { transform: none; }
}

/* Cómo trabajamos */
.steps { list-style: none; padding: 0; margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: none; }
.step .media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.step .num { display: block; margin: 22px 0 8px; font-family: var(--head); font-size: 14px; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.step h3 { font-size: 22px; margin-bottom: 8px; }
.step p { color: var(--ink-2); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; gap: 44px; } }

/* Fotos de zona y contacto */
.zone-photo { margin-top: 48px; }
.zone-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 45%; }
.contact-photo { margin-top: 24px; }
.contact-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 700px) { .zone-photo img { aspect-ratio: 4 / 3; object-position: 62% 50%; } .contact-photo { display: none; } }
@media (hover: hover) and (pointer: fine) { .step:hover .media img { transform: scale(1.035); } }
@media (prefers-reduced-motion: reduce) { .step:hover .media img { transform: none; } }
