:root {
  --blue: #1625c7;
  --blue-dark: #080e68;
  --blue-deep: #070b4e;
  --blue-soft: #edf0ff;
  --ink: #10144a;
  --muted: #656a7e;
  --paper: #fffefa;
  --cream: #f5f2e8;
  --yellow: #ffe56b;
  --yellow-soft: #fff7c8;
  --green: #079a3b;
  --line: #d7d9e4;
  --danger: #a42218;
  --radius: 26px;
  --max: 1360px;
  --shadow: 0 24px 70px rgba(8, 14, 104, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; overflow-x: clip; color: var(--ink); background: var(--cream); font-family: "Trebuchet MS", "Avenir Next", Avenir, Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
main { overflow-x: clip; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 12px; padding: 10px 16px; color: white; background: var(--blue-dark); text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #cfaa00; outline-offset: 3px; }

/* HEADER */
.site-header { width: min(var(--max), calc(100% - 32px)); min-height: 86px; margin: 14px auto; padding: 8px 18px; position: sticky; z-index: 60; top: 12px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; background: rgba(255, 254, 250, .96); border: 1px solid rgba(215, 217, 228, .82); border-radius: 20px; box-shadow: 0 12px 38px rgba(8, 14, 104, .08); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; box-shadow: 0 4px 12px rgba(8, 14, 104, .1); }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1.15rem; font-weight: 900; color: var(--blue-dark); line-height: 1.1; letter-spacing: -.02em; }
.brand-text small { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.main-nav { display: flex; justify-content: center; gap: clamp(16px, 3.5vw, 44px); font-size: .92rem; font-weight: 900; }
.main-nav a { text-decoration: none; position: relative; padding: 6px 0; transition: color .18s ease; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--blue); transition: width .2s ease; border-radius: 2px; }
.main-nav a:hover { color: var(--blue); }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-phone-btn { min-height: 44px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 7px; color: var(--blue-dark); background: var(--blue-soft); border: 1px solid rgba(22, 37, 199, .15); border-radius: 10px; text-decoration: none; font-size: .88rem; font-weight: 900; transition: all .18s ease; }
.header-phone-btn:hover { background: #dde4ff; color: var(--blue); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(22, 37, 199, .12); }
.header-cta { gap: 8px; font-size: .92rem; box-shadow: 0 4px 14px rgba(7, 154, 59, .18); }

.nav-toggle { display: none; width: 44px; height: 44px; padding: 11px 9px; border: 0; background: var(--blue-soft); border-radius: 10px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.toggle-bar { display: block; width: 100%; height: 2.5px; background: var(--blue-dark); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

/* BUTTONS & ACTIONS */
.button { min-height: 49px; padding: 12px 23px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; cursor: pointer; text-decoration: none; font-weight: 900; transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(8, 14, 104, .15); }
.button-sm { min-height: 40px; padding: 8px 16px; font-size: .88rem; }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: var(--blue-dark); background: white; border-color: var(--line); }
.button-secondary:hover { border-color: var(--blue); }
.button-dark { color: white; background: var(--blue-dark); }
.button-dark:hover { background: #020537; }
.button-whatsapp { color: #087b32; background: white; border-color: #9bd7af; }
.button-whatsapp:hover { color: white; background: var(--green); border-color: var(--green); }
.text-action { color: var(--blue); cursor: pointer; font-weight: 900; text-underline-offset: 4px; transition: color .18s ease, transform .18s ease; }
.text-action:hover { color: var(--blue-dark); transform: translateX(3px); }

/* LAYOUT & GENERAL */
main > section, .site-footer { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: .78rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow-light { color: var(--yellow); }
.section-heading { max-width: 820px; }
.section-heading h2 { margin-bottom: 14px; font-size: clamp(2.25rem, 4vw, 4.4rem); line-height: .98; letter-spacing: -.045em; }
.section-intro { max-width: 680px; color: var(--muted); font-size: 1.08rem; }

/* MEDIA FRAMES */
.media-frame { position: relative; margin: 0; overflow: hidden; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.media-frame:hover img { transform: scale(1.035); }
figcaption { position: absolute; z-index: 2; right: 10px; bottom: 9px; padding: 4px 7px; color: white; background: rgba(8, 14, 104, .76); border-radius: 4px; font-size: .64rem; }

/* BLOQUE 1: HERO */
.hero { min-height: 590px; display: grid; grid-template-columns: 48% 52%; overflow: hidden; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-copy { z-index: 1; padding: clamp(44px, 5.5vw, 76px) clamp(28px, 4vw, 64px); align-self: center; }
h1 { margin-bottom: 20px; font-size: clamp(2.2rem, 3.6vw, 3.9rem); line-height: 1.04; letter-spacing: -.04em; }
h1 span { color: var(--blue); }
.hero-lead { max-width: 560px; margin-bottom: 28px; color: var(--muted); font-size: clamp(1.04rem, 1.4vw, 1.25rem); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-photo { min-height: 590px; clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%); }
.hero-photo img { object-position: 58% center; }

/* BLOQUE 2: SERVICIOS TÉCNICOS */
.services { padding: 96px 0 30px; }
.services-showcase { margin-top: 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.service-card { display: flex; flex-direction: column; overflow: hidden; background: var(--paper); border-radius: var(--radius); box-shadow: 0 16px 45px rgba(8, 14, 104, .09); }
.service-card .media-frame { height: 260px; }
.service-card-body { padding: clamp(24px, 3.5vw, 36px); display: flex; flex-direction: column; flex-grow: 1; }
.service-card-body h3 { margin-bottom: 10px; font-size: clamp(1.6rem, 2.4vw, 2.2rem); line-height: 1.05; }
.service-card-body p { color: var(--muted); margin-bottom: 20px; flex-grow: 1; }
.service-tag { margin-bottom: 8px !important; color: var(--blue) !important; font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }

/* Precompra destacada dentro de servicios */
.service-featured { grid-column: 1 / -1; padding: clamp(34px, 5vw, 54px); background: var(--yellow); border-radius: var(--radius); box-shadow: var(--shadow); }
.service-featured-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.service-featured-header h3 { margin-bottom: 8px; font-size: clamp(2.1rem, 3.5vw, 3.4rem); line-height: .96; }
.featured-lead { font-weight: 900; margin-bottom: 0; }
.service-tag-featured { color: var(--blue-dark) !important; }
.inspection-badges { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 9px; }
.inspection-badges span { padding: 8px 14px; background: var(--yellow-soft); border: 1px solid rgba(8, 14, 104, .18); border-radius: 999px; font-size: .88rem; font-weight: 900; }

.service-index { margin-top: 28px; padding: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: var(--paper); border-radius: 18px; box-shadow: 0 14px 40px rgba(8, 14, 104, .07); }
.service-index p { min-height: 70px; margin: 0; padding: 16px; display: flex; align-items: center; gap: 14px; background: var(--blue-soft); border-radius: 12px; }
.service-index span { color: var(--blue); font-size: .72rem; font-weight: 900; letter-spacing: .1em; }

/* BLOQUE 3: RESPALDO Y CONDICIONES */
.trust-section { margin-top: 96px; padding: clamp(48px, 6vw, 76px); color: white; background: var(--blue-deep); border-radius: var(--radius); box-shadow: var(--shadow); }
.trust-intro { max-width: 780px; margin-bottom: 44px; }
.trust-intro h2 { margin-bottom: 12px; font-size: clamp(2.3rem, 4vw, 4.2rem); line-height: .98; }
.trust-intro-lead { color: #d8dcff; font-size: 1.12rem; margin: 0; }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.trust-card { padding: 28px; display: flex; align-items: flex-start; gap: 20px; background: rgba(255, 254, 250, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; }
.trust-badge { font-size: 3.4rem; font-weight: 900; line-height: .85; color: var(--yellow); letter-spacing: -.06em; flex-shrink: 0; }
.trust-icon { font-size: 2.2rem; line-height: 1; flex-shrink: 0; }
.trust-card strong { display: block; margin-bottom: 6px; font-size: 1.2rem; }
.trust-card p { margin: 0; color: #cdd2fa; font-size: .92rem; }

/* BLOQUE 4: RESEÑAS */
.reviews { margin-top: 96px; padding: clamp(44px, 5.5vw, 72px); background: var(--paper); border-radius: var(--radius); box-shadow: 0 18px 55px rgba(8, 14, 104, .08); }
.reviews-heading { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.reviews-grid { margin-top: 32px; display: grid; grid-template-columns: 1fr; gap: 24px; }
.reviews-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.review-card { min-height: 170px; margin: 0; padding: 22px; background: var(--blue-soft); border-radius: 15px; }
.reviews-empty { min-height: 72px; margin: 0; padding: 18px 22px; display: flex; align-items: center; color: var(--muted); background: var(--cream); border-radius: 12px; }
.review-card-head { display: flex; justify-content: space-between; gap: 12px; }
.stars { color: #b28600; letter-spacing: .08em; }
.review-card p { margin: 14px 0; color: #454a65; overflow-wrap: anywhere; }
.review-card time { color: var(--muted); font-size: .78rem; }
.review-form { max-width: 660px; padding: 30px; background: var(--blue-soft); border-radius: 16px; }
.review-form[hidden] { display: none; }
.review-form-head { display: flex; justify-content: space-between; gap: 16px; }
.review-form-head button { border: 0; color: var(--blue); background: transparent; cursor: pointer; font-weight: 900; }
.review-form label { display: block; margin: 12px 0 7px; font-weight: 900; }
.review-note { margin: 10px 0 0; color: var(--muted); font-size: .82rem; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* BLOQUE 5: CONTACTO / FORMULARIO */
.contact { margin-top: 96px; padding: clamp(42px, 6vw, 76px); display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(36px, 6vw, 80px); color: white; background: var(--blue); border-radius: var(--radius); box-shadow: var(--shadow); }
.contact h2 { margin-bottom: 16px; font-size: clamp(2.6rem, 4.4vw, 4.8rem); line-height: .94; letter-spacing: -.05em; }
.contact-copy > p:not(.eyebrow) { color: #dfe2ff; font-size: 1.05rem; }
.coverage-note { margin: 26px 0; padding: 18px 0; display: grid; gap: 3px; border-block: 1px solid rgba(255,255,255,.24); }
.coverage-note span { color: #d2d6ff; font-size: .9rem; }
.contact-form { padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; color: var(--ink); background: var(--paper); border-radius: 18px; box-shadow: 0 24px 60px rgba(4, 7, 58, .24); }
.field { display: grid; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 900; }
.field label span { color: var(--muted); font-weight: 400; }
input, textarea, select { width: 100%; padding: 13px 14px; color: var(--ink); background: white; border: 1px solid #b9bfd4; border-radius: 9px; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 37, 199, .12); outline: 0; }
.form-message { min-height: 22px; margin: 0; color: var(--danger); font-weight: 800; }
.form-message.is-success { color: var(--green); }

/* FOOTER */
.site-footer { padding: 48px 28px 96px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; color: var(--muted); border-top: 1px solid var(--line); margin-top: 60px; }
.footer-brand { display: flex; align-items: center; gap: 20px; }
.footer-brand img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.footer-tagline { margin: 0 0 4px; font-weight: 700; color: var(--ink); }
.footer-credits { margin: 0; font-size: .84rem; color: var(--muted); }
.footer-credits strong { color: var(--blue-dark); font-weight: 900; }
.footer-legal { margin: 6px 0 0; }
.btn-legal { background: none; border: none; padding: 0; font-size: .82rem; color: var(--blue); text-decoration: underline; cursor: pointer; font-family: inherit; }
.btn-legal:hover { color: var(--blue-dark); }
.footer-phone { color: var(--blue); font-weight: 900; text-decoration: none; transition: color .18s ease; }
.footer-phone:hover { color: var(--blue-dark); text-decoration: underline; }
.mobile-whatsapp { display: none; }

/* PRIVACY MODAL DIALOG */
.privacy-modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(640px, 92vw);
  max-height: 85vh;
  box-shadow: 0 25px 60px rgba(10, 15, 60, .35);
  background: white;
}
.privacy-modal::backdrop {
  background: rgba(10, 16, 45, .65);
  backdrop-filter: blur(4px);
}
.privacy-modal-card {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}
.privacy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.privacy-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--blue-dark);
}
.privacy-modal-close {
  background: none;
  border: 1px solid var(--line);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: all .2s ease;
}
.privacy-modal-close:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.privacy-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink);
}
.privacy-modal-body h4 {
  margin: 18px 0 6px;
  color: var(--blue-dark);
  font-size: 1rem;
}
.privacy-modal-body h4:first-child {
  margin-top: 0;
}
.privacy-modal-body p {
  margin: 0 0 10px;
}
.privacy-modal-body ul {
  margin: 0 0 14px 20px;
  padding: 0;
}
.privacy-modal-body a {
  color: var(--blue);
  font-weight: 700;
}

/* REVEAL ANIMATIONS */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .58s ease, transform .58s cubic-bezier(.2,.7,.2,1); }
.js .reveal-left { transform: translateX(-26px); }
.js .reveal-right { transform: translateX(26px); }
.js .reveal.is-visible { opacity: 1; transform: translate(0, 0); }
.attention-pulse { animation: whatsappHalo .9s ease-out 1; }
@keyframes whatsappHalo { 0% { box-shadow: 0 0 0 0 rgba(7,154,59,.36); } 100% { box-shadow: 0 0 0 15px rgba(7,154,59,0); } }

/* RESPONSIVE DESIGN */
@media (max-width: 1120px) {
  .site-header { grid-template-columns: auto 1fr auto; gap: 16px; }
  .main-nav { gap: 18px; }
  .hero { grid-template-columns: 50% 50%; }
  .contact { grid-template-columns: .9fr 1.1fr; }
}

@media (max-width: 880px) {
  html { scroll-padding-top: 84px; }
  .site-header { min-height: 70px; margin-top: 8px; padding: 8px 14px; grid-template-columns: 1fr auto auto; gap: 10px; top: 7px; }
  .nav-toggle { display: flex; }
  .main-nav { display: none; position: absolute; z-index: 20; top: 76px; left: 8px; right: 8px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
  .main-nav.is-open { display: grid; gap: 14px; }
  .hero { min-height: 0; grid-template-columns: 1fr; }
  .hero-copy { padding: 48px 28px 36px; }
  .hero-photo { min-height: 420px; clip-path: none; }
  .services-showcase { grid-template-columns: 1fr; }
  .service-index { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .reviews-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { padding-bottom: 70px; }
  main > section, .site-footer, .site-header { width: min(100% - 20px, var(--max)); }
  .site-header { grid-template-columns: 1fr auto auto; padding: 8px 12px; gap: 8px; }
  .brand img { width: 44px; height: 44px; }
  .brand-text strong { font-size: .95rem; }
  .brand-text small { font-size: .62rem; }
  .header-phone-btn span { display: none; }
  .header-phone-btn { padding: 8px 10px; min-height: 40px; }
  .header-cta span { display: none; }
  .header-cta { padding: 8px 10px; min-height: 40px; }
  h1 { font-size: clamp(2.05rem, 8.5vw, 2.75rem); line-height: 1.08; }
  .hero-copy { padding: 42px 20px 28px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-photo { min-height: 320px; }
  .service-card .media-frame { height: 220px; }
  .service-card-body { padding: 22px 18px; }
  .service-featured { padding: 28px 20px; }
  .service-featured-header { flex-direction: column; align-items: stretch; }
  .service-index { padding: 12px; grid-template-columns: 1fr; }
  .service-index p { min-height: 60px; }
  .trust-section { margin-top: 72px; padding: 36px 20px; }
  .trust-card { padding: 20px; }
  .reviews { margin-top: 72px; padding: 38px 18px; }
  .reviews-heading { align-items: stretch; flex-direction: column; }
  .reviews-list { grid-template-columns: 1fr; }
  .review-form { padding: 20px 16px; }
  .contact { margin-top: 72px; padding: 36px 18px; }
  .contact-form { padding: 20px 16px; grid-template-columns: 1fr; }
  .field, .field-wide { grid-column: 1; }
  .site-footer { padding: 34px 14px 24px; grid-template-columns: 1fr; gap: 20px; }
  .footer-brand { flex-direction: column; align-items: flex-start; gap: 14px; }
  .site-footer img { width: 68px; height: 68px; }
  .mobile-whatsapp { position: fixed; z-index: 70; left: 10px; right: 10px; bottom: 9px; min-height: 51px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 11px; box-shadow: 0 12px 26px rgba(0, 91, 34, .28); text-decoration: none; font-weight: 900; }
  .js .reveal-left, .js .reveal-right { transform: translateY(18px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal, .js .reveal-left, .js .reveal-right { opacity: 1; transform: none; }
}
