/* ============================================
   ERVI · Landing page — Design tokens
   ============================================ */
:root {
  --bg: #090C24;
  --bg-alt: #0D1240;
  --surface: #131A52;
  --surface-2: #1A2266;
  --primary: #5B3FE8;
  --primary-light: #8A6BFF;
  --accent: #22E5D0;
  --accent-2: #4FC3FF;
  --light-bg: #F6F5FC;
  --light-surface: #FFFFFF;
  --ink: #0D0F2B;
  --ink-muted: #565A82;
  --text: #F3F4FE;
  --text-muted: #A6ABD6;
  --border-dark: rgba(255, 255, 255, 0.09);
  --border-light: rgba(13, 15, 43, 0.09);

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

  --radius: 18px;
  --radius-sm: 10px;
  --max-w: 1180px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.text-gradient {
  background: linear-gradient(100deg, var(--accent-2), var(--accent) 60%, var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================
   Signature element — trade route thread
   ============================================ */
.route-thread {
  position: fixed;
  left: 22px;
  top: 0;
  bottom: 0;
  width: 4px;
  z-index: 40;
  pointer-events: none;
  display: none;
}

.route-thread__svg {
  width: 4px;
  height: 100%;
  overflow: visible;
}

.route-thread__path {
  fill: none;
  stroke: var(--border-dark);
  stroke-width: 2;
  stroke-dasharray: 3 7;
  stroke-linecap: round;
}

.route-thread__dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 229, 208, 0.18), 0 0 18px rgba(34, 229, 208, 0.7);
  transition: top 0.08s linear;
}

@media (min-width: 1100px) {
  .route-thread {
    display: block;
  }
}

/* ============================================
   Nav
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(9, 12, 36, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-dark);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.nav__logo-image {
  display: block;
  width: auto;
  height: 50px;
}

.nav__logo-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent-2));
  color: #fff;
  margin-right: 6px;
  font-size: 1rem;
}

.nav__links {
  display: none;
  gap: 30px;
}

.nav__link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
}

.nav__link.is-active::after {
  width: 100%;
}

.nav__cta {
  display: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 100px;
  background: var(--text);
  color: var(--ink);
  transition: transform 0.2s var(--ease), opacity 0.2s;
}

.nav__cta:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.nav__burger {
  display: grid;
  gap: 5px;
  width: 26px;
  padding: 4px;
}

.nav__burger span {
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav__burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__burger.is-open span:nth-child(2) {
  opacity: 0;
}

.nav__burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__mobile {
  max-height: 0;
  overflow: hidden;
  background: rgba(9, 12, 36, 0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  transition: max-height 0.35s var(--ease);
}

.nav__mobile.is-open {
  max-height: 320px;
}

.nav__mobile a {
  padding: 16px 28px;
  font-weight: 500;
  border-top: 1px solid var(--border-dark);
  color: var(--text-muted);
}

.nav__mobile a:hover {
  color: var(--text);
}

@media (min-width: 860px) {
  .nav__links {
    display: flex;
  }

  .nav__cta {
    display: inline-block;
  }

  .nav__burger {
    display: none;
  }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 100px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(100deg, rgba(9, 12, 36, 0.5) 40%, var(--bg) 58%),
    linear-gradient(rgba(9, 12, 36, 0.35), rgba(9, 12, 36, 0.35)),
    radial-gradient(ellipse 700px 500px at 10% 100%, rgba(34, 229, 208, 0.14), transparent 60%),
    url('img/hero-globe.jpg');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: cover;
}

@media (max-width: 780px) {
  .hero__bg {
    background:
      linear-gradient(180deg, rgba(9, 12, 36, 0.6) 0%, var(--bg) 70%),
      linear-gradient(rgba(9, 12, 36, 0.4), rgba(9, 12, 36, 0.4)),
      url('img/hero-globe.jpg');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
  }
}

/* ============================================
   Reusable: full-bleed section photo + gradient
   ============================================ */
.section--photo {
  position: relative;
  overflow: hidden;
}

.section--photo .section__inner {
  position: relative;
  z-index: 1;
}

.section-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: cover;
  opacity: 0.5;
}

.section-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(273deg, transparent 44%, var(--bg) 85%);
}

.section-photo--objetivo {
  background-image: url('img/objetivo-puerto.jpg');
}

.section-photo--servicios {
  background-image: url('img/servicio-proveedores.jpg');
}

@media (max-width: 780px) {
  .section-photo {
    opacity: 0.28;
  }

  .section-photo::after {
    background: linear-gradient(180deg, transparent 0%, var(--bg) 65%);
  }
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero__title em {
  font-style: normal;
  color: var(--text);
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero__scroll span {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollpulse 1.8s ease-in-out infinite;
}

@keyframes scrollpulse {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.2s;
}

.btn--primary {
  background: linear-gradient(120deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(91, 63, 232, 0.6);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -8px rgba(91, 63, 232, 0.75);
}

.btn--ghost {
  border: 1px solid var(--border-dark);
  color: var(--text);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn--block {
  width: 100%;
  margin-top: 6px;
}

/* ============================================
   Sections — shared
   ============================================ */
.section {
  position: relative;
  padding: 120px 24px;
}

.section--dark {
  background: var(--bg);
}

.section--light {
  background: var(--light-bg);
  color: var(--ink);
}

.section--contact {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}

.section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 820px;
  margin-bottom: 20px;
}

.section__title em {
  font-style: normal;
  color: var(--accent);
}

.section--light .section__title--dark em {
  color: var(--primary);
}

.section__lead {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 620px;
  margin-bottom: 48px;
}

/* ============================================
   Objetivo
   ============================================ */
.objetivo__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  margin-top: 56px;
}

.objetivo__card {
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 32px;
}

.objetivo__num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 14px;
}

.objetivo__card p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

@media (min-width: 780px) {
  .objetivo__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   Resolvemos
   ============================================ */
.pillars {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

.pillar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.pillar__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--light-surface);
  box-shadow: 0 6px 20px -8px rgba(13, 15, 43, 0.25);
  font-size: 1.2rem;
}

.steps__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 30px;
}

.steps__track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.step {
  background: var(--light-surface);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
  border: 1px solid var(--border-light);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -12px rgba(13, 15, 43, 0.2);
}

.step__n {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  font-weight: 500;
}

@media (min-width: 780px) {
  .steps__track {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   Diferencia — "Lo que realmente marca la diferencia"
   ============================================ */
.diferencia__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 56px;
}

.diferencia__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.diferencia__card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 229, 208, 0.4);
  background: var(--surface-2);
}

.diferencia__num {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.55;
  letter-spacing: 0.04em;
}

.diferencia__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(91, 63, 232, 0.35), rgba(34, 229, 208, 0.2));
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.diferencia__card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  padding-right: 30px;
}

.diferencia__card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.diferencia__card p strong {
  color: var(--accent-2);
  font-weight: 600;
}

@media (min-width: 640px) {
  .diferencia__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .diferencia__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   Servicios
   ============================================ */
.services-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 56px;
}

.service-card {
  background: rgba(19, 26, 82, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 229, 208, 0.4);
  background: rgba(26, 34, 102, 0.82);
}

.service-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(91, 63, 232, 0.35), rgba(34, 229, 208, 0.2));
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.service-card strong {
  color: var(--accent);
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   Contacto
   ============================================ */
.contact-grid {
  display: grid;
  gap: 56px;
  grid-template-columns: 1fr;
}

.contact-info__media {
  width: 140px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  margin-bottom: 28px;
  box-shadow: 0 20px 40px -18px rgba(34, 229, 208, 0.35);
}

.contact-info__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-info .section__title {
  margin-bottom: 34px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.02rem;
}

.contact-list a {
  transition: color 0.2s;
}

.contact-list a:hover {
  color: var(--accent);
}

.contact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-badges span {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-dark);
  color: var(--text-muted);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea {
  background: var(--bg);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #565A82;
}

.form-note {
  font-size: 0.85rem;
  color: var(--accent);
  min-height: 1.2em;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border-dark);
  padding: 32px 24px;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ============================================
   Reveal on scroll
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}