/* =============================================================
   RESOSALUD — Hoja de estilos
   Identidad de marca:  azules corporativos + Montserrat
   #71a5d9 (claro) · #317abf (medio) · #1b3e92 (profundo)
   ============================================================= */

:root {
  /* Color de marca */
  --brand-light: #71a5d9;
  --brand:       #317abf;
  --brand-deep:  #1b3e92;
  --navy:        #16223f;   /* fondos oscuros / footer */
  --ink:         #1b2748;   /* texto principal */
  --sky-soft:    #e9f1fb;   /* tinte azul muy claro */
  --sky-mid:     #d5e6f7;
  --glow:        rgba(113, 165, 217, 0.40);

  --bg:      #f1f6fc;
  --surface: #ffffff;
  --paper:   #ffffff;
  --muted:   #57678a;
  --line:    rgba(27, 62, 146, 0.12);

  /* Tipografía */
  --sans: "Montserrat", system-ui, -apple-system, sans-serif;

  /* Layout */
  --max: 1200px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 22px;
  --radius-sm: 14px;

  --shadow-sm: 0 2px 12px rgba(27, 62, 146, 0.07);
  --shadow-md: 0 20px 45px -20px rgba(27, 62, 146, 0.30);
  --shadow-lg: 0 40px 80px -30px rgba(22, 34, 63, 0.45);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* Textura sutil global */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Utilidades ---------- */
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--brand);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--brand); border-radius: 2px; }
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--navy);
}
.section-lead { max-width: 46ch; color: var(--muted); font-size: 1.06rem; margin-top: 1rem; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-weight: 700; font-size: .95rem; letter-spacing: .005em;
  padding: .92rem 1.65rem; border-radius: 100px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, background .3s, color .3s, border-color .3s;
  will-change: transform;
}
.btn { white-space: nowrap; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: 0 12px 26px -12px var(--brand-deep);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -14px var(--brand-deep); filter: brightness(1.06); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-ghost { color: var(--brand-deep); border: 1.5px solid var(--line); background: rgba(255,255,255,.55); }
.btn-ghost:hover { border-color: var(--brand); transform: translateY(-3px); }
.btn-light { background: #fff; color: var(--brand-deep); }
.btn-light:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* =============================================================
   HEADER
   ============================================================= */
.site-header { position: sticky; top: 0; z-index: 1000; transition: background .4s, box-shadow .4s, backdrop-filter .4s; }
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px -18px rgba(27,62,146,.4);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 1rem; }
.logo { display: flex; align-items: center; gap: .7rem; }
.logo-mark { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.logo-text { line-height: 1; }
.logo-text b {
  font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em; color: var(--navy);
}
.logo-text span { display: block; font-size: .58rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-top: 4px; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-size: .93rem; font-weight: 600; color: var(--ink); position: relative; padding: .3rem 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--brand); border-radius: 2px; transition: width .3s; }
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-phone { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .93rem; color: var(--navy); white-space: nowrap; }
.nav-phone svg { width: 17px; height: 17px; color: var(--brand); }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-sm); color: var(--navy); }
.nav-toggle svg { width: 22px; height: 22px; margin: auto; }

/* =============================================================
   HERO
   ============================================================= */
.hero { position: relative; padding-top: clamp(2rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-rings {
  position: absolute; top: -12%; right: -12%; width: 720px; height: 720px;
  background:
    radial-gradient(circle, transparent 0 28%, var(--glow) 28% 29%, transparent 29%),
    radial-gradient(circle, transparent 0 44%, rgba(49,122,191,.12) 44% 45%, transparent 45%),
    radial-gradient(circle, transparent 0 62%, rgba(49,122,191,.08) 62% 63%, transparent 63%);
  animation: spin 60s linear infinite;
}
.hero-blur { position: absolute; bottom: -20%; left: -8%; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 70%); filter: blur(40px); }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-tag {
  display: inline-flex; align-items: center; gap: .6rem; padding: .5rem 1rem;
  background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 100px;
  font-size: .8rem; font-weight: 700; color: var(--brand-deep); backdrop-filter: blur(6px);
}
.hero-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(49,122,191,.2); }
.hero h1 {
  font-weight: 800; font-size: clamp(2.7rem, 6.4vw, 4.9rem); line-height: 1.02;
  letter-spacing: -0.035em; color: var(--navy); margin: 1.4rem 0 1.3rem;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero h1 .accent { color: var(--brand-deep); font-style: normal; }
.hero-desc { font-size: 1.11rem; color: var(--muted); max-width: 44ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.hero-media { position: relative; }
.hero-media .frame { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/5; border: 8px solid #fff; }
.hero-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, transparent 55%, rgba(22,34,63,.42)); }
.hero-badge { position: absolute; left: -22px; bottom: 34px; z-index: 3; background: var(--paper); padding: 1rem 1.2rem; border-radius: 18px; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: .85rem; }
.hero-badge .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--sky-soft); color: var(--brand); display: grid; place-items: center; }
.hero-badge .ico svg { width: 22px; height: 22px; }
.hero-badge b { font-weight: 800; font-size: 1.2rem; display: block; color: var(--navy); }
.hero-badge span { font-size: .78rem; color: var(--muted); }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; margin-top: clamp(3rem, 6vw, 4.5rem); box-shadow: var(--shadow-sm); }
.hero-stats .stat { background: var(--surface); padding: 1.6rem 1.4rem; text-align: center; }
.hero-stats .stat b { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--brand-deep); display: block; letter-spacing: -.02em; }
.hero-stats .stat span { font-size: .86rem; color: var(--muted); }

/* =============================================================
   SERVICIOS
   ============================================================= */
.services-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.service-card { position: relative; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s; }
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.service-card .media { aspect-ratio: 16/11; overflow: hidden; position: relative; }
.service-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.service-card:hover .media img { transform: scale(1.07); }
.service-card .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(22,34,63,.30)); }
.service-card .body { padding: 1.4rem 1.5rem 1.6rem; }
.service-card h3 { font-weight: 800; font-size: 1.28rem; letter-spacing: -.02em; color: var(--navy); }
.service-card p { color: var(--muted); font-size: .95rem; margin-top: .45rem; }
.service-card .arrow { margin-top: 1rem; display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .88rem; color: var(--brand); }
.service-card .arrow svg { width: 16px; height: 16px; transition: transform .3s; }
.service-card:hover .arrow svg { transform: translateX(5px); }

/* =============================================================
   TECNOLOGÍA
   ============================================================= */
.tech { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.tech::before { content: ""; position: absolute; top: -30%; left: -10%; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(113,165,217,.20), transparent 70%); }
.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; position: relative; }
.tech .eyebrow { color: var(--brand-light); }
.tech .eyebrow::before { background: var(--brand-light); }
.tech h2 { font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.025em; margin: 1rem 0 1.2rem; }
.tech p.lead { color: rgba(255,255,255,.74); font-size: 1.06rem; max-width: 46ch; }
.tech-list { margin-top: 2rem; display: grid; gap: .9rem; }
.tech-list li { display: flex; align-items: flex-start; gap: .85rem; font-size: 1rem; color: rgba(255,255,255,.92); }
.tech-list .check { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: rgba(113,165,217,.2); color: var(--brand-light); display: grid; place-items: center; margin-top: 1px; }
.tech-list .check svg { width: 15px; height: 15px; }
.tech-media { position: relative; border-radius: 26px; overflow: hidden; border: 8px solid rgba(255,255,255,.06); box-shadow: var(--shadow-lg); aspect-ratio: 4/3.4; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); }
.tech-media img { width: 100%; height: 100%; object-fit: cover; }

/* =============================================================
   PROCESO
   ============================================================= */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; margin-top: 3rem; }
.step { position: relative; padding: 2.2rem 1.8rem; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.step .n { font-weight: 800; font-size: 3.2rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--brand-light); opacity: .85; letter-spacing: -.03em; }
.step h3 { font-weight: 800; font-size: 1.32rem; margin: 1rem 0 .5rem; color: var(--navy); letter-spacing: -.02em; }
.step p { color: var(--muted); font-size: .97rem; }
.step .line { position: absolute; top: 3rem; right: -14px; width: 28px; height: 2px; background: var(--line); }

/* =============================================================
   MISIÓN Y VISIÓN
   ============================================================= */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 3rem; }
.mv-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2.6rem 2.4rem;
  box-shadow: var(--shadow-sm); transition: transform .4s, box-shadow .4s;
}
.mv-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.mv-card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 5px; height: 100%;
  background: linear-gradient(180deg, var(--brand-light), var(--brand-deep));
}
.mv-card::after {
  content: ""; position: absolute; top: -30%; right: -20%; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(113,165,217,.14), transparent 70%);
}
.mv-ico {
  position: relative; width: 58px; height: 58px; border-radius: 16px;
  background: linear-gradient(140deg, var(--brand), var(--brand-deep)); color: #fff;
  display: grid; place-items: center; margin-bottom: 1.3rem;
}
.mv-ico svg { width: 30px; height: 30px; }
.mv-card h3 { position: relative; font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; color: var(--navy); margin-bottom: .7rem; }
.mv-card p { position: relative; color: var(--muted); font-size: 1.02rem; line-height: 1.7; }

/* =============================================================
   BENEFICIOS
   ============================================================= */
.benefits { background: var(--sky-soft); }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 3rem; }
.benefit { background: var(--paper); border-radius: var(--radius); padding: 2rem 1.6rem; box-shadow: var(--shadow-sm); transition: transform .4s; }
.benefit:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.benefit .ico { width: 52px; height: 52px; border-radius: 15px; background: linear-gradient(140deg, var(--brand), var(--brand-deep)); color: #fff; display: grid; place-items: center; margin-bottom: 1.1rem; }
.benefit .ico svg { width: 26px; height: 26px; }
.benefit h3 { font-weight: 800; font-size: 1.18rem; color: var(--navy); letter-spacing: -.02em; }
.benefit p { color: var(--muted); font-size: .93rem; margin-top: .4rem; }

/* =============================================================
   GALERÍA
   ============================================================= */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3rem; }
.gallery-grid a { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow-sm); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.gallery-grid a:hover img { transform: scale(1.08); }
.gallery-grid a:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

/* =============================================================
   FAQ
   ============================================================= */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq-list { display: grid; gap: .8rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; transition: box-shadow .3s; }
.faq-item[open] { box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.3rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 700; font-size: 1.02rem; color: var(--navy); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .plus { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--sky-soft); color: var(--brand); display: grid; place-items: center; transition: transform .3s, background .3s, color .3s; }
.faq-item[open] .plus { transform: rotate(45deg); background: var(--brand); color: #fff; }
.faq-item .plus svg { width: 15px; height: 15px; }
.faq-item .answer { padding: 0 1.5rem 1.4rem; color: var(--muted); }

/* =============================================================
   UBICACIÓN / MAPA
   ============================================================= */
.map-section { background: var(--sky-soft); }
.map-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.map-data { margin-top: 1.8rem; display: grid; gap: 1rem; }
.map-data li { display: flex; align-items: flex-start; gap: .9rem; font-size: 1rem; color: var(--ink); font-weight: 500; }
.map-data .ico { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: var(--paper); color: var(--brand); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.map-data .ico svg { width: 20px; height: 20px; }
.map-data li > span:last-child { padding-top: .5rem; }
.map-frame {
  position: relative; border-radius: 26px; overflow: hidden;
  border: 8px solid #fff; box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3; background: var(--sky-mid);
}
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =============================================================
   CTA FINAL
   ============================================================= */
.cta-card { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 60%, var(--navy) 100%); border-radius: 32px; padding: clamp(2.8rem, 6vw, 5rem); text-align: center; color: #fff; box-shadow: var(--shadow-lg); }
.cta-card::before { content: ""; position: absolute; top: -40%; right: -10%; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 70%); }
.cta-card::after { content: ""; position: absolute; bottom: -50%; left: -12%; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(113,165,217,.25), transparent 70%); }
.cta-card h2 { position: relative; font-weight: 800; font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.06; letter-spacing: -.03em; }
.cta-card p { position: relative; color: rgba(255,255,255,.82); font-size: 1.12rem; margin: 1rem auto 2rem; max-width: 40ch; }
.cta-card .btn { position: relative; }
.cta-card .btn-light { color: var(--brand-deep); }

/* =============================================================
   FOOTER
   ============================================================= */
.footer { background: var(--navy); color: rgba(255,255,255,.72); padding-block: clamp(3.5rem, 6vw, 5rem) 2rem; margin-top: clamp(4rem,8vw,6rem); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer .logo-text b { color: #fff; }
.footer .logo-text span { color: var(--brand-light); }
.footer-brand p { margin-top: 1.1rem; max-width: 34ch; font-size: .93rem; }
.footer h4 { color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: 1.1rem; letter-spacing: -.01em; }
.footer-col ul { display: grid; gap: .7rem; }
.footer-col a, .footer-col li { font-size: .93rem; transition: color .3s; }
.footer-col a:hover { color: var(--brand-light); }
.footer-contact li { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: .8rem; font-size: .93rem; }
.footer-contact svg { width: 17px; height: 17px; color: var(--brand-light); flex-shrink: 0; margin-top: 3px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.8rem; font-size: .84rem; flex-wrap: wrap; }
.footer-social { display: flex; gap: .8rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: background .3s, transform .3s; }
.footer-social a:hover { background: var(--brand); transform: translateY(-3px); }
.footer-social svg { width: 17px; height: 17px; color: #fff; }

/* =============================================================
   BOTÓN WHATSAPP FLOTANTE
   ============================================================= */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 60px; height: 60px; border-radius: 50%; background: #25D366; display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(37,211,102,.7); transition: transform .3s; }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; color: #fff; }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366; animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }

/* =============================================================
   MODAL — AGENDAR CITA
   ============================================================= */
.modal-overlay { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 1.2rem; background: rgba(22, 34, 63, 0.55); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.modal-overlay.open { display: flex; opacity: 1; }
.modal { position: relative; width: 100%; max-width: 940px; background: var(--surface); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: .85fr 1.15fr; transform: translateY(20px) scale(.98); opacity: 0; transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .4s; max-height: 94vh; }
.modal-overlay.open .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal-aside { background: linear-gradient(160deg, var(--brand) 0%, var(--brand-deep) 60%, var(--navy) 100%); color: #fff; padding: 2.6rem 2.2rem; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.modal-aside::before { content: ""; position: absolute; bottom: -30%; right: -20%; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 70%); }
.modal-aside .eyebrow { color: var(--brand-light); }
.modal-aside .eyebrow::before { background: var(--brand-light); }
.modal-aside h3 { font-weight: 800; font-size: 1.75rem; line-height: 1.14; margin: 1rem 0; position: relative; letter-spacing: -.02em; }
.modal-aside p { color: rgba(255,255,255,.8); font-size: .94rem; position: relative; }
.modal-aside .aside-list { margin-top: 1.6rem; display: grid; gap: .8rem; position: relative; }
.modal-aside .aside-list li { display: flex; gap: .6rem; align-items: center; font-size: .9rem; color: rgba(255,255,255,.92); }
.modal-aside .aside-list svg { width: 18px; height: 18px; color: var(--brand-light); flex-shrink: 0; }
.modal-aside .aside-logo { width: 46px; height: 46px; position: relative; }

.modal-form { padding: 2.4rem 2.2rem; overflow-y: auto; }
.modal-form h2 { font-weight: 800; font-size: 1.55rem; letter-spacing: -.02em; color: var(--navy); }
.modal-form .sub { color: var(--muted); font-size: .93rem; margin: .35rem 0 1.6rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .82rem; font-weight: 700; color: var(--navy); margin-bottom: .45rem; }
.field label .req { color: var(--brand); }
.field input, .field select { width: 100%; padding: .85rem 1rem; font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .25s, box-shadow .25s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(49,122,191,.14); }
.field input::placeholder { color: #9aa9c4; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.modal-form .btn { width: 100%; margin-top: .6rem; }
.form-note { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 1rem; }
.modal-close { position: absolute; top: 1rem; right: 1rem; z-index: 5; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .3s, background .3s; }
.modal-close:hover { transform: rotate(90deg); background: #fff; }
.modal-close svg { width: 20px; height: 20px; color: var(--navy); }

/* =============================================================
   SCROLL REVEAL
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

@keyframes riseIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.hero .anim { opacity: 0; animation: riseIn .9s cubic-bezier(.2,.8,.2,1) forwards; }
.hero .anim.a1 { animation-delay: .1s; }
.hero .anim.a2 { animation-delay: .25s; }
.hero .anim.a3 { animation-delay: .4s; }
.hero .anim.a4 { animation-delay: .55s; }
.hero-media.anim { animation-delay: .3s; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 460px; margin-inline: auto; }
  .tech-grid, .faq-grid, .map-grid, .mv-grid { grid-template-columns: 1fr; }
  .services-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .modal { grid-template-columns: 1fr; }
  .modal-aside { display: none; }
  .step .line { display: none; }
}
@media (max-width: 720px) {
  .nav-links, .nav-phone { display: none; }
  .nav-toggle { display: grid; }
  .nav.open .nav-links { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--surface); padding: 1.5rem var(--pad); gap: 1.2rem; box-shadow: var(--shadow-md); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .services-grid, .process-grid, .benefits-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid a:first-child { grid-column: span 2; grid-row: auto; }
  .field-row { grid-template-columns: 1fr; }
  .hero-badge { left: 12px; bottom: 12px; }
}
@media (max-width: 460px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid a:first-child { grid-column: auto; }
  .logo-text span { display: none; }        /* header compacto en móvil */
  .logo-mark { width: 40px; height: 40px; }
  .logo-text b { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .hero-rings { animation: none; }
}
