/* Art direction: linza.ru style — Clean, magenta brand, professional optical guide
   Palette: White base, magenta accent (#a2238e), light gray sections
   Typography: Gilroy (system fallback) — clean, modern
   Density: Balanced-to-dense — comparison tables and data-heavy */

/* ===== TYPE SCALE ===== */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* ===== SPACING ===== */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ===== FONTS ===== */
  --font-display: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ===== RADIUS ===== */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* ===== TRANSITIONS ===== */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ===== CONTENT WIDTHS ===== */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ===== LIGHT MODE — linza.ru Magenta Palette ===== */
:root, [data-theme="light"] {
  /* Surfaces */
  --color-bg:               #FFFFFF;
  --color-surface:          #FFFFFF;
  --color-surface-2:        #FAFAFA;
  --color-surface-offset:   #F5F5F5;
  --color-surface-offset-2: #E8E9ED;
  --color-surface-dynamic:  #E0E0E0;
  --color-divider:          #E0E0E0;
  --color-border:           #E0E0E0;

  /* Text */
  --color-text:             #1A1A1A;
  --color-text-muted:       #6B7280;
  --color-text-faint:       #9CA3AF;
  --color-text-inverse:     #FFFFFF;

  /* Primary Accent — Magenta */
  --color-primary:          #a2238e;
  --color-primary-hover:    #bb26a4;
  --color-primary-active:   #8a1d78;
  --color-primary-highlight: #f5e6f1;

  /* Success */
  --color-success:          #16A34A;
  --color-success-highlight: #DCFCE7;

  /* Warning */
  --color-warning:          #D97706;
  --color-warning-highlight: #FEF3C7;

  /* Error */
  --color-error:            #DC2626;
  --color-error-highlight:  #FEE2E2;

  /* Shadows — neutral black, no blue tint */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* ===== GLOBAL TYPOGRAPHY ===== */
h1, h2, h3 { font-family: var(--font-display); }
h4, h5, h6 { font-family: var(--font-body); font-weight: 600; }

/* ===== SCROLL ANIMATIONS ===== */
.fade-in { opacity: 1; }
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}
@keyframes reveal-fade { to { opacity: 1; } }
