/* ============================================================
   CHIFFREX LOGISTICS — Design System
   Navy + Congo-red, light editorial premium. French.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Manrope:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Brand — sampled from the logo */
  --navy-900: #0C1E45;
  --navy-800: #112A5E;
  --navy-700: #16356B;
  --navy-600: #1E4488;
  --navy-500: #2A57A6;
  --navy-tint: #EEF2F9;
  --navy-tint-2: #E2EAF5;

  --red-700: #A50D1F;
  --red-600: #CE1126;   /* primary red accent */
  --red-500: #E22236;
  --red-tint: #FCEDEE;

  /* Neutrals — cool */
  --ink: #0E1A30;
  --slate-700: #33425C;
  --slate-500: #5A6A85;
  --slate-400: #8895AB;
  --slate-300: #B7C1D2;
  --line: #E4E9F1;
  --line-strong: #CFD7E5;
  --surface: #F6F8FC;
  --surface-2: #EFF3F9;
  --white: #FFFFFF;

  /* Semantic */
  --green-600: #157A4D;
  --green-tint: #E6F4EC;
  --amber-600: #B8860B;

  /* Type */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  /* Spacing */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(72px, 9vw, 132px);

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadow — navy tinted */
  --sh-1: 0 1px 2px rgba(12,30,69,.06), 0 1px 1px rgba(12,30,69,.04);
  --sh-2: 0 8px 24px -8px rgba(12,30,69,.16), 0 2px 6px rgba(12,30,69,.06);
  --sh-3: 0 24px 60px -16px rgba(12,30,69,.28), 0 8px 20px -10px rgba(12,30,69,.18);
  --sh-red: 0 12px 30px -10px rgba(206,17,38,.45);
  --sh-navy: 0 18px 44px -16px rgba(18,42,94,.55);

  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.bg-surface { background: var(--surface); }
.bg-tint { background: var(--navy-tint); }
.bg-navy { background: var(--navy-800); color: #fff; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
.display {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.035em;
}
.h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
.h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 700; letter-spacing: -0.025em; }
.h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.28rem); color: var(--slate-700); line-height: 1.6; font-weight: 400; }
.serif-accent { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.text-red { color: var(--red-600); }
.text-navy { color: var(--navy-700); }
.text-muted { color: var(--slate-500); }
p { margin: 0 0 1em; text-wrap: pretty; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red-600);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--red-600); display: inline-block; }
.eyebrow--center::after { content: ""; width: 26px; height: 2px; background: var(--red-600); display: inline-block; }
.eyebrow--light { color: #fff; }
.eyebrow--light::before, .eyebrow--light::after { background: var(--red-500); }
.eyebrow--muted { color: var(--navy-600); }
.eyebrow--muted::before, .eyebrow--muted::after { background: var(--navy-600); }

.section-head { max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .h2 { margin-top: 18px; }
.section-head .lead { margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: .98rem;
  padding: 14px 26px; border-radius: var(--r-sm); border: 1.5px solid transparent;
  transition: all .18s var(--ease); white-space: nowrap; cursor: pointer; line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--red-600); color: #fff; box-shadow: var(--sh-red); }
.btn--primary:hover { background: var(--red-700); transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(206,17,38,.55); }
.btn--navy { background: var(--navy-700); color: #fff; }
.btn--navy:hover { background: var(--navy-800); transform: translateY(-2px); box-shadow: var(--sh-navy); }
.btn--ghost { background: transparent; color: var(--navy-700); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--navy-700); background: var(--navy-tint); }
.btn--light { background: #fff; color: var(--navy-800); }
.btn--light:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--lg { padding: 17px 32px; font-size: 1.04rem; }
.btn--block { width: 100%; }
.btn--link { padding: 0; background: none; color: var(--navy-700); font-weight: 700; gap: 8px; }
.btn--link svg { transition: transform .2s var(--ease); }
.btn--link:hover svg { transform: translateX(4px); }
.btn--link.red { color: var(--red-600); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s var(--ease);
}
.site-header.scrolled { box-shadow: var(--sh-1); }
.nav { display: flex; align-items: center; gap: 16px; height: 78px; }
.nav__logo { display: flex; align-items: center; flex-shrink: 0; }
.nav__logo img { height: 44px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.nav__link {
  font-weight: 600; font-size: .94rem; color: var(--slate-700); white-space: nowrap;
  padding: 9px 12px; border-radius: var(--r-sm); transition: all .15s var(--ease); position: relative;
}
.nav__link:hover { color: var(--navy-700); background: var(--navy-tint); }
.nav__link.active { color: var(--navy-700); }
.nav__link.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--red-600); border-radius: 2px;
}
.nav__spacer { flex: 1; }
.nav__cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav__phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy-700); font-size: .92rem; white-space: nowrap; }
.nav__phone svg { width: 18px; height: 18px; color: var(--red-600); }
.nav__toggle { display: none; background: none; border: none; padding: 8px; color: var(--navy-800); }
.nav__toggle svg { width: 28px; height: 28px; }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 78px 0 0 0; z-index: 99;
  background: #fff; padding: 24px var(--gutter);
  transform: translateX(100%); transition: transform .3s var(--ease);
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; padding: 16px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.mobile-menu a.active { color: var(--red-600); }
.mobile-menu .btn { margin-top: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #fff; padding-top: clamp(64px, 8vw, 96px); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 48px; padding-bottom: 56px; }
.footer__brand .wordmark { margin-bottom: 18px; }
.footer__desc { color: rgba(255,255,255,.62); font-size: .96rem; max-width: 320px; }
.footer__col h4 { font-family: var(--font-body); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--red-500); font-weight: 700; margin-bottom: 18px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer__col a, .footer__col li { color: rgba(255,255,255,.72); font-size: .96rem; transition: color .15s; }
.footer__col a:hover { color: #fff; }
.footer__contact-item { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.72); font-size: .95rem; margin-bottom: 14px; }
.footer__contact-item svg { width: 18px; height: 18px; color: var(--red-500); flex-shrink: 0; margin-top: 3px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer__bottom p { color: rgba(255,255,255,.5); font-size: .88rem; margin: 0; }
.footer__bottom a { color: rgba(255,255,255,.5); font-size: .88rem; }
.footer__bottom a:hover { color: #fff; }
.footer__socials { display: flex; gap: 10px; }
.footer__socials a { width: 38px; height: 38px; border-radius: var(--r-sm); background: rgba(255,255,255,.08); display: grid; place-items: center; transition: background .15s; }
.footer__socials a:hover { background: var(--red-600); }
.footer__socials svg { width: 18px; height: 18px; }

/* Wordmark (CSS, for dark surfaces) */
.wordmark { display: inline-flex; flex-direction: column; line-height: 1; }
.wordmark__name { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; color: #fff; }
.wordmark__name b { color: var(--red-500); }
.wordmark__sub { font-family: var(--font-body); font-weight: 700; font-size: .62rem; letter-spacing: .42em; color: rgba(255,255,255,.6); margin-top: 5px; padding-left: 2px; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1); transition: all .2s var(--ease); }
.card--hover:hover { box-shadow: var(--sh-2); transform: translateY(-4px); border-color: var(--line-strong); }

/* ---------- Photo placeholders (art-directed) ---------- */
.photo {
  position: relative; overflow: hidden; border-radius: var(--r-md);
  background:
    linear-gradient(135deg, rgba(12,30,69,.86), rgba(22,53,107,.72)),
    radial-gradient(120% 120% at 80% 10%, rgba(206,17,38,.5), transparent 55%),
    var(--navy-700);
  isolation: isolate;
}
.photo::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .07; mix-blend-mode: overlay; pointer-events: none;
}
.photo__label {
  position: absolute; left: 16px; bottom: 14px; z-index: 2;
  font-family: var(--font-serif); font-style: italic; font-size: .92rem;
  color: rgba(255,255,255,.78); display: flex; align-items: center; gap: 8px;
}
.photo__label::before { content: ""; width: 22px; height: 1.5px; background: var(--red-500); }
.photo__icon { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; opacity: .9; }
.photo__icon svg { width: 88px; height: 88px; color: rgba(255,255,255,.16); stroke-width: 1.2; }
.photo--frame { box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset; }
.photo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; display: block; }
.photo--img::after { opacity: .04; }
.photo--img .photo__icon { display: none; }
.photo--img .photo__label {
  z-index: 2; left: 0; right: 0; bottom: 0; padding: 26px 16px 14px;
  background: linear-gradient(to top, rgba(12,30,69,.78), transparent);
}

/* ---------- Badge / chip ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .8rem; font-weight: 700; padding: 6px 13px; border-radius: var(--r-pill);
  letter-spacing: .01em;
}
.badge--green { background: var(--green-tint); color: var(--green-600); }
.badge--navy { background: var(--navy-tint); color: var(--navy-700); }
.badge--red { background: var(--red-tint); color: var(--red-700); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Stat ---------- */
.stat__value { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 4vw, 3.2rem); letter-spacing: -0.03em; line-height: 1; }
.stat__label { font-size: .92rem; color: var(--slate-500); margin-top: 8px; font-weight: 600; }

/* ---------- Utility ---------- */
.grid { display: grid; gap: 24px; }
.flow > * + * { margin-top: 1em; }
.muted { color: var(--slate-500); }
.center { text-align: center; }
/* Entrance reveal disabled as a hard hide — content is always visible.
   (This preview throttles the animation/transition clock; visibility must not depend on it.) */
.reveal, .reveal.in { opacity: 1; transform: none; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

@media (max-width: 1180px) {
  .nav__phone { display: none; }
}
@media (max-width: 980px) {
  .nav__links, .nav__phone { display: none; }
  .nav__toggle { display: block; }
  .nav__cta .btn { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* ---------- Preloader (ultra-premium, keyframe-driven) ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: #fff;
}
.preloader.is-out { animation: plOut .6s var(--ease) forwards; }
.preloader.is-hidden { display: none; }
.preloader__inner { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.preloader__logo { width: clamp(220px, 42vw, 320px); height: auto; animation: plFloat 2.2s ease-in-out infinite; }
.preloader__track { width: 230px; height: 4px; border-radius: 4px; background: rgba(18,52,89,.12); overflow: hidden; position: relative; }
.preloader__track::after { content: ""; position: absolute; inset: 0; width: 58%; border-radius: 4px; background: linear-gradient(90deg, var(--navy-500), var(--red-500)); }
.preloader__bar { position: absolute; top: 0; left: 0; height: 100%; width: 45%; border-radius: 4px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent); z-index: 2; animation: plSweep 1.35s ease-in-out infinite; }
.preloader__txt { font-family: var(--font-body); font-weight: 600; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--slate-400); }
@keyframes plSpin { to { transform: rotate(360deg); } }
@keyframes plFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes plSweep { 0% { transform: translateX(-130%); } 100% { transform: translateX(310%); } }
@keyframes plOut { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .preloader__logo, .preloader__bar { animation: none; }
}

/* ---------- Language switcher ---------- */
.lang { position: relative; flex-shrink: 0; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 11px; border-radius: var(--r-sm);
  background: transparent; border: 1.5px solid var(--line-strong);
  color: var(--navy-700); font-family: var(--font-body); font-weight: 700;
  font-size: .9rem; line-height: 1; transition: all .15s var(--ease); cursor: pointer;
}
.lang__btn:hover { border-color: var(--navy-700); background: var(--navy-tint); }
.lang__btn .lang__globe { width: 17px; height: 17px; color: var(--red-600); }
.lang__btn .lang__chev { width: 14px; height: 14px; color: var(--slate-500); transition: transform .2s var(--ease); }
.lang.open .lang__btn { border-color: var(--navy-700); background: var(--navy-tint); }
.lang.open .lang__btn .lang__chev { transform: rotate(180deg); }
.lang__code { letter-spacing: .04em; }

.lang__menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 120;
  min-width: 184px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 18px 44px -14px rgba(12,30,69,.28);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98);
  transform-origin: top right; transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
}
.lang.open .lang__menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.lang__menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; padding: 11px 13px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--slate-700);
  font-family: var(--font-body); font-weight: 600; font-size: .95rem; text-align: left;
  cursor: pointer; transition: background .13s, color .13s;
}
.lang__menu button:hover { background: var(--navy-tint); color: var(--navy-700); }
.lang__menu button .lang__opt-code { font-size: .74rem; font-weight: 700; letter-spacing: .08em; color: var(--slate-400); }
.lang__menu button.active { color: var(--navy-700); background: var(--navy-tint); }
.lang__menu button.active .lang__opt-code { color: var(--red-600); }

/* Footer language switcher (dark surface) */
.footer__lang { margin-top: 22px; }
.footer__lang-label {
  font-family: var(--font-body); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .14em; color: var(--red-500); font-weight: 700; margin-bottom: 12px;
}
.footer__lang-row { display: flex; flex-wrap: wrap; gap: 8px; }
.footer__lang-row button {
  padding: 8px 13px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.74); font-family: var(--font-body); font-weight: 600;
  font-size: .88rem; cursor: pointer; transition: all .15s var(--ease);
}
.footer__lang-row button:hover { background: rgba(255,255,255,.14); color: #fff; }
.footer__lang-row button.active { background: var(--red-600); border-color: var(--red-600); color: #fff; }

@media (max-width: 980px) {
  .lang__btn { padding: 8px 10px; }
}
@media (max-width: 380px) {
  .lang__btn .lang__chev { display: none; }
}
