/* ULUX Precision Studio — light editorial tokens. Logical properties for RTL. */

:root {
  --ulux-paper: #f6f4ef;
  --ulux-surface: #ece9e2;
  --ulux-ink: #151515;
  --ulux-muted: #5c5c5c;
  --ulux-blue: #2457f5;
  --ulux-blue-ink: #ffffff;
  --ulux-lime: #d8ff43;
  --ulux-dark: #141414;
  --ulux-dark-surface: #1c1c1c;
  --ulux-dark-text: #f7f5f0;
  --ulux-line: rgba(21, 21, 21, 0.14);
  --ulux-line-dark: rgba(247, 245, 240, 0.16);
  --ulux-danger: #c0392b;
  --ulux-focus: #2457f5;

  --color-ink: var(--ulux-ink);
  --color-paper: var(--ulux-paper);
  --color-muted: var(--ulux-muted);
  --color-accent: var(--ulux-blue);
  --color-accent-ink: var(--ulux-blue-ink);
  --color-line: var(--ulux-line);
  --color-danger: var(--ulux-danger);
  --color-focus: var(--ulux-focus);

  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-en: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Vazirmatn", "Noto Sans Arabic", tahoma, sans-serif;
  --font-fa: "Vazirmatn", "Tahoma", sans-serif;
  --font-he: "Heebo", "Arial Hebrew", "Noto Sans Hebrew", sans-serif;
  --font-ru: "IBM Plex Sans", Inter, "Segoe UI", system-ui, sans-serif;
  --font-tr: Inter, "Segoe UI", system-ui, sans-serif;
  --font-body: var(--font-en);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --container: min(76rem, calc(100% - var(--gutter) * 2));
  --header-h: 4rem;
  --radius: 0.75rem;
  --radius-sm: 0.375rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --step--1: clamp(0.8125rem, 0.76rem + 0.22vw, 0.9375rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.125rem, 1rem + 0.55vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.8vw, 3.25rem);
  --step-4: clamp(2.35rem, 1.5rem + 4vw, 4.25rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: clamp(3rem, 5vw, 5.5rem);
  --space-6: clamp(4.5rem, 8vw, 7.5rem);
}

.lang-ar { --font-body: var(--font-ar); --font-display: var(--font-ar); }
.lang-fa { --font-body: var(--font-fa); --font-display: var(--font-fa); }
.lang-he { --font-body: var(--font-he); --font-display: var(--font-he); }
.lang-ru { --font-body: var(--font-ru); --font-display: var(--font-ru); }
.lang-tr, .lang-es, .lang-fr, .lang-de, .lang-pt, .lang-it, .lang-nl {
  --font-body: var(--font-en);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ulux-ink);
  background: var(--ulux-paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 0.16em; }
p, h1, h2, h3, h4 { overflow-wrap: anywhere; }

h1, h2, h3, .ag-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 var(--space-3);
  color: var(--ulux-ink);
}

h1, .ag-display { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); letter-spacing: -0.02em; }

.ag-lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ulux-muted);
  max-width: 40rem;
  margin: 0;
}

.ag-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ulux-blue);
  margin-bottom: var(--space-2);
}

.ag-skip {
  position: absolute;
  inset-inline-start: var(--space-2);
  top: -4rem;
  background: var(--ulux-blue);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.ag-skip:focus { top: var(--space-2); }

.ag-wrap {
  width: var(--container);
  margin-inline: auto;
}

.ag-section { padding-block: var(--space-6); }
.ag-section--paper { background: var(--ulux-paper); color: var(--ulux-ink); }
.ag-section--surface { background: var(--ulux-surface); color: var(--ulux-ink); }
.ag-section--dark {
  background: var(--ulux-dark);
  color: var(--ulux-dark-text);
}
.ag-section--dark h1,
.ag-section--dark h2,
.ag-section--dark h3 { color: var(--ulux-dark-text); }
.ag-section--dark .ag-lede,
.ag-section--dark .ag-muted { color: rgba(247, 245, 240, 0.72); }
.ag-section--dark .ag-kicker { color: var(--ulux-lime); }
.ag-section--dark .ag-rule { border-color: var(--ulux-line-dark); }

.ag-split {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 900px) {
  .ag-split { grid-template-columns: 1.1fr 0.9fr; align-items: end; }
}

.ag-muted { color: var(--ulux-muted); }
.ag-rule {
  border: 0;
  border-block-start: 1px solid var(--ulux-line);
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--ulux-focus);
  outline-offset: 3px;
}

.ag-ltr { unicode-bidi: isolate; direction: ltr; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
