/* ==========================================================================
   QASD — Saudi Market Enablement & Logistics Solutions
   styles.css  ·  Custom layer on top of Tailwind (Play CDN)
   --------------------------------------------------------------------------
   Design system: "Maritime command center"
   - Deep hull navy + channel blue + sea-glint azure + desert brass accent
   - Display: Sora · Body: Inter · Manifest labels: Space Mono · AR: IBM Plex Sans Arabic
   - Signature: animated vessel-tracking route line
   ========================================================================== */

:root {
  /* Brand palette */
  --ink:        #07182B;   /* deepest hull navy            */
  --deep:       #0A1F38;   /* dark surface                 */
  --abyss:      #0C2640;   /* card on dark                 */
  --channel:    #1E6FA8;   /* primary brand blue           */
  --channel-700:#155A8C;
  --azure:      #4EAEDD;   /* bright sea glint / highlight */
  --azure-soft: #8FD0EE;
  --brass:      #C49A47;   /* refined desert-gold accent   */
  --brass-600:  #B3893A;
  --brass-soft: #E3C883;

  /* Neutrals */
  --mist:  #F4F8FB;   /* light page background           */
  --fog:   #E8EFF5;   /* alt light band                  */
  --line:  #D9E3EC;   /* hairlines on light              */
  --line-d:#1C3A57;   /* hairlines on dark               */
  --slate: #51647A;   /* muted body text on light        */
  --ink-2: #16314E;   /* secondary ink                   */
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  --shadow-card: 0 1px 2px rgba(7,24,43,.04), 0 12px 30px -12px rgba(7,24,43,.18);
  --shadow-hi:   0 24px 60px -20px rgba(7,24,43,.40);
  --ring-brass:  0 0 0 1px rgba(196,154,71,.5);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.font-display { font-family: var(--font-display); }
.font-mono    { font-family: var(--font-mono); }

/* Eyebrow / manifest label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--brass);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--brass), transparent);
}
[dir="rtl"] .eyebrow::before {
  background: linear-gradient(270deg, var(--brass), transparent);
}
.eyebrow--light { color: var(--brass-soft); }

/* Headings */
.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.02em;
}

/* Selection */
::selection { background: var(--brass); color: var(--ink); }

/* Focus visibility (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Logo lockup — white plate guarantees the official logo renders cleanly
   over any background, regardless of its own background/colours.
   -------------------------------------------------------------------------- */
.logo-link { display: inline-flex; align-items: center; gap: .62rem; }
/* Official logo lockup: colourful diamond mark + wordmark.
   The wordmark swaps white -> black when the navbar turns solid on scroll. */
.logo-mark { height: 34px; width: auto; display: block; }
.logo-word { height: 17px; width: auto; display: block; }
.logo-word--black { display: none; }
.nav.is-solid .logo-word--white { display: none; }
.nav.is-solid .logo-word--black { display: block; }
.footer-logo .logo-mark { height: 40px; }
.footer-logo .logo-word { height: 20px; }

/* --------------------------------------------------------------------------
   Navbar — transparent over hero → solid glass on scroll
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transition: background .35s ease, box-shadow .35s ease, border-color .35s ease, padding .35s ease;
  border-bottom: 1px solid transparent;
}
.nav__link {
  position: relative;
  font-size: .92rem;
  font-weight: 500;
  color: rgba(255,255,255,.82);
  transition: color .25s ease;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  height: 2px; width: 0; background: var(--brass);
  transition: width .28s ease;
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after, .nav__link[aria-current="true"]::after { width: 100%; }

.nav.is-solid {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -18px rgba(7,24,43,.4);
}
.nav.is-solid .nav__link { color: var(--ink-2); }
.nav.is-solid .nav__link:hover { color: var(--channel); }
.nav.is-solid .nav__link[aria-current="true"] { color: var(--channel); }
.nav.is-solid .nav__burger span { background: var(--ink); }
.nav.is-solid .lang-switch { color: var(--ink-2); border-color: var(--line); }
.nav.is-solid .lang-switch:hover { border-color: var(--channel); color: var(--channel); }

/* Language switch pill */
.lang-switch {
  font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .08em;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff; border-radius: 999px;
  padding: .42rem .8rem; transition: all .25s ease;
  display: inline-flex; align-items: center; gap: .4rem;
}
.lang-switch:hover { border-color: var(--brass); color: var(--brass-soft); }

/* Burger */
.nav__burger { width: 26px; height: 18px; position: relative; }
.nav__burger span {
  position: absolute; left: 0; height: 2px; width: 100%;
  background: #fff; border-radius: 2px; transition: transform .3s ease, opacity .25s ease, top .3s ease;
}
.nav__burger span:nth-child(1) { top: 0; }
.nav__burger span:nth-child(2) { top: 8px; }
.nav__burger span:nth-child(3) { top: 16px; }
.nav__burger.is-open span:nth-child(1) { top: 8px; transform: rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--ink);
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.6,.05,.1,1);
  display: flex; flex-direction: column;
}
[dir="rtl"] .mobile-menu { transform: translateX(-100%); }
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu a { color: #fff; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 78% -10%, rgba(30,111,168,.40), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(196,154,71,.14), transparent 55%),
    linear-gradient(160deg, #051324 0%, var(--ink) 45%, #061a30 100%);
  overflow: hidden;
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .28; mix-blend-mode: luminosity;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,15,30,.55) 0%, rgba(5,15,30,.25) 40%, rgba(5,16,30,.85) 100%);
}
/* Engineered grid texture */
.hero__grid {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(78,174,221,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78,174,221,.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 70% 20%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(120% 90% at 70% 20%, #000 35%, transparent 80%);
}

/* Signature: vessel route line */
.route-line .path-bg { stroke: rgba(143,208,238,.22); }
.route-line .path-fg {
  stroke: var(--azure);
  stroke-dasharray: 10 12;
  animation: route-dash 6s linear infinite;
}
.route-line .vessel {
  fill: var(--brass);
  filter: drop-shadow(0 0 6px rgba(196,154,71,.8));
  offset-rotate: auto;
  animation: route-travel 9s cubic-bezier(.45,.05,.55,.95) infinite;
}
.route-line .node { fill: var(--azure); }
.route-line .node-ring { fill: none; stroke: var(--azure); animation: pulse-ring 3s ease-out infinite; }
@keyframes route-dash { to { stroke-dashoffset: -88; } }
@keyframes pulse-ring { 0% { r: 4; opacity: .9; } 100% { r: 16; opacity: 0; } }

/* Hero load-in sequence */
.reveal-up { opacity: 0; transform: translateY(22px); }
.in .reveal-up,
.reveal-up.in { animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .18s; }
.d3 { animation-delay: .31s; } .d4 { animation-delay: .44s; } .d5 { animation-delay: .57s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* Load line / manifest strip */
.loadline { position: relative; }
.loadline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: linear-gradient(90deg, transparent, rgba(143,208,238,.35), transparent);
}

/* --------------------------------------------------------------------------
   Scroll reveal (sections)
   -------------------------------------------------------------------------- */
.r {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.r.in { opacity: 1; transform: translateY(0); }
.r-1 { transition-delay: .06s; } .r-2 { transition-delay: .14s; }
.r-3 { transition-delay: .22s; } .r-4 { transition-delay: .3s; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  align-items: center; justify-content: center; gap: .55rem;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  padding: .92rem 1.6rem; border-radius: 10px;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
}
/* Zero-specificity display so Tailwind utilities (hidden, sm:inline-flex) always win */
:where(.btn) { display: inline-flex; }
.btn svg { transition: transform .25s ease; }
.btn:hover svg { transform: translateX(3px); }
[dir="rtl"] .btn:hover svg { transform: translateX(-3px); }
.btn-primary { background: var(--brass); color: var(--ink); box-shadow: 0 10px 24px -10px rgba(196,154,71,.7); }
.btn-primary:hover { background: var(--brass-soft); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn-ghost:hover { border-color: var(--azure); background: rgba(78,174,221,.12); transform: translateY(-2px); }
.btn-channel { background: var(--channel); color: #fff; box-shadow: 0 12px 26px -12px rgba(30,111,168,.8); }
.btn-channel:hover { background: var(--channel-700); transform: translateY(-2px); }
.btn-outline-ink { border: 1px solid var(--line); color: var(--ink-2); background: #fff; }
.btn-outline-ink:hover { border-color: var(--channel); color: var(--channel); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.card::after {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: 0; height: 2px;
  background: var(--brass); transform: scaleX(0); transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
[dir="rtl"] .card::after { transform-origin: right; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hi); border-color: transparent; }
.card:hover::after { transform: scaleX(1); }

.card-dark {
  background: linear-gradient(180deg, var(--abyss), var(--deep));
  border: 1px solid var(--line-d);
  border-radius: 16px;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.card-dark:hover { transform: translateY(-6px); border-color: rgba(78,174,221,.5); box-shadow: 0 30px 60px -28px rgba(0,0,0,.7); }

.svc-index {
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .1em;
  color: var(--brass); 
}

/* Icon chip */
.chip {
  width: 52px; height: 52px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(30,111,168,.12), rgba(30,111,168,.04));
  border: 1px solid rgba(30,111,168,.2);
  color: var(--channel);
}
.card-dark .chip {
  background: linear-gradient(180deg, rgba(78,174,221,.16), rgba(78,174,221,.04));
  border-color: rgba(78,174,221,.28); color: var(--azure);
}

/* Section enders with route divider */
.divider-route { color: var(--azure); opacity: .5; }

/* --------------------------------------------------------------------------
   Process timeline
   -------------------------------------------------------------------------- */
.step-num {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--brass-soft);
  border: 1px solid var(--line-d); flex: none;
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */
.stat-num { font-family: var(--font-display); font-weight: 700; line-height: 1; letter-spacing: -.02em; }

/* --------------------------------------------------------------------------
   Testimonials carousel
   -------------------------------------------------------------------------- */
.carousel { position: relative; }
.carousel__track { display: flex; transition: transform .6s cubic-bezier(.5,.05,.1,1); }
.carousel__slide { min-width: 100%; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.28); transition: all .3s ease; }
.dot.is-active { background: var(--brass); width: 26px; border-radius: 6px; }

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */
.field { position: relative; }
.field label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; margin-top: .4rem;
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: .8rem .9rem; font-size: .95rem; color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #9AABBC; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--channel); box-shadow: 0 0 0 4px rgba(30,111,168,.12);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #D6453C; box-shadow: 0 0 0 4px rgba(214,69,60,.1); }
.field .err { display: none; color: #D6453C; font-size: .78rem; margin-top: .35rem; }
.field.invalid .err { display: block; }

.form-success {
  display: none; align-items: center; gap: .8rem;
  background: #E9F2FA; border: 1px solid rgba(30,111,168,.30);
  color: var(--ink); border-radius: 12px; padding: 1rem 1.1rem;
}
.form-success.show { display: flex; }
.form-error {
  display: none; align-items: center; gap: .8rem;
  background: #FBEAEC; border: 1px solid rgba(200,40,60,.32);
  color: var(--ink); border-radius: 12px; padding: 1rem 1.1rem;
}
.form-error.show { display: flex; }
.form-error a { color: var(--channel); font-weight: 600; }
/* Honeypot — hidden from humans, catches bots */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.foot-link { color: rgba(255,255,255,.66); transition: color .2s ease; font-size: .92rem; }
.foot-link:hover { color: var(--brass-soft); }
.social-ic {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line-d); color: rgba(255,255,255,.8); transition: all .25s ease;
}
.social-ic:hover { border-color: var(--brass); color: var(--brass-soft); transform: translateY(-2px); }

/* Image graceful-fallback wrapper (gradient shows if <img> fails) */
.img-wrap { position: relative; background: linear-gradient(160deg, var(--abyss), var(--channel-700)); overflow: hidden; }
.img-wrap img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.img-wrap:hover img { transform: scale(1.05); }

/* Marquee logo / trust ticker (optional partners-by-sector) */
.tick { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--slate); }

/* RTL fine-tuning */
[dir="rtl"] body { font-family: 'IBM Plex Sans Arabic', var(--font-body); }
[dir="rtl"] .h-display,
[dir="rtl"] .font-display { font-family: 'IBM Plex Sans Arabic', var(--font-display); letter-spacing: 0; }
[dir="rtl"] .eyebrow,
[dir="rtl"] .lang-switch,
[dir="rtl"] .svc-index,
[dir="rtl"] .tick { font-family: 'IBM Plex Sans Arabic', var(--font-mono); letter-spacing: .04em; }
[dir="rtl"] .nav__link::after { left: auto; right: 0; }

/* Utility: kill the Tailwind CDN console look for print */
@media print { .nav, .mobile-menu, .hero__video { display: none !important; } }
