/* ==========================================================================
   PORTIVEX SUPPLY CHAIN SOLUTIONS — Stylesheet
   Design language: customs-manifest / waybill meets modern freight brand.
   Palette derived from brand mark: deep navy hull, signal orange, sea fog.
   ========================================================================== */

:root {
  --navy-deep:  #0A1A38;
  --navy-mid:   #10306B;
  --navy-bright:#123B8A;
  --orange:     #F2650F;
  --orange-deep:#D5591B;
  --ink:        #0B1526;
  --paper:      #F8F7F4;
  --paper-dim:  #EFEDE7;
  --fog:        #8C9AAE;
  --fog-line:   rgba(255,255,255,0.14);
  --hairline:   rgba(11,21,38,0.12);
  --white:      #FFFFFF;

  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --max-w: 1180px;
  --edge: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

/* ---------- Eyebrow / manifest label system ----------
   Structural device: every section is framed as a line-item on the
   company's own shipping manifest — encodes the document-driven,
   paper-trail nature of customs & freight work. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--orange);
  flex-shrink: 0;
}
.eyebrow .doc-no {
  color: var(--fog);
  margin-left: auto;
  font-size: 11.5px;
}
section .eyebrow .doc-no { display: inline-block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h2.section-title {
  font-size: clamp(28px, 4.2vw, 44px);
  max-width: 14ch;
}

p { margin: 0 0 1em; }
.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  color: #33405A;
  max-width: 58ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover { background: var(--orange-deep); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--fog-line);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-outline-dark {
  background: transparent;
  border-color: var(--hairline);
  color: var(--ink);
}
.btn-outline-dark:hover { border-color: var(--orange); color: var(--orange-deep); }

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

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,26,56,0.0);
  transition: background 0.3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.site-header.scrolled {
  background: rgba(9,21,44,0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 46px; width: auto; }
.brand-text {
  font-family: var(--font-display);
  color: var(--white);
  line-height: 1.1;
}
.brand-text strong {
  display: block;
  font-size: 17px;
  letter-spacing: 0.01em;
}
.brand-text span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--orange);
  text-transform: uppercase;
  margin-top: 2px;
}

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}
nav.primary-nav a {
  color: var(--white);
  font-size: 14.5px;
  font-weight: 500;
  opacity: 0.85;
  position: relative;
  padding: 4px 0;
}
nav.primary-nav a:hover { opacity: 1; color: var(--orange); }
.nav-cta { display: flex; align-items: center; gap: 20px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--fog-line);
  border-radius: 3px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  margin: 0 auto;
  transition: transform .25s ease, opacity .25s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--navy-deep) 0%, #0D2149 68%, #0F2C5C 100%);
  color: var(--white);
  padding: 168px 0 120px;
  overflow: hidden;
}
.hero-graphic {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
}
.hero .wrap { position: relative; z-index: 2; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: start;
}
.hero-media { position: relative; margin-top: 42px; }
.hero-media-frame {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.12);
}
.hero-media-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--orange);
  z-index: 2;
}
.hero-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  display: block;
}
.hero-media-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,26,56,0) 55%, rgba(6,14,30,0.88) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-media-tag {
  position: absolute;
  left: 18px; bottom: 16px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.hero-tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-tag::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--orange);
}
.hero h1 {
  font-size: clamp(34px, 6vw, 68px);
  max-width: 15ch;
  color: var(--white);
}
.hero .lede {
  color: rgba(255,255,255,0.78);
  font-size: clamp(16px, 1.7vw, 20px);
  max-width: 52ch;
  margin-bottom: 34px;
}
.hero .cta-row { margin-bottom: 56px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 0;
  border-top: 1px solid var(--fog-line);
  padding-top: 28px;
}
.hero-stats .stat {
  padding-right: 20px;
  border-left: 1px solid var(--fog-line);
  padding-left: 20px;
}
.hero-stats .stat:first-child { border-left: none; padding-left: 0; }
.hero-stats .stat b {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  display: block;
  color: var(--white);
}
.hero-stats .stat span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--fog);
  text-transform: uppercase;
}

/* route line signature element used across hero + process */
.route-svg { width: 100%; height: 100%; }
.route-dash {
  stroke-dasharray: 6 8;
  animation: dashmove 6s linear infinite;
}
@keyframes dashmove { to { stroke-dashoffset: -140; } }

/* ---------- Generic section spacing ---------- */
section { padding: 96px 0; }
.section-dark {
  background: var(--navy-deep);
  color: var(--white);
}
.section-alt { background: var(--paper-dim); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.section-head .lede { margin-bottom: 0; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: start;
}
.about-copy .lede { color: #33405A; }
.perks {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.perks h4 {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 14px;
}
.perks ul { margin: 0; padding: 0; list-style: none; }
.perks li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 15px;
  color: #33405A;
}
.perks li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 1px;
  background: var(--orange);
}

.credentials-card {
  background: var(--navy-deep);
  color: var(--white);
  padding: 36px 32px;
  border-radius: 4px;
  position: relative;
}
.credentials-card::before {
  content: 'EST. TEAM EXPERIENCE';
  position: absolute;
  top: -11px; left: 28px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 2px;
}
.credentials-card .big-num {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 64px);
  color: var(--orange);
  line-height: 1;
  margin-bottom: 6px;
}
.credentials-card .big-num small {
  font-size: 22px;
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 500;
  margin-left: 8px;
}
.credentials-card p {
  color: rgba(255,255,255,0.72);
  font-size: 14.5px;
  margin-bottom: 22px;
}
.mini-vm { display: grid; gap: 18px; margin-top: 10px; }
.mini-vm .vm-item {
  border-top: 1px solid var(--fog-line);
  padding-top: 16px;
}
.mini-vm .vm-item h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 8px;
}
.mini-vm .vm-item p {
  font-size: 14.5px;
  color: rgba(255,255,255,0.82);
  margin: 0;
}

/* ---------- Services ---------- */
.services-list {
  display: flex;
  flex-direction: column;
}
.service-row {
  display: grid;
  grid-template-columns: 80px 1fr 1.1fr;
  gap: 36px;
  padding: 38px 0;
  border-top: 1px solid var(--hairline);
  align-items: start;
}
.services-list .service-row:last-child { border-bottom: 1px solid var(--hairline); }

.service-icon {
  width: 52px; height: 52px;
  border-radius: 3px;
  background: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
}
.service-icon svg { width: 26px; height: 26px; stroke: var(--orange); }

.service-heading .tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fog);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.service-heading h3 {
  font-size: 22px;
  margin-bottom: 10px;
}
.service-heading .badge-new {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 10px;
  transform: translateY(-2px);
}
.service-heading p { color: #33405A; font-size: 15px; margin: 0; }

.service-detail ul {
  margin: 0; padding: 0; list-style: none;
}
.service-detail li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
  font-size: 14.5px;
  color: #384358;
}
.service-detail li::before {
  content: '';
  position: absolute; left: 0; top: 8px;
  width: 7px; height: 1px;
  background: var(--orange);
}
.service-detail .feat-inline {
  font-size: 13.5px;
  color: var(--fog);
  margin-top: 10px;
  font-family: var(--font-mono);
}

/* ---------- Process (route timeline) ---------- */
.process-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  position: relative;
}
.process-track::before {
  content: '';
  position: absolute;
  top: 27px; left: 0; right: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 8px, transparent 8px 16px);
  z-index: 0;
}
.process-step { position: relative; z-index: 1; }
.step-marker {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--navy-deep);
  border: 1px solid var(--orange);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  margin-bottom: 22px;
}
.process-step h4 {
  font-size: 17px;
  margin-bottom: 10px;
}
.process-step p {
  font-size: 14.5px;
  color: rgba(255,255,255,0.72);
  margin: 0;
}
.process-step .leg-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fog);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

/* ---------- Leadership ---------- */
.leadership {
  background: var(--paper);
}
.telex {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: clamp(28px, 5vw, 56px);
  position: relative;
  background: var(--white);
}
.telex::before {
  content: 'MD OFFICE — DIRECT MESSAGE';
  position: absolute;
  top: -11px; left: 32px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 2px;
}
.telex blockquote {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 25px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
}
.telex .signee {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--hairline);
  padding-top: 22px;
}
.signee-mark {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--navy-deep);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}
.signee b { display: block; font-size: 15px; }
.signee span {
  display: block;
  font-size: 13px;
  color: var(--fog);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.contact-copy h2 { color: var(--white); }
.contact-copy .lede { color: rgba(255,255,255,0.75); }
.contact-cards { display: grid; gap: 16px; }
.contact-card {
  border: 1px solid var(--fog-line);
  border-radius: 4px;
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color .2s ease, background .2s ease;
}
.contact-card:hover { border-color: var(--orange); background: rgba(242,101,15,0.06); }
.contact-card .ci {
  width: 38px; height: 38px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-card .ci svg { width: 18px; height: 18px; stroke: var(--orange); }
.contact-card .cc-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fog);
  display: block;
  margin-bottom: 4px;
}
.contact-card .cc-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #071228;
  color: rgba(255,255,255,0.6);
  padding: 40px 0 26px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--fog-line);
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand {
  display: flex; align-items: center; gap: 12px;
}
.footer-brand img { height: 32px; }
.footer-brand span {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--white);
}
.footer-nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.footer-nav a { font-size: 13.5px; }
.footer-nav a:hover { color: var(--orange); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}
.footer-bottom a { color: var(--fog); }
.footer-bottom a:hover { color: var(--orange); }
.credit a { color: rgba(255,255,255,0.55); border-bottom: 1px solid rgba(255,255,255,0.2); }
.credit a:hover { color: var(--orange); border-color: var(--orange); }

/* ---------- Reveal-on-scroll (subtle, respects reduced motion) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in-view { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-media-frame img { aspect-ratio: 16 / 10; }
  .hero-media { max-width: 560px; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .process-track { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .process-track::before { display: none; }
  .service-row { grid-template-columns: 60px 1fr; }
  .service-detail { grid-column: 1 / -1; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .hero-stats .stat:nth-child(3) { border-left: none; padding-left: 0; }
}

@media (max-width: 760px) {
  nav.primary-nav {
    position: fixed;
    top: 84px; left: 0; right: 0; bottom: 0;
    background: rgba(9,20,42,0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 20px var(--edge) 40px;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
  }
  nav.primary-nav.open { transform: translateX(0); }
  nav.primary-nav a {
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid var(--fog-line);
    font-size: 17px;
  }
  .nav-cta { display: none; }
  nav.primary-nav .nav-cta-mobile {
    display: flex;
    margin-top: 24px;
  }
  .menu-toggle { display: flex; }

  .hero { padding: 128px 0 80px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-media-frame img { aspect-ratio: 4 / 3; }

  section { padding: 68px 0; }
  .section-head { margin-bottom: 36px; }
  .service-row { grid-template-columns: 1fr; gap: 16px; }
  .service-icon { margin-bottom: 6px; }
  .process-track { grid-template-columns: 1fr; }
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { justify-content: center; }
}
