/* ============================================================
   Vanuatu NDMO Logistics Dashboard — Site Styles
   Humanitarian / UN-inspired design system
   ============================================================ */

:root {
  /* Brand palette */
  --un-blue: #00A6E0;
  --un-blue-dark: #0089BD;
  --navy: #0B3D67;
  --navy-deep: #072A47;
  --gold: #FFC72C;

  /* Neutrals */
  --ink: #16242F;
  --muted: #5A6B78;
  --bg: #F4F7FA;
  --bg-alt: #EAF1F7;
  --surface: #FFFFFF;
  --border: #E2E8EE;
  --border-strong: #CBD6DF;

  /* Feedback */
  --ok: #1F9D6B;
  --warn: #C9772B;

  /* Typography */
  --font-sans: "Inter", "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Source Sans 3", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Geometry */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(11, 61, 103, .06), 0 2px 8px rgba(11, 61, 103, .06);
  --shadow-md: 0 6px 18px rgba(11, 61, 103, .10), 0 2px 6px rgba(11, 61, 103, .08);
  --shadow-lg: 0 18px 48px rgba(7, 42, 71, .18);
  --maxw: 1140px;
  --ring: 0 0 0 3px rgba(0, 166, 224, .35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--un-blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; color: var(--navy); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin: .3rem 0; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: clamp(48px, 7vw, 92px) 0; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding: clamp(36px, 5vw, 64px) 0; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 64ch; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--un-blue-dark);
  margin-bottom: .75rem;
}
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--un-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand__logo { width: 42px; height: 42px; flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; color: var(--navy); }
.brand__sub { font-size: .76rem; color: var(--muted); letter-spacing: .02em; }

.nav__menu { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav__menu a {
  display: inline-block; padding: 9px 14px; border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 600; font-size: .96rem; text-decoration: none;
}
.nav__menu a:hover { background: var(--bg-alt); text-decoration: none; }
.nav__menu a.is-current { color: var(--navy); background: var(--bg-alt); }

.nav__toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border-strong);
  background: #fff; border-radius: 10px; cursor: pointer; position: relative;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; position: absolute; left: 11px; width: 22px; height: 2px; background: var(--navy);
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle span { top: 21px; }
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after { top: 7px; }
.nav__toggle.is-active span { background: transparent; }
.nav__toggle.is-active span::before { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-active span::after { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  padding: 13px 22px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--un-blue); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--un-blue-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--navy); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--un-blue); color: var(--un-blue-dark); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--bg-alt); }
.btn--lg { padding: 16px 28px; font-size: 1.06rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(0, 166, 224, .18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
}
.hero::after {
  /* subtle topographic / grid motif */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(700px 360px at 70% 20%, #000, transparent 75%);
          mask-image: radial-gradient(700px 360px at 70% 20%, #000, transparent 75%);
}
.hero__inner { position: relative; z-index: 1; padding: clamp(56px, 8vw, 104px) 0; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--gold); }
.hero__lead { font-size: 1.22rem; color: rgba(255,255,255,.9); max-width: 60ch; }
.hero__actions { margin-top: 28px; }
.hero__trust {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 10px;
  font-size: .92rem; color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  padding: 8px 14px; border-radius: 999px;
}
.hero__trust svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ============================================================
   Feature cards
   ============================================================ */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card__icon {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--un-blue), var(--navy)); color: #fff; margin-bottom: 16px;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); margin-bottom: 0; font-size: .98rem; }

/* ============================================================
   Steps / How it works
   ============================================================ */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: relative; box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 18px; right: 20px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--bg-alt);
}
.step h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.step h3 .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--un-blue); flex: 0 0 auto; }
.step p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ============================================================
   Info callout (auth / scope)
   ============================================================ */
.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 5px solid var(--un-blue); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow-sm);
}
.callout__icon {
  width: 46px; height: 46px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--bg-alt); color: var(--navy);
}
.callout__icon svg { width: 24px; height: 24px; }
.callout h3 { margin-bottom: .35rem; }
.callout p { margin-bottom: .5rem; color: var(--muted); }
.callout ul { margin: .2rem 0 0; color: var(--muted); }
.callout ul li { margin: .25rem 0; }

/* ============================================================
   CTA band
   ============================================================ */
.cta {
  background: linear-gradient(150deg, var(--un-blue), var(--navy));
  color: #fff; border-radius: var(--radius); padding: clamp(34px, 5vw, 56px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
  box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; margin-bottom: .35rem; }
.cta p { color: rgba(255,255,255,.9); margin: 0; max-width: 56ch; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--navy-deep); color: rgba(255,255,255,.78);
  padding: 54px 0 28px; font-size: .95rem;
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer__brand { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 12px; }
.footer__brand .brand__logo { width: 40px; height: 40px; }
.footer__brand .brand__name { color: #fff; }
.footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin: .45rem 0; }
.footer__bottom {
  margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; align-items: center;
  font-size: .86rem; color: rgba(255,255,255,.6);
}

/* ============================================================
   Article (Terms / Privacy)
   ============================================================ */
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(28px, 4vw, 56px); box-shadow: var(--shadow-sm); }
.article__head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article__meta { color: var(--muted); font-size: .9rem; }
.article h2 { font-size: 1.4rem; margin-top: 1.8rem; }
.article h3 { font-size: 1.1rem; margin-top: 1.4rem; color: var(--navy); }
.article ul { color: var(--muted); }
.article p { color: var(--ink); }
.article .updated { display: inline-flex; align-items: center; gap: 8px; }

/* ============================================================
   App page
   ============================================================ */
.app-hero { background: linear-gradient(160deg, var(--navy), var(--navy-deep)); color: #fff; }
.app-hero__inner { padding: clamp(50px, 7vw, 88px) 0; text-align: center; }
.app-hero h1 { color: #fff; }
.app-hero .eyebrow { color: var(--gold); }
.app-hero p { color: rgba(255,255,255,.9); max-width: 60ch; margin-left: auto; margin-right: auto; }
.app-card {
  max-width: 720px; margin: -56px auto 0; position: relative; z-index: 2;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-lg);
}
.signin {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius);
  background: var(--bg-alt); border: 1px solid var(--border); margin-bottom: 22px;
}
.signin svg { width: 34px; height: 34px; flex: 0 0 auto; }
.signin__text strong { display: block; color: var(--navy); }
.signin__text span { color: var(--muted); font-size: .92rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .grid--3, .steps, .grid--2 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__menu {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--border); padding: 12px 18px 18px;
    box-shadow: var(--shadow-md);
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: 12px 14px; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .callout { grid-template-columns: 1fr; }
  .callout__icon { width: 42px; height: 42px; }
  .cta { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
