/* ===== Tokens ===== */
:root{
  --navy: #0A1E3D;
  --blue: #2D6CDF;
  --blue-deep: #1B4FB0;
  --amber: #F5A623;
  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --ink: #10192B;
  --muted: #5B6472;
  --line: #E4E9F2;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(10,30,61,0.06);
  --shadow-md: 0 12px 32px rgba(10,30,61,0.10);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
h1,h2,h3{
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0;
}
p{ margin: 0; color: var(--muted); }
a{ text-decoration: none; color: inherit; }
ul{ list-style: none; margin: 0; padding: 0; }
img{ max-width: 100%; display: block; }

.container{
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.eyebrow.center{ text-align: center; }

.section-title{ font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 700; }
.section-title.center{ text-align: center; margin-bottom: 8px; }

/* ===== Buttons ===== */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover{ background: var(--blue-deep); box-shadow: var(--shadow-md); }
.btn-ghost{ background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover{ border-color: var(--blue); color: var(--blue); }
.btn.full{ width: 100%; justify-content: center; }

/* ===== Header ===== */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 20px;
}
.logo{ display: flex; align-items: center; gap: 10px; color: var(--navy); }
.logo-mark{ display: flex; color: var(--blue); }
.logo-text{ font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; display: flex; flex-direction: column; line-height: 1.1; }
.logo-text small{ font-family: var(--font-body); font-weight: 500; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.main-nav{ display: flex; gap: 28px; margin-left: auto; }
.main-nav a{ font-weight: 600; font-size: 0.94rem; color: var(--ink); position: relative; padding: 6px 0; }
.main-nav a.active,
.main-nav a:hover{ color: var(--blue); }
.main-nav a.active::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--blue); border-radius: 2px;
}

.header-whatsapp{
  display: flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff;
  padding: 10px 16px; border-radius: 999px;
  font-weight: 600; font-size: 0.9rem;
  white-space: nowrap;
}
.header-whatsapp .wa-icon{ color: #25D366; display: flex; }
.header-whatsapp:hover{ background: var(--blue-deep); }

.nav-toggle{
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span{ width: 22px; height: 2px; background: var(--navy); border-radius: 2px; }

/* ===== Hero ===== */
.hero{ padding-top: 64px; overflow: hidden; }
.hero-grid{
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 48px;
  padding-bottom: 56px;
}
.hero-copy h1{ font-size: clamp(2.3rem, 4.4vw, 3.4rem); font-weight: 800; }
.hero-copy h1 span{ color: var(--blue); }
.hero-lead{ margin-top: 18px; max-width: 46ch; font-size: 1.05rem; }

.hero-badges{ display: flex; flex-wrap: wrap; gap: 22px; margin: 26px 0 30px; }
.hero-badges li{ display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; color: var(--navy); }
.badge-icon{ font-size: 1.1rem; }

.hero-cta{ display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero visual / signature scanning element */
.hero-visual{ position: relative; display: flex; flex-direction: column; align-items: center; }
.scan-frame{
  position: relative; width: 100%; max-width: 420px;
  aspect-ratio: 4 / 3.2;
  background: linear-gradient(180deg, #EEF3FC 0%, #E4ECFB 100%);
  border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.hero-photo{
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.radar{ animation: pulse 3s ease-in-out infinite; transform-origin: center; }
@keyframes pulse{
  0%,100%{ opacity: 0.6; }
  50%{ opacity: 1; }
}
.scan-line{
  position: absolute; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, rgba(45,108,223,0) 0%, rgba(45,108,223,0.16) 50%, rgba(45,108,223,0) 100%);
  animation: sweep 4.5s linear infinite;
  pointer-events: none;
}
@keyframes sweep{
  0%{ top: -40%; }
  100%{ top: 100%; }
}
.rec-tag{
  margin-top: 16px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.rec-tag i{
  width: 8px; height: 8px; border-radius: 50%; background: #E23B3B;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink{ 0%,100%{ opacity: 1; } 50%{ opacity: 0.25; } }

@media (prefers-reduced-motion: reduce){
  .scan-line, .radar, .rec-tag i{ animation: none; }
}

/* Trust bar */
.trust-bar{ background: var(--navy); padding: 30px 0; }
.trust-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust-item{ display: flex; gap: 12px; align-items: flex-start; color: #fff; }
.trust-icon{ font-size: 1.4rem; }
.trust-item strong{ display: block; font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 2px; }
.trust-item p{ color: #B9C6E3; font-size: 0.86rem; }

/* ===== Services ===== */
.services{ padding: 72px 0 80px; }
.filters{ display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 28px 0 40px; }
.filter-btn{
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-weight: 600; font-size: 0.88rem; color: var(--navy);
  cursor: pointer; transition: all 0.15s ease;
}
.filter-btn:hover{ border-color: var(--blue); color: var(--blue); }
.filter-btn.active{ background: var(--blue); border-color: var(--blue); color: #fff; }

.cards-grid{ display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.service-card{
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.service-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon{ font-size: 1.8rem; }
.service-card h3{ font-size: 1.02rem; }
.service-card p{ font-size: 0.88rem; flex-grow: 1; }
.card-link{ font-weight: 700; color: var(--blue); font-size: 0.88rem; }
.service-card.hidden{ display: none; }

/* ===== Panel de detalle de servicio (hero + galería) ===== */
.detail-panel{
  position: relative;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 0.6s ease, opacity 0.4s ease, transform 0.4s ease;
}
.detail-panel[hidden]{ display: none; }
.detail-panel.is-open{
  max-height: 3000px;
  opacity: 1;
  transform: translateY(0);
}

.detail-panel-close{
  position: absolute;
  top: 36px; right: 0;
  z-index: 2;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.2s ease;
}
.detail-panel-close:hover{
  border-color: var(--blue);
  color: var(--blue);
  transform: rotate(90deg);
}

/* Hero de portada con overlay, estilo landing */
.detail-hero{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6.2;
  min-height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--blue-deep));
  box-shadow: var(--shadow-md);
}
.detail-hero-img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.detail-hero-overlay{
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px 32px;
  background: linear-gradient(90deg, rgba(10,30,61,0.88) 0%, rgba(10,30,61,0.55) 55%, rgba(10,30,61,0.15) 100%);
}
.detail-hero-overlay .eyebrow{ color: #9DC0FF; margin-bottom: 8px; }
.detail-hero-title{
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  max-width: 24ch;
}

.detail-body{ padding-top: 28px; max-width: 780px; }
.detail-text p{ color: var(--ink); font-size: 1rem; margin-bottom: 14px; }
.detail-text p:last-child{ margin-bottom: 0; }

.detail-cta{ margin-top: 22px; }

.detail-gallery-title{
  margin-top: 40px; margin-bottom: 18px;
  font-size: 1.1rem; font-weight: 700; color: var(--navy);
}

.detail-gallery{
  max-width: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.detail-gallery-item{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.detail-gallery-item img,
.detail-gallery-item video{
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.detail-gallery-item:hover img,
.detail-gallery-item:hover video{ transform: scale(1.05); }
.detail-gallery-item.is-video::after{
  content: "▶";
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(10,30,61,0.65);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  pointer-events: none;
}

@media (max-width: 720px){
  .detail-hero{ aspect-ratio: 4 / 3.4; }
  .detail-hero-overlay{ padding: 20px; }
  .detail-gallery{ grid-template-columns: repeat(2, 1fr); }
  .detail-panel-close{ top: 36px; }
}

/* ===== Lightbox de galería ===== */
.lightbox{
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: rgba(10,30,61,0.92);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox[hidden]{ display: none; }
.lightbox.is-open{ opacity: 1; }

.lightbox-img{
  max-width: min(92vw, 1000px);
  max-height: 88vh;
  width: auto; height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.lightbox.is-open .lightbox-img{ transform: scale(1); }

.lightbox-close{
  position: absolute; top: 24px; right: 24px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.2s ease;
}
.lightbox-close:hover{
  background: rgba(255,255,255,0.18);
  transform: rotate(90deg);
}

.detail-gallery-item:not(.is-video){ cursor: zoom-in; }

/* ===== About ===== */
.about{ padding: 72px 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid{ display: grid; grid-template-columns: 1.1fr 0.75fr 0.85fr; gap: 32px; align-items: center; }
.about-copy p{ margin-top: 16px; max-width: 54ch; }
.about-list{ margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.about-list li{ padding-left: 26px; position: relative; color: var(--ink); font-weight: 500; font-size: 0.94rem; }
.about-list li::before{ content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }

.stats-list{ display: flex; flex-direction: column; gap: 16px; }
.stat{
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; display: flex; align-items: baseline; gap: 12px;
}
.stat strong{ font-family: var(--font-display); font-size: 1.7rem; color: var(--blue); }
.stat span{ color: var(--muted); font-size: 0.88rem; font-weight: 600; }

.about-badge{ width: 100%; }
.about-badge img{
  width: 100%; border-radius: 14px; border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

/* ===== Contact ===== */
.contact{ padding: 72px 0 90px; }
.contact-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-lead{ margin-top: 14px; margin-bottom: 26px; }

.contact-cards{ display: flex; flex-direction: column; gap: 14px; }
.contact-card{
  display: flex; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; transition: border-color 0.15s ease, transform 0.15s ease;
}
a.contact-card:hover{ border-color: var(--blue); transform: translateX(3px); }
.contact-card span{ font-size: 1.3rem; }
.contact-card strong{ display: block; color: var(--navy); font-size: 0.94rem; }
.contact-card p{ font-size: 0.86rem; }

.contact-form{
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-sm);
}
.contact-form label{ display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.contact-form input, .contact-form textarea{
  font-family: var(--font-body); font-size: 0.95rem; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus{ outline: 2px solid var(--blue); outline-offset: 1px; }
.form-note{ font-size: 0.78rem; text-align: center; }

/* ===== Footer ===== */
.site-footer{ background: var(--navy); padding: 22px 0; }
.footer-inner{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #B9C6E3; font-size: 0.85rem; }

/* ===== Floating WhatsApp ===== */
.float-whatsapp{
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: #25D366; color: #fff; padding: 14px; border-radius: 999px;
  box-shadow: 0 8px 22px rgba(37,211,102,0.4);
}
.float-whatsapp span{
  max-width: 0; overflow: hidden; white-space: nowrap; font-weight: 700; font-size: 0.86rem;
  transition: max-width 0.25s ease;
}
.float-whatsapp:hover span{ max-width: 220px; }

/* ===== Responsive ===== */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-visual{ order: -1; max-width: 380px; margin: 0 auto; }
  .trust-grid{ grid-template-columns: repeat(2, 1fr); }
  .cards-grid{ grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid{ grid-template-columns: 1fr; }
  .about-badge{ max-width: 320px; margin: 0 auto; }
}

@media (max-width: 720px){
  .main-nav{ position: fixed; top: 76px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: 18px 24px; gap: 16px;
    border-bottom: 1px solid var(--line); transform: translateY(-140%); transition: transform 0.25s ease; }
  .main-nav.open{ transform: translateY(0); }
  .header-whatsapp{ display: none; }
  .nav-toggle{ display: flex; }
  .cards-grid{ grid-template-columns: 1fr; }
  .float-whatsapp span{ display: none; }
}
