/* =============================================================
   ALLTRON LOGISTICS — Design System CSS
   Based on: Intercom Design Guide (DESIGN-intercom.md)
   Font: Geist Sans (Vercel)
   Accent: Deep Navy #0C2D6B · CTA Orange #ff5600
   ============================================================= */

/* ── Geist Sans ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Geist Sans via CDN (unpkg) */
@font-face {
  font-family: 'Geist';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/Geist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/Geist-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/Geist-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
  /* Colors */
  --canvas:         #f5f1ec;
  --surface-1:      #ffffff;
  --surface-2:      #ebe7e1;
  --ink:            #111111;
  --ink-muted:      #626260;
  --ink-subtle:     #7b7b78;
  --hairline:       #d3cec6;
  --hairline-soft:  #ebe7e1;
  --inverse-canvas: #0a0a0a;
  --inverse-ink:    #ffffff;
  --inverse-ink-muted: #9c9fa5;

  /* Brand Accents */
  --navy:           #0C2D6B;
  --navy-dark:      #081e4a;
  --navy-light:     #1a4499;
  --orange:         #ff5600;
  --orange-dark:    #e04800;

  /* Border Radius */
  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-xxl: 24px;
  --r-pill: 9999px;

  /* Spacing */
  --sp-xxs: 4px;
  --sp-xs:  8px;
  --sp-sm:  12px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  32px;
  --sp-xxl: 48px;
  --sp-section: 96px;

  /* Typography */
  --font: 'Geist', 'Inter', ui-sans-serif, system-ui, sans-serif;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms var(--ease);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--canvas);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Container ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--sp-lg);
}

/* ── Typography Scale ────────────────────────────────────────── */
.display-xl {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -2px;
}
.display-lg {
  font-size: clamp(28px, 4.5vw, 56px);
  font-weight: 500;
  line-height: 1.10;
  letter-spacing: -1.4px;
}
.display-md {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.8px;
}
.headline {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.20;
  letter-spacing: -0.5px;
}
.card-title {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.3px;
}
.subhead {
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 400;
  line-height: 1.40;
  letter-spacing: -0.2px;
}
.body-lg {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.50;
  letter-spacing: -0.1px;
}
.body     { font-size: 16px; line-height: 1.50; }
.body-sm  { font-size: 14px; line-height: 1.50; }
.caption  { font-size: 12px; line-height: 1.40; }
.eyebrow  { font-size: 14px; font-weight: 500; line-height: 1.30; letter-spacing: 0.5px; text-transform: uppercase; color: var(--navy); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 12px 22px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: var(--inverse-ink);
}
.btn-primary:hover { background: #2a2a2a; }

.btn-orange {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 2px 12px rgba(255, 86, 0, 0.3);
}
.btn-orange:hover {
  background: var(--orange-dark);
  box-shadow: 0 4px 20px rgba(255, 86, 0, 0.4);
}

.btn-secondary {
  background: var(--surface-1);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn-secondary:hover { background: var(--surface-2); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-navy:hover { background: var(--navy-dark); }

/* ── Navigation ──────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: rgba(245, 241, 236, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline-soft);
  transition: box-shadow var(--transition);
}
.site-nav.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  text-decoration: none;
}
.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--navy);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-logo-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.nav-logo-text span { color: var(--navy); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--navy);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  padding: var(--sp-lg);
  z-index: 99;
  flex-direction: column;
  gap: var(--sp-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.mobile-nav .btn { width: 100%; justify-content: center; margin-top: var(--sp-xs); }

/* ── Hero Section ────────────────────────────────────────────── */
#hero {
  padding-top: 64px; /* nav offset */
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xxl);
  align-items: center;
  padding-block: var(--sp-section);
}
.hero-content { z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: var(--sp-lg);
}
.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-headline {
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--ink);
  margin-bottom: var(--sp-lg);
}
.hero-headline em {
  font-style: normal;
  color: var(--navy);
}
.hero-subtext {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 480px;
  margin-bottom: var(--sp-xxl);
}
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  align-items: center;
}
.hero-image-wrap {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 24px 64px rgba(12, 45, 107, 0.18), 0 4px 12px rgba(0,0,0,0.08);
}
.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s var(--ease);
}
.hero-image-wrap:hover img { transform: scale(1.04); }
.hero-badge {
  position: absolute;
  bottom: var(--sp-lg);
  left: var(--sp-lg);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--r-lg);
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  border: 1px solid rgba(255,255,255,0.6);
}
.hero-badge-icon {
  font-size: 24px;
}
.hero-badge-text { font-size: 13px; font-weight: 500; color: var(--ink); }
.hero-badge-text span { display: block; font-weight: 400; color: var(--ink-muted); font-size: 12px; }

/* ── Services Overview ───────────────────────────────────────── */
#services {
  background: var(--surface-1);
  padding-block: var(--sp-section);
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}
.section-header {
  text-align: center;
  margin-bottom: var(--sp-xxl);
}
.section-header .eyebrow { margin-bottom: var(--sp-sm); display: block; }
.section-header h2 { color: var(--ink); margin-bottom: var(--sp-md); }
.section-header p { color: var(--ink-muted); max-width: 520px; margin-inline: auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
}
.service-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: var(--sp-xxl) var(--sp-lg);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: default;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(12, 45, 107, 0.10);
  border-color: var(--navy);
}
.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-lg);
  transition: background var(--transition);
}
.service-card:hover .service-icon { background: var(--orange); }
.service-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: var(--sp-sm);
}
.service-card p { font-size: 14px; color: var(--ink-muted); line-height: 1.6; }
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--sp-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  transition: gap var(--transition);
}
.service-link:hover { gap: 8px; }
.service-link svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ── Detail Sections (Ocean / Air / Warehouse / Last-mile) ───── */
.detail-section {
  padding-block: var(--sp-section);
}
.detail-section:nth-child(even) { background: var(--surface-1); }

.detail-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xxl);
  align-items: center;
}
/* On desktop, .reverse sections visually flip so image appears on the left.
   We use CSS order on the image child instead of the broken direction:rtl hack. */
.detail-inner.reverse .detail-image-wrap { order: -1; }

.detail-content { max-width: 520px; }
.detail-content .eyebrow { margin-bottom: var(--sp-sm); display: block; }
.detail-content h2 { color: var(--ink); margin-bottom: var(--sp-lg); }
.detail-content .lead {
  font-size: 18px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: var(--sp-xl);
}
.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  margin-bottom: var(--sp-xxl);
}
.feature-item {
  display: flex;
  gap: var(--sp-md);
  align-items: flex-start;
}
.feature-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-check svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.feature-item-text strong { display: block; font-size: 15px; font-weight: 500; color: var(--ink); }
.feature-item-text span { font-size: 14px; color: var(--ink-muted); }

.detail-image-wrap {
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 16px 48px rgba(12, 45, 107, 0.12), 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
}
.detail-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.detail-image-wrap:hover img { transform: scale(1.03); }

/* ── Overseas Warehouse — Dark Section ───────────────────────── */
#warehouse {
  background: var(--navy);
  color: var(--inverse-ink);
}
#warehouse .detail-content h2 { color: var(--inverse-ink); }
#warehouse .detail-content .lead { color: rgba(255,255,255,0.70); }
#warehouse .eyebrow { color: var(--orange); }
#warehouse .feature-check { background: var(--orange); }
#warehouse .feature-item-text strong { color: var(--inverse-ink); }
#warehouse .feature-item-text span { color: rgba(255,255,255,0.65); }
#warehouse .detail-image-wrap {
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

/* ── Contact Section ─────────────────────────────────────────── */
#contact {
  background: var(--canvas);
  padding-block: var(--sp-section);
  border-top: 1px solid var(--hairline-soft);
}
.contact-cta-banner {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xxl);
  padding: var(--sp-section) var(--sp-xxl);
  text-align: center;
  margin-bottom: var(--sp-xxl);
}
.contact-cta-banner h2 { margin-bottom: var(--sp-md); color: var(--ink); }
.contact-cta-banner p { color: var(--ink-muted); max-width: 480px; margin: 0 auto var(--sp-xl); font-size: 18px; line-height: 1.6; }
.contact-cta-group { display: flex; justify-content: center; gap: var(--sp-md); flex-wrap: wrap; }

.contact-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xxl);
  align-items: start;
}
.contact-info h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin-bottom: var(--sp-xl);
  color: var(--ink);
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}
.contact-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item-icon svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.contact-item-body strong { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.contact-item-body a,
.contact-item-body span { font-size: 15px; color: var(--ink-muted); transition: color var(--transition); }
.contact-item-body a:hover { color: var(--navy); text-decoration: underline; }

.map-wrap {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--hairline);
  height: 340px;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: var(--sp-xxl) 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--sp-xxl);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid var(--hairline-soft);
  margin-bottom: var(--sp-xl);
}
.footer-brand p {
  font-size: 14px;
  color: var(--ink-muted);
  max-width: 240px;
  line-height: 1.6;
  margin-top: var(--sp-md);
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--sp-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col ul li { margin-bottom: var(--sp-sm); }
.footer-col ul a {
  font-size: 14px;
  color: var(--ink-muted);
  transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--ink); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}
.footer-bottom p { font-size: 13px; color: var(--ink-subtle); }

/* ── Scroll Reveal Animation ─────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }

/* ── Utility ─────────────────────────────────────────────────── */
.text-navy   { color: var(--navy); }
.text-orange { color: var(--orange); }
.text-muted  { color: var(--ink-muted); }

/* ── Responsive ──────────────────────────────────────────────── */

/* Tablet — 1024px */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner  { grid-template-columns: 1fr 1fr; }
}

/* Tablet — 768px */
@media (max-width: 768px) {
  :root { --sp-section: 64px; }

  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-block: var(--sp-xxl);
    text-align: center;
  }
  .hero-headline { letter-spacing: -1.2px; }
  .hero-subtext { margin-inline: auto; }
  .hero-cta-group { justify-content: center; }
  .hero-image-wrap { aspect-ratio: 16/9; }

  .detail-inner {
    grid-template-columns: 1fr;
  }
  /* Always show image on top across ALL sections on mobile,
     regardless of whether the section is normal or .reverse.
     Use 16/10 ratio for a full-width visual that reads well on narrow screens. */
  .detail-inner .detail-image-wrap,
  .detail-inner.reverse .detail-image-wrap {
    order: -1;
    aspect-ratio: 16/10;
    margin-bottom: var(--sp-xs);
  }
  .detail-content {
    max-width: 100%;
    order: 0;
  }

  .contact-details { grid-template-columns: 1fr; }
  .contact-cta-banner { padding: var(--sp-xxl) var(--sp-lg); }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: var(--sp-xl); }
}

/* Mobile — 480px */
@media (max-width: 480px) {
  :root { --sp-section: 48px; }

  .hero-headline { letter-spacing: -1px; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner  { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .contact-cta-group { flex-direction: column; }
  .contact-cta-group .btn { width: 100%; justify-content: center; }
}
