/* ================================================
   GLOBAL INTEGRA 2026
   Landing: "la marca encendida" (letrero luminoso)
   Secciones internas: diseño claro clásico
   Safari-viejo friendly: solo colores sólidos / rgba().
   ================================================ */

:root {
  /* Landing nocturna */
  --noche: #060a14;
  --panel: #0d1526;
  --linea: #1c2842;
  --azul-electrico: #4d8dff;
  --azul-suave: #a9c6ff;

  /* Cuerpo claro */
  --navy: #0a1130;
  --blue: #2e6bff;
  --blue-dark: #1f4fd6;
  --ink: #182036;
  --gray: #5a6478;
  --line: #e3e7f0;
  --bg-alt: #f4f6fb;
  --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

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

/* ---------- Tipografía ---------- */
h2 {
  font-size: clamp(1.9rem, 3.9vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 { font-weight: 700; }

.eyebrow {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.mono-label {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--azul-suave);
}

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { margin-bottom: 16px; }
.section-sub { color: var(--gray); font-size: 1.14rem; }
.lead { font-size: 1.2rem; color: var(--gray); margin-bottom: 28px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 15px 30px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--azul-electrico);
  color: #04070f;
}
.btn-primary:hover {
  background: #6ba1ff;
  box-shadow: 0 0 22px rgba(77, 141, 255, 0.55);
}

.btn-ghost {
  border: 1px solid rgba(244, 247, 255, 0.4);
  color: #f4f7ff;
}
.btn-ghost:hover {
  border-color: #f4f7ff;
  box-shadow: 0 0 18px rgba(244, 247, 255, 0.18);
}

/* ---------- Marca (logo con globo) ---------- */
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  height: 60px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  background: transparent;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
}

.header.scrolled {
  background: rgba(6, 10, 20, 0.62);
  padding: 12px 0;
  border-bottom-color: var(--linea);
}

/* Header siempre oscuro para páginas internas sin hero (ej. aviso de privacidad) */
.header.header-static {
  background: rgba(6, 10, 20, 0.92);
  border-bottom-color: var(--linea);
}

.header-inner { display: flex; align-items: center; gap: 30px; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  font-family: 'IBM Plex Mono', 'Menlo', monospace;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  padding: 8px 12px;
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--azul-suave); }

.btn-header { padding: 11px 20px; font-size: 0.78rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: #f4f7ff;
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-image: url('../img/hero.jpg');
  background-image: image-set(url('../img/hero.webp') type('image/webp'), url('../img/hero.jpg') type('image/jpeg'));
  background-position: center 28%;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background:
    linear-gradient(to bottom, rgba(6, 10, 20, 0.35) 0%, rgba(6, 10, 20, 0) 22%),
    linear-gradient(to top, rgba(6, 10, 20, 0.97) 0%, rgba(6, 10, 20, 0.62) 45%, rgba(6, 10, 20, 0.28) 100%);
}

.hero-content {
  position: relative;
  padding-bottom: 96px;
  padding-top: 150px;
  color: #f4f7ff;
}

.hero-eyebrow { display: block; margin-bottom: 26px; }

.hero h1 {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-stretch: 115%;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(2.8rem, 7.5vw, 5.4rem);
  line-height: 0.98;
  margin-bottom: 26px;
}

/* Entrada del titular línea por línea (estilo SplitText) */
.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}
.hero h1 .line-inner {
  display: block;
  transform: translateY(110%);
  animation: linea-sube 0.9s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
.hero h1 .line:nth-child(2) .line-inner { animation-delay: 0.12s; }
.hero h1 .line:nth-child(3) .line-inner { animation-delay: 0.24s; }

@keyframes linea-sube {
  to { transform: translateY(0); }
}

/* El resto del hero entra después del titular */
.hero-eyebrow,
.hero-sub,
.hero-actions {
  opacity: 0;
  animation: hero-fade 0.8s ease forwards;
}
.hero-eyebrow { animation-delay: 0.1s; }
.hero-sub { animation-delay: 0.55s; }
.hero-actions { animation-delay: 0.7s; }

@keyframes hero-fade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Firma: la palabra ALTURA es un letrero que se enciende */
.sign {
  color: #dce9ff;
  text-shadow:
    0 0 6px rgba(169, 198, 255, 0.9),
    0 0 18px rgba(77, 141, 255, 0.85),
    0 0 46px rgba(77, 141, 255, 0.6),
    0 0 90px rgba(45, 100, 220, 0.45);
  animation: encender 2.4s ease-out 0.4s both;
}

@keyframes encender {
  0%   { opacity: 0.12; text-shadow: none; }
  9%   { opacity: 0.85; }
  11%  { opacity: 0.15; text-shadow: none; }
  16%  { opacity: 0.9; }
  19%  { opacity: 0.2; text-shadow: none; }
  30%  { opacity: 1; }
  44%  { opacity: 0.55; }
  52%  { opacity: 1; }
  100% { opacity: 1; }
}

.hero-sub {
  max-width: 52ch;
  font-size: 1.1rem;
  color: rgba(244, 247, 255, 0.85);
  margin-bottom: 38px;
}

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

.hero-caption {
  position: absolute;
  right: 28px;
  bottom: 26px;
  color: rgba(169, 198, 255, 0.75);
}

/* ---------- Readout (datos duros) ---------- */
.readout {
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
  background: var(--panel);
}

.readout-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.readout span {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8e9bb8;
  padding: 22px 18px;
  border-left: 1px solid var(--linea);
}
.readout span:first-child { border-left: none; padding-left: 0; }

.readout strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: #f4f7ff;
  letter-spacing: -0.01em;
}

/* ---------- Secciones ---------- */
.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); }

.section-dark {
  background: var(--navy);
  color: var(--white);
}
.section-dark .section-sub { color: #aab6d8; }

/* ---------- Nosotros ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.about-photo img {
  border-radius: 18px;
  width: 100%;
  height: 560px;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(10, 17, 48, 0.18);
}

.about-cards { display: grid; gap: 18px; }

.about-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 26px;
}
.about-card h3 { color: var(--blue); margin-bottom: 6px; font-size: 1.05rem; }
.about-card p { color: var(--gray); font-size: 0.98rem; }

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.service-card {
  background: var(--white);
  border: 1px solid rgba(18, 19, 23, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(10, 17, 48, 0.08);
}

.service-img { height: 210px; overflow: hidden; }
.service-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.service-card:hover .service-img img { transform: scale(1.05); }

.service-body { padding: 22px 24px 26px; }
.service-body h3 { font-size: 1.12rem; margin-bottom: 8px; }
.service-body p { color: var(--gray); font-size: 0.98rem; }

/* ---------- Procesos ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.process-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.process-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(10, 17, 48, 0.08);
  border-color: transparent;
}

.process-photo {
  margin: -28px -26px 20px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
}
.process-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(15%) saturate(0.9) contrast(1.05);
  transition: transform 0.5s ease, filter 0.4s ease;
}
.process-card:hover .process-photo img {
  transform: scale(1.06);
  filter: grayscale(0%) saturate(1) contrast(1.05);
}

.process-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(46, 107, 255, 0.09);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.process-icon svg { width: 26px; height: 26px; }

.process-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.process-tags {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--blue);
  margin-bottom: 8px;
}
.process-card p:last-child { color: var(--gray); font-size: 0.95rem; }

/* ---------- Capacidad ---------- */
.capacity-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.capacity-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.capacity-photos img {
  width: 100%;
  height: 195px;
  object-fit: cover;
  border-radius: 16px;
}

.check-list { list-style: none; display: grid; gap: 20px; }
.check-list li {
  position: relative;
  padding-left: 40px;
  color: #c6cfe8;
  font-size: 1.02rem;
}
.check-list li strong { color: var(--white); }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 2px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- LATAM ---------- */
.latam-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: start;
}

.latam-map-card { padding: 14px 0; }

.latam-map { display: block; width: 100%; height: auto; }

.latam-map .country-ctx {
  fill: var(--bg-alt);
  stroke: var(--line);
  stroke-width: 0.8;
}
.latam-map .country-hl {
  fill: rgba(46, 107, 255, 0.14);
  stroke: rgba(46, 107, 255, 0.55);
  stroke-width: 1;
}
.latam-map .country-hq {
  fill: rgba(224, 122, 24, 0.16);
  stroke: rgba(200, 100, 20, 0.65);
  stroke-width: 1.1;
}

.latam-map .route {
  stroke: rgba(46, 107, 255, 0.32);
  stroke-width: 1.1;
  stroke-dasharray: 2.5 3.5;
  fill: none;
}
.latam-map .leader {
  stroke: rgba(24, 32, 54, 0.3);
  stroke-width: 0.8;
  fill: none;
}

.latam-map .pin-dot { fill: var(--blue); stroke: var(--white); stroke-width: 1.4; }
.latam-map .pin-glow { fill: var(--blue); opacity: 0.16; }
.latam-map .hq-dot { fill: #c9670f; stroke: var(--white); stroke-width: 1.6; }
.latam-map .hq-glow { fill: #e07a18; opacity: 0.2; }

.latam-map .pin-label {
  fill: var(--ink);
  font-size: 9.5px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
}
.latam-map .hq-label {
  fill: #b45309;
  font-size: 10.5px;
  font-weight: 800;
  font-family: 'Manrope', sans-serif;
}

.incoterms {
  background: var(--navy);
  border-radius: 16px;
  padding: 28px;
  color: var(--white);
  display: grid;
  gap: 16px;
}
.incoterms-title { font-weight: 700; color: #aab6d8; font-size: 1rem; }
.incoterm {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 14px;
}
.incoterm strong { font-size: 1.2rem; color: #6f9aff; min-width: 52px; }
.incoterm span { color: #c6cfe8; font-size: 0.92rem; }

/* ---------- Franja de marcas (marquesina) ---------- */
.trusted {
  background: var(--white);
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--line);
}

.trusted-label {
  text-align: center;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 30px;
}

.marquee {
  position: relative;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  align-items: center;
  width: -webkit-max-content;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee-item {
  flex: 0 0 auto;
  width: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}
.marquee-item img {
  max-width: 100%;
  max-height: 88px;
  width: auto;
  height: auto;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  pointer-events: none;
}
.marquee-fade-l {
  left: 0;
  background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0));
}
.marquee-fade-r {
  right: 0;
  background: linear-gradient(to left, #ffffff, rgba(255, 255, 255, 0));
}

/* ---------- Sectores ---------- */
.sector-group { margin-top: 54px; }

.sector-title {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.sector-title strong { font-weight: 800; color: var(--navy); }

.logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.logo-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.logo-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(10, 17, 48, 0.08);
}

.logo-card img {
  max-width: 100%;
  max-height: 84px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ---------- Galería ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery figure {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  height: 240px;
  cursor: zoom-in;
}
.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery figure:hover img { transform: scale(1.06); }

.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(6, 10, 20, 0.8), rgba(6, 10, 20, 0));
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery figure:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 20, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }

.lightbox img {
  max-width: 86vw;
  max-height: 76vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.lightbox-caption {
  color: #c9d4ea;
  margin-top: 18px;
  font-size: 0.98rem;
  font-weight: 600;
}

.lightbox button {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox-close { top: 22px; right: 22px; }
.lightbox-prev { left: 22px; top: 50%; margin-top: -23px; }
.lightbox-next { right: 22px; top: 50%; margin-top: -23px; }

@media (max-width: 760px) {
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox img { max-width: 94vw; }
}

/* ---------- Calidad ---------- */
.quality {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}
.quality h2 { margin-bottom: 12px; }

.quality-cta {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
}
.quality-cta p { font-weight: 700; font-size: 1.1rem; margin-bottom: 18px; }
.quality-cta .btn-primary {
  background: var(--blue);
  color: var(--white);
}
.quality-cta .btn-primary:hover { background: var(--blue-dark); }

.cert-marquee-wrap { margin-top: 64px; }
.cert-marquee-wrap .trusted-label { margin-bottom: 26px; }

.marquee-track-reverse { animation-direction: reverse; }

.cert-marquee .marquee-item { width: 190px; }
.cert-marquee .marquee-item img { max-height: 104px; }

.cert-marquee .marquee-fade-l {
  background: linear-gradient(to right, var(--bg-alt), rgba(244, 246, 251, 0));
}
.cert-marquee .marquee-fade-r {
  background: linear-gradient(to left, var(--bg-alt), rgba(244, 246, 251, 0));
}

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  padding: 110px 0;
  color: var(--white);
  overflow: hidden;
}

.contact-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-image: url('../img/contacto.jpg');
  background-image: image-set(url('../img/contacto.webp') type('image/webp'), url('../img/contacto.jpg') type('image/jpeg'));
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.contact-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(8, 13, 38, 0.88);
}

.contact-content { position: relative; }
.contact-content .section-sub { color: #aab6d8; }
.contact-content .section-head {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
@media (min-width: 761px) {
  .contact-content .section-head h2 { white-space: nowrap; }
}

.contact-grid {
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Formulario de contacto ---------- */
.contact-form {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 32px;
}

.form-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field { margin-bottom: 18px; }

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #aab6d8;
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--white);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-field textarea { resize: vertical; min-height: 100px; }

.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(255, 255, 255, 0.4); }

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.09);
}

.form-consent {
  font-size: 0.82rem;
  color: #aab6d8;
  margin-bottom: 14px;
}
.form-consent a { color: #8fb4ff; }
.form-consent a:hover { color: var(--white); }

.form-submit { width: 100%; border: none; cursor: pointer; }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status {
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2em;
}
.form-status.success { color: #6fe0a0; }
.form-status.error { color: #ff8080; }

/* ---------- Página legal (aviso de privacidad) ---------- */
.legal {
  padding: 160px 0 110px;
  background: var(--white);
}

.legal-content { max-width: 760px; }

.legal-content h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.legal-updated {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-top: 40px;
  margin-bottom: 14px;
}

.legal-content p {
  color: var(--ink);
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-content ul {
  margin: 0 0 16px 22px;
  color: var(--ink);
  line-height: 1.75;
}

.legal-content a { color: var(--blue); }
.legal-content a:hover { text-decoration: underline; }

.legal-contact-note {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--gray);
}

.legal-back {
  display: inline-block;
  margin-top: 30px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.legal-back:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .legal { padding: 130px 0 70px; }
}

/* ---------- Footer ---------- */
.footer {
  background: #070c22;
  color: #8e99bd;
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer .brand-logo { height: 52px; }

.footer-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-schedule {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 24px;
  font-size: 0.9rem;
}
.footer-schedule span:nth-child(odd) { color: #8e99bd; }
.footer-schedule span:nth-child(even) { color: #d6dcef; font-weight: 600; }

.footer-info-col p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #d6dcef;
  margin-bottom: 10px;
}
.footer-info-col a {
  display: block;
  font-size: 0.9rem;
  color: #8e99bd;
  text-decoration: none;
  margin-top: 4px;
}
.footer-info-col a:hover { color: var(--white); }

.footer-map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  filter: grayscale(0.3) contrast(0.92) brightness(0.92);
  transition: filter 0.3s ease;
}
.footer-map:hover, .footer-map:focus-within { filter: none; }
.footer-map iframe { display: block; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.footer-nav a {
  color: #8e99bd;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.footer-nav a:hover { color: var(--white); }

.footer-social { display: flex; gap: 12px; flex-shrink: 0; }
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #cdd6f0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.footer-social a svg { width: 18px; height: 18px; }
.footer-social a:hover {
  color: var(--white);
  border-color: var(--azul-electrico);
  background: rgba(77, 141, 255, 0.25);
}

.footer p { font-size: 0.85rem; }
.footer p a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer p a:hover { color: var(--white); }

/* ---------- Botón flotante WhatsApp ---------- */
.whatsapp-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: whatsappPop 0.4s ease 0.6s both;
}
.whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.6);
}
.whatsapp-btn svg { width: 30px; height: 30px; }

@keyframes whatsappPop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Botón volver arriba ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 300;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(10, 17, 48, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { border-color: var(--blue); color: var(--blue); }
.back-to-top svg { width: 20px; height: 20px; }

@media (max-width: 760px) {
  .whatsapp-btn { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .whatsapp-btn svg { width: 26px; height: 26px; }
  .back-to-top { right: 16px; bottom: 80px; width: 42px; height: 42px; }
}

/* ---------- Animación reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Aparición escalonada (tarjetas, galería, lista) */
.services-grid .reveal:nth-child(2),
.gallery .reveal:nth-child(2),
.check-list .reveal:nth-child(2) { transition-delay: 0.1s; }
.services-grid .reveal:nth-child(3),
.gallery .reveal:nth-child(3),
.check-list .reveal:nth-child(3) { transition-delay: 0.2s; }
.services-grid .reveal:nth-child(4),
.gallery .reveal:nth-child(4),
.check-list .reveal:nth-child(4) { transition-delay: 0.3s; }
.services-grid .reveal:nth-child(5) { transition-delay: 0.4s; }
.services-grid .reveal:nth-child(6) { transition-delay: 0.5s; }

/* Las fotos se asientan con un zoom sutil al aparecer */
.reveal img {
  transform: scale(1.07);
  transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.visible img {
  transform: scale(1);
}

/* El fondo del hero se mueve con parallax: sobredimensionar para evitar bordes */
.hero-bg {
  top: -12%;
  bottom: -12%;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sign { animation: none; }
  .whatsapp-btn { animation: none; }
  .hero h1 .line-inner {
    transform: none;
    animation: none;
  }
  .hero-eyebrow,
  .hero-sub,
  .hero-actions {
    opacity: 1;
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0s;
  }
  .reveal img {
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .logo-grid { grid-template-columns: repeat(4, 1fr); }
  .about-grid,
  .capacity-grid,
  .latam-grid,
  .quality { grid-template-columns: 1fr; gap: 40px; }
  .about-photo img { height: 380px; }

  .readout-inner { grid-template-columns: repeat(2, 1fr); }
  .readout span:nth-child(3) { border-left: none; padding-left: 0; }
  .readout span { border-top: 1px solid var(--linea); }
  .readout span:first-child, .readout span:nth-child(2) { border-top: none; }
}

/* El menú de escritorio (7 ítems) ya no cabe junto al logo y al botón por
   debajo de este ancho, así que el menú hamburguesa arranca antes que el
   resto de los ajustes de móvil (que siguen activándose a 760px). */
@media (max-width: 1200px) {
  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 78%;
    max-width: 320px;
    background: var(--noche);
    border-left: 1px solid var(--linea);
    flex-direction: column;
    padding: 100px 36px;
    gap: 12px;
    margin-left: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav.open { transform: translateX(0); }
  .nav a { font-size: 0.95rem; padding: 10px 0; }

  .nav-toggle { display: block; position: relative; z-index: 110; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .btn-header { display: none; }
}

@media (max-width: 760px) {
  .section { padding: 72px 0; }
  .hero-content { padding-bottom: 76px; }
  .hero-caption { display: none; }

  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .logo-card { min-height: 92px; padding: 14px 10px; }
  .logo-card img { max-height: 56px; }

  .trusted { padding: 34px 0 30px; }
  .marquee-item { width: 128px; padding: 0 8px; }
  .marquee-item img { max-height: 68px; }
  .marquee-fade { width: 48px; }
  .cert-marquee .marquee-item { width: 150px; }
  .cert-marquee .marquee-item img { max-height: 84px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery figure { height: 220px; }
  .contact-form { padding: 24px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .capacity-photos img { height: 140px; }
  .capacity-photos { gap: 10px; }
  .footer-info { grid-template-columns: 1fr; gap: 26px; }
}
