/* ============ Tokens ============ */
:root {
  --acento: #FFB300;
  --acento-texto: #111;
  --oscuro: #0B1D2A;
  --oscuro-2: #12293A;
  --texto: #14202B;
  --texto-suave: #4E5D6A;
  --fondo: #FFFFFF;
  --fondo-suave: #F3F5F7;
  --borde: #E3E7EB;
  --wa: #25D366;
  --wa-texto: #06301A;
  --radio-lg: 28px;
  --radio: 18px;
  --radio-sm: 12px;
  --sombra: 0 10px 30px -12px rgba(11, 29, 42, .25);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
figure { margin: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 96px 0; }
.section-tight { padding: 32px 0; }
.muted { background: var(--fondo-suave); }
.eyebrow { color: #B07A00; font-weight: 600; font-size: .875rem; letter-spacing: .02em; margin-bottom: 12px; }
.dark .eyebrow { color: var(--acento); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--acento); color: var(--acento-texto); padding: 8px 16px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; border-radius: 6px; }

.ico { width: 20px; height: 20px; flex-shrink: 0; }

/* Imagen que no carga */
img.img-fallo { opacity: 0; }
.hero, .about-img, .service-img, .project, .video-card { background: linear-gradient(135deg, #22384a, #0B1D2A); }

/* ============ Botones ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
  touch-action: manipulation;
}
.btn .ico { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 44px; padding: 10px 20px; font-size: .9rem; }
.btn-acento { background: var(--acento); color: var(--acento-texto); }
.btn-acento:hover { box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--acento) 70%, transparent); }
.btn-oscuro { background: var(--oscuro); color: #fff; }
.btn-oscuro:hover { background: var(--oscuro-2); }
.btn-wa { background: var(--wa); color: var(--wa-texto); }
.btn-wa svg { width: 22px; height: 22px; }
.btn-wa:hover { box-shadow: 0 8px 20px -6px rgba(37, 211, 102, .6); }

.pill-outline, .pill-light {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; font: inherit; font-size: .8rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.pill-outline { border: 1px solid rgba(255,255,255,.5); color: #fff; padding: 6px 14px; min-height: 32px; }
.pill-outline:hover { background: rgba(255,255,255,.12); }

.circle-btn {
  position: absolute; display: grid; place-items: center; text-align: center;
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--acento); color: var(--acento-texto);
  font-size: .85rem; font-weight: 700; text-decoration: none; line-height: 1.2;
  box-shadow: var(--sombra);
  transition: transform .25s var(--ease);
}
.circle-btn:hover { transform: scale(1.06); }

/* ============ Navegación ============ */
.nav {
  position: fixed; top: 16px; left: 0; right: 0; z-index: 50;
  padding: 0 16px; pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  max-width: calc(var(--max) - 8px); margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px; border-radius: 999px;
  color: #fff;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
}
.nav.scrolled .nav-inner, .sin-hero .nav-inner {
  background: rgba(255,255,255,.92); color: var(--texto);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px -10px rgba(11,29,42,.3);
}
.sin-hero main { padding-top: 110px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.02em; }
.logo-mark { width: 20px; height: 20px; border-radius: 50%; background: conic-gradient(var(--acento) 0 50%, currentColor 50% 100%); }
.logo-img { height: 36px; width: auto; }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  display: inline-block; padding: 8px 12px; font-size: .92rem; font-weight: 500; text-decoration: none;
  border-radius: 999px; transition: background-color .2s;
}
.nav-links a:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; place-items: center; }
.nav-toggle .ico { width: 24px; height: 24px; }

/* ============ Hero ============ */
.hero-wrap { padding: 16px; }
.hero {
  position: relative; overflow: hidden; border-radius: var(--radio-lg);
  min-height: min(92vh, 860px); min-height: min(92dvh, 860px);
  display: flex; align-items: center;
  color: #fff;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,29,42,.55) 0%, rgba(11,29,42,0) 22%),
    linear-gradient(90deg, rgba(11,29,42,.82) 0%, rgba(11,29,42,.45) 50%, rgba(11,29,42,.05) 100%);
}
.hero-content { position: relative; padding-top: 120px; padding-bottom: 180px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3.75rem); font-weight: 800; max-width: 17ch; overflow-wrap: break-word; hyphens: auto; }
.hero-sub { margin: 20px 0 32px; max-width: 42ch; font-size: 1.05rem; color: rgba(255,255,255,.88); }

.hero-address {
  position: absolute; right: 12%; top: 38%;
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .9rem; font-weight: 600; line-height: 1.4;
  background: rgba(11,29,42,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 12px 16px; border-radius: var(--radio-sm);
}
.hero-address .ico { color: var(--acento); margin-top: 1px; }

.badge-rot { position: absolute; right: 30%; bottom: 56px; width: 124px; height: 124px; }
.badge-rot svg { width: 100%; height: 100%; animation: girar 16s linear infinite; }
.badge-rot text { font-size: 10px; font-weight: 800; fill: var(--acento-texto); }
.badge-rot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--acento); }
.badge-rot svg { position: relative; }
.badge-dot { position: absolute; inset: 42%; border-radius: 50%; background: var(--acento-texto); }
@keyframes girar { to { transform: rotate(360deg); } }

.rating-card {
  position: absolute; left: 32px; bottom: 32px; width: 220px;
  background: var(--oscuro); color: #fff; border-radius: var(--radio);
  padding: 18px; box-shadow: var(--sombra);
}
.rating-top { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.15); }
.rating-top p { font-size: .9rem; font-weight: 600; line-height: 1.35; }
.rating-avatars { display: flex; }
.rating-avatars i {
  width: 26px; height: 26px; border-radius: 50%; margin-left: -8px; border: 2px solid var(--oscuro);
  background: linear-gradient(135deg, #c9d3dc, #7f95a8); font-style: normal; font-size: .8rem; font-weight: 700;
  display: grid; place-items: center; color: var(--oscuro);
}
.rating-avatars i:last-child { background: #fff; }
.rating-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; }
.rating-bottom strong { display: inline-flex; align-items: center; gap: 4px; font-size: 1.5rem; }
.star { width: 16px; height: 16px; color: var(--acento); fill: var(--acento); }

/* ============ Nosotros ============ */
.about-head { display: grid; grid-template-columns: 1fr 2.2fr; gap: 48px; margin-bottom: 56px; }
.about-lema { color: var(--texto-suave); font-size: .92rem; max-width: 22ch; }
.about-title { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; line-height: 1.35; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.about-img { position: relative; border-radius: var(--radio); overflow: hidden; min-height: 360px; }
.about-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-img .circle-btn { left: 50%; top: 50%; translate: -50% -50%; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stat { background: var(--fondo-suave); border-radius: var(--radio); padding: 28px; display: flex; flex-direction: column; justify-content: space-between; }
/* Con 2 tarjetas: una arriba de la otra */
.stats:has(> :nth-child(2):last-child) { grid-template-columns: 1fr; }
.stat-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.stat-head strong { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-head .ico { width: 28px; height: 28px; color: var(--oscuro); }
.stat h3 { font-size: 1rem; margin-bottom: 6px; }
.stat p { color: var(--texto-suave); font-size: .9rem; line-height: 1.5; }

/* ============ Video ============ */
.video-card { position: relative; border-radius: var(--radio-lg); overflow: hidden; aspect-ratio: 16 / 7; }
.video-card img { width: 100%; height: 100%; object-fit: cover; }
.play-btn {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--acento); color: var(--acento-texto); display: grid; place-items: center;
  box-shadow: 0 0 0 12px color-mix(in srgb, var(--acento) 30%, transparent);
  transition: transform .25s var(--ease);
}
.play-btn svg { width: 32px; height: 32px; margin-left: 4px; }
.play-btn:hover { transform: scale(1.07); }
.pill-light { position: absolute; right: 20px; bottom: 20px; background: #fff; color: var(--texto); border: 0; padding: 10px 16px; min-height: 44px; }
.pill-light .ico { width: 16px; height: 16px; }

.video-modal { border: 0; padding: 0; background: transparent; width: min(960px, 92vw); max-width: none; overflow: visible; }
.video-modal::backdrop { background: rgba(5, 12, 18, .85); }
.video-frame { aspect-ratio: 16 / 9; border-radius: var(--radio); overflow: hidden; background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-close { position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }

/* ============ Servicios ============ */
.dark { background: var(--oscuro); color: #fff; border-radius: var(--radio-lg); margin: 0 16px; }
.services-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 40px; }
.services-intro { max-width: 46ch; color: rgba(255,255,255,.75); }
.service {
  display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: 40px; align-items: stretch;
  padding: 40px 0; border-top: 1px solid rgba(255,255,255,.12);
}
.service-text { display: flex; flex-direction: column; }
.service-num { color: var(--acento); font-size: .85rem; font-weight: 700; margin-bottom: 10px; }
.service h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; max-width: 16ch; }
.service p { margin-top: 20px; max-width: 48ch; color: rgba(255,255,255,.72); font-size: .95rem; }
.service-tag { margin-top: auto; padding-top: 24px; font-weight: 600; color: rgba(255,255,255,.9); }
.service-img { position: relative; border-radius: var(--radio); overflow: hidden; aspect-ratio: 4 / 3; }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service:hover .service-img img { transform: scale(1.05); }
.service-img .circle-btn { left: 50%; top: 50%; translate: -50% -50%; width: 84px; height: 84px; }

/* ============ Proyectos ============ */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 700; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project { position: relative; border-radius: var(--radio); overflow: hidden; aspect-ratio: 4 / 3; }
.project:first-child { grid-column: span 2; aspect-ratio: auto; }
.project:first-child img { position: absolute; inset: 0; }
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project:hover img { transform: scale(1.05); }
.project figcaption {
  position: absolute; inset: auto 0 0 0; padding: 48px 20px 20px; color: #fff;
  background: linear-gradient(0deg, rgba(11,29,42,.85), rgba(11,29,42,0));
  display: flex; flex-direction: column; gap: 2px;
}
.project figcaption span { font-size: .8rem; color: var(--acento); font-weight: 600; }
.project figcaption strong { font-size: 1.15rem; }

/* ============ Testimonios ============ */
.testis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi { margin: 0; background: #fff; border-radius: var(--radio); padding: 28px; display: flex; flex-direction: column; gap: 20px; border: 1px solid var(--borde); }
.testi .quote { width: 28px; height: 28px; color: var(--acento); }
.testi p { font-size: 1.02rem; line-height: 1.6; flex: 1; }
.testi footer { display: flex; align-items: center; gap: 12px; }
.testi footer strong { display: block; font-size: .95rem; }
.testi footer small { color: var(--texto-suave); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--oscuro); color: var(--acento); font-weight: 800; }

/* ============ CTA ============ */
.cta {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  background: var(--acento); color: var(--acento-texto); border-radius: var(--radio-lg); padding: 48px;
}
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.cta p { margin-top: 8px; max-width: 50ch; }
.cta .btn-wa { background: var(--oscuro); color: #fff; }

/* ============ Contacto ============ */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.contact-info h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 700; margin-bottom: 12px; }
.contact-info > p { color: var(--texto-suave); }
.contact-list { margin-top: 32px; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 12px; align-items: center; }
.contact-list .ico { color: #B07A00; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: var(--fondo-suave); padding: 32px; border-radius: var(--radio-lg); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field label span { color: #B3261E; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--texto);
  min-height: 48px; padding: 12px 14px; border-radius: var(--radio-sm);
  border: 1px solid #C9D1D8; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--oscuro); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 45%, transparent); }
.field [aria-invalid="true"] { border-color: #B3261E; }
.field-err { color: #B3261E; font-size: .85rem; min-height: 0; }
.field-err:empty { display: none; }

/* ============ Pie ============ */
.footer { background: var(--oscuro); color: rgba(255,255,255,.8); padding: 64px 0 24px; margin-top: 32px; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr auto; gap: 40px; align-items: start; }
.footer-grid p { max-width: 36ch; font-size: .95rem; }
.footer-links { display: grid; gap: 4px; }
.footer-links a { text-decoration: none; display: inline-block; padding: 4px 0; }
.footer-links a:hover { color: var(--acento); }
.socials { display: flex; gap: 8px; margin-top: 20px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); transition: background-color .2s, color .2s; }
.socials a:hover { background: var(--acento); color: var(--acento-texto); border-color: var(--acento); }
.footer-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.6); }

/* ============ WhatsApp flotante ============ */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 10px 24px -6px rgba(0,0,0,.35);
  transition: transform .2s var(--ease);
}
.wa-float svg { width: 32px; height: 32px; }
.wa-float:hover { transform: scale(1.08); }

/* ============ Animación de entrada ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.stats .reveal:nth-child(2), .testis .reveal:nth-child(2), .projects .reveal:nth-child(2) { transition-delay: .06s; }
.stats .reveal:nth-child(3), .testis .reveal:nth-child(3), .projects .reveal:nth-child(3) { transition-delay: .12s; }
.stats .reveal:nth-child(4), .projects .reveal:nth-child(4) { transition-delay: .18s; }

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

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .badge-rot { right: 8%; bottom: 40px; width: 104px; height: 104px; }
  .hero-address { right: 6%; top: auto; bottom: 170px; }
  .about-grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
  .nav-inner { padding: 10px 12px 10px 20px; gap: 12px; flex-wrap: wrap; border-radius: 28px; }
  .nav nav { order: 3; width: 100%; margin: 0; }
  .nav-links { display: none; flex-direction: column; gap: 2px; padding: 8px 0 6px; }
  .nav.open .nav-links { display: flex; }
  .nav.open .nav-inner { background: #fff; color: var(--texto); box-shadow: var(--sombra); }
  .nav-links a { display: block; padding: 12px 8px; font-size: 1rem; }
  .nav-toggle { display: grid; }
  .nav-cta { margin-left: auto; }
  .nav-toggle { margin-left: 0; }

  .section { padding: 72px 0; }
  .about-head { grid-template-columns: 1fr; gap: 16px; }
  .services-head, .section-head { flex-direction: column; align-items: flex-start; }
  .service { grid-template-columns: 1fr; gap: 24px; }
  .service-img { order: -1; }
  .projects { grid-template-columns: 1fr 1fr; }
  .project:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
  .testis { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .cta { padding: 32px; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero-wrap { padding: 10px; }
  .hero { min-height: auto; flex-direction: column; align-items: stretch; }
  .hero-content { padding-top: 130px; padding-bottom: 32px; }
  .hero-sub { font-size: 1rem; }
  .hero-address { position: relative; right: auto; bottom: auto; margin: 0 16px; align-self: flex-start; }
  .rating-card { position: relative; left: auto; bottom: auto; margin: 16px; width: auto; }
  .badge-rot { width: 80px; height: 80px; right: 16px; bottom: 146px; top: auto; }
  .nav-cta { display: none; }
  .nav-toggle { margin-left: auto; }
  .dark { margin: 0 10px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 18px; }
  .about-img { min-height: 260px; }
  .video-card { aspect-ratio: 4 / 3; }
  .projects { grid-template-columns: 1fr; }
  .project:first-child { grid-column: auto; aspect-ratio: 4 / 3; }
  .contact-form { grid-template-columns: 1fr; padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta { padding: 28px 22px; }
  .cta .btn { width: 100%; }
}
