/* ==========================================================================
   MUDEPA · Multimodal del Pacífico · Demostración SimCodec
   ========================================================================== */

@font-face { font-family: "Barlow Condensed"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/barlow-condensed-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/barlow-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/barlow-condensed-800.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/barlow-600.woff2") format("woff2"); }

:root {
  --navy: #0F2C4F;
  --blue: #1F4E83;
  --orange: #E8892B;
  --paper: #F4F2EE;
  --white: #FFFFFF;
  --ink: #0E1A2B;
  --muted: #4B5563;
  --on-dark: #F4F2EE;
  --on-dark-muted: #B8C4D6;
  --line: rgba(15, 44, 79, 0.16);
  --line-dark: rgba(244, 242, 238, 0.18);
  --wa: #1E7F4F;
  --header-h: 128px;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --text: "Barlow", Arial, Helvetica, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

.eyebrow {
  font-family: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}
.eyebrow--light { color: var(--orange); }

.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--navy);
}
.section-title--light { color: var(--on-dark); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font: 600 0.95rem/1 var(--text);
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn--primary { background: var(--orange); color: var(--ink); }
.btn--primary:hover { background: #F09A43; }
.btn--ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--ghost:hover { background: var(--navy); color: var(--on-dark); }
.btn--ghost-dark { border-color: var(--navy); color: var(--navy); }

/* ---------- Aviso + encabezado fijo ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.demo-bar { background: var(--navy); color: var(--on-dark); }
.demo-bar__text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.9rem;
  padding: 0.5rem var(--pad);
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: center;
}
.demo-bar a { color: var(--on-dark); font-weight: 600; text-underline-offset: 3px; }
.demo-bar__short { display: none; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 76px;
  padding: 0 var(--pad);
}
.nav__logo img { height: 40px; width: auto; }
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.2rem);
  white-space: nowrap;
}
.nav__links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0;
  background: linear-gradient(var(--orange), var(--orange)) no-repeat 0 100% / 0 2px;
  transition: background-size 0.4s var(--ease);
}
.nav__links a:hover { background-size: 100% 2px; }
.nav__cta { white-space: nowrap; }
.nav__cta.btn { min-height: 42px; padding: 0.6rem 1.1rem; font-size: 0.9rem; }

.nav__toggle {
  display: none;
  width: 48px; height: 48px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.nav__toggle span:nth-child(1) { top: 16px; }
.nav__toggle span:nth-child(2) { top: 23px; }
.nav__toggle span:nth-child(3) { top: 30px; }
.nav-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1099px) {
  .nav__toggle { display: block; }
  .nav__cta { display: none; }
  .nav__links {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    background: var(--paper);
    font-family: var(--display);
    font-size: 2.6rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav__links a { font-size: inherit; font-weight: inherit; }
  .nav-open .nav__links { opacity: 1; visibility: visible; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--header-h) + 2.5rem) var(--pad) 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: end;
  gap: 2.5rem clamp(2rem, 4vw, 4.5rem);
  overflow: hidden;
}
.hero__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 7.2vw, 7.6rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--navy);
}
.hero__line { display: block; white-space: nowrap; }
.hero__line--accent { color: var(--blue); }
.hero__lead {
  max-width: 34rem;
  margin-top: 2rem;
  font-size: 1.15rem;
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
.hero__media { position: relative; }
.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 60% center;
  will-change: transform;
}
.hero__scroll {
  position: absolute;
  left: var(--pad);
  bottom: 1.75rem;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  color: var(--navy);
  animation: bob 2.2s var(--ease) infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

@media (max-width: 899px) {
  .hero { grid-template-columns: 1fr; align-items: start; min-height: auto; padding-bottom: 4rem; }
  .hero__media img { aspect-ratio: 4 / 3; }
  .hero__scroll { display: none; }
}

/* ---------- Marquesina ---------- */
.marquee {
  overflow: hidden;
  background: var(--navy);
  color: var(--on-dark);
  padding: 1.1rem 0;
  border-top: 1px solid var(--line-dark);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee__track span {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding-right: 2.2rem;
}
.marquee__track span::after {
  content: "";
  width: 0.42em; height: 0.42em;
  margin-left: 2.2rem;
  background: var(--orange);
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Nosotros ---------- */
.about {
  padding: clamp(5rem, 10vw, 9rem) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem clamp(2rem, 5vw, 6rem);
  max-width: 1440px;
  margin: 0 auto;
}
.about__head { grid-column: 1; }
.about__body { grid-column: 2; align-self: end; color: var(--muted); }
.about__lead { font-size: 1.35rem; line-height: 1.5; color: var(--ink); margin-bottom: 1.2rem; }
.about__grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.about__card {
  padding: 2.2rem;
  background: var(--white);
  border: 1px solid var(--line);
}
.about__card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.9rem;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.6rem;
}
.about__card p { color: var(--muted); }
.about__card--dark { background: var(--navy); border-color: var(--navy); }
.about__card--dark h3 { color: var(--on-dark); }
.about__card--dark p { color: var(--on-dark-muted); }
.values { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 2rem; }
.values__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 1.2rem;
}
.values__list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.values__list li {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--navy);
  font-weight: 500;
  color: var(--navy);
}

@media (max-width: 899px) {
  .about { grid-template-columns: 1fr; }
  .about__head, .about__body { grid-column: auto; }
  .about__grid { grid-template-columns: 1fr; }
}

/* ---------- Productos y servicios (horizontal en escritorio) ---------- */
.services { background: var(--navy); color: var(--on-dark); position: relative; }
.services__sticky {
  height: 100vh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 1.5rem) 0 3rem;
  overflow: hidden;
}
.services__head { padding: 0 var(--pad); margin-bottom: 2.5rem; max-width: 1440px; width: 100%; margin-left: auto; margin-right: auto; }
.services__track {
  display: flex;
  gap: 1.5rem;
  padding: 0 var(--pad);
  will-change: transform;
}
.service-card {
  flex: 0 0 min(440px, 82vw);
  display: flex;
  flex-direction: column;
  background: var(--blue);
  border: 1px solid var(--line-dark);
  padding: 1.5rem;
  min-height: 520px;
}
.service-card--last { background: var(--paper); color: var(--ink); justify-content: space-between; }
.service-card--last h3 { color: var(--navy); }
.service-card--last p { color: var(--muted); }
.service-card__media {
  height: 200px;
  margin: -1.5rem -1.5rem 1.4rem;
  overflow: hidden;
  background: var(--navy);
}
.service-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.service-card:hover .service-card__media img { transform: scale(1.05); }
.service-card__media--plain { display: grid; place-items: center; color: var(--orange); }
.service-card__media--plain svg { width: 120px; height: 120px; }
.service-card__num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--orange);
  margin-bottom: 0.4rem;
}
.service-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--on-dark);
  margin-bottom: 0.8rem;
}
.service-card p { color: var(--on-dark-muted); font-size: 0.98rem; margin-bottom: 1.1rem; }
.service-card .btn { margin-top: auto; align-self: flex-start; }
.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: auto; }
.tags li {
  font-size: 0.85rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line-dark);
  color: var(--on-dark);
}
.service-card--last .tags { display: none; }

.services__progress {
  margin: 2.5rem var(--pad) 0;
  height: 2px;
  background: var(--line-dark);
  max-width: 1440px;
  width: calc(100% - 2 * var(--pad));
  margin-left: auto;
  margin-right: auto;
}
.services__progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
}

/* Móvil y tablet: carrusel táctil nativo */
@media (max-width: 899px), (prefers-reduced-motion: reduce) {
  .services__sticky { height: auto; min-height: 0; padding: 5rem 0; overflow: visible; }
  .services__track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
  }
  .service-card { scroll-snap-align: start; min-height: 0; }
  .services__progress { display: none; }
}

/* ---------- Contacto ---------- */
.contact {
  padding: clamp(5rem, 10vw, 9rem) var(--pad);
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4rem clamp(2rem, 5vw, 6rem);
}
.contact__lead { color: var(--muted); font-size: 1.15rem; margin: 1.4rem 0 2.4rem; max-width: 30rem; }
.contact__list { display: grid; gap: 1.6rem; }
.contact__list li { display: grid; grid-template-columns: 28px 1fr; gap: 1rem; align-items: start; }
.contact__list svg { color: var(--blue); margin-top: 2px; }
.contact__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.contact__list a { display: block; color: var(--navy); text-decoration: none; font-weight: 500; font-size: 1.1rem; width: fit-content; }
.contact__list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact__list span:not(.contact__label) { color: var(--ink); }

.contact__form {
  background: var(--white);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2.6rem);
  display: grid;
  gap: 1.1rem;
  align-content: start;
}
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--navy); }
.field input, .field select, .field textarea {
  font: 400 1rem/1.4 var(--text);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #9AA6B6;
  border-radius: 2px;
  padding: 0.7rem 0.85rem;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); background: var(--white); }
.field [aria-invalid="true"] { border-color: #B42318; }
.field__error { color: #B42318; font-size: 0.875rem; min-height: 0; }
.field__error:empty { display: none; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.4rem; }
.contact__note { font-size: 0.875rem; color: var(--muted); }

@media (max-width: 899px) {
  .contact { grid-template-columns: 1fr; }
}

/* ---------- Pie ---------- */
.footer {
  background: var(--navy);
  color: var(--on-dark-muted);
  padding: 3.5rem var(--pad) 7.5rem;
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  max-width: 1440px;
  margin: 0 auto 2.5rem;
}
.footer__logo { height: 44px; width: auto; filter: brightness(0) invert(1); }
.footer__legal { text-align: right; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 2rem;
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.875rem;
}
.demo-note a { color: var(--on-dark); font-weight: 600; text-underline-offset: 3px; }
.footer__copy { color: var(--on-dark-muted); }

@media (max-width: 599px) {
  .footer__legal { text-align: left; }
}

/* ---------- WhatsApp flotante ---------- */
.whatsapp {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wa);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(14, 26, 43, 0.25);
  transition: transform 0.3s var(--ease);
}
.whatsapp:hover { transform: scale(1.06); }

/* ---------- Cursor (solo puntero fino) ---------- */
.cursor { display: none; }

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .cursor {
    display: block;
    position: fixed;
    top: 0; left: 0;
    width: 36px; height: 36px;
    margin: -18px 0 0 -18px;
    border: 1.5px solid var(--orange);
    border-radius: 50%;
    pointer-events: none;
    z-index: 200;
    mix-blend-mode: normal;
    transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background-color 0.35s;
  }
  .cursor.is-hover {
    width: 64px; height: 64px;
    margin: -32px 0 0 -32px;
    background: rgba(232, 137, 43, 0.15);
  }
}

/* ---------- Revelado inicial sin JS: todo visible ---------- */
.js-off .hero__media img { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .marquee__track { animation: none; }
  .hero__scroll { animation: none; }
}

@media (max-width: 599px) {
  .nav__logo img { height: 34px; }
  .demo-bar__full { display: none; }
  .demo-bar__short { display: inline; }
  .hero { padding-top: calc(var(--header-h) + 1.5rem); }
  .hero__actions .btn { flex: 1 1 auto; }
  .service-card { min-height: 0; }
  .service-card h3 { font-size: 1.75rem; }
}
