/* ===================================================================
   ZenGlobal Cargo Logistics — stylesheet
   Plain CSS3 with custom properties (variables). Mobile-first:
   base styles target phones, then @media (min-width) adds tablet/desktop.
   =================================================================== */

/* -------------------------------------------------------------------
   1. DESIGN TOKENS (CSS variables)
   Defined on :root so they're available everywhere. Change a value
   here and it updates across the whole site.
   ------------------------------------------------------------------- */
:root {
  /* Brand colors — sampled from the deck (see BRAND_GUIDELINES.md) */
  --color-ink: #2F3E46;       /* body text, dark logo lettering */
  --color-navy: #012069;      /* bold headings */
  --color-primary: #3375BA;   /* links, arrow bullets */
  --color-accent: #0078C0;    /* eyebrow labels, bands, buttons */
  --color-sky: #71B1E1;       /* light blue accents, gradients */
  --color-bg: #FFFFFF;        /* main background */
  --color-bg-alt: #F5FAFD;    /* alternating section background */
  --color-border: #E1E9F0;    /* hairlines, card borders */
  --color-muted: #5B6b73;     /* secondary text */

  /* The deck's signature diagonal blue gradient */
  --gradient-band: linear-gradient(135deg, #0078C0 0%, #3375BA 55%, #71B1E1 100%);

  /* Type scale — uses clamp() so sizes flex between mobile and desktop.
     clamp(MIN, PREFERRED, MAX): never smaller than MIN, never bigger than MAX. */
  --fs-hero: clamp(2.25rem, 5vw, 3.25rem);
  --fs-h2: clamp(1.75rem, 3.5vw, 2.25rem);
  --fs-h3: clamp(1.2rem, 2vw, 1.375rem);
  --fs-body: clamp(1rem, 1.2vw, 1.0625rem);
  --fs-small: 0.9375rem;
  --fs-eyebrow: 0.8125rem;

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 10px rgba(1, 32, 105, 0.06);
  --shadow-md: 0 14px 40px rgba(1, 32, 105, 0.10);

  /* Reusable section vertical padding */
  --section-pad: clamp(3.5rem, 8vw, 6rem);
}

/* -------------------------------------------------------------------
   2. RESET / BASE
   A light reset for consistent rendering across browsers.
   ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }              /* native smooth anchor scroll */
/* scroll-padding stops sticky-header overlap when jumping to a section */
html { scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-accent); }

h1, h2, h3 { color: var(--color-navy); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: var(--fs-hero); font-weight: 800; line-height: 1.1; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
p { margin: 0 0 1rem; }

/* Visible focus ring for keyboard users (accessibility) */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link: hidden until focused, then appears top-left */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* -------------------------------------------------------------------
   3. LAYOUT HELPERS
   ------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: 820px; }     /* for text-heavy sections */

.section { padding-block: var(--section-pad); }
.section-alt { background: var(--color-bg-alt); }

/* Eyebrow: small uppercase accent label above headings */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 0.6rem;
}
.eyebrow-light { color: var(--color-sky); }

.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-intro { color: var(--color-muted); font-size: 1.05rem; }

/* -------------------------------------------------------------------
   4. BUTTONS
   ------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;            /* pill shape */
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-md); }

.btn-outline {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

/* -------------------------------------------------------------------
   5. HEADER / NAVIGATION
   ------------------------------------------------------------------- */
.site-header {
  position: sticky;       /* stays at the top as you scroll */
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);     /* frosted-glass effect */
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
/* .scrolled is added by JS once the user scrolls down a little */
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--color-border);
  background: rgba(255, 255, 255, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.logo img { width: 150px; height: auto; }

/* Navigation list */
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  margin: 0;
  padding: 0;
}
.nav-list a {
  color: var(--color-ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}
.nav-list a:hover { color: var(--color-accent); }
/*
  The CTA is a button sitting inside the nav. We use the more specific
  selector ".nav-list a.nav-cta" so it beats ".nav-list a" above —
  otherwise the nav link's "padding: 0.35rem 0" wins and the text ends up
  touching the button edges. We restore proper button padding here.
*/
.nav-list a.nav-cta {
  color: #fff;
  padding: 0.6rem 1.4rem;   /* comfortable space around the label */
  line-height: 1;
}
.nav-list a.nav-cta:hover { color: #fff; }

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-navy);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* -------------------------------------------------------------------
   6. HERO
   ------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #eaf3fb 0%, #ffffff 70%);
  isolation: isolate;     /* keeps the background art behind the text */
}
.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
}
/*
  The globe graphic now sits crisp on the RIGHT side (not faded across the
  whole hero). object-position pins it to the right so the network/globe is
  the focal point there.
*/
.hero-art img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 1;
}
/*
  A white "scrim" laid over the art: solid white on the LEFT (where the text
  lives) fading to transparent on the RIGHT (where the globe shows). This is
  what guarantees the headline is always readable — like the deck's layout.
*/
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    #ffffff 0%,
    #ffffff 34%,
    rgba(255, 255, 255, 0.72) 52%,
    rgba(255, 255, 255, 0.15) 74%,
    rgba(255, 255, 255, 0) 100%
  );
}
.hero-inner {
  display: flex;
  align-items: center;
  min-height: 72vh;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.hero-text { max-width: 600px; }
.hero-sub {
  font-size: 1.15rem;
  color: var(--color-ink);
  font-weight: 500;       /* a touch heavier so it reads clearly */
  max-width: 32rem;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/*
  On small screens the text sits over the full width, so we make the scrim
  mostly white (top-to-bottom) to keep everything legible.
*/
@media (max-width: 767px) {
  .hero-art img { object-position: center bottom; }
  .hero-art::after {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.94) 0%,
      rgba(255, 255, 255, 0.86) 45%,
      rgba(255, 255, 255, 0.45) 100%
    );
  }
}

/* -------------------------------------------------------------------
   7. SPLIT LAYOUT (text + image side by side)
   ------------------------------------------------------------------- */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.split-media { position: relative; }

/* -------------------------------------------------------------------
   8. ARROW BULLET LISTS (the deck's › style)
   ------------------------------------------------------------------- */
.arrow-list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.arrow-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
}
/* The arrow is a CSS "before" pseudo-element so we don't need an icon file */
.arrow-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: -0.05em;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.25em;
  line-height: 1;
}
.detail-list li { margin-bottom: 0.9rem; }
.detail-list strong { color: var(--color-navy); }

/* -------------------------------------------------------------------
   9. SERVICE CARDS GRID
   ------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;     /* 1 column on mobile */
}
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-sky);
}
/* A thin accent bar at the top of each card */
.card { border-top: 4px solid var(--color-accent); }
.card h3 { margin-bottom: 0.5rem; }
.card p { margin: 0; color: var(--color-muted); font-size: 0.98rem; }

/* -------------------------------------------------------------------
   10. FEATURE GRID (Why ZGCL)
   ------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  gap: 1.5rem 2.5rem;
  grid-template-columns: 1fr;
}
.feature { padding-left: 1.25rem; border-left: 3px solid var(--color-sky); }
.feature h3 { margin-bottom: 0.35rem; }
.feature p { margin: 0; color: var(--color-muted); font-size: 0.98rem; }

/* -------------------------------------------------------------------
   11. PULL-QUOTE BAND
   ------------------------------------------------------------------- */
.quote {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  background: var(--gradient-band);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow-md);
}
.quote blockquote {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.4;
  font-style: italic;
}

/* -------------------------------------------------------------------
   12. STAT BADGE (drone section — "80% CO₂ reduction")
   ------------------------------------------------------------------- */
.stat-badge {
  position: absolute;
  bottom: -18px;
  left: -18px;
  background: var(--color-navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.stat-num { display: block; font-size: 2rem; font-weight: 800; line-height: 1; color: var(--color-sky); }
.stat-label { display: block; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 0.25rem; }

/* -------------------------------------------------------------------
   13. CONTACT / CTA
   ------------------------------------------------------------------- */
.contact {
  position: relative;
  overflow: hidden;
  background: var(--color-navy);
  color: #fff;
  isolation: isolate;
}
.contact h2 { color: #fff; }
.contact p { color: rgba(255, 255, 255, 0.85); }
.contact-art { position: absolute; inset: 0; z-index: -1; }
.contact-art img { width: 100%; height: 100%; object-fit: cover; object-position: left center; opacity: 0.18; }
.contact-inner { text-align: center; }
.contact-inner .container { max-width: 720px; }
.contact-pending { margin-top: 1.5rem; color: var(--color-sky); }

/* -------------------------------------------------------------------
   14. FOOTER
   ------------------------------------------------------------------- */
.site-footer {
  background: #0a1830;        /* slightly darker than navy */
  color: rgba(255, 255, 255, 0.8);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  padding-bottom: 2rem;
}
.footer-brand img { width: 190px; height: auto; }
.footer-tag { margin-top: 0.75rem; color: rgba(255, 255, 255, 0.6); font-size: var(--fs-small); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { color: rgba(255, 255, 255, 0.8); font-size: var(--fs-small); }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.25rem;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.55);
}

/* -------------------------------------------------------------------
   15. SCROLL-REVEAL ANIMATION
   Elements with .reveal start invisible & shifted, then .is-visible
   (added by JS via IntersectionObserver) fades them in.
   ------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ===================================================================
   16. RESPONSIVE — TABLET (>= 768px)
   =================================================================== */
@media (min-width: 768px) {
  .split { grid-template-columns: 1fr 1fr; }
  /* "reverse" puts the image first on desktop for alternating layouts */
  .split.reverse .split-media { order: -1; }

  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===================================================================
   17. RESPONSIVE — DESKTOP (>= 1024px)
   =================================================================== */
@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .logo img { width: 180px; }
}

/* ===================================================================
   18. MOBILE NAV (< 768px) — hamburger menu behavior
   Placed last so it overrides the desktop nav styles above.
   =================================================================== */
@media (max-width: 767px) {
  .nav-toggle { display: flex; }   /* show hamburger */

  /* The nav becomes a dropdown panel that slides down when open */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    /* Hidden by default: collapsed to zero height */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav.open { max-height: 28rem; }  /* revealed when JS adds .open */

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
  }
  .nav-list li { width: 100%; }
  .nav-list a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
  .nav-cta { text-align: center; margin-top: 0.75rem; border-bottom: none !important; }

  /* Animate the hamburger into an "X" when the menu is open */
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ===================================================================
   19. REDUCED MOTION — respect users who prefer less animation
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
