/* ═══════════════════════════════════════════════════════════════════════════
   IMMERSA LANDING — Base (Reset + Typography + Utilities)
   Loaded AFTER tokens.css, BEFORE components.css + landing.css.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Modern CSS reset ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h, 72px) + 1rem);
}
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video, canvas, picture {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}
:focus {
  outline: none;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-sm);
}

/* ─── Honor reduced-motion globally ──────────────────────────────────── */
@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;
  }
}

/* ─── Selection ──────────────────────────────────────────────────────── */
::selection {
  background: var(--c-accent-soft);
  color: var(--c-accent-hi);
}

/* ─── Typography scale ────────────────────────────────────────────────── */
.t-display {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.t-h1 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.t-h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.t-h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  line-height: 1.25;
  font-weight: 700;
}
.t-h4 {
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 700;
}
.t-body-lg {
  font-size: 1.125rem;
  line-height: 1.7;
}
.t-body {
  font-size: 1rem;
  line-height: 1.7;
}
.t-body-sm {
  font-size: 0.875rem;
  line-height: 1.6;
}
.t-caption {
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--c-text-muted);
}
.t-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
}
.t-price {
  font-family: var(--f-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.t-muted { color: var(--c-text-muted); }
.t-dim   { color: var(--c-text-dim); }
.t-accent { color: var(--c-accent); }

/* Arabic-specific rhythm adjustments — Arabic prefers looser line-height */
html[lang="ar"] .t-display,
html[lang="ar"] .t-h1,
html[lang="ar"] .t-h2 {
  line-height: 1.2;
  letter-spacing: 0;
}
html[lang="ar"] body {
  line-height: 1.75;
}

/* ─── Layout utilities ────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: var(--gutter-mobile);
}
@media (min-width: 768px) {
  .wrap {
    padding-inline: var(--gutter-desktop);
  }
}
.wrap--narrow {
  max-width: var(--max-narrow);
}
.wrap--reading {
  max-width: var(--max-reading);
}

.section {
  padding-block: var(--section-py-mobile);
}
@media (min-width: 768px) {
  .section {
    padding-block: var(--section-py-desktop);
  }
}

.section--hero {
  padding-block-start: 6rem;
  padding-block-end: 3rem;
}
@media (min-width: 768px) {
  .section--hero {
    padding-block-start: 9rem;
    padding-block-end: 5rem;
  }
}

/* Grid/flex helpers */
.grid { display: grid; gap: var(--s-5); }
.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)); }

@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--s-1); }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }
.gap-6 { gap: var(--s-6); }

.text-center { text-align: center; }
.text-start  { text-align: start; }

.mt-1 { margin-top: var(--s-1); }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }

.mb-1 { margin-bottom: var(--s-1); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-6 { margin-bottom: var(--s-6); }
.mb-7 { margin-bottom: var(--s-7); }

/* ─── Accessibility utilities ────────────────────────────────────────── */
.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;
}
.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -40px;
  background: var(--c-accent);
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  font-weight: 700;
  z-index: 1200;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus {
  top: 1rem;
}

/* ─── Decorative divider (used in hero trust strip) ──────────────────── */
.hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-border), transparent);
  margin: var(--s-5) 0;
}

/* Badge / chip primitives */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-text-muted);
}
.chip--accent {
  background: var(--c-accent-soft);
  border-color: rgba(200, 169, 106, 0.35);
  color: var(--c-accent-hi);
}

/* Pull-quote for comparison section */
blockquote.pull {
  margin: 0;
  padding: var(--s-5) 0;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--c-accent);
  text-align: center;
  position: relative;
}
blockquote.pull::before,
blockquote.pull::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--c-accent);
  margin: 1rem auto;
  opacity: 0.5;
}
