/* ============================================================
   CPAYE - Compagnie de la Paye
   Cabinet de paie & gestion sociale
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: light;

  --green:        #6AAE27;
  --green-dark:   #4D8319;
  --green-ink:    #2A4E10;
  --green-soft:   #EEF7E0;
  --green-wash:   #F5FAEC;
  --green-glow:   rgba(106,174,39,0.28);
  --green-line:   rgba(106,174,39,0.18);

  --rivage:       #44403c;
  --rivage-dark:  #2c2a27;
  --rivage-line:  rgba(68,64,60,0.18);
  --rivage-soft:  rgba(68,64,60,0.06);

  --ink:          #0E2014;
  --ink-2:        #2A3A2E;
  --muted:        #6E7A6E;
  --muted-2:      #A4ADA0;
  --hair:         rgba(14,32,20,0.08);
  --hair-2:       rgba(14,32,20,0.16);

  --bg:           #FFFFFF;
  --bg-soft:      #F7FAF3;
  --bg-dark:      #0E2014;
  --bg-card:      #FFFFFF;

  --ff-sans:      'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --ff-serif:     'Instrument Serif', Georgia, serif;

  --nav-h:        72px;
  --r-sm:         10px;
  --r:            18px;
  --r-lg:         28px;
  --r-xl:         36px;

  --sh-sm:        0 1px 2px rgba(14,32,20,.06), 0 1px 1px rgba(14,32,20,.04);
  --sh:           0 6px 18px rgba(14,32,20,.06), 0 2px 6px rgba(14,32,20,.04);
  --sh-lg:        0 20px 50px rgba(14,32,20,.09), 0 8px 16px rgba(14,32,20,.06);
  --sh-xl:        0 40px 90px rgba(14,32,20,.14), 0 16px 32px rgba(14,32,20,.08);
  --sh-green:     0 20px 50px rgba(106,174,39,.28);
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
  html  { background: var(--bg); }
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px)  { .wrap { padding-inline: 2rem; } }
@media (min-width: 1200px) { .wrap { padding-inline: 3rem; } }

.section { padding: 6rem 0; position: relative; }
.section--tight { padding: 4.5rem 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: #E7EDE3; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--ff-sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
}

.display {
  font-family: var(--ff-sans);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.display em, .h2 em, .h1 em {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--green-dark);
}

.h1 { font-size: clamp(2.4rem, 6.2vw, 4.6rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; color: var(--ink); }
.h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: var(--ink); }
.h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.h4 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.lead { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--muted); line-height: 1.65; max-width: 62ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green-dark);
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px; background: currentColor;
  display: inline-block;
}
.eyebrow--on-dark { color: #A9D67A; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.005em;
  line-height: 1;
  transition: transform .18s ease, box-shadow .18s ease, background-color .22s ease, color .22s ease, border-color .22s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
}
.btn svg { flex-shrink: 0; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px var(--green-glow); }
.btn--primary:hover { background: var(--green-dark); box-shadow: 0 10px 28px var(--green-glow); transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--hair-2); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.btn--light { background: #fff; color: var(--ink); border-color: var(--hair); }
.btn--light:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--sh); }

.btn--lg { padding: 1rem 1.7rem; font-size: 1rem; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
  border-bottom: 1px solid transparent;
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 768px) { .nav__inner { padding-inline: 2rem; } }
@media (min-width: 1200px) { .nav__inner { padding-inline: 3rem; } }

.nav.is-scrolled {
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--hair);
}

.nav__brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.nav__brand-logo { height: 36px; width: auto; }
.nav__brand-txt {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.nav__links {
  display: none;
  gap: 2rem;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
}
.nav__links a { position: relative; transition: color .2s; }
.nav__links a:hover { color: var(--green-dark); }
.nav__links a::after {
  content: '';
  position: absolute; left: 50%; bottom: -6px;
  height: 2px; width: 0; background: var(--green);
  transition: width .25s ease, left .25s ease;
  border-radius: 2px;
}
.nav__links a:hover::after { width: 18px; left: calc(50% - 9px); }

@media (min-width: 900px) { .nav__links { display: flex; } }

.nav__actions { display: flex; align-items: center; gap: 0.6rem; }
.nav__actions .btn { display: none; }
@media (min-width: 720px) { .nav__actions .btn { display: inline-flex; } }

.nav__social {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink);
  border: 1px solid var(--hair-2);
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.nav__social:hover {
  color: var(--green-dark);
  border-color: var(--green);
  transform: translateY(-1px);
}
@media (min-width: 720px) { .nav__social { display: inline-flex; } }

.nav__burger {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--hair-2);
  background: #fff;
  box-shadow: var(--sh-sm);
}
.nav__burger span {
  display: block; width: 18px; height: 2px; background: var(--ink);
  position: relative;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav__burger span::before,
.nav__burger span::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
  border-radius: 2px;
  transition: transform .3s;
}
.nav__burger span::before { top: -6px; }
.nav__burger span::after  { top:  6px; }
.nav.is-open .nav__burger span { background: transparent; }
.nav.is-open .nav__burger span::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__burger span::after  { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 900px) { .nav__burger { display: none; } }

.nav__mobile {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--hair);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.nav.is-open .nav__mobile { transform: none; opacity: 1; pointer-events: auto; }
.nav__mobile a {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-2);
}
.nav__mobile .btn { width: 100%; margin-top: 0.5rem; }
@media (min-width: 900px) { .nav__mobile { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 0;
  overflow: hidden;
}
.hero > .wrap { position: relative; }
.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
  .hero { padding-top: calc(var(--nav-h) + 4rem); padding-bottom: 0; }
}

.hero__badges {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--green-line);
}
.hero__badge__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(106,174,39,0.22);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  50% { box-shadow: 0 0 0 6px rgba(106,174,39,0); }
}

.hero__headline {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: clamp(2rem, 4.8vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 1.25rem;
  word-break: normal;
  overflow-wrap: break-word;
}
.hero__headline em {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--green-dark);
  position: relative;
  white-space: nowrap;
}
.hero__headline em::after {
  content: '';
  position: absolute;
  left: 0; right: 4%;
  bottom: 0.02em;
  height: 0.28em;
  background: var(--green);
  opacity: 0.22;
  border-radius: 2px;
  z-index: -1;
}

.hero__sub {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 52ch;
  margin-bottom: 1.5rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0;
}

.hero__trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hair);
}
.hero__trust-item { display: flex; flex-direction: column; gap: 0.25rem; }
.hero__trust-num {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hero__trust-num em {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--green-dark);
}
.hero__trust-label {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Hero visual : animated paystub card */
.hero__visual {
  position: relative;
  min-height: 460px;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  max-width: 100%;
}
.hero__orb {
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--green-soft) 0%, transparent 68%);
  filter: blur(6px);
  z-index: 0;
  animation: orbFloat 10s ease-in-out infinite;
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.paystub {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  padding: 1.5rem;
  border: 1px solid var(--hair);
  transform: rotate(-2deg);
  animation: stubFloat 6s ease-in-out infinite;
}
@keyframes stubFloat {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50%      { transform: rotate(-2deg) translateY(-10px); }
}
.paystub__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 1rem; border-bottom: 1px dashed var(--hair-2);
}
.paystub__head h4 {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.paystub__head p { font-weight: 600; color: var(--ink); font-size: 1rem; }
.paystub__chip {
  background: var(--green-soft);
  color: var(--green-dark);
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  text-transform: uppercase;
}
.paystub__lines { padding: 1.1rem 0; display: grid; gap: 0.7rem; }
.paystub__row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.88rem;
}
.paystub__row span:first-child { color: var(--muted); }
.paystub__row span:last-child  { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.paystub__row--bar {
  height: 6px;
  background: var(--green-wash);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.paystub__row--bar::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--green);
  width: 0;
  animation: barFill 2s 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
  border-radius: 4px;
}
@keyframes barFill { to { width: 82%; } }
.paystub__total {
  margin-top: 0.5rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--hair-2);
  display: flex; justify-content: space-between; align-items: center;
}
.paystub__total span:first-child {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}
.paystub__total strong {
  font-family: var(--ff-sans);
  font-weight: 700; font-size: 1.35rem; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.paystub__footer {
  margin-top: 1rem;
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 600;
}
.paystub__check {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  animation: checkPop 0.6s 1.5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes checkPop {
  0%   { transform: scale(0) rotate(-12deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Floating mini cards around paystub */
.hero__float {
  position: absolute;
  z-index: 2;
  background: #fff;
  border-radius: var(--r);
  box-shadow: var(--sh-lg);
  padding: 0.8rem 1rem;
  display: flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--hair);
  animation: floatCard 5s ease-in-out infinite;
}
.hero__float--top {
  top: 4%; left: 2%;
  right: auto;
  animation-delay: -1.5s;
}
.hero__float--bot {
  bottom: 6%; right: 2%;
  animation-delay: -3s;
}
/* Static CPAYE brand at the top of the hero */
/* .hero__brand {
  margin-bottom: 2rem;
} */
.hero__brand img {
  height: 72px;
  width: auto;
  display: block;
  margin:auto;
}
@media (max-width: 760px) {
  .hero__brand { margin-bottom: 1.25rem; }
  .hero__brand img { height: 64px; }
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.hero__float__ic {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-dark);
  display: inline-flex; align-items: center; justify-content: center;
}
.hero__float__lbl { font-size: 0.78rem; color: var(--muted); }
.hero__float__val { font-size: 0.92rem; font-weight: 700; color: var(--ink); }

@media (max-width: 760px) {
  .hero__visual { min-height: 380px; padding: 0 1rem; }
  .hero__orb { width: 340px; height: 340px; }
  .paystub { transform: rotate(-1deg); max-width: 320px; padding: 1.25rem; }
  .paystub__head p { font-size: 0.95rem; }
  .paystub__total strong { font-size: 1.2rem; }
  .hero__float { display: none; }
}

/* ============================================================
   MARQUEE - trusted technologies
   ============================================================ */
.marquee {
  padding: 2.25rem 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
}
.marquee--in-hero {
  margin-top: 3rem;
  padding: 1.5rem 0 1.25rem;
  background: transparent;
  border-bottom: none;
  border-top: none;
  position: relative;
  z-index: 1;
}
/* edge fade via fixed gradient overlays (no mask-image: avoids
   per-frame re-rasterization of the animated layer in Chromium/Edge) */
.marquee--in-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, #fff 0%, rgba(255,255,255,0) 8%),
    linear-gradient(to left,  #fff 0%, rgba(255,255,255,0) 8%);
  z-index: 2;
}
.marquee--in-hero::before {
  /* soft signature : three green dots above the label */
  content: '· · ·';
  display: block;
  text-align: center;
  letter-spacing: 0.4em;
  color: var(--green);
  font-size: 0.85rem;
  line-height: 1;
  margin-bottom: 0.85rem;
  opacity: 0.65;
}
.marquee--in-hero .marquee__label { margin-bottom: 0.85rem; font-size: 0.72rem; }
.marquee--in-hero .marquee__item { font-size: 0.95rem; }
@media (min-width: 960px) {
  .marquee--in-hero {
    margin-top: 4.5rem;
    padding: 1.75rem 0 1.5rem;
  }
}
.marquee__label {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.marquee__track {
  display: flex;
  /* Use margin-right on items instead of `gap` so trailing space is
     symmetric -> infinite loop wraps seamlessly (no jitter at -50%). */
  animation: scrollX 75s linear infinite;
  width: max-content;
  will-change: transform;
  /* Force a stable GPU layer to avoid sub-pixel jitter on slow desktop animations */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: 3rem;
  color: var(--ink-2);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
  white-space: nowrap;
  opacity: 0.75;
  transition: opacity .2s, color .2s;
  /* Avoid per-frame text re-hinting that causes shimmer at slow speeds */
  text-rendering: optimizeSpeed;
  transform: translateZ(0);
}
.marquee__item:hover { opacity: 1; color: var(--green-dark); }
.marquee__item::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  display: inline-block;
}
@keyframes scrollX {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* Static fallback : applied either via OS-level reduced-motion preference
   or via JS-detected software GPU (virtualized/Citrix/RDP environments
   where animation re-encoding causes visible jitter). The duplicated
   items used for seamless looping are hidden, and items wrap in a centered
   grid. */
@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
    transform: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 0.5rem 1.75rem;
  }
  .marquee__item { margin-right: 0; }
  .marquee__item:nth-child(n+10) { display: none; }
  .marquee--in-hero::after { display: none; }
}
html.gpu-software .marquee__track {
  animation: none;
  transform: none;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 0.5rem 1.75rem;
}
html.gpu-software .marquee__item { margin-right: 0; }
html.gpu-software .marquee__item:nth-child(n+10) { display: none; }
html.gpu-software .marquee--in-hero::after { display: none; }

/* Hero visual animations disabled on virtualized/software GPUs and when
   the user prefers reduced motion — the floating cards, orb pulse and
   badge dot use transform-based loops that re-encode poorly on remote
   desktops and produce visible jitter. */
html.gpu-software .hero__orb,
html.gpu-software .paystub,
html.gpu-software .hero__float,
html.gpu-software .hero__badge__dot {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero__orb,
  .paystub,
  .hero__float,
  .hero__badge__dot {
    animation: none;
  }
}

/* ============================================================
   SERVICES - bento grid
   ============================================================ */
.sec-head {
  display: grid;
  gap: 1.25rem;
  max-width: 56rem;
  margin-bottom: 3.5rem;
}
.sec-head--center { text-align: center; margin-inline: auto; }
.sec-head--center .lead { margin-inline: auto; }

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
.bento__card {
  grid-column: span 6;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  display: flex; flex-direction: column; gap: 0.75rem;
  min-height: 240px;
}
.bento__card:hover {
  border-color: var(--green);
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
}
.bento__card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx,50%) var(--my,0%), var(--green-soft), transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 0;
}
.bento__card:hover::after { opacity: 1; }
.bento__card > * { position: relative; z-index: 1; }

.bento__ic {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-dark);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .3s, background .3s, color .3s;
}
.bento__card:hover .bento__ic {
  transform: rotate(-6deg) scale(1.05);
  background: var(--green);
  color: #fff;
}
.bento__card h3 { font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.bento__card p  { color: var(--muted); font-size: 0.95rem; line-height: 1.55; margin-top: auto; }
.bento__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.bento__tag {
  font-size: 0.72rem; font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-2);
  border: 1px solid var(--hair);
}

@media (min-width: 720px) {
  .bento__card { grid-column: span 3; }
  .bento__card--wide { grid-column: span 6; }
}
@media (min-width: 1024px) {
  .bento__card { grid-column: span 3; }
  .bento__card--wide { grid-column: span 6; flex-direction: row; align-items: center; }
  .bento__card--wide .bento__content { flex: 1; }
  .bento__card--tall { grid-row: span 2; }
}

.bento__card--featured {
  background: linear-gradient(135deg, var(--green-ink) 0%, #1A3A0E 100%);
  border-color: transparent;
  color: #E7EDE3;
}
.bento__card--featured h3 { color: #fff; }
.bento__card--featured p  { color: rgba(255,255,255,0.72); }
.bento__card--featured .bento__ic { background: rgba(255,255,255,0.1); color: #fff; }
.bento__card--featured .bento__tag { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85); }
.bento__card--featured:hover { transform: translateY(-3px); border-color: transparent; }
.bento__card--featured::after { display: none; }

/* ============================================================
   AUDIENCES - Tabs
   ============================================================ */
.tabs {
  display: inline-flex;
  background: #fff;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--hair);
  box-shadow: var(--sh-sm);
  position: relative;
  gap: 0.2rem;
  margin-bottom: 3rem;
}
.tabs__btn {
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color .2s;
  position: relative;
  z-index: 1;
}
.tabs__btn.is-active { color: #fff; }
.tabs__pill {
  position: absolute;
  top: 0.35rem; bottom: 0.35rem;
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 4px 12px var(--green-glow);
  transition: left .38s cubic-bezier(0.22,1,0.36,1), width .38s cubic-bezier(0.22,1,0.36,1);
  z-index: 0;
  left: 0.35rem;
}

.tabs-panels { position: relative; min-height: 340px; }
.tab-panel {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.tab-panel.is-active {
  position: relative;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
@media (min-width: 880px) {
  .tab-panel { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

.tab-panel__copy h3 {
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}
.tab-panel__copy h3 em {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--green-dark);
}
.tab-panel__copy p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.02rem;
  margin-bottom: 1.5rem;
}
.tab-panel__copy ul { display: grid; gap: 0.6rem; margin-bottom: 1.5rem; }
.tab-panel__copy li {
  display: flex; align-items: flex-start; gap: 0.65rem;
  color: var(--ink-2);
  font-size: 0.98rem;
}
.tab-panel__copy li svg {
  flex-shrink: 0; margin-top: 3px; color: var(--green);
}

.tab-panel__art {
  position: relative;
  padding: 2rem;
  background: var(--green-wash);
  border-radius: var(--r-xl);
  border: 1px solid var(--green-line);
  min-height: 280px;
  display: grid; place-items: center;
  overflow: hidden;
}
.tab-panel__art-deco {
  position: absolute;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(140px, 20vw, 260px);
  color: rgba(106,174,39,0.08);
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  left: -5%; bottom: -12%;
}
.tab-panel__art-content {
  position: relative;
  display: grid; gap: 0.7rem;
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--r);
  box-shadow: var(--sh);
  width: 100%;
  max-width: 360px;
}
.tab-panel__art-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--hair);
  font-size: 0.9rem;
}
.tab-panel__art-row:last-child { border-bottom: none; }
.tab-panel__art-row strong { color: var(--ink); font-weight: 600; }
.tab-panel__art-row span { color: var(--muted); }
.tab-panel__art-row em {
  font-style: normal;
  color: var(--green-dark);
  font-weight: 600;
}

/* ============================================================
   PROCESS - Horizontal timeline
   ============================================================ */
.timeline {
  position: relative;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

.timeline__item {
  position: relative;
  padding: 2rem 1.75rem;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  transition: border-color .3s, transform .3s;
}
.timeline__item:hover {
  border-color: var(--green);
  transform: translateY(-3px);
}
.timeline__num {
  display: inline-flex;
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 2.4rem;
  color: var(--green-dark);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 1rem;
  position: relative;
}
.timeline__num::before {
  content: '';
  position: absolute;
  left: -0.15em; right: -0.15em; top: 50%;
  height: 0.45em;
  background: var(--green);
  opacity: 0.15;
  border-radius: 4px;
  transform: translateY(-50%);
  z-index: -1;
}
.timeline__item h3 { font-weight: 600; font-size: 1.2rem; margin-bottom: 0.5rem; letter-spacing: -0.015em; }
.timeline__item p  { color: var(--muted); line-height: 1.6; font-size: 0.95rem; }

.timeline__line {
  display: none;
}
@media (min-width: 820px) {
  .timeline__line {
    display: block;
    position: absolute;
    top: calc(2rem - 1px);
    left: 2rem;
    right: calc(33.333% - 3rem);
    height: 2px;
    background: var(--hair);
    z-index: 0;
  }
  .timeline__line-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: var(--green);
    transition: width 1.2s cubic-bezier(0.22,1,0.36,1) .2s;
  }
  .timeline.is-visible .timeline__line-fill { width: 100%; }
  .timeline__item { background: transparent; border: none; padding: 0; }
  .timeline__item:hover { transform: none; }
  .timeline__item h3 { margin-top: 1rem; }
  .timeline__num {
    width: 4rem; height: 4rem;
    background: #fff;
    border: 2px solid var(--green);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0;
    font-size: 1.6rem;
    color: var(--green-dark);
    position: relative;
    z-index: 1;
  }
  .timeline__num::before { display: none; }
}

/* ============================================================
   STATS - big animated numbers on dark
   ============================================================ */
.stats {
  background: linear-gradient(135deg, var(--green-ink) 0%, #0E2014 100%);
  color: #E7EDE3;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(106,174,39,0.22), transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(106,174,39,0.15), transparent 50%);
  pointer-events: none;
}
.stats .wrap { position: relative; z-index: 1; }
.stats__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem 2rem;
  justify-items: center;
}
@media (min-width: 640px) { .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 3rem 2rem; max-width: 720px; margin-inline: auto; } }

.stat {
  display: flex; flex-direction: column; gap: 0.4rem;
  position: relative;
}
.stat__num {
  font-weight: 700;
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  letter-spacing: -0.035em;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__num em {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  color: #A9D67A;
}
.stat__num-suffix { font-size: 0.55em; color: #A9D67A; margin-left: 0.1em; font-weight: 400; }
.stat__num-prefix { font-size: 0.75em; color: #A9D67A; margin-right: 0.05em; font-weight: 400; }
.stat__label {
  font-size: 0.92rem;
  color: rgba(231,237,227,0.55);
  max-width: 22ch;
  line-height: 1.4;
}

/* ============================================================
   PARTNER RIVAGE
   ============================================================ */
.partner {
  position: relative;
  background: linear-gradient(135deg, var(--green-wash) 0%, #fff 100%);
  border: 1px solid var(--green-line);
  border-radius: var(--r-xl);
  padding: 2.75rem 2.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  overflow: hidden;
}
@media (min-width: 820px) {
  .partner { grid-template-columns: auto 1fr auto; padding: 3rem 3rem; gap: 2.5rem; }
}
.partner::before {
  content: '';
  position: absolute;
  right: -10%; top: -40%;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--green-soft), transparent 65%);
  pointer-events: none;
}
.partner > * { position: relative; }

.partner__mark {
  width: 200px;
  aspect-ratio: 200 / 96;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--rivage) 0%, var(--rivage-dark) 100%);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-lg), 0 0 0 6px rgba(255,255,255,0.6), 0 0 0 7px var(--rivage-line);
}
.partner__mark img {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}
.partner__body { display: flex; flex-direction: column; gap: 0.4rem; }
.partner__eyebrow {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--rivage); font-weight: 700;
}

/* Inline Rivage wordmark in title */
.rivage-wordmark {
  height: 1.7em;
  width: auto;
  display: inline-block;
  vertical-align: -0.5em;
  margin-left: 0.05em;
  color: var(--rivage);
}
/* Inline Rivage symbol + name in body copy */
.rivage-mark__sym {
  height: 0.95em;
  width: auto;
  display: inline-block;
  vertical-align: -0.12em;
  margin-right: 0.18em;
  color: var(--rivage);
}
.rivage-inline {
  color: var(--rivage);
  font-weight: 600;
  white-space: nowrap;
}
.eyebrow--rivage { color: var(--rivage); }
.partner__body h3 {
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  letter-spacing: -0.02em;
}
.partner__body p { color: var(--muted); line-height: 1.55; max-width: 52ch; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 0.75rem; }
.faq__item {
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.faq__item:hover { border-color: var(--hair-2); }
.faq__item.is-open { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

.faq__q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color .2s;
}
.faq__q:hover { color: var(--green-dark); }

.faq__icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--hair-2);
  display: inline-grid;
  place-items: center;
  transition: background .25s, border-color .25s, transform .3s, color .25s;
  color: var(--ink-2);
  margin-left: 1rem;
  position: relative;
}
.faq__item.is-open .faq__icon {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  transform: rotate(45deg);
}
.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  top: 50%; left: 50%;
}
.faq__icon::before { /* horizontal bar */
  width: 11px; height: 1.8px;
  transform: translate(-50%, -50%);
}
.faq__icon::after { /* vertical bar */
  width: 1.8px; height: 11px;
  transform: translate(-50%, -50%);
}

.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .38s cubic-bezier(0.22,1,0.36,1);
}
.faq__a > div { padding: 0 1.25rem 1.25rem; color: var(--muted); line-height: 1.7; font-size: 0.97rem; }
.faq__a a { color: var(--green-dark); font-weight: 600; border-bottom: 1px dashed var(--green-line); }
.faq__a a:hover { border-bottom-style: solid; }
.faq__item.is-open .faq__a { max-height: 400px; }

/* ============================================================
   CTA (contact)
   ============================================================ */
.cta {
  padding: 5rem 0 5.5rem;
  background: linear-gradient(135deg, var(--green-ink) 0%, #0E2014 100%);
  color: #E7EDE3;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(106,174,39,0.22), transparent 50%);
}
.cta::after {
  content: 'cpaye';
  position: absolute;
  font-family: var(--ff-serif);
  font-style: italic;
  color: rgba(169,214,122,0.05);
  font-size: clamp(180px, 28vw, 420px);
  bottom: -15%; left: -4%;
  line-height: 1; letter-spacing: -0.05em;
  pointer-events: none;
}
.cta .wrap { position: relative; z-index: 1; }
.cta h2 {
  font-weight: 700;
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.25rem;
}
.cta h2 em {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  color: #A9D67A;
}
.cta p {
  color: rgba(231,237,227,0.65);
  max-width: 56ch;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  line-height: 1.6;
}
.cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  color: var(--ink);
  padding: 1.1rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}
.cta__btn:hover { transform: translateY(-2px); box-shadow: 0 16px 42px rgba(169,214,122,0.35); }
.cta__btn svg { transition: transform .2s; }
.cta__btn:hover svg { transform: translateX(4px); }

.cta__coords {
  margin-top: 2.5rem;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1rem 2.5rem;
  color: rgba(231,237,227,0.55);
  font-size: 0.95rem;
}
.cta__coords span { display: inline-flex; align-items: center; gap: 0.45rem; }
.cta__coords a { color: rgba(231,237,227,0.85); }
.cta__coords a:hover { color: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink);
  color: rgba(231,237,227,0.55);
  padding: 3rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  text-align: center;
}
@media (min-width: 720px) {
  .footer__inner { flex-direction: row; text-align: left; }
}
.footer__logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.35rem 0.75rem;
  background: #fff;
  border-radius: 10px;
}
.footer__logo img { height: 28px; width: auto; }
.footer__copy { font-size: 0.88rem; }
.footer__legal {
  font-size: 0.88rem;
  color: rgba(231,237,227,0.7);
  border-bottom: 1px dashed rgba(255,255,255,0.2);
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.footer__legal:hover { color: #fff; border-color: #fff; }

.footer__actions {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}
.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: rgba(231,237,227,0.7);
  border: 1px solid rgba(255,255,255,0.12);
  transition: color .2s, border-color .2s, background .2s;
}
.footer__social:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
}

.footer__made {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  font-size: 0.82rem;
}
.footer__made a {
  font-family: var(--ff-serif);
  font-style: italic;
  color: rgba(231,237,227,0.5);
  letter-spacing: -0.01em;
  transition: color .2s;
}
.footer__made a span { color: var(--green); }
.footer__made a:hover { color: rgba(231,237,227,0.9); }
.footer__made a:hover span { color: var(--green); }

/* ============================================================
   MENTIONS MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(680px, calc(100vw - 2rem));
  max-height: min(85vh, 720px);
  background: #fff;
  color: var(--ink);
  border: none;
  border-radius: var(--r-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--sh-xl);
}
.modal[open] {
  display: flex;
  flex-direction: column;
}
.modal[open] { animation: modalIn .28s cubic-bezier(0.22,1,0.36,1); }
@keyframes modalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal[open]::backdrop { animation: backdropIn .28s ease; }
@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal::backdrop {
  background: rgba(14,32,20,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal__inner {
  padding: 2.25rem 2rem 2rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  position: relative;
  overscroll-behavior: contain;
}
.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px; height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  color: var(--ink-2);
  transition: background .2s, color .2s, transform .2s, border-color .2s;
  z-index: 2;
}
.modal__close::before,
.modal__close::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 1.8px;
  background: currentColor;
  border-radius: 2px;
}
.modal__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.modal__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.modal__close:hover { background: var(--green); color: #fff; border-color: var(--green); transform: rotate(90deg); }
.modal__title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  padding-right: 3rem;
}
.modal__section { margin-bottom: 1.75rem; }
.modal__section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.modal__section p  { color: var(--muted); line-height: 1.65; font-size: 0.95rem; margin-bottom: 0.5rem; }
.modal__section ul { margin: 0.5rem 0 0.5rem 1.25rem; list-style: disc; }
.modal__section li { color: var(--muted); line-height: 1.65; font-size: 0.95rem; margin-bottom: 0.2rem; }
.modal__section a  { color: var(--green-dark); border-bottom: 1px dashed var(--green-line); font-weight: 500; }
.modal__section a:hover { border-bottom-style: solid; }
.modal__section strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   ANIMATIONS (fade-up & utilities)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(0.22,1,0.36,1), transform .8s cubic-bezier(0.22,1,0.36,1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
.reveal.d5 { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
