/* ============================================
   DESIGN TOKENS — Qiwi.ch Redesign
   Source de vérité absolue.
   Aucune valeur hex hardcodée ailleurs.
   ============================================ */

:root {
  /* --- Palette --- */
  --color-primary:        #0f3553;
  --color-primary-dark:   #0a1a28;
  --color-primary-light:  #1a4d6e;
  --color-accent:         #00857a;
  --color-accent-light:   #00a89b;
  --color-accent-glow:    rgba(0, 133, 122, 0.15);

  --color-surface:        #f7f5f0;
  --color-surface-alt:    #edeae5;
  --color-white:          #ffffff;

  --color-text:           #1a1a2e;
  --color-text-secondary: #4a5568;
  --color-text-light:     #718096;
  --color-text-on-dark:   #ffffff;
  --color-text-on-dark-secondary: rgba(255, 255, 255, 0.7);

  --color-border:         rgba(0, 0, 0, 0.08);
  --color-border-on-dark: rgba(255, 255, 255, 0.12);
  --color-stroke-on-dark: rgba(255, 255, 255, 0.2);

  /* --- Typographie --- */
  --font-display: 'Sora', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --text-xs:   clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl:   clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
  --text-2xl:  clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --text-3xl:  clamp(1.875rem, 1.4rem + 2.5vw, 3rem);
  --text-4xl:  clamp(2.25rem, 1.5rem + 3.5vw, 4rem);
  --text-5xl:  clamp(2.75rem, 1.8rem + 4.5vw, 5rem);
  --text-6xl:  clamp(3rem, 2rem + 5vw, 6.5rem);

  --leading-tight:  1.1;
  --leading-snug:   1.25;
  --leading-normal: 1.6;

  --tracking-tight:  -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.02em;
  --tracking-wider:   0.06em;

  /* --- Espacement --- */
  --space-xs:   0.5rem;
  --space-sm:   0.75rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2rem;
  --space-2xl:  3rem;
  --space-3xl:  4rem;
  --space-4xl:  6rem;
  --space-5xl:  8rem;
  --space-section: clamp(4rem, 3rem + 5vw, 8rem);

  /* --- Layout --- */
  --container-max:    1200px;
  --container-narrow: 800px;
  --container-wide:   1400px;
  --gutter:           clamp(1rem, 0.5rem + 2vw, 2rem);
  --nav-height:       72px;

  /* --- Ombres --- */
  --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md:    0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg:    0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glow:  0 0 40px var(--color-accent-glow);

  /* --- Rayons --- */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;

  /* --- Z-index --- */
  --z-nav:     100;
  --z-overlay: 200;
  --z-modal:   300;
}

/* ============================================
   RESET
   ============================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto; /* Lenis gère le smooth scroll */
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   GSAP — états initiaux
   ============================================ */

/* gsap-reveal, gsap-clip, gsap-fade: initial states set by JS via gsap.set()
   No CSS opacity:0 here — if JS fails, content stays visible. */

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .gsap-reveal,
  .gsap-reveal-word,
  .gsap-clip,
  .gsap-fade {
    opacity: 1;
    transform: none;
    clip-path: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
