/*
 * Ruya Website V2 — Design System
 * main.css
 *
 * Single source of truth for all design tokens, reset, typography,
 * layout primitives, and shared component foundations.
 *
 * Architecture:
 *   1. @font-face (commented — activate when WOFF2 files are placed)
 *   2. CSS custom properties (:root)
 *   3. Reset and base
 *   4. Typography
 *   5. Layout primitives
 *   6. Button primitives
 *   7. Card primitives
 *   8. Header / nav primitives
 *   9. Hero primitives
 *  10. Grid utilities
 *  11. Status / label primitives
 *  12. Watermark utility
 *  13. Accessibility
 *  14. Responsive breakpoints
 *  15. Print basics
 *  16. Reduced-motion overrides
 */


/* ==========================================================================
   1. @font-face
   — Active. WOFF2 files in assets/fonts/ (activated V2J).
   ========================================================================== */

/*
 * WOFF2 files placed locally in assets/fonts/ — activated V2J.
 * No Google Fonts CDN. Binaries fetched from gstatic at activation time; served locally.
 *
 * Approved typefaces (from final global brand identity):
 *   Latin / logo / numbers  → Sora
 *   Arabic headings/display → Cairo
 *   Arabic body / UI        → Readex Pro
 */

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/Sora-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/Cairo-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/ReadexPro-Regular.woff2") format("woff2");
}


/* ==========================================================================
   2. CSS Custom Properties
   ========================================================================== */

:root {

  /* --- Color: Core --- */
  --color-soft-black:   #0A0A0A;
  --color-ink:          #111111;
  --color-graphite:     #242424;
  --color-graphite-2:   #343434;
  --color-white:        #FFFFFF;
  --color-warm-white:   #F8F7F3;
  --color-paper:        #F4F2EA;
  --color-paper-2:      #FCFAF5;
  --color-stone:        #E2DED4;
  --color-stone-2:      #CAC4B8;
  --color-champagne:    #B3A06A;
  --color-champagne-soft: #D8CA94;
  --color-muted:        #6F6B64;

  /* --- Color: Semantic --- */
  --color-bg:           var(--color-ink);
  --color-bg-surface:   var(--color-graphite);
  --color-bg-elevated:  var(--color-graphite-2);
  --color-bg-light:     var(--color-warm-white);
  --color-bg-paper:     var(--color-paper);
  --color-text:         var(--color-warm-white);
  --color-text-muted:   var(--color-muted);
  --color-text-dim:     var(--color-stone-2);
  --color-text-dark:    var(--color-ink);
  --color-accent:       var(--color-champagne);
  --color-accent-soft:  var(--color-champagne-soft);
  --color-border:       color-mix(in srgb, var(--color-stone) 14%, transparent);
  --color-border-strong: color-mix(in srgb, var(--color-stone) 28%, transparent);
  --color-border-accent: color-mix(in srgb, var(--color-champagne) 40%, transparent);
  --color-overlay:      color-mix(in srgb, var(--color-soft-black) 60%, transparent);

  /* --- Typography: Families --- */
  /* Approved fonts (brand identity): Sora · Cairo · Readex Pro          */
  /* Activate only after physical WOFF2 files are approved and placed.    */
  --font-latin:      "Sora", "Segoe UI", system-ui, sans-serif;
  --font-ar-display: "Cairo", Tahoma, Arial, system-ui, sans-serif;
  --font-ar-body:    "Readex Pro", "Cairo", Tahoma, Arial, system-ui, sans-serif;

  /* --- Typography: Scale --- */
  --text-xs:      0.72rem;   /*  ~11.5px */
  --text-sm:      0.825rem;  /*  ~13px   */
  --text-base:    1rem;      /*  16px    */
  --text-md:      1.1rem;    /*  ~17.6px */
  --text-lg:      1.25rem;   /*  20px    */
  --text-xl:      1.5rem;    /*  24px    */
  --text-2xl:     1.875rem;  /*  30px    */
  --text-3xl:     2.25rem;   /*  36px    */
  --text-4xl:     clamp(2.25rem, 4vw, 3rem);
  --text-hero:    clamp(2.75rem, 5.5vw, 4.25rem);
  --text-display: clamp(3.25rem, 7vw, 5.5rem);

  /* --- Typography: Weights --- */
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-bold:    700;

  /* --- Typography: Leading --- */
  --leading-tight:   1.2;
  --leading-snug:    1.4;
  --leading-normal:  1.65;
  --leading-relaxed: 1.85;
  --leading-arabic:  1.9;  /* Arabic text needs more line height */

  /* --- 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;

  /* --- Section spacing --- */
  --section-pad-y: clamp(4rem, 8vw, 7rem);
  --section-pad-x: clamp(1.25rem, 5vw, 3rem);

  /* --- Layout --- */
  --max-width-site:    1280px;
  --max-width-content: 880px;
  --max-width-narrow:  640px;
  --max-width-wide:    1400px;

  /* --- Border radius --- */
  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.875rem;
  --radius-xl:   1.25rem;
  --radius-2xl:  1.75rem;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm:  0 1px 3px color-mix(in srgb, var(--color-soft-black) 20%, transparent);
  --shadow-md:  0 4px 16px color-mix(in srgb, var(--color-soft-black) 28%, transparent);
  --shadow-lg:  0 12px 40px color-mix(in srgb, var(--color-soft-black) 36%, transparent);
  --shadow-xl:  0 24px 64px color-mix(in srgb, var(--color-soft-black) 44%, transparent);
  --shadow-accent: 0 8px 32px color-mix(in srgb, var(--color-champagne) 20%, transparent);

  /* --- Transitions --- */
  --ease-default: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out:     cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out:  cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast:   150ms;
  --duration-base:   220ms;
  --duration-slow:   360ms;

  /* --- Header --- */
  --header-height:      64px;
  --header-height-lg:   72px;
  --header-bg:          color-mix(in srgb, var(--color-ink) 90%, transparent);
}


/* ==========================================================================
   3. Reset and base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* RTL default — matches Arabic-first document */
  direction: rtl;
}

html[lang="en"] {
  direction: ltr;
}

body {
  font-family: var(--font-ar-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-arabic);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html[lang="en"] body {
  font-family: var(--font-latin);
  line-height: var(--leading-normal);
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font: inherit;
}

p {
  line-height: inherit;
}

strong {
  font-weight: var(--weight-bold);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ar-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
html[lang="en"] h5,
html[lang="en"] h6 {
  font-family: var(--font-latin);
}

/* Numbers and Latin characters stay LTR even inside RTL context */
.ltr,
[dir="ltr"],
.brand-wordmark,
.stat-number,
.contact-value {
  direction: ltr;
  unicode-bidi: isolate;
}


/* ==========================================================================
   4. Typography
   ========================================================================== */

/* Display — hero headline */
.text-display {
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

html[lang="ar"] .text-display {
  letter-spacing: 0;
}

/* Hero */
.text-hero {
  font-size: var(--text-hero);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
}

html[lang="ar"] .text-hero {
  letter-spacing: 0;
}

/* Section headings */
.text-h1 { font-size: var(--text-4xl);  line-height: var(--leading-snug); }
.text-h2 { font-size: var(--text-3xl);  line-height: var(--leading-snug); }
.text-h3 { font-size: var(--text-2xl);  line-height: var(--leading-snug); }
.text-h4 { font-size: var(--text-xl);   line-height: var(--leading-snug); }
.text-h5 { font-size: var(--text-lg);   line-height: var(--leading-snug); }

/* Body */
.text-lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

.text-body  { font-size: var(--text-base); }
.text-sm    { font-size: var(--text-sm); }
.text-xs    { font-size: var(--text-xs); }

/* Label / kicker */
.text-kicker {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}

html[lang="ar"] .text-kicker {
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Latin-specific numeric display */
.text-stat {
  font-family: var(--font-latin);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: -0.02em;
  direction: ltr;
  unicode-bidi: isolate;
}

/* Accent / champagne highlight */
.text-accent {
  color: var(--color-accent);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-dim {
  color: var(--color-text-dim);
}


/* ==========================================================================
   5. Layout Primitives
   ========================================================================== */

/* Site container */
.container {
  width: 100%;
  max-width: var(--max-width-site);
  margin-inline: auto;
  padding-inline: var(--section-pad-x);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--content {
  max-width: var(--max-width-content);
}

.container--wide {
  max-width: var(--max-width-wide);
}

/* Section wrapper */
.section {
  padding-block: var(--section-pad-y);
}

.section--sm {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section--lg {
  padding-block: clamp(5rem, 10vw, 9rem);
}

/* Muted band / alternating background */
.section--muted {
  background-color: color-mix(in srgb, var(--color-graphite) 50%, var(--color-ink));
}

.section--paper {
  background-color: var(--color-paper);
  color: var(--color-text-dark);
}

.section--paper .text-muted {
  color: var(--color-muted);
}

/* Section header block */
.section-header {
  margin-block-end: clamp(2rem, 4vw, 3.5rem);
}

.section-header--center {
  text-align: center;
}

.section-header .text-kicker {
  margin-block-end: var(--space-3);
}

.section-header h2 {
  margin-block-end: var(--space-4);
}

.section-header p {
  color: var(--color-text-muted);
  max-width: 56ch;
}

.section-header--center p {
  margin-inline: auto;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-12);
}


/* ==========================================================================
   6. Button Primitives
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: 1;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.btn:active {
  transform: translateY(1px);
}

/* Primary — champagne on dark */
.btn--primary {
  background-color: var(--color-champagne);
  color: var(--color-soft-black);
  border-color: var(--color-champagne);
}

.btn--primary:hover {
  background-color: var(--color-champagne-soft);
  border-color: var(--color-champagne-soft);
  box-shadow: var(--shadow-accent);
}

/* Secondary — outlined */
.btn--secondary {
  background-color: transparent;
  color: var(--color-warm-white);
  border-color: var(--color-border-strong);
}

.btn--secondary:hover {
  border-color: var(--color-champagne);
  color: var(--color-champagne-soft);
}

/* Ghost — no border */
.btn--ghost {
  background-color: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
  padding-inline: var(--space-4);
}

.btn--ghost:hover {
  color: var(--color-text);
  background-color: color-mix(in srgb, var(--color-stone) 8%, transparent);
}

/* Sizes */
.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--text-xs);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: var(--text-base);
}

/* Button row */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

html[dir="rtl"] .btn-row {
  justify-content: flex-start;
}


/* ==========================================================================
   7. Card Primitives
   ========================================================================== */

.card {
  position: relative;
  display: grid;
  gap: var(--space-4);
  padding: clamp(1.25rem, 3vw, 2rem);
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* Accent left border (RTL: inline-start = right) */
.card--accented {
  border-inline-start: 2px solid var(--color-champagne);
}

/* Hover-interactive card */
.card--interactive {
  cursor: pointer;
  transition:
    transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.card--interactive:hover,
.card--interactive:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-accent);
  outline: none;
}

.card--interactive:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Selected state */
.card--selected {
  border-color: var(--color-champagne);
  background-color: var(--color-bg-elevated);
  box-shadow: var(--shadow-accent);
}

/* Light card — for paper-background sections */
.card--light {
  background-color: var(--color-white);
  border-color: var(--color-stone);
  color: var(--color-text-dark);
}

/* Card subparts */
.card-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  color: var(--color-accent);
}

html[lang="ar"] .card-label {
  letter-spacing: 0.02em;
}

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.card-body {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

/* Detail panel — expands below grid to show selected item detail */
.detail-panel {
  grid-column: 1 / -1;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-xl);
  animation: panel-in var(--duration-slow) var(--ease-out) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ==========================================================================
   8. Header / Nav Primitives
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding-inline: var(--section-pad-x);
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 0;
}

/* Brand / logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

/* Primary wordmark — Latin only */
.brand-wordmark {
  font-family: var(--font-latin);
  font-size: 1.35rem;
  font-weight: var(--weight-bold);
  color: var(--color-warm-white);
  letter-spacing: -0.01em;
  direction: ltr;
  unicode-bidi: isolate;
}

/*
 * .brand-mark — favicon / app-icon container only.
 * BRAND RULE: Do NOT populate .brand-mark with the Arabic "ر" symbol
 * in the website header. The header shows the Ruya wordmark only.
 * "ر" is a secondary asset for favicon, watermark, stamp, or app icon.
 * If used in header HTML, this container must remain empty or be removed.
 */
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

/* Site nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.site-nav a {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
  transition:
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-text);
  background-color: color-mix(in srgb, var(--color-stone) 10%, transparent);
}

.site-nav a[aria-current="page"] {
  color: var(--color-accent-soft);
}

/* Language toggle */
.lang-toggle {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.lang-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

/* Mobile nav menu (placeholder — structure for V2C) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.nav-toggle:hover {
  color: var(--color-text);
  background-color: color-mix(in srgb, var(--color-stone) 10%, transparent);
}


/* ==========================================================================
   9. Hero Primitives
   ========================================================================== */

.hero {
  min-height: calc(100svh - var(--header-height));
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 8vw, 7rem);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Two-column: copy left, visual right (RTL: copy right, visual left) */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: var(--space-6);
}

.hero-copy .text-kicker {
  margin-block-end: 0;
}

.hero-copy h1 {
  font-size: var(--text-hero);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
}

html[lang="ar"] .hero-copy h1 {
  letter-spacing: 0;
}

.hero-copy .text-lead {
  max-width: 52ch;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Background texture — subtle champagne grain (CSS-only) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 70% 70% at 60% 40%,
      color-mix(in srgb, var(--color-champagne) 6%, transparent) 0%,
      transparent 70%
    );
  pointer-events: none;
}

html[lang="ar"] .hero::before {
  background:
    radial-gradient(
      ellipse 70% 70% at 40% 40%,
      color-mix(in srgb, var(--color-champagne) 6%, transparent) 0%,
      transparent 70%
    );
}


/* ==========================================================================
   10. Grid Utilities
   ========================================================================== */

.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Auto-fill responsive grid */
.grid--auto-sm {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.grid--auto-md {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.grid--auto-lg {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr));
}

/* Split: 60/40 */
.grid--split {
  grid-template-columns: 3fr 2fr;
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

/* Flex row */
.flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* Spacer */
.spacer { flex: 1 1 0; }


/* ==========================================================================
   11. Status / Label Primitives
   ========================================================================== */

/* Generic badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.3rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

html[lang="ar"] .badge {
  letter-spacing: 0;
}

.badge--muted {
  background-color: color-mix(in srgb, var(--color-stone) 12%, transparent);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.badge--champagne {
  background-color: color-mix(in srgb, var(--color-champagne) 14%, transparent);
  color: var(--color-champagne-soft);
  border: 1px solid color-mix(in srgb, var(--color-champagne) 30%, transparent);
}

.badge--active {
  background-color: color-mix(in srgb, var(--color-stone) 16%, transparent);
  color: var(--color-stone);
  border: 1px solid color-mix(in srgb, var(--color-stone) 30%, transparent);
}

/* Status dot */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: currentColor;
  flex-shrink: 0;
}

/* Eyebrow / section kicker */
.eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-block-end: var(--space-4);
}

html[lang="ar"] .eyebrow {
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Numbered list — process steps */
.step-list {
  display: grid;
  gap: var(--space-6);
  counter-reset: step-counter;
}

.step-list li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-4);
  align-items: start;
  counter-increment: step-counter;
}

.step-list li::before {
  content: counter(step-counter, decimal-leading-zero);
  font-family: var(--font-latin);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  line-height: 1.6;
  direction: ltr;
  unicode-bidi: isolate;
}

/* Checklist */
.check-list {
  display: grid;
  gap: var(--space-3);
}

.check-list li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: var(--space-3);
  align-items: baseline;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.check-list li::before {
  content: "✓";
  color: var(--color-champagne);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}


/* ==========================================================================
   12. Watermark Utility
   ========================================================================== */

/*
 * The Arabic "ر" is used only as a secondary watermark / texture element —
 * never beside the Ruya wordmark in the header.
 * Apply .watermark-ra to a section or container to add a subtle background mark.
 */

.watermark-ra {
  position: relative;
  isolation: isolate;
}

.watermark-ra::after {
  content: "ر";
  position: absolute;
  inset-inline-end: -2%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-ar-display);
  font-size: clamp(16rem, 28vw, 24rem);
  font-weight: var(--weight-bold);
  color: color-mix(in srgb, var(--color-champagne) 5%, transparent);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

html[lang="en"] .watermark-ra::after {
  inset-inline-end: auto;
  inset-inline-start: -2%;
}

/* All content inside .watermark-ra must be above the pseudo-element */
.watermark-ra > * {
  position: relative;
  z-index: 1;
}


/* ==========================================================================
   12b. Scroll Reveal Utility
   ========================================================================== */

/*
 * Progressive enhancement — elements start invisible and reveal when scrolled
 * into view. JS adds .is-revealed via IntersectionObserver.
 * If JS is absent or prefers-reduced-motion is active, content is fully visible.
 */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 470ms var(--ease-out),
    transform 470ms var(--ease-out);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ==========================================================================
   12c. Language Transition
   ========================================================================== */

/*
 * Applied to <html> by withLanguageTransition() during the language switch.
 * Prevents pointer interactions on <main> while content is fading out/in.
 * Opacity is managed via inline styles in JS so timing is exact.
 * No reduced-motion rule needed — withLanguageTransition() bails early when PRM active.
 */

html.is-language-transitioning main {
  pointer-events: none;
}


/* ==========================================================================
   13. Accessibility
   ========================================================================== */

/* Visible focus for keyboard nav */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Remove focus ring for mouse/touch */
:focus:not(:focus-visible) {
  outline: none;
}

/* Skip link — screen readers + keyboard users */
.skip-link {
  position: absolute;
  top: -100%;
  inset-inline-start: var(--space-4);
  z-index: 999;
  padding: var(--space-3) var(--space-6);
  background-color: var(--color-champagne);
  color: var(--color-soft-black);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-md);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Visually separated but not sr-only */
.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}


/* ==========================================================================
   14. Responsive Breakpoints
   ========================================================================== */

/* Mobile-first overrides */

/* < 480px — extra small */
@media (max-width: 30em) {
  :root {
    --section-pad-x: 1rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  /* V2V-2: hero visual stays visible on mobile (compact form in components.css) */

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .grid--split {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

/* < 640px — small */
@media (max-width: 40em) {
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .grid--split {
    grid-template-columns: 1fr;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-row .btn {
    text-align: center;
    justify-content: center;
  }
}

/* < 768px — medium */
@media (max-width: 48em) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  /* V2V-2: hero visual stays visible on mobile (compact form in components.css) */

  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

/* < 1024px — large */
@media (max-width: 64em) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* > 1024px — header grows */
@media (min-width: 64em) {
  :root {
    --header-height: var(--header-height-lg);
  }
}


/* ==========================================================================
   15. Print Basics
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  .site-header,
  .site-footer,
  .btn,
  .btn-row,
  .nav-toggle,
  .lang-toggle {
    display: none !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555 !important;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  p, blockquote {
    orphans: 3;
    widows: 3;
  }
}


/* ==========================================================================
   16. Reduced-Motion Overrides
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }
}
