:root {
  --header-content-offset: 118px;
  --mobile-menu-offset-top: 130px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

/* ——— Branded text selection ——— */
::selection {
  background: var(--color-ink-800);
  color: var(--color-sky-200);
}

::-moz-selection {
  background: var(--color-ink-800);
  color: var(--color-sky-200);
}

body {
  font-family: var(--font-sans);
  color: #1e293b;
  background-color: #f8fafc;
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
  height: 100vh;
}

#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: opacity 0.46s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.46s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
}

#intro-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#intro-overlay__logo {
  width: clamp(280px, 40vw, 520px);
  height: auto;
  opacity: 0;
  transform: scale(1);
  transition: transform 0.46s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.36s ease;
  will-change: transform, opacity;
  animation: none;
}

#intro-overlay.is-logo-ready #intro-overlay__logo {
  opacity: 1;
  animation: logoGrow 0.9s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes logoGrow {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.5);
  }
}

#intro-overlay.is-hidden #intro-overlay__logo {
  opacity: 0;
}

main {
  padding-bottom: 3.5rem;
}

.site-shell {
  width: min(1240px, calc(100vw - 2.4rem));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, calc(100vw - 2rem));
  z-index: 60;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), inset 0 2px 4px rgba(255, 255, 255, 1);
  transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), inset 0 2px 4px rgba(255, 255, 255, 1);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.site-header__inner {
  width: 100%;
  padding-inline: 1.5rem;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: min-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.is-scrolled .site-header__inner {
  min-height: 54px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.is-scrolled .brand {
  transform: scale(0.9);
}

.brand__wordmark {
  height: clamp(28px, 4vw, 36px);
  width: auto;
  border-radius: 4px;
  filter: brightness(0) invert(0.1);
  /* Darken the logo for light background */
  transition: transform 0.2s ease, filter 0.2s ease;
}

.brand__wordmark:hover {
  transform: scale(1.02);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav__link {
  position: relative;
  z-index: 0;
  overflow: hidden;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  color: #475569;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  transform: translateY(0);
  transition: color 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-nav__link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(15, 23, 42, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-nav__link:hover {
  color: #0f172a;
  transform: translateY(-1px);
}

.site-nav__link:hover::before {
  opacity: 0.62;
  transform: scale(1);
}

.site-nav__link[aria-current="page"] {
  color: #0f172a;
}

.site-nav__link[aria-current="page"]::before {
  opacity: 1;
  transform: scale(1);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  backdrop-filter: blur(8px);
  transition: background-color 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-switch__toggle {
  position: relative;
  width: 74px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lang-switch__toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  box-shadow: none;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-switch__toggle.is-en::before {
  transform: translateX(100%);
}

.lang-switch__label {
  position: relative;
  z-index: 1;
  text-align: center;
  transition: color 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-switch__toggle.is-fr .lang-switch__label[data-lang="fr"],
.lang-switch__toggle.is-en .lang-switch__label[data-lang="en"] {
  color: #0f172a;
}

.burger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 65;
  border-radius: 10px;
  transition: background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.burger-menu:hover {
  background: rgba(15, 23, 42, 0.06);
}

.burger-menu span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #0f172a;
  margin-block: 5px;
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.2s ease,
    background-color 0.2s ease;
}

.burger-menu[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger-menu[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger-menu[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.is-mobile-nav-open {
  overflow: hidden;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(18, 31, 49, 0.52);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.mobile-menu {
  width: min(100%, 360px);
  margin: var(--mobile-menu-offset-top) auto 0;
  padding-inline: 1rem;
}

.mobile-menu__links {
  display: grid;
  gap: 0.9rem;
}

.mobile-menu__link {
  display: block;
  width: 100%;
  padding: 0.88rem 1.2rem;
  border-radius: 999px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(2, 8, 20, 0.22);
}

.mobile-menu__link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.98);
}

.mobile-menu__lang {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.mobile-menu__lang-switch {
  border-color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(2, 8, 20, 0.2);
}

.mobile-menu__lang-switch .lang-switch__toggle {
  color: #334155;
}

.mobile-menu__lang-switch .lang-switch__toggle::before {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  box-shadow: none;
}

@media (min-width: 1025px) {
  .mobile-menu-overlay {
    display: none !important;
  }
}

.section {
  margin-top: 5rem;
}

.section--narrow {
  width: min(1120px, calc(100vw - 2.4rem));
  margin-inline: auto;
}

.section__title {
  font-family: var(--font-display);
  color: #2b333c;
  font-weight: 500;
  font-size: clamp(2rem, 1.55vw + 1.25rem, 3.4rem);
  line-height: 1.14;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-timeline: view();
  animation-range: entry 5% cover 25%;
}

.section__title--center {
  text-align: center;
}

.section__lead {
  margin-top: 1.55rem;
  font-family: var(--font-sans);
  font-weight: 400;
  color: #4e565f;
  text-align: center;
  font-size: clamp(1.08rem, 0.55vw + 0.95rem, 1.28rem);
  line-height: 1.76;
  opacity: 0;
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-timeline: view();
  animation-range: entry 10% cover 30%;
}

@keyframes fade-up {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.section__overline {
  text-align: center;
  color: #818a92;
  font-size: clamp(1.2rem, 1vw + 0.8rem, 1.95rem);
  margin-bottom: 0.8rem;
  letter-spacing: 0.03em;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn--primary {
  background: linear-gradient(180deg, #1e3b6a, #13274d);
  color: #ffffff;
  padding: 0.85rem 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(19, 39, 77, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

.btn--primary:hover {
  background: linear-gradient(180deg, #25477d, #1a3461);
  box-shadow: 0 12px 32px rgba(19, 39, 77, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn--ghost {
  border: 1px solid rgba(12, 24, 43, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: #0c182b;
  padding: 0.85rem 1.8rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: 700;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(12, 24, 43, 0.5);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

/* Section titles get a subtle scale-up */
.section__title.reveal {
  transform: translateY(22px) scale(0.97);
}

/* Contact form gets a slight fade-up */
.contact-form.reveal {
  transform: translateY(24px);
}

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

/* Accessibility: skip animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-footer {
  margin-top: 6.3rem;
}

.site-footer:not(.site-footer--dark) {
  padding-block: 2rem;
  border-top: 1px solid rgba(26, 50, 77, 0.14);
  color: #5a6572;
}

.site-footer--dark {
  background: linear-gradient(180deg, #021b36 0%, #010c1e 100%);
  color: #c8d5e2;
  border-top: 1px solid rgba(111, 155, 194, 0.2);
  padding-block: 3rem 2.4rem;
}

.site-footer__inner {
  width: min(1240px, calc(100vw - 2.4rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.6rem;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  justify-self: start;
}

.site-footer__logo-main {
  width: min(100%, 208px);
  height: auto;
  opacity: 0.86;
  filter: drop-shadow(0 4px 10px rgba(1, 8, 20, 0.24));
}

.site-footer__middle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.85rem;
  min-width: 0;
}

.site-footer__nav {
  display: flex;
  gap: 1.05rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-inline: auto;
}

.site-footer__nav a {
  position: relative;
  padding-bottom: 2px;
  color: #c3d0dd;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.22s ease, opacity 0.22s ease;
}

.site-footer__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--color-sky-300);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-footer__nav a:hover {
  color: #eef5ff;
  opacity: 1;
}

.site-footer__nav a:hover::after {
  transform: scaleX(1);
}

.site-footer__social {
  display: flex;
  justify-content: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(155, 191, 228, 0.36);
  background: transparent;
  color: #b8cce2 !important;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.social-link:hover {
  background: rgba(111, 158, 209, 0.14);
  border-color: rgba(185, 212, 238, 0.6);
  color: #d9ebff !important;
}

.social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.site-footer__contact {
  display: grid;
  gap: 0.6rem;
  color: #aab7c5;
  text-align: right;
  justify-content: flex-end;
  justify-self: end;
}

.site-footer__contact a {
  color: #78ccff;
}

.site-footer__contact p {
  margin: 0;
}

.site-footer:not(.site-footer--dark) a {
  color: #1d4f82;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-sky-300);
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 0 4px rgba(154, 214, 255, 0.18);
}

@media (max-width: 1024px) {
  :root {
    --header-content-offset: 126px;
    --mobile-menu-offset-top: 138px;
  }

  .site-header__inner {
    min-height: 64px;
    padding-block: 0.85rem;
    flex-wrap: nowrap;
    transition: min-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding-block 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .site-header.is-scrolled .site-header__inner {
    min-height: 54px;
    padding-block: 0.55rem;
  }

  .burger-menu {
    display: block;
  }

  .site-nav {
    display: none;
  }

  .lang-switch--desktop {
    display: none;
  }

  .mobile-menu-overlay {
    display: block;
  }

  .site-header.is-menu-open {
    background: rgba(255, 255, 255, 0.46);
    border-color: rgba(255, 255, 255, 0.72);
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    justify-items: center;
  }

  .site-footer__brand {
    justify-self: center;
  }

  .site-footer__middle {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .site-footer__nav {
    justify-content: center;
  }

  .site-footer__contact {
    text-align: center;
    justify-content: center;
    justify-self: center;
  }
}

@media (max-width: 760px) {
  :root {
    --header-content-offset: 122px;
    --mobile-menu-offset-top: 132px;
  }

  .mobile-menu {
    width: min(100%, 344px);
    padding-inline: 0.8rem;
  }

  .mobile-menu__link {
    font-size: 0.96rem;
    padding-inline: 1rem;
  }

  .section {
    margin-top: 3.8rem;
  }

  .site-footer__logo-main {
    width: 184px;
  }

  .site-footer__middle {
    flex-direction: column;
    gap: 0.55rem;
  }

  .site-footer__social {
    margin-top: 0.12rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================================
   MATERIAL GRAIN EFFECT (Noise Overlay)
   ========================================================================= */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  /* Under modals/overlays if needed */
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.032;
  mix-blend-mode: overlay;
}

/* =========================================================================
   BACK TO TOP BUTTON
   ========================================================================= */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #1a2a44;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

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

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }
}
