:root {
  --primary: #57469f;
  --primary-dark: #45357f;
  --secondary: #1593bf;
  --secondary-dark: #0f7397;
  --ink: #111827;
  --muted: #667085;
  --line: #e7e7f2;
  --surface: #ffffff;
  --surface-soft: #f7f6ff;
  --surface-blue: #eefaff;
  --bg: #fbfbff;
  --shadow: 0 24px 80px rgba(63, 48, 130, 0.12);
  --radius-lg: 34px;
  --radius-md: 24px;
  --radius-sm: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 18px;
  z-index: 1000;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  transition: top .25s ease;
}

.skip-link:focus {
  top: 18px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 86px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(231, 231, 242, .85);
  background: rgba(255, 255, 255, .91);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 185px;
}

.brand img {
  width: 190px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  position: relative;
  font-weight: 700;
  color: #344054;
  font-size: .96rem;
}

.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.mobile-panel {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: white;
  background: var(--primary);
  box-shadow: 0 18px 34px rgba(87, 70, 159, .22);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  color: white;
  background: var(--secondary);
  box-shadow: 0 18px 34px rgba(21, 147, 191, .22);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
}

.btn-outline {
  color: var(--primary);
  background: white;
  border: 1px solid rgba(87, 70, 159, .18);
}

.btn-outline:hover {
  background: var(--surface-soft);
  border-color: rgba(87, 70, 159, .34);
}

.btn-white {
  background: white;
  color: var(--primary);
}

.btn-white:hover {
  background: #f7f3ff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(21, 147, 191, .14);
  border-radius: 999px;
  color: var(--secondary-dark);
  background: rgba(21, 147, 191, .10);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.page-hero,
.hero {
  position: relative;
  overflow: hidden;
}

.page-hero::before,
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(87, 70, 159, .18), transparent 33%),
    radial-gradient(circle at 88% 18%, rgba(21, 147, 191, .18), transparent 28%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 56px;
  align-items: center;
  padding: 76px 0 92px;
}

.hero-copy h1,
.page-hero h1 {
  margin: 20px 0 20px;
  max-width: 900px;
  font-size: clamp(2.7rem, 5vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.05em;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 4.4vw, 4.6rem);
}

.hero-copy p,
.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.28rem);
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.84);
  box-shadow: 0 14px 40px rgba(17, 24, 39, .05);
}

.mini-card strong {
  display: block;
  font-size: .98rem;
}

.icon-dot {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(21, 147, 191, .12);
  color: var(--secondary);
  font-weight: 900;
}

.hero-card {
  position: relative;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.hero-card-shell {
  border-radius: 28px;
  padding: 26px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-pill {
  display: inline-flex;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 900;
}

.hero-mark {
  font-size: 2rem;
}

.logo-panel {
  margin-top: 38px;
  border-radius: 26px;
  padding: 28px;
  background: rgba(255,255,255,.96);
  color: var(--ink);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .10);
}

.logo-panel img {
  width: min(100%, 360px);
  margin: 0 auto;
}

.logo-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.logo-stat {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.logo-stat:nth-child(2) {
  background: var(--surface-blue);
}

.logo-stat small {
  display: block;
  color: var(--primary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.logo-stat span {
  display: block;
  margin-top: 8px;
  font-weight: 800;
}

.section {
  padding: 92px 0;
}

.section-white {
  background: white;
}

.section-soft {
  background: linear-gradient(180deg, #ffffff, #fbfbff);
}

.section-head {
  max-width: 820px;
}

.section-head.center {
  margin: 0 auto;
  text-align: center;
}

.section-head h2 {
  margin: 18px 0 14px;
  font-size: clamp(2rem, 3.3vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.two-col {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 36px;
  align-items: center;
}

.content-card,
.soft-card,
.stat-card,
.mission-card,
.news-card,
.contact-card,
.article-card,
.timeline-item,
.team-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius-md);
}

.content-card {
  padding: 18px;
  box-shadow: 0 20px 56px rgba(17, 24, 39, .07);
}

.content-card-inner {
  padding: 26px;
  border-radius: 24px;
  background: var(--surface-soft);
}

.content-card-panel {
  padding: 26px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 16px 42px rgba(17,24,39,.06);
}

.content-card-panel h3 {
  margin: 18px 0 10px;
  font-size: 1.8rem;
  line-height: 1.1;
}

.content-card-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.feature-pairs,
.stats-grid,
.team-grid,
.news-grid,
.mission-grid,
.article-meta-grid,
.contact-grid,
.footer-grid,
.image-grid,
.timeline {
  display: grid;
  gap: 18px;
}

.feature-pairs {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 22px;
}

.soft-card {
  padding: 18px;
  background: #fcfcff;
}

.soft-card strong {
  display: block;
  color: var(--primary);
}

.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 34px;
}

.stat-card {
  padding: 24px;
  box-shadow: 0 14px 44px rgba(17,24,39,.04);
}

.stat-card strong {
  display: block;
  color: var(--primary);
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: -.04em;
}

.stat-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
}

.mission-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 42px;
}

.mission-card {
  padding: 28px;
  background: #fcfcff;
  transition: transform .25s ease, box-shadow .25s ease;
}

.mission-card:hover,
.news-card:hover,
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(87,70,159,.12);
}

.mission-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(87,70,159,.11);
  color: var(--primary);
  font-size: 1.55rem;
}

.mission-card h3 {
  margin: 22px 0 12px;
  font-size: 1.28rem;
  line-height: 1.2;
}

.mission-card p,
.news-card p,
.team-card p,
.page-copy p,
.article-body p,
.article-body li,
.check-list li,
.contact-detail p {
  color: var(--muted);
}

.cta-band {
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 30px 80px rgba(87,70,159,.20);
  overflow: hidden;
}

.cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 44px;
}

.cta-inner h2 {
  margin: 16px 0 10px;
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1.03;
}

.cta-inner p {
  max-width: 820px;
  color: rgba(255,255,255,.84);
  font-size: 1.08rem;
}

.news-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 42px;
}

.news-card {
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.news-media {
  height: 230px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.news-media img,
.article-hero-image img,
.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-body {
  padding: 24px;
}

.badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(21,147,191,.10);
  color: var(--secondary-dark);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 900;
}

.news-body time,
.article-kicker {
  display: block;
  margin-top: 16px;
  color: var(--secondary-dark);
  font-weight: 900;
  font-size: .92rem;
}

.news-body h3 {
  margin: 12px 0;
  font-size: 1.34rem;
  line-height: 1.22;
}

.text-link {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  margin-top: 12px;
  color: var(--primary);
  font-weight: 900;
}

.page-hero-inner {
  position: relative;
  padding: 74px 0 72px;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
}

.page-copy {
  max-width: 930px;
}

.page-copy h2,
.article-body h2,
.article-body h3 {
  margin-top: 34px;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.page-copy h2 {
  font-size: 2rem;
}

.timeline {
  margin-top: 30px;
}

.timeline-item {
  padding: 24px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: start;
}

.timeline-year {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 950;
}

.check-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.check-list li {
  position: relative;
  padding-left: 34px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--secondary);
  font-size: .82rem;
  font-weight: 950;
}

.team-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 28px;
}

.team-card {
  padding: 24px;
  background: white;
  transition: transform .25s ease, box-shadow .25s ease;
}

.team-avatar {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(87,70,159,.16), rgba(21,147,191,.16));
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 950;
}

.team-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.team-card p {
  margin: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 34px;
}

.service-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: white;
}

.service-card h3 {
  margin: 0 0 10px;
  font-size: 1.42rem;
}

.image-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 28px;
}

.image-card {
  min-height: 280px;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: white;
}

.contact-grid {
  grid-template-columns: .95fr 1.05fr;
  align-items: start;
}

.contact-card {
  padding: 32px;
}

.contact-card-dark {
  color: white;
  background: var(--primary);
  border-color: transparent;
  box-shadow: 0 24px 64px rgba(87,70,159,.20);
}

.contact-card-dark p {
  color: rgba(255,255,255,.84);
}

.contact-details {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.contact-detail {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.10);
}

.detail-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,.14);
  font-size: 1.2rem;
}

.contact-detail strong {
  display: block;
}

.contact-detail p {
  margin: 5px 0 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: #344054;
  font-weight: 850;
  font-size: .94rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d7d9ea;
  border-radius: 18px;
  background: white;
  color: var(--ink);
  padding: 14px 16px;
  outline: none;
  transition: border .22s ease, box-shadow .22s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(87,70,159,.72);
  box-shadow: 0 0 0 5px rgba(87,70,159,.10);
}

textarea {
  min-height: 170px;
  resize: vertical;
}

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-blue);
  color: var(--secondary-dark);
  font-weight: 800;
  display: none;
}

.form-status.visible {
  display: block;
}

.blog-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 34px;
}

.search-field {
  width: min(100%, 430px);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  padding: 11px 16px;
  font-weight: 850;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.article-card {
  overflow: hidden;
}

.article-hero-image {
  height: 420px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.article-body {
  padding: 32px;
}

.article-body h1 {
  margin: 10px 0 16px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.article-body h2 {
  font-size: 1.8rem;
}

.article-body h3 {
  font-size: 1.45rem;
}

.article-meta-grid {
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0 10px;
}

.article-meta {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.article-meta strong {
  display: block;
  color: var(--primary);
}

.sidebar {
  display: grid;
  gap: 18px;
}

.sidebar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 24px;
}

.sidebar-card h3 {
  margin-top: 0;
  line-height: 1.15;
}

.sidebar-links {
  display: grid;
  gap: 12px;
}

.sidebar-links a {
  color: var(--primary);
  font-weight: 850;
}

.footer {
  margin-top: 0;
  border-top: 1px solid var(--line);
  background: white;
}

.footer-grid {
  grid-template-columns: 1.3fr .78fr .78fr 1fr;
  padding: 54px 0;
}

.footer-brand img {
  width: 210px;
}

.footer-brand p {
  max-width: 420px;
  color: var(--muted);
}

.footer h3 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.footer-links {
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  padding: 18px;
  font-size: .95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .nav,
  .header-actions {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-panel.open {
    position: absolute;
    top: 86px;
    left: 0;
    right: 0;
    display: grid;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid var(--line);
    background: white;
    box-shadow: 0 28px 60px rgba(17,24,39,.10);
  }

  .mobile-panel a {
    padding: 15px 16px;
    border-radius: 18px;
    background: #fbfbff;
    color: #344054;
    font-weight: 850;
  }

  .mobile-panel .mobile-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 6px;
  }

  .hero-inner,
  .two-col,
  .contact-grid,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .mission-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-inner {
    grid-template-columns: 1fr;
  }

  .article-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    height: 78px;
  }

  .mobile-panel.open {
    top: 78px;
  }

  .header-inner {
    width: min(calc(100% - 22px), var(--container));
  }

  .brand {
    min-width: unset;
  }

  .brand img {
    width: 156px;
  }

  .hero-inner,
  .page-hero-inner,
  .section {
    padding-top: 58px;
    padding-bottom: 64px;
  }

  .benefit-grid,
  .logo-stats,
  .feature-pairs,
  .stats-grid,
  .mission-grid,
  .team-grid,
  .service-grid,
  .image-grid,
  .form-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cta-inner,
  .contact-card,
  .article-body {
    padding: 24px;
  }

  .news-media,
  .article-hero-image {
    height: 250px;
  }
}

.service-media {
  height: 210px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0 30px;
}
.article-gallery.gallery-small {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gallery-card {
  min-height: 220px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 720px) {
  .article-gallery,
  .article-gallery.gallery-small {
    grid-template-columns: 1fr;
  }
}


/* =========================================
   Effets JavaScript additionnels
   ========================================= */
.site-header.scrolled {
  height: 72px;
  box-shadow: 0 18px 48px rgba(17, 24, 39, .10);
  background: rgba(255, 255, 255, .96);
}

.site-header,
.brand img {
  transition: height .28s ease, box-shadow .28s ease, background .28s ease, width .28s ease;
}

.site-header.scrolled .brand img {
  width: 168px;
}

.hero-card,
.mission-card,
.news-card,
.team-card,
.stat-card,
.soft-card,
.service-card {
  transform-style: preserve-3d;
}

.js-tilt {
  will-change: transform;
  transition: transform .18s ease, box-shadow .22s ease;
}

.stat-card strong[data-count] {
  min-height: 1em;
  display: inline-block;
}

.progress-line {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 999;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 0 18px rgba(87, 70, 159, .35);
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 24px 44px rgba(87, 70, 159, .28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(.92);
  transition: opacity .24s ease, visibility .24s ease, transform .24s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.03);
}

[data-parallax] {
  will-change: transform;
}

.lightbox-trigger {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(8, 12, 28, .84);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-dialog {
  position: relative;
  width: min(100%, 1080px);
  max-height: min(88vh, 900px);
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 36px 120px rgba(0, 0, 0, .42);
  transform: translateY(18px) scale(.97);
  transition: transform .25s ease;
}

.lightbox.open .lightbox-dialog {
  transform: translateY(0) scale(1);
}

.lightbox img {
  width: 100%;
  max-height: min(88vh, 900px);
  object-fit: contain;
  background: #0b1020;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(17, 24, 39, .72);
  font-size: 1.45rem;
  cursor: pointer;
}

.cursor-glow {
  position: fixed;
  z-index: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(87,70,159,.10), rgba(21,147,191,.06), transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .22s ease;
}

body.cursor-active .cursor-glow {
  opacity: 1;
}

.typewriter-caret {
  display: inline-block;
  width: 3px;
  height: .95em;
  margin-left: 7px;
  vertical-align: -.08em;
  background: var(--secondary);
  animation: caretBlink .85s infinite;
}

@keyframes caretBlink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 160;
  max-width: 360px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 20px;
  color: white;
  background: linear-gradient(135deg, rgba(87,70,159,.96), rgba(21,147,191,.96));
  box-shadow: 0 24px 54px rgba(17,24,39,.20);
  transform: translateY(18px);
  opacity: 0;
  visibility: hidden;
  transition: transform .24s ease, opacity .24s ease, visibility .24s ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

@media (max-width: 720px) {
  .site-header.scrolled {
    height: 70px;
  }

  .site-header.scrolled .brand img {
    width: 145px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }

  .toast {
    right: 16px;
    left: 16px;
    bottom: 82px;
    max-width: none;
  }

  .cursor-glow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-tilt,
  .back-to-top,
  .lightbox,
  .lightbox-dialog,
  .site-header,
  .brand img,
  .toast {
    transition: none !important;
  }

  .typewriter-caret {
    animation: none;
  }
}
