/* ============================================
   VIFCO — Stylesheet V4
   Instrument Serif · Nav lisible · Duotone images
   ============================================ */

:root {
  --vifco-blue: #004E8D;
  --vifco-blue-light: #5BB4FF;
  --vifco-blue-glow: #32A3FF;
  --vifco-blue-deep: #002E54;
  --vifco-bg: #FAFAF7;
  --vifco-bg-warm: #F2EFEA;
  --vifco-ink: #1A1A1A;
  --vifco-ink-soft: #3B3838;
  --vifco-line: rgba(26, 26, 26, 0.12);
  --serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter Tight', -apple-system, sans-serif;
  --container: 1400px;
  --gutter: 48px;
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--vifco-bg);
  color: var(--vifco-ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============ SCROLL PROGRESS BAR ============ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--vifco-blue), var(--vifco-blue-light));
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ============ NAVIGATION (always readable) ============ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s var(--ease-smooth);
  background: transparent;
}

/* === DARK BACKGROUND state (hero pages) === */
nav.dark-bg .nav-links a {
  color: white;
  opacity: 0.95;
}

nav.dark-bg .nav-cta {
  color: white;
  border: 1.5px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

nav.dark-bg .nav-cta:hover {
  background: white;
  color: var(--vifco-blue-deep);
  border-color: white;
  box-shadow: 0 10px 30px rgba(255,255,255,0.25);
}

/* === SCROLLED state === */
nav.scrolled {
  background: rgba(250, 250, 247, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--vifco-line);
}

nav.scrolled .nav-links a { color: var(--vifco-ink); opacity: 1; }

nav.scrolled .nav-cta {
  color: var(--vifco-ink);
  border-color: var(--vifco-ink);
  background: transparent;
  backdrop-filter: none;
}

nav.scrolled .nav-cta:hover {
  background: var(--vifco-blue-deep);
  color: white;
  border-color: var(--vifco-blue-deep);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.logo img {
  height: 38px;
  width: auto;
  transition: opacity 0.3s, transform 0.4s var(--ease-smooth);
}

.logo:hover img { transform: scale(1.05); }

.logo .logo-blue { display: none; }
nav.scrolled .logo .logo-white { display: none; }
nav.scrolled .logo .logo-blue { display: block; }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s, opacity 0.3s;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  padding: 11px 24px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.4s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

/* ============ SECTIONS ============ */
.section {
  padding: 140px var(--gutter);
  position: relative;
}

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vifco-blue);
  margin-bottom: 48px;
  font-weight: 500;
}

.section-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--vifco-blue);
  transition: width 0.6s var(--ease-smooth);
}

.section-label.is-visible::before { width: 80px; }

.section-label.light { color: var(--vifco-blue-light); }
.section-label.light::before { background: var(--vifco-blue-light); }

/* ============ TYPOGRAPHY (Instrument Serif) ============ */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
}
h1 { font-size: clamp(64px, 11vw, 180px); line-height: 0.9; }
h2 { font-size: clamp(44px, 6vw, 88px); line-height: 0.95; }
h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -0.01em; }

/* === Italic emphasis === plus de soulignement, juste italique === */
em {
  font-style: italic;
  color: var(--vifco-blue);
  font-weight: 400;
}

/* On dark backgrounds, italic stays light blue (now lighter for readability) */
.dark-bg em,
.hero em,
.page-header em,
.approach em,
.locations em,
.approach-banner em {
  color: var(--vifco-blue-light);
  /* No underline anymore */
}

/* ============ LINKS ============ */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--vifco-blue);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  border-bottom: 1px solid var(--vifco-blue);
  padding-bottom: 4px;
  transition: gap 0.3s var(--ease-smooth);
  width: fit-content;
}

.link-arrow:hover { gap: 22px; }
.link-arrow::after { content: '→'; transition: transform 0.3s var(--ease-smooth); }
.link-arrow:hover::after { transform: translateX(4px); }

.link-arrow.light {
  color: var(--vifco-blue-light);
  border-color: var(--vifco-blue-light);
}

/* ============ MAGNETIC BUTTON ============ */
.magnetic {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 22px 44px;
  background: var(--vifco-blue-deep);
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: 100px;
  transition: all 0.4s var(--ease-smooth);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 500;
}

.magnetic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--vifco-blue) 0%, var(--vifco-blue-glow) 100%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}

.magnetic:hover::before { opacity: 1; }
.magnetic > * { position: relative; z-index: 1; }
.magnetic:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0,78,141,0.35);
}

.magnetic .arrow { transition: transform 0.4s var(--ease-smooth); }
.magnetic:hover .arrow { transform: translateX(6px); }

/* ============ DUOTONE TREATMENT (Raphael FA style) ============ */
.duotone {
  position: relative;
  overflow: hidden;
}

.duotone img {
  filter: grayscale(1) contrast(1.1) brightness(0.95);
  transition: filter 0.8s var(--ease-smooth);
}

.duotone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--vifco-blue-deep) 0%, var(--vifco-blue) 100%);
  mix-blend-mode: screen;
  opacity: 0.85;
  z-index: 1;
  transition: opacity 0.6s var(--ease-smooth);
  pointer-events: none;
}

.duotone::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,46,84,0.4) 100%);
  z-index: 2;
  pointer-events: none;
}

.duotone:hover img {
  filter: grayscale(0) contrast(1.05) brightness(1);
}

.duotone:hover::before { opacity: 0.15; }

/* ============ FOOTER ============ */
footer {
  background: var(--vifco-ink);
  color: white;
  padding: 80px var(--gutter) 40px;
  position: relative;
  z-index: 2;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo img {
  height: 44px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  transition: transform 0.4s var(--ease-smooth);
}

.footer-logo:hover img { transform: scale(1.05); }

.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
  font-weight: 500;
  font-family: var(--sans);
}

.footer-col a, .footer-col p {
  display: block;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.2s, transform 0.2s;
}

.footer-col a:hover {
  color: var(--vifco-blue-light);
  transform: translateX(4px);
}

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ============ REVEAL ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-smooth), transform 1s var(--ease-smooth);
  animation: revealFallback 0s 3s forwards;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

@keyframes revealFallback {
  to { opacity: 1; transform: translateY(0); }
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* === Word-by-word reveal for headlines === */
.reveal-words .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40%);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
  animation: revealWordFallback 0s 3s forwards;
}

.reveal-words.is-visible .word {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

@keyframes revealWordFallback {
  to { opacity: 1; transform: translateY(0); }
}

.reveal-words.is-visible .word:nth-child(1) { transition-delay: 0s; }
.reveal-words.is-visible .word:nth-child(2) { transition-delay: 0.06s; }
.reveal-words.is-visible .word:nth-child(3) { transition-delay: 0.12s; }
.reveal-words.is-visible .word:nth-child(4) { transition-delay: 0.18s; }
.reveal-words.is-visible .word:nth-child(5) { transition-delay: 0.24s; }
.reveal-words.is-visible .word:nth-child(6) { transition-delay: 0.30s; }
.reveal-words.is-visible .word:nth-child(7) { transition-delay: 0.36s; }
.reveal-words.is-visible .word:nth-child(8) { transition-delay: 0.42s; }
.reveal-words.is-visible .word:nth-child(9) { transition-delay: 0.48s; }
.reveal-words.is-visible .word:nth-child(10) { transition-delay: 0.54s; }
.reveal-words.is-visible .word:nth-child(11) { transition-delay: 0.60s; }
.reveal-words.is-visible .word:nth-child(12) { transition-delay: 0.66s; }

/* ============ TICKER MARQUEE ============ */
.ticker-wrap {
  overflow: hidden;
  width: 100%;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.ticker-track {
  display: inline-flex;
  gap: 60px;
  animation: ticker 70s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 60px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  font-style: italic;
}

.ticker-item::after {
  content: '·';
  color: var(--vifco-blue);
  font-size: 36px;
  font-style: normal;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============ COUNTER ============ */
[data-counter] { font-variant-numeric: tabular-nums; }

@keyframes pulseCount {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); color: var(--vifco-blue-light); }
  100% { transform: scale(1); }
}

/* ============ LANGUAGE SWITCHER ============ */
.lang-switch {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  margin-right: 16px;
  transition: all 0.3s var(--ease-smooth);
  color: white;
}
.lang-switch:hover {
  border-color: var(--vifco-blue-light);
  background: rgba(50,163,255,0.15);
  color: white;
}
nav.scrolled .lang-switch {
  border-color: var(--vifco-ink);
  background: transparent;
  color: var(--vifco-ink);
}
nav.scrolled .lang-switch:hover {
  border-color: var(--vifco-blue);
  background: rgba(0,78,141,0.06);
  color: var(--vifco-blue);
}
/* ============ MOBILE MENU (HAMBURGER) ============ */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  z-index: 1100;
  flex-direction: column;
  gap: 5px;
  position: relative;
}

.menu-toggle .bar {
  width: 24px;
  height: 2px;
  background: white;
  transition: all 0.4s var(--ease-smooth);
  display: block;
  border-radius: 2px;
}

nav.scrolled .menu-toggle .bar { background: var(--vifco-ink); }

.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--vifco-blue-deep);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu .menu-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding: 80px 24px 40px;
  text-align: center;
  width: 100%;
}

.mobile-menu .menu-inner > a {
  font-family: var(--serif);
  font-size: 36px;
  color: white;
  font-weight: 400;
  transition: color 0.3s, transform 0.3s;
}

.mobile-menu .menu-inner > a:hover { color: var(--vifco-blue-light); }

.mobile-menu .menu-cta {
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 16px 32px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  color: white;
}

.mobile-menu .menu-cta:hover {
  background: var(--vifco-blue);
  border-color: var(--vifco-blue);
}

.mobile-menu .menu-lang {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.mobile-menu .menu-lang a {
  color: rgba(255,255,255,0.5);
  transition: color 0.3s;
}

.mobile-menu .menu-lang a.active {
  color: white;
}

.mobile-menu .menu-lang a:hover {
  color: var(--vifco-blue-light);
}

.mobile-menu .menu-lang span {
  color: rgba(255,255,255,0.3);
}

body.menu-open {
  overflow: hidden;
}

/* ============ RESPONSIVE — TABLET ============ */
@media (max-width: 1024px) {
  :root {
    --gutter: 32px;
    --container: 100%;
  }

  .mission-grid,
  .exp-grid,
  .approach-content,
  .team-intro-grid {
    grid-template-columns: 1fr !important;
  }

  .values,
  .team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .pillars,
  .stats-banner-grid,
  .team-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ============ RESPONSIVE — MOBILE ============ */
@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }

  /* Show hamburger, hide nav links + nav-cta + lang-switch */
  .nav-links,
  .nav-cta,
  nav .lang-switch {
    display: none !important;
  }

  .menu-toggle {
    display: flex !important;
  }

  nav {
    padding: 16px var(--gutter);
  }

  nav.scrolled {
    padding: 12px var(--gutter);
  }

  .logo img {
    height: 32px;
  }

  /* Hero */
  .hero {
    padding: 0 var(--gutter) 60px;
    min-height: 90vh;
  }

  .hero h1 {
    font-size: clamp(48px, 13vw, 80px) !important;
    line-height: 0.95 !important;
  }

  .hero-eyebrow {
    font-size: 10px;
    margin-bottom: 24px;
  }

  .hero-bottom {
    grid-template-columns: 1fr !important;
    gap: 32px;
    padding-top: 40px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 24px !important;
  }

  /* Page headers */
  .page-header,
  .page-header[class] {
    padding: 130px var(--gutter) 70px !important;
    min-height: 50vh !important;
  }

  .page-header h1 {
    font-size: clamp(40px, 12vw, 72px) !important;
    line-height: 0.95 !important;
  }

  .header-tagline {
    font-size: 14px !important;
  }

  .header-eyebrow {
    font-size: 10px;
    margin-bottom: 24px;
  }

  /* Sections - reduce vertical padding */
  section,
  .section,
  .mission,
  .expertises,
  .stats-banner,
  .transactions,
  .approach,
  .approach-banner,
  .cta,
  .team-intro,
  .team-section {
    padding: 70px var(--gutter) !important;
  }

  .section-inner,
  .approach-content,
  .banner-inner,
  .team-inner,
  .team-intro-inner {
    max-width: 100%;
  }

  /* Grids → single column */
  .values,
  .pillars,
  .exp-grid,
  .team-grid,
  .stats-banner-grid,
  .team-stats,
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Padding sur les cards */
  .pillar,
  .value,
  .exp-card,
  .partner-card {
    padding: 32px 24px !important;
  }

  /* Typography */
  h1, h2 {
    font-size: clamp(32px, 9vw, 56px) !important;
    line-height: 1 !important;
  }

  h2 { margin-bottom: 24px !important; }

  h3 { font-size: 20px !important; }

  p { font-size: 14px !important; line-height: 1.6 !important; }

  /* Stats numbers */
  .stat-num,
  .team-stat-num,
  .pillar-num {
    font-size: 48px !important;
  }

  /* Footer */
  footer {
    padding: 60px var(--gutter) 30px !important;
  }

  .footer-inner {
    gap: 32px !important;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    font-size: 12px;
  }

  /* Transactions filters */
  .filter-btn {
    font-size: 11px !important;
    padding: 6px 12px !important;
  }

  .filters-row {
    flex-wrap: wrap;
    gap: 8px !important;
  }

  /* Transaction rows */
  .transaction-row {
    grid-template-columns: 1fr !important;
    padding: 20px 0 !important;
  }

  /* Contact form */
  .contact-form-grid,
  .contact-grid {
    grid-template-columns: 1fr !important;
  }

  /* Team partners */
  .partner-photo {
    aspect-ratio: 4 / 5;
  }

  /* CTA */
  .cta h2 {
    font-size: clamp(36px, 10vw, 56px) !important;
  }

  /* Disable parallax on mobile (perf) */
  [data-parallax] {
    transform: none !important;
  }

  /* Disable cursor-tracked card glow */
  .pillar::before,
  .value::before,
  .exp-card::before,
  .partner-card::before,
  .trans-card::before {
    display: none !important;
  }
}

/* ============ RESPONSIVE — SMALL MOBILE (iPhone SE etc) ============ */
@media (max-width: 414px) {
  :root {
    --gutter: 16px;
  }

  .hero h1 {
    font-size: 44px !important;
  }

  .page-header h1 {
    font-size: 38px !important;
  }

  h2 { font-size: 28px !important; }

  .stat-num,
  .team-stat-num {
    font-size: 40px !important;
  }

  .mobile-menu .menu-inner > a {
    font-size: 28px;
  }
}
