*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-heading); margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.ico { width: 1em; height: 1em; flex-shrink: 0; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 .95rem/1 var(--font-body);
  padding: .8rem 1.25rem;
  border-radius: calc(var(--radius) * .8);
  border: 0; cursor: pointer; text-decoration: none;
  transition: background-color .2s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn--sm { padding: .55rem .9rem; font-size: .85rem; }
.btn--lg { padding: 1rem 1.6rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: color-mix(in srgb, #fff 85%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.nav__bar { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 1.25rem; max-width: 1400px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__logo { height: 34px; width: auto; }
.brand__name { font: 800 1.3rem/1 var(--font-heading); letter-spacing: -0.02em; color: var(--primary); }
.nav__links { display: none; align-items: center; gap: 1.4rem; }
.nav__links > a:not(.btn) { font-size: .9rem; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .2s; }
.nav__links > a:not(.btn):hover { color: var(--text); }
.nav__phone { display: inline-flex; align-items: center; gap: .4rem; color: var(--primary) !important; font-weight: 600 !important; }
.nav__toggle { background: none; border: 0; padding: .5rem; color: var(--primary); cursor: pointer; font-size: 1.4rem; display: flex; }
.nav__toggle .ico--close { display: none; }
.nav__toggle[aria-expanded="true"] .ico--open { display: none; }
.nav__toggle[aria-expanded="true"] .ico--close { display: block; }
.nav__mobile { display: flex; flex-direction: column; gap: .25rem; padding: .5rem 1.25rem 1.25rem; background: #fff; border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent); }
.nav__mobile[hidden] { display: none; }
.nav__mobile > a:not(.btn) { display: flex; align-items: center; gap: .5rem; padding: .6rem 0; font-weight: 500; color: var(--text); text-decoration: none; }
.nav__mobile .btn { margin-top: .5rem; }
@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__toggle, .nav__mobile { display: none !important; }
}

main { padding-top: 64px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 90vh; display: flex; align-items: center; justify-content: center; overflow: hidden; isolation: isolate; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero__overlay { position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--primary) var(--hero-overlay), transparent); }
.hero__content { max-width: 52rem; padding: 7rem 1.25rem; text-align: center; color: #fff; animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero__eyebrow { font-size: .85rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; opacity: .8; margin-bottom: 1rem; }
.hero__title { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 800; line-height: 1.08; margin-bottom: 2rem; }
.hero__title span { color: var(--highlight); }
@media (min-width: 640px) { .hero__title span { display: block; } }
.hero__text { font-size: clamp(1.15rem, 2.4vw, 1.8rem); font-weight: 300; line-height: 1.5; max-width: 42rem; margin: 0 auto; opacity: .9; }
.hero__text strong { font-weight: 700; color: var(--highlight); }
.hero .btn { margin-top: 2.25rem; }
@keyframes rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }

/* ---------- Secciones ---------- */
.section { padding: 6rem 0; }
.section--alt { background: var(--surface-alt); }
.section__head { text-align: center; max-width: 44rem; margin: 0 auto 4rem; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); font-weight: 800; color: var(--text); }
.lead { margin-top: 1rem; color: var(--muted); }

/* Servicios */
.services { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services { grid-template-columns: repeat(3, 1fr); } }
.service {
  padding: 1.6rem; background: #fff; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  transition: border-color .25s, box-shadow .25s;
}
.service:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 12px 30px -16px color-mix(in srgb, var(--primary) 45%, transparent); }
.service__icon {
  width: 2.75rem; height: 2.75rem; border-radius: calc(var(--radius) * .7);
  display: grid; place-items: center; margin-bottom: 1rem;
  background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 1.25rem;
}
.service h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.service p { font-size: .9rem; color: var(--muted); line-height: 1.65; }

/* Nosotros */
.about { display: grid; gap: 4rem; align-items: center; }
@media (min-width: 1024px) { .about { grid-template-columns: 1fr 1fr; } }
.about h2 { margin-bottom: 1.5rem; }
.about__text { color: var(--muted); margin-bottom: 1.5rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.checks li { display: flex; align-items: center; gap: .75rem; font-size: .95rem; }
.checks .ico { color: var(--accent); font-size: 1.15rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat { background: #fff; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); padding: 1.6rem 1rem; text-align: center; }
.stat__value { font: 800 clamp(1.4rem, 3vw, 1.9rem)/1.15 var(--font-heading); color: var(--accent); }
.stat__label { font-size: .8rem; color: var(--muted); margin-top: .35rem; }

/* Contacto */
.contact { display: grid; gap: 3rem; max-width: 64rem; margin: 0 auto; }
@media (min-width: 1024px) { .contact { grid-template-columns: 2fr 3fr; } .contact--no-form { grid-template-columns: 1fr; max-width: 32rem; } }
.contact__info { display: grid; gap: 1.5rem; align-content: start; }
.info { display: flex; gap: 1rem; align-items: flex-start; }
.info__icon { width: 2.5rem; height: 2.5rem; border-radius: calc(var(--radius) * .7); display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 1.1rem; }
.info__label { font-size: .9rem; font-weight: 600; }
.info a, .info p:not(.info__label) { font-size: .9rem; color: var(--muted); text-decoration: none; display: block; }
.info a:hover { color: var(--accent); text-decoration: underline; }
.info .info__wa { color: var(--accent); font-weight: 600; margin-top: .15rem; }

.form { display: grid; gap: 1rem; }
.form__row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.form label { display: grid; gap: .35rem; font-size: .82rem; font-weight: 500; color: var(--muted); }
.form input, .form textarea {
  font: inherit; font-size: .95rem; color: var(--text); width: 100%;
  padding: .7rem .85rem; background: #fff;
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  border-radius: calc(var(--radius) * .7);
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.form [aria-invalid="true"] { border-color: #d64545; }
.form textarea { resize: vertical; min-height: 7rem; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form__status { font-size: .9rem; }
.form__status.is-ok { color: #1b7f4b; }
.form__status.is-error { color: #c23434; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pie */
.footer { background: var(--primary); color: #fff; padding: 3rem 0 1.5rem; }
.footer__grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .footer__grid { grid-template-columns: repeat(3, 1fr); } }
.footer__brand { font: 800 1.15rem/1 var(--font-heading); margin-bottom: .75rem; }
.footer__title { font-weight: 600; font-size: .9rem; margin-bottom: .75rem; }
.footer__muted, .footer ul { font-size: .88rem; color: rgba(255,255,255,.72); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer a { text-decoration: none; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer__social { display: inline-flex; align-items: center; gap: .4rem; }
.footer__copy { border-top: 1px solid rgba(255,255,255,.2); padding-top: 1.5rem; text-align: center; font-size: .78rem; color: rgba(255,255,255,.55); }

/* Flotantes */
.floating { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; display: flex; align-items: center; gap: .6rem; }
.fab--quote { box-shadow: 0 8px 24px -10px rgba(0,0,0,.45); }
.fab--wa { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: #1fa855; color: #fff; font-size: 1.5rem; box-shadow: 0 8px 24px -10px rgba(0,0,0,.45); }
.fab--wa:hover { background: #178c46; }

/* Aparición única al hacer scroll */
.reveal > * { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-in > * { opacity: 1; transform: none; }
.reveal.is-in > *:nth-child(2) { transition-delay: .08s; }
.reveal.is-in > *:nth-child(3) { transition-delay: .16s; }
.reveal.is-in > *:nth-child(4) { transition-delay: .24s; }
.reveal.is-in > *:nth-child(5) { transition-delay: .32s; }
.reveal.is-in > *:nth-child(n+6) { transition-delay: .4s; }
.no-js .reveal > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal > * { opacity: 1; transform: none; }
}

/* ---------- Idioma ---------- */
.nav__lang { font-weight: 700 !important; font-size: .8rem !important; letter-spacing: .04em; padding: .3rem .5rem; border: 1px solid color-mix(in srgb, var(--text) 18%, transparent); border-radius: 6px; color: var(--primary) !important; }
.nav__lang:hover { border-color: var(--accent); }

/* ---------- Servicios con página propia ---------- */
.service--link { cursor: pointer; position: relative; }
.service h3 a { text-decoration: none; color: inherit; }
.service h3 a::after { content: ""; position: absolute; inset: 0; }
.service--link:focus-within { border-color: var(--accent); }
.service__more { display: inline-flex; align-items: center; gap: .3rem; margin-top: .9rem; font-size: .85rem; font-weight: 600; color: var(--accent); }

/* ---------- Respaldo ---------- */
.badges { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .badges { grid-template-columns: repeat(2, 1fr); } }
.badge { display: flex; gap: 1rem; align-items: flex-start; padding: 1.4rem; background: #fff; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); }
.badge__mark { width: 3.25rem; height: 3.25rem; flex-shrink: 0; display: grid; place-items: center; border-radius: calc(var(--radius) * .7); background: color-mix(in srgb, var(--primary) 8%, transparent); color: var(--primary); font-size: 1.4rem; overflow: hidden; }
.badge__mark img { width: 100%; height: 100%; object-fit: contain; padding: .3rem; }
.badge h3 { font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.badge p { font-size: .9rem; color: var(--muted); }
.clients { margin-top: 3.5rem; text-align: center; }
.clients__title { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.5rem; }
.clients__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem 2.75rem; }
.clients__list img { height: 48px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.clients__list img:hover { filter: none; opacity: 1; }

/* ---------- Galería ---------- */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: .7rem .9rem; font-size: .85rem; color: var(--muted); }

/* ---------- Formulario: cotización y privacidad ---------- */
.form select { font: inherit; font-size: .95rem; color: var(--text); width: 100%; padding: .7rem .85rem; background: #fff; border: 1px solid color-mix(in srgb, var(--text) 16%, transparent); border-radius: calc(var(--radius) * .7); }
.form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.form__quote { border: 1px dashed color-mix(in srgb, var(--text) 18%, transparent); border-radius: var(--radius); padding: 1rem 1rem 1.1rem; margin: 0; display: grid; gap: 1rem; }
.form__quote legend { font-size: .8rem; font-weight: 600; color: var(--text); padding: 0 .4rem; }
.form .form__check { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; color: var(--muted); }
.form__check input { width: 1.05rem; height: 1.05rem; margin-top: .15rem; accent-color: var(--accent); flex-shrink: 0; }
.form__check a { color: var(--accent); }

/* ---------- Páginas interiores ---------- */
.page-hero { background: var(--primary); color: #fff; padding: 3.5rem 0 3rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.page-hero__lead { margin-top: .75rem; max-width: 44rem; opacity: .85; font-size: 1.05rem; }
.page-hero__back { display: inline-block; color: rgba(255,255,255,.8); text-decoration: none; font-size: .88rem; margin-bottom: 1.25rem; }
.page-hero__back:hover { color: #fff; }
.page-hero__icon { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: calc(var(--radius) * .7); background: rgba(255,255,255,.12); font-size: 1.4rem; margin-bottom: 1rem; color: var(--highlight); }
.page-hero--plain { padding-bottom: 2.5rem; }
.section--tight { padding: 3rem 0 5rem; }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.prose h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.prose p { margin: 0 0 1rem; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .35rem; }
.prose a { color: var(--accent); }
.prose__cta { margin-top: 2.5rem !important; }

/* ---------- Información financiera ---------- */
.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.pills a { padding: .45rem .85rem; border-radius: 6px; background: #fff; color: var(--primary); text-decoration: none; font-size: .88rem; font-weight: 500; }
.pills a:hover { background: color-mix(in srgb, #fff 85%, var(--highlight)); }
.finance { max-width: 56rem; display: grid; gap: 2.75rem; }
.finance__group h2 { font-size: 1.4rem; padding-bottom: .6rem; border-bottom: 2px solid var(--primary); margin-bottom: 1rem; }
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.docs a { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; background: #fff; border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); border-radius: calc(var(--radius) * .7); text-decoration: none; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.docs a:hover { border-color: var(--accent); box-shadow: 0 6px 18px -12px color-mix(in srgb, var(--primary) 50%, transparent); }
.docs .ico { color: var(--accent); font-size: 1.15rem; }
.docs span { flex: 1; }
.docs small { font-size: .7rem; font-weight: 700; letter-spacing: .05em; color: var(--muted); border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); border-radius: 4px; padding: .1rem .35rem; }
.page-finance .finance__group { scroll-margin-top: 80px; }

.fab--quote { transition: opacity .25s, transform .25s; }
.fab--quote.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
