/* ==========================================================
   SF Transporte y Logística — papeles de despacho sellados
   Azul y marino de la marca, sellos de aduana.
   ========================================================== */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("fonts/bigshoulders.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Big Shoulders Stencil Display";
  src: url("fonts/bigshoulders-stencil.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #e8edf7;
  --ground-deep: #dbe3f2;
  --ground-light: #f4f6fb;
  --navy: #0a1233;
  --navy-deep: #060b22;
  --paper: #ffffff;
  --blue-bright: #3b82f6;
  --blue: #1e4fd6;
  --gray: #5a5e69;
  --wa: #25d366;
  --wa-hover: #3be07c;
  --cream-ink: #e8eefb;

  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-stencil: "Big Shoulders Stencil Display", "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-text: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  scrollbar-color: var(--navy) var(--ground-deep);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--navy);
  background-color: var(--ground);
  caret-color: var(--navy);
}

::selection { background: var(--navy); color: var(--ground-light); }

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}
.contact :focus-visible, .site-footer :focus-visible {
  outline-color: var(--cream-ink);
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--navy); color: var(--cream-ink);
  padding: 0.7rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 0.75rem; }

.wrap { width: min(100% - 2 * var(--gutter), 75rem); margin-inline: auto; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 2px solid var(--navy);
}
.header-in {
  width: min(100% - 2 * var(--gutter), 75rem);
  margin-inline: auto;
  height: var(--header-h);
  display: flex; align-items: center; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand-logo { height: 3.3rem; width: auto; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; line-height: 1; letter-spacing: 0.01em; white-space: nowrap; }

.nav { display: flex; gap: 1.75rem; }
.nav a { font-weight: 600; text-decoration: none; padding-block: 0.4rem; }
.nav a:hover { text-decoration: underline; }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.wa-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 2.75rem; padding: 0 1rem 0 0.8rem;
  background: var(--navy); color: var(--cream-ink);
  border-radius: 999px; font-weight: 700; text-decoration: none; font-size: 0.95rem;
  transition: background-color 0.2s;
}
.wa-pill svg { width: 1.35rem; height: 1.35rem; color: var(--wa); }
.wa-pill:hover { background: var(--navy-deep); }

.menu-btn {
  display: none; position: relative;
  width: 2.75rem; height: 2.75rem; padding: 0;
  background: transparent; border: 2px solid var(--navy); border-radius: 10px; cursor: pointer; color: var(--navy);
}
.menu-btn span {
  position: absolute; left: 0.7rem; right: 0.7rem; height: 2px; background: currentColor;
  transition: transform 0.25s var(--ease);
}
.menu-btn span:nth-child(1) { top: 1.05rem; }
.menu-btn span:nth-child(2) { top: 1.55rem; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(0.25rem) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-0.25rem) rotate(-45deg); }

@media (max-width: 52rem) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: #fff;
    border-bottom: 2px solid var(--navy);
    padding: 0.5rem var(--gutter) 1rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { font-size: 1.2rem; padding: 0.85rem 0; border-top: 1px solid rgba(10, 18, 51, 0.2); }
  .nav a:first-child { border-top: 0; }
}
@media (max-width: 34rem) {
  .brand-name { display: none; }
}
@media (max-width: 24rem) {
  .brand-logo { height: 2.9rem; }
  .wa-pill { padding: 0 0.8rem 0 0.65rem; font-size: 0.9rem; }
}

/* ---------- Sellos ---------- */
.stamp-slot {
  display: block;
  width: var(--w, 6rem);
  transform: rotate(var(--r, 0deg));
  mix-blend-mode: multiply;
  opacity: 0.94;
}
.stamp { display: block; width: 100%; height: auto; filter: url(#wear); }
.ink-navy  { color: var(--navy); }
.ink-blue  { color: var(--blue); }
.ink-gray  { color: #4f5566; }
.ink-royal { color: #123a9c; }

@keyframes thump {
  from { opacity: 0; transform: scale(1.9) rotate(calc(var(--r, 0deg) - 7deg)); filter: blur(5px); }
  55%  { opacity: 1; transform: scale(0.95) rotate(var(--r, 0deg)); filter: blur(0); }
  to   { opacity: 0.97; transform: scale(1) rotate(var(--r, 0deg)); filter: blur(0); }
}
.s-load, .stamp-slot.hit {
  animation: thump 0.7s var(--ease) var(--d, 0s) both;
}
.stamp-slot.hit { --d: 0s; animation-duration: 0.55s; }

@media (prefers-reduced-motion: reduce) {
  .s-load, .stamp-slot.hit { animation: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 5vw, 4.5rem) clamp(4.5rem, 7vw, 6.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.25rem, 2.2rem + 5vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 12ch;
}
.lede { margin-top: 1.5rem; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); line-height: 1.5; max-width: 34rem; }
.hero-link { margin-top: 1.25rem; font-weight: 700; }
.hero-link a { text-decoration-thickness: 3px; }
.hero-link a:hover { text-decoration-color: var(--blue); }

.stamp-row {
  display: flex; margin-top: 2.75rem; padding-left: 0.25rem;
}
.stamp-row .stamp-slot { --w: clamp(4.7rem, 12vw, 8rem); }
.stamp-row .stamp-slot + .stamp-slot { margin-left: -1rem; }

/* Etiqueta de envío */
.label-wrap { position: relative; --lp: 3.2rem; padding-top: var(--lp); }
.label {
  position: relative;
  background: var(--paper);
  color: var(--navy);
  border-radius: 6px;
  padding: 1.5rem 1.25rem 1.4rem;
  box-shadow: 0 1px 0 rgba(10, 18, 51, 0.18), 0 22px 36px -18px rgba(10, 18, 51, 0.45);
}
@media (min-width: 56rem) {
  .label { transform: rotate(1deg); padding: 1.75rem 1.9rem 1.75rem; }
}

.label-stamps { position: absolute; inset: var(--lp) 0 auto 0; height: 0; pointer-events: none; }
.s-salida { position: absolute; right: 0.1rem; top: -2.7rem; --w: 7.6rem; }
.s-dest   { position: absolute; right: 6.4rem; top: -3.7rem; --w: 5.4rem; z-index: 1; }
@media (min-width: 56rem) {
  .s-salida { right: 0.4rem; top: -3.1rem; --w: 9.5rem; }
  .s-dest   { right: 8.4rem; top: -4.7rem; --w: 7rem; }
}

.label-title {
  font-family: var(--font-stencil);
  font-weight: 900;
  font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0.01em;
  padding-top: 0.15rem;
}
.route-line {
  margin-top: 0.6rem;
  font-weight: 700;
  font-size: 0.98rem;
  min-height: 1.5em;
}

.field { margin-top: 1.15rem; border: 0; min-width: 0; }
.field legend, .field > label {
  display: block; padding: 0; margin-bottom: 0.55rem;
  font-weight: 800; font-size: 1rem;
}
.opt { font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; cursor: pointer; }
.chip input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; margin: 0; cursor: pointer;
}
.chip span {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.95rem;
  border: 2px solid var(--navy); border-radius: 10px;
  font-weight: 650; font-size: 0.98rem; line-height: 1.1;
  transition: background-color 0.18s, color 0.18s, transform 0.18s var(--ease);
}
.chip:hover span { background: rgba(10, 18, 51, 0.07); }
.chip input:checked + span { background: var(--navy); color: var(--paper); }
.chip input:active + span { transform: scale(0.97); }
.chip input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 3px; }

.field input[type="text"] {
  width: 100%; min-height: 3rem; padding: 0 0.9rem;
  font: inherit; font-size: 1rem; color: var(--navy);
  background: #fffdf7; border: 2px solid var(--navy); border-radius: 10px;
}
.field input[type="text"]::placeholder { color: #4a5878; opacity: 1; }
.field input[type="text"]:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  min-height: 3.5rem; padding: 0.7rem 1.25rem;
  background: var(--wa); color: var(--navy);
  border-radius: 12px; text-decoration: none; text-align: center;
  font-weight: 800; font-size: 1.05rem; line-height: 1.2;
  box-shadow: 0 10px 22px -12px rgba(8, 24, 51, 0.7);
  transition: background-color 0.18s, transform 0.18s var(--ease), box-shadow 0.18s;
}
.btn-wa svg { width: 1.7rem; height: 1.7rem; flex: none; }
.btn-wa:hover { background: var(--wa-hover); transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(8, 24, 51, 0.75); }
.btn-wa:active { transform: translateY(0); }
.label .btn-wa { margin-top: 1.5rem; }
.fine { margin-top: 0.75rem; font-size: 0.9rem; line-height: 1.4; }

@media (max-width: 55.99rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .stamp-row { margin-top: 2rem; }
}

/* ---------- Cinta de embalar ---------- */
.tape-wrap { position: relative; z-index: 5; overflow: hidden; margin-block: -2.1rem; padding-block: 0.6rem; pointer-events: none; }
.tape {
  position: relative;
  width: 106%;
  margin-left: -3%;
  transform: rotate(-0.7deg);
  overflow: hidden;
  height: 4.2rem;
  background: var(--blue);
  box-shadow: 0 6px 14px -8px rgba(10, 18, 51, 0.4);
  display: flex; align-items: center;
  color: #fff;
}
.tape-in { display: flex; gap: 2rem; white-space: nowrap; padding-left: 2rem; }
.tape-in span {
  font-family: var(--font-stencil); font-weight: 900; font-size: 1.7rem; line-height: 1;
  letter-spacing: 0.08em;
}
.tape-dark { transform: rotate(0.6deg); background: #fff; color: var(--navy); }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(5rem, 8vw, 7.5rem) clamp(4rem, 7vw, 6.5rem); }
.section-head h2, .contact h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-wrap: balance;
  max-width: 16ch;
}
.section-head p { margin-top: 1.1rem; max-width: 34rem; font-size: 1.12rem; }

/* Rutas: libro de registro */
.routes .section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.ledger { border-bottom: 2px solid var(--navy); }
.route {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.7fr) 7.4rem;
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-block: 2rem;
  border-top: 2px solid var(--navy);
}
.route-num {
  display: block;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.5rem, 1.5rem + 2.8vw, 3.9rem); line-height: 0.95;
}
.route-dir { display: block; margin-top: 0.3rem; font-weight: 650; }

.stops { display: flex; flex-wrap: wrap; align-items: center; row-gap: 0.4rem; }
.stops li { display: flex; align-items: center; font-weight: 800; font-size: 1.12rem; }
.stops li:first-child::before {
  content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%;
  background: var(--navy); margin-right: 0.5rem; flex: none;
}
.stops li + li::before {
  content: ""; width: 1.4rem; border-top: 2px dashed var(--navy); margin-inline: 0.6rem; flex: none;
}
.route-body p { margin-top: 0.7rem; max-width: 36rem; }

.route-stamp { --w: 7.4rem; justify-self: end; }

.ledger-note { margin-top: 1.75rem; max-width: 46rem; font-weight: 600; }

@media (max-width: 47.99rem) {
  .route {
    grid-template-columns: minmax(0, 1fr) 5rem;
    grid-template-areas: "id stamp" "body body";
    padding-block: 1.6rem;
  }
  .route-id { grid-area: id; }
  .route-body { grid-area: body; }
  .route-stamp { grid-area: stamp; --w: 4.8rem; align-self: start; }
  .stops { flex-direction: column; align-items: flex-start; border-left: 2px dashed var(--navy); margin-left: 0.3rem; padding-left: 1.1rem; row-gap: 0.45rem; }
  .stops li { position: relative; }
  .stops li::before, .stops li:first-child::before, .stops li + li::before {
    content: ""; position: absolute; left: calc(-1.1rem - 0.4rem); top: 50%; translate: 0 -50%;
    width: 0.7rem; height: 0.7rem; margin: 0; border: 0; border-radius: 50%; background: var(--navy);
  }
}

/* Servicios: manifiesto de carga */
.services { background-color: #fff; }
.services-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.services .section-head { position: sticky; top: calc(var(--header-h) + 2rem); }
.manifest { border-bottom: 2px solid var(--navy); }
.manifest-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 0.5rem 2rem; align-items: baseline;
  padding-block: 1.6rem; border-top: 2px solid var(--navy);
}
.manifest dt {
  font-family: var(--font-stencil); font-weight: 900;
  font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.5rem); line-height: 1;
}
.manifest dd { max-width: 30rem; }

@media (max-width: 55.99rem) {
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .services .section-head { position: static; }
}
@media (max-width: 38rem) {
  .manifest-row { grid-template-columns: minmax(0, 1fr); padding-block: 1.35rem; }
}

/* Cómo funciona */
.process { background-color: var(--ground-light); padding-bottom: clamp(6rem, 9vw, 8rem); }
.process .section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 2rem; counter-reset: none; }
.steps li { border-top: 2px dashed var(--navy); padding-top: 1.1rem; }
.step-num {
  display: block; margin-bottom: 0.6rem;
  font-family: var(--font-stencil); font-weight: 900; font-size: 6rem; line-height: 0.85;
  color: var(--blue); mix-blend-mode: multiply;
}
.steps h3 { font-size: 1.25rem; line-height: 1.2; font-weight: 800; text-wrap: balance; }
.steps p { margin-top: 0.5rem; }

@media (max-width: 62rem) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 2rem; }
}
@media (max-width: 38rem) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps li {
    display: grid; grid-template-columns: 3.6rem minmax(0, 1fr); column-gap: 1rem; align-items: start;
    padding-block: 1.3rem;
  }
  .step-num { grid-row: 1 / span 2; font-size: 4.4rem; margin: 0; }
  .steps li:last-child { border-bottom: 2px dashed var(--navy); }
}

/* ---------- Contacto ---------- */
.contact {
  background: var(--navy);
  color: var(--cream-ink);
  padding-block: clamp(6rem, 9vw, 8rem) clamp(4rem, 7vw, 6rem);
}
.contact h2 { color: #ffffff; max-width: 14ch; }
.contact ::selection { background: var(--ground); color: var(--navy); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-lede { margin-top: 1.25rem; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); max-width: 30rem; }

.btn-wa-xl {
  display: inline-flex; margin-top: 2rem;
  min-height: 4.25rem; padding: 0.9rem 2rem;
  font-size: 1.3rem; border-radius: 14px;
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.8);
}
.btn-wa-xl svg { width: 2.1rem; height: 2.1rem; }

.contact-data { margin-top: 2.25rem; display: grid; gap: 1.1rem; }
.contact-data dt { font-size: 0.95rem; font-weight: 600; color: #a9bdf0; }
.contact-data dd { font-size: 1.3rem; font-weight: 700; }
.contact-data a { text-decoration-color: var(--blue-bright); }
.contact-data a:hover { text-decoration-color: var(--wa); }

.checklist {
  border: 2px dashed rgba(232, 238, 251, 0.5);
  border-radius: 6px;
  padding: clamp(1.4rem, 3vw, 2rem);
}
.checklist h3 { font-size: 1.3rem; line-height: 1.25; font-weight: 800; color: #ffffff; text-wrap: balance; }
.checklist ul { margin-top: 1.1rem; display: grid; gap: 0.8rem; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.2rem; width: 1.25rem; height: 1.25rem;
  background: var(--wa);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 55.99rem) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 30rem) {
  .btn-wa-xl { display: flex; width: 100%; padding-inline: 1rem; font-size: 1.15rem; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--cream-ink); padding-block: 2.25rem 2.75rem; }
.footer-in { display: grid; gap: 0.4rem; }
.footer-logo { height: 5rem; width: auto; background: #fff; padding: 0.55rem 0.9rem; border-radius: 10px; margin-bottom: 0.8rem; justify-self: start; }
.footer-fine { font-size: 0.9rem; margin-top: 0.6rem; }
