/* ========== CSS RESET (yours, unchanged) ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

input, button, textarea, select {
  font: inherit;
  border: none;
  background: none;
}

/* Global a11y: hidden must always win over component display rules */
[hidden] { display: none !important; }

/* Keyboard focus ring. The old reset removed outlines entirely, so keyboard
   users could not see where they were. Two-tone ring works on light + dark. */
:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 8px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ========== BASE STYLES ========== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #F7F7F8;
  color: #000000;
  line-height: 1.6;
  overflow-x: hidden; /* safety net: prevents horizontal scroll from any translateX leaking outside clipped areas */
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

h1,.h1 { font-size: 48px; }
h2,.h2 { font-size: 32px; }
h3,.h3 { font-size: 28px; }
h4,.h4 { font-size: 20px; }
h5,.h5 { font-size: 16px; }

@media (min-width: 768px) {
  h1,.h1 { font-size: 72px; }
  h2,.h2 { font-size: 36px; }
}

/* ========== CONTAINER SYSTEM ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

/* CSS variables (yours, plus a few added for this section) */
:root {
  --section-background-color: #F7F7F8;
  --section-text-color: #000000;
  --section-text-alternate-color: #44454c;
  --section-border-color: #e0e2e6;
  --widget-background-color: #ffffff;
  --widget-text-color: #000000;
  --widget-border-color: #e0e2e6;
  --section-text-small: 14px;
  --section-text-medium: 16px;
  --section-text-large: 18px;
  --section-text-xlarge: 24px;
  --heading-display-font: 'Playfair Display', serif;

  /* hero-specific additions, kept separate so they don't collide with your global tokens */
  --hero-panel-bg: #eceeef;
  --hero-muted: #b9bcc0;
  --hero-ink: #14161a;
  --hero-card-bg: rgba(20, 22, 26, 0.88);
  --hero-radius-lg: 28px;
  --hero-radius-md: 18px;
}

/* ==================================================================
   ANIMATION ENGINE STYLES — generic, section-agnostic.
   These pair 1:1 with scroll-reveal.js. Don't rename these classes
   per section; add new data-animate="..." values here instead if
   you ever need a new motion type.
   ================================================================== */

/* character-split reveal (headings) */
.js-anim-char {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.28em);
  /* smooth cubic-bezier gives a natural deceleration wave feel */
  transition:
    opacity  0.6s cubic-bezier(0.22, 1, 0.36, 1),
    filter   0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, filter, opacity;
}
.js-anim-char.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* generic directional reveals — data-animate="fade-up|fade-left|fade-right|fade-in|scale-in" */
.js [data-animate] {
  opacity: 0;
  /* smooth wave easing — elements decelerate gracefully into place */
  transition:
    opacity   0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

/* Kept translateY-only for all directional types on mobile to prevent
   any horizontal overflow from translateX. fade-right becomes a gentle
   upward fade on narrow viewports (see media query below). */
.js [data-animate="fade-up"]    { transform: translateY(22px); }
.js [data-animate="fade-left"]  { transform: translateX(-24px); }
.js [data-animate="fade-right"] { transform: translateX(24px); }
.js [data-animate="fade-in"]    { transform: none; }
.js [data-animate="scale-in"]   { transform: scale(0.95); }
/* chars: on desktop the element wrapper is visible and only the child spans animate */
.js [data-animate="chars"]      { opacity: 1; transform: none; }
/* on mobile chars falls back to a plain fade-up — same initial state as fade-up */
@media (max-width: 899px) {
  .js [data-animate="chars"] { opacity: 0; transform: translateY(22px); }
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* On mobile, convert all horizontal slides to vertical fades to prevent
   any chance of horizontal scrollbar / clipping glitches */
@media (max-width: 900px) {
  .js [data-animate="fade-left"],
  .js [data-animate="fade-right"] {
    transform: translateY(18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim-char,
  [data-animate] {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* =========================================================
    SHARED HEADER CONTENT STYLES
    Both the primary header and the ghost sticky header reuse
    these same descendant classes (logo, nav, cta, toggle) so
    there's exactly one place to edit content/behavior styling.
    ========================================================= */
.header_wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1320px;
  margin: 0 auto;
}
.header_logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--section-text-color);
}

.header_nav { display: none; }
.header_nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.header_nav-link {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  color: var(--section-text-color);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.header_nav-link::after{
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #000;
  transition: width .3s;
}
.header_nav-link:hover::after,
.header_nav-link[aria-current="page"]::after{
  width: 100%;
}
.header_nav-link[aria-current="page"] { opacity: 1; }
.header_mobile-link[aria-current="page"] { background-color: rgba(0, 0, 0, 0.05); }
.header_nav-link:hover,
.header_nav-link:focus-visible { opacity: 1; }
.header_cta {
  display: none;
  align-items: center;
  gap: 6px;
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.header_cta:hover { opacity: 0.85; transform: translateY(-1px); }
.header_cta-icon { width: 14px; height: 14px; }
.header_toggle {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}
.header_toggle:hover { background-color: rgba(0, 0, 0, 0.05); }
.header_toggle-bar {
  width: 20px;
  height: 2px;
  background-color: var(--section-text-color);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.2s ease;
}
.header_toggle--active .header_toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header_toggle--active .header_toggle-bar:nth-child(2) { opacity: 0; }
.header_toggle--active .header_toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 768px) {
  .header_cta { display: inline-flex; }
}
@media (min-width: 992px) {
  .header_nav { display: block; }
  .header_toggle { display: none; }
}

/* =========================================================
    1) PRIMARY HEADER — completely normal, in-flow.
    It never becomes fixed, never becomes sticky. It just sits
    at the top of the page and scrolls away like any element.
    This is what removes the jerk at the source: nothing about
    ITS position ever changes.
    ========================================================= */
.header {
  position: relative;
  z-index: 9999;
  width: 100%;
  background-color: var(--section-background-color);
  padding: 16px 20px;
}

.header_logo-icon{
  width: auto;
  height: 24px;
}

/* =========================================================
    2) GHOST STICKY HEADER — a separate, always-fixed element.
    It is position: fixed from first paint, forever. We NEVER
    toggle its `position`. We only toggle opacity/transform,
    which the browser can animate on the compositor thread —
    no layout recalculation, no reflow, no jerk, on any device.
    It's invisible and inert until you scroll past the trigger.
    ========================================================= */
.header-ghost {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 9999;
  width: calc(100% - 24px);
  max-width: calc(820px - 24px);
  background-color: var(--widget-background-color);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  padding: 8px 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -10px) scale(0.98);
  transition:
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.35s;
}
.header-ghost--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

/* ========== MOBILE POPUP MENU (shared by both headers) ========== */
.header_mobile-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(17, 17, 17, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1001;
}
.header_mobile-overlay--open {
  opacity: 1;
  visibility: visible;
}
.header_mobile-panel {
  position: fixed;
  top: 84px;
  left: 16px;
  right: 16px;
  background-color: var(--widget-background-color);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  padding: 8px;
  opacity: 0;
  transform: translateY(-14px) scale(0.97);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header_mobile-overlay--open .header_mobile-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.header_mobile-list { list-style: none; margin: 0; padding: 0; }
.header_mobile-item + .header_mobile-item { border-top: 1px solid rgba(0, 0, 0, 0.06); }
.header_mobile-link {
  display: block;
  padding: 15px 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--section-text-color);
  text-decoration: none;
  border-radius: 12px;
  transition: background-color 0.15s ease;
}
.header_mobile-link:hover,
.header_mobile-link:focus-visible { background-color: rgba(0, 0, 0, 0.04); }
.header_mobile-footer {
  padding: 10px 6px 6px;
  margin-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.header_mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
body.header_no-scroll { overflow: hidden; }

/* =========================================================
  FOOTER SECTION
  ========================================================= */

.footer{
  position: relative;
  background-color: var(--section-background-color);
  color: var(--section-text-color);
  margin-bottom: 20px;
}

.footer__top-wrapper{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  width: 100%;
  background: var(--widget-background-color);
  padding: 20px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  gap: 16px;
}

.footer__left{
  max-width: 100%;
  width: 100%;
}

.footer__right{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 10px;
  max-width: 100%;
  width: 100%;
}

.footer__logo{
  margin-bottom: 20px;
}

.footer__logo img {
  height: 32px;
  width: auto;
}

.footer__text{
  font-size: var(--section-text-medium);
  color: var(--section-text-alternate-color);
  max-width: 100%;
  font-weight: 400;
}

.footer__menu{
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.footer__pages-menu strong,
.footer__social-menu strong{
  display: block;
  margin-bottom: 8px;
  font-size: var(--section-text-medium);
}

.footer__menu-item{
  width: 100%;
}

.footer__menu-link{
  display: inline-block;
  width: fit-content;
  font-size: var(--section-text-medium);
}

.footer__menu-link::after{
  content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #000;
    transition: width .3s;
}
.footer__menu-link:hover::after{
  width: 100%;
}

.footer__bottom-wrapper{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
  background: var(--widget-text-color);
  color: var(--widget-background-color);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  padding: 10px 20px;
}

.footer__copyright,
.footer__credit {
  font-size: var(--section-text-small);
}

@media (min-width: 768px) {
  .footer__top-wrapper{
    flex-direction: row;
    padding: 40px;
    gap: 40px;
  }
  .footer__left{
    max-width: 70%;
  }
  .footer__text{
    max-width: 500px;
  }
  .footer__right{
    max-width: 30%;
    gap: 20px;
  }
  .footer__menu{
    gap: 12px;
  }
  .footer__pages-menu strong,
  .footer__social-menu strong{
    margin-bottom: 12px;
  }
  .footer__bottom-wrapper{
    padding: 10px 40px;
  }
}