/* =========================================================
   Wathiq — Novera-style design system
   Premium Saudi legal-tech SaaS · DM Sans + Source Serif 4
   ========================================================= */

:root {
  /* Color */
  --bg:           #FAFAF9;   /* page off-white */
  --bg-warm:      #FAF6F0;   /* warm section tint */
  --bg-cream:     #F5F0E8;   /* form / soft card */
  --ink:          #0F0F0F;   /* near-black headings */
  --ink-2:        #1A1A1A;   /* dark sections */
  --body:         #57514D;   /* body text */
  --body-2:       #8A8480;   /* muted secondary */
  --line:         #ECEAE6;   /* hairlines */
  --line-2:       #E2DFDA;
  --line-3:       #D9D5CE;
  --on-dark:      #FFFFFF;
  --on-dark-2:    rgba(255, 255, 255, 0.7);
  --on-dark-3:    rgba(255, 255, 255, 0.5);
  --accent:       #B86A3F;   /* muted terracotta */
  --accent-2:     #8E5630;
  --btn-dark:     #1A1A1A;
  --btn-dark-h:   #000000;

  /* Type */
  --serif: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --mono:  'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;
  --serif-ar: 'Amiri', 'Noto Naskh Arabic', serif;
  --sans-ar:  'IBM Plex Sans Arabic', 'Tajawal', system-ui, sans-serif;

  /* Rhythm */
  --max:    1248px;
  --gutter: clamp(20px, 4vw, 24px);
  --pad-y:  clamp(72px, 10vw, 128px);

  /* Motion */
  --ease:        cubic-bezier(0.44, 0, 0.56, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:      0.2s;
  --t-base:      0.4s;
  --t-slow:      0.6s;

  /* Elevation */
  --shadow-card: 0 8px 32px rgba(15, 15, 15, 0.06);
  --shadow-lift: 0 16px 48px rgba(15, 15, 15, 0.10);
}

/* =========================================================
   THMANYAH typeface (Arabic) — bundled locally (woff2 + otf)
   Sans = UI/body · Serif Display = headings · Serif Text = long-form
   ========================================================= */
@font-face { font-family:'Thmanyah Sans'; font-style:normal; font-weight:300; font-display:swap;
  src:url('fonts/thmanyahsans-Light.woff2') format('woff2'), url('fonts/thmanyahsans-Light.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Sans'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/thmanyahsans-Regular.woff2') format('woff2'), url('fonts/thmanyahsans-Regular.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Sans'; font-style:normal; font-weight:500 600; font-display:swap;
  src:url('fonts/thmanyahsans-Medium.woff2') format('woff2'), url('fonts/thmanyahsans-Medium.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Sans'; font-style:normal; font-weight:700; font-display:swap;
  src:url('fonts/thmanyahsans-Bold.woff2') format('woff2'), url('fonts/thmanyahsans-Bold.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Sans'; font-style:normal; font-weight:800 900; font-display:swap;
  src:url('fonts/thmanyahsans-Black.woff2') format('woff2'), url('fonts/thmanyahsans-Black.otf') format('opentype'); }

@font-face { font-family:'Thmanyah Serif Display'; font-style:normal; font-weight:300; font-display:swap;
  src:url('fonts/thmanyahserifdisplay-Light.woff2') format('woff2'), url('fonts/thmanyahserifdisplay-Light.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Serif Display'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/thmanyahserifdisplay-Regular.woff2') format('woff2'), url('fonts/thmanyahserifdisplay-Regular.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Serif Display'; font-style:normal; font-weight:500 600; font-display:swap;
  src:url('fonts/thmanyahserifdisplay-Medium.woff2') format('woff2'), url('fonts/thmanyahserifdisplay-Medium.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Serif Display'; font-style:normal; font-weight:700; font-display:swap;
  src:url('fonts/thmanyahserifdisplay-Bold.woff2') format('woff2'), url('fonts/thmanyahserifdisplay-Bold.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Serif Display'; font-style:normal; font-weight:800 900; font-display:swap;
  src:url('fonts/thmanyahserifdisplay-Black.woff2') format('woff2'), url('fonts/thmanyahserifdisplay-Black.otf') format('opentype'); }

@font-face { font-family:'Thmanyah Serif Text'; font-style:normal; font-weight:300; font-display:swap;
  src:url('fonts/thmanyahseriftext-Light.woff2') format('woff2'), url('fonts/thmanyahseriftext-Light.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Serif Text'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/thmanyahseriftext-Regular.woff2') format('woff2'), url('fonts/thmanyahseriftext-Regular.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Serif Text'; font-style:normal; font-weight:500 600; font-display:swap;
  src:url('fonts/thmanyahseriftext-Medium.woff2') format('woff2'), url('fonts/thmanyahseriftext-Medium.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Serif Text'; font-style:normal; font-weight:700; font-display:swap;
  src:url('fonts/thmanyahseriftext-Bold.woff2') format('woff2'), url('fonts/thmanyahseriftext-Bold.otf') format('opentype'); }
@font-face { font-family:'Thmanyah Serif Text'; font-style:normal; font-weight:800 900; font-display:swap;
  src:url('fonts/thmanyahseriftext-Black.woff2') format('woff2'), url('fonts/thmanyahseriftext-Black.otf') format('opentype'); }

/* In Arabic (RTL) the whole type system maps to Thmanyah — every element that
   uses var(--serif)/var(--sans)/var(--mono) switches automatically. English
   (LTR) keeps DM Sans / Source Serif untouched. */
html[dir="rtl"] {
  --serif:         'Thmanyah Serif Display', 'Amiri', 'Noto Naskh Arabic', serif;
  --serif-text:    'Thmanyah Serif Text', 'Amiri', serif;
  --sans:          'Thmanyah Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --mono:          'Thmanyah Sans', 'IBM Plex Sans Arabic', ui-monospace, monospace;
  --serif-ar:      'Thmanyah Serif Display', 'Amiri', serif;
  --serif-text-ar: 'Thmanyah Serif Text', 'Amiri', serif;
  --sans-ar:       'Thmanyah Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { position: relative; overscroll-behavior: none; }
[dir="rtl"] body { font-family: var(--sans-ar); }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

::selection { background: var(--ink); color: var(--on-dark); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* =========================================================
   TYPE SCALE
   ========================================================= */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
  font-family: var(--serif-ar);
  letter-spacing: 0;
}
h2 { line-height: 1.15; }
h3, h4 { line-height: 1.25; }
p { margin: 0; color: var(--body); }

.h-display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: var(--ink);
}
.h-1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.h-2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.h-3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--body);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
[dir="rtl"] .eyebrow { font-family: var(--sans-ar); }

.label-mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body);
}

.body-lg { font-size: 18px; line-height: 1.6; color: var(--body); }
.body-md { font-size: 16px; line-height: 1.65; color: var(--body); }
.body-sm { font-size: 14px; line-height: 1.6; color: var(--body); }

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              opacity var(--t-fast) var(--ease);
  white-space: nowrap;
}
[dir="rtl"] .btn { font-family: var(--sans-ar); }
.btn .arrow { display: inline-block; transition: transform 0.25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .btn:hover .arrow { transform: translateX(-4px); }

.btn-white {
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.08);
}
.btn-white:hover { transform: scale(1.03); box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 6px 22px rgba(0,0,0,0.12); }

.btn-dark {
  background: var(--btn-dark);
  color: var(--on-dark);
}
.btn-dark:hover { background: var(--btn-dark-h); transform: scale(1.02); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-3);
}
.btn-ghost:hover { background: var(--bg-warm); border-color: var(--ink); }

.btn-ghost-light {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(255,255,255,0.25);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }

/* =========================================================
   NAV
   ========================================================= */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background var(--t-base) var(--ease),
              backdrop-filter var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.nav.is-light {
  background: rgba(250, 250, 249, 0.86);
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  border-bottom: 1px solid var(--line);
}
.nav.is-dark {
  background: rgba(15, 15, 15, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 40px;
}
.brand svg { height: 36px; width: auto; }
.nav.is-dark .brand { color: var(--on-dark); }
.nav.is-light .brand { color: var(--ink); }

.navlink {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.92;
  transition: opacity var(--t-fast) var(--ease);
}
.navlink:hover { opacity: 0.6; }
.nav.is-dark .navlink { color: var(--on-dark); }
.nav.is-light .navlink { color: var(--ink); }
.navlink.is-active { font-weight: 500; }
.navlink .chev { opacity: 0.6; }
.navlink .chev svg { display: block; width: 10px; height: 10px; }

.nav-cta {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 999px;
}
.nav.is-dark .nav-cta {
  background: #FFFFFF; color: var(--ink);
}
.nav.is-light .nav-cta {
  background: var(--ink); color: #FFFFFF;
}

/* =========================================================
   HERO — full viewport video, marquee at bottom
   ========================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #0a0807;
  overflow: hidden;
  isolation: isolate;
}
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Poster = the video's first frame. Painted instantly (it's just an image)
     so the hero shows content the moment CSS loads; the <video> plays on top
     once it can. Same frame → the swap is seamless. */
  background: #0a0807 url("hero-poster.jpg?v=1") center / cover no-repeat;
}
.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.02);
  background: #0a0807;  /* dark behind the video → the poster→video gap is never white */
}
.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 75%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 70%),
    linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.45) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(96px, 14vw, 160px) clamp(180px, 18vw, 220px);
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 26px;
}
[dir="rtl"] .hero-eyebrow { font-family: var(--sans-ar); letter-spacing: 0; text-transform: none; font-size: 13px; }

.hero-h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  color: var(--on-dark);
  max-width: 18ch;
  margin: 0 0 24px;
}
.hero-h1 .muted { color: #FFFFFF; }

.hero-sub {
  font-family: var(--sans);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
  color: rgba(255,255,255,0.78);
  max-width: 56ch;
  margin: 0 0 36px;
  white-space: pre-line;
}
[dir="rtl"] .hero-sub { font-family: var(--sans-ar); }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero marquee — frosted strip at the bottom of the hero */
.hero-marquee {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  z-index: 2;
  padding: 22px 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.22) 100%);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  border-top: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.hero-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 80s linear infinite;
}
[dir="rtl"] .hero-marquee-track { animation-direction: reverse; }
.hero-marquee-logo {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  margin-inline-end: 58px;   /* per-item gap (not track gap) so -50% tiles exactly */
}
.hero-marquee-logo img {
  height: 34px;
  width: auto;
  display: block;
  /* transparent + black-and-white: render every mark as a uniform white silhouette */
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0,0,0,0.45));
  opacity: 0.9;
  transition: opacity var(--t-fast) var(--ease);
}
.hero-marquee-logo:hover img { opacity: 1; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.hero-marquee::before,
.hero-marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}
.hero-marquee::before { left: 0;  background: linear-gradient(90deg, rgba(8,6,4,0.55), rgba(8,6,4,0)); }
.hero-marquee::after  { right: 0; background: linear-gradient(270deg, rgba(8,6,4,0.55), rgba(8,6,4,0)); }

/* =========================================================
   PAGE HERO (inner pages)
   ========================================================= */

.page-hero {
  padding-top: clamp(140px, 14vw, 180px);
  padding-bottom: clamp(56px, 7vw, 80px);
  background: var(--bg);
  text-align: center;
}
.page-hero-eyebrow { margin-bottom: 20px; justify-content: center; display: inline-flex; }
.page-hero h1 { max-width: 18ch; margin-inline: auto; margin-bottom: 22px; }
.page-hero .body-lg { max-width: 58ch; margin-inline: auto; }

/* =========================================================
   SECTION SHELL
   ========================================================= */

.section {
  position: relative;
  padding-block: var(--pad-y);
}
.section.is-warm { background: var(--bg-warm); }
.section.is-dark { background: var(--ink-2); color: var(--on-dark); }
.section.is-dark h1, .section.is-dark h2, .section.is-dark h3 { color: var(--on-dark); }
.section.is-dark p { color: var(--on-dark-2); }

.section-head { margin-bottom: clamp(40px, 5vw, 64px); max-width: 64ch; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { margin-bottom: 18px; }
.section-head p { font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; }
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-head.is-center .eyebrow { justify-content: center; display: inline-flex; }

/* =========================================================
   "Every case. One workspace" — 3 image-card grid
   ========================================================= */

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
}
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr; } }

.feat-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.feat-card-media {
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-warm);
  aspect-ratio: 4 / 3;
  position: relative;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
}
.feat-card-media > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.feat-card-text h3 { margin-bottom: 10px; }
.feat-card-text p { font-size: 15px; line-height: 1.6; }

/* live DC product demos embedded in the cards */
.feat-card-media.is-demo {
  aspect-ratio: 16 / 9;
  background: #DCD8D2;
  border: 1px solid var(--line-2);
}
.feat-card-media.is-demo .demo-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}
.feat-card-media.is-demo .demo-video {
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.feat-card-media.is-demo .demo-video.is-ready { opacity: 1; }

/* =========================================================
   "Legal work shouldn't be scattered" — vertical stack
   ========================================================= */

.layers-list {
  border-top: 1px solid var(--line-2);
}
.layer-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.5fr) 2fr;
  gap: clamp(24px, 6vw, 96px);
  align-items: start;
  padding: clamp(36px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--line-2);
}
.layer-num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-feature-settings: "lnum" 1;
}
.layer-body { max-width: 60ch; }
.layer-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 36px);
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 10px;
}
[dir="rtl"] .layer-title { font-family: var(--serif-ar); letter-spacing: 0; }
.layer-lead {
  font-family: var(--sans);
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 14px;
}
[dir="rtl"] .layer-lead { font-family: var(--sans-ar); }
.layer-desc {
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.68;
  color: var(--body);
  margin: 0;
  text-wrap: pretty;
}
.layer-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-3);
  transition: border-color var(--t-fast) var(--ease), gap var(--t-fast) var(--ease);
}
[dir="rtl"] .layer-link { font-family: var(--sans-ar); }
.layer-link .arrow { transition: transform 0.25s var(--ease-out); }
.layer-link:hover { border-color: var(--ink); gap: 13px; }
.layer-link:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .layer-link:hover .arrow { transform: translateX(-4px); }

@media (max-width: 760px) {
  .layer-row { grid-template-columns: 1fr; gap: 14px; }
  .layer-num { font-size: 34px; }
}

/* =========================================================
   PILL BAND — sticky text + pill list
   ========================================================= */

.pills-section {
  padding-block: var(--pad-y);
  background: var(--ink-2);
  color: var(--on-dark);
}
.pills-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 900px) { .pills-grid { grid-template-columns: 1fr; } }
.pills-left { position: sticky; top: 128px; }
/* Drop the sticky pin once stacked, or the intro text overlaps the pills.
   Declared AFTER the base rule so it wins on source order at <=900px. */
@media (max-width: 900px) {
  .pills-left { position: static; top: auto; }
}
.pills-left h2 { color: var(--on-dark); margin-bottom: 18px; }
.pills-left p { color: var(--on-dark-2); }

.pills-list { display: flex; flex-direction: column; gap: 14px; }
.pill-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  color: var(--on-dark);
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.pill-link:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); transform: translateX(4px); }
[dir="rtl"] .pill-link:hover { transform: translateX(-4px); }
.pill-link-l { display: flex; align-items: baseline; gap: 14px; }
.pill-link-l .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.55;
}
.pill-link-l .label {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.02em;
}
[dir="rtl"] .pill-link-l .label { font-family: var(--serif-ar); }
.pill-link-l .desc {
  font-size: 13px;
  color: var(--on-dark-2);
  display: block;
  margin-top: 4px;
}
.pill-link-r { font-size: 18px; opacity: 0.55; }

/* =========================================================
   CTA BAND
   ========================================================= */

.cta-band {
  background: var(--ink-2);
  color: var(--on-dark);
  padding-block: clamp(44px, 5.5vw, 68px);
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--on-dark);
  max-width: 22ch;
  margin: 0;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  background: #0A0A0A;
  color: var(--on-dark);
  padding-top: 52px;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { max-width: 30ch; }
.footer-brand svg { height: 32px; color: #FFFFFF; margin-bottom: 18px; }
.footer-brand p { color: var(--on-dark-2); font-size: 14px; line-height: 1.65; }
.footer-social { margin-top: 18px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  color: var(--on-dark-2);
  border: 1px solid rgba(255,255,255,0.14);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.footer-social a:hover { color: #FFFFFF; border-color: rgba(255,255,255,0.32); background: rgba(255,255,255,0.06); }
.footer-social a svg { width: 20px; height: 20px; margin: 0; color: inherit; }
.footer-col h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  margin-bottom: 18px;
}
[dir="rtl"] .footer-col h4 { font-family: var(--sans-ar); letter-spacing: 0; text-transform: none; font-size: 13px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--on-dark-2);
  font-size: 14px;
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--on-dark); }

.footer-wordmark {
  position: relative;
  height: clamp(110px, 14vw, 168px);   /* enough of the mark to read as the logo, still tighter than before */
  overflow: hidden;
  margin-top: -10px;   /* sit the wordmark a touch higher (both languages) */
}
.footer-wordmark svg {
  position: absolute;
  top: 0;                              /* anchor top; bottom ~44% is cropped at the hairline */
  left: 0;
  width: 100%;
  height: auto;
  color: var(--on-dark);
  opacity: 0.96;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--on-dark-3);
}

/* =========================================================
   MOTION primitives
   ========================================================= */

.reveal {
  opacity: 0.001;
  transform: translateY(20px);
  filter: blur(10px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out),
    filter 0.7s var(--ease-out);
  will-change: opacity, transform, filter;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal-sm {
  opacity: 0.001;
  transform: translateY(12px);
  filter: blur(4px);
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out),
    filter 0.5s var(--ease-out);
}
.reveal-sm.is-in { opacity: 1; transform: translateY(0); filter: blur(0); }
.reveal-slide {
  opacity: 0.3;
  transform: translateX(-80px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}
.reveal-slide.is-in { opacity: 1; transform: translateX(0); }
[dir="rtl"] .reveal-slide { transform: translateX(80px); }
[dir="rtl"] .reveal-slide.is-in { transform: translateX(0); }

.reveal-stagger > * { transition-delay: 0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-sm, .reveal-slide {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .hero-marquee-track { animation: none !important; }
}

/* =========================================================
   FORM
   ========================================================= */

.form-card {
  background: var(--bg-warm);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-card);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.col-span-2 { grid-column: span 2; }
@media (max-width: 700px) { .form-field.col-span-2 { grid-column: span 1; } }
.form-label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
[dir="rtl"] .form-label { font-family: var(--sans-ar); letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.form-label .req { color: var(--accent); margin-inline-start: 2px; }
.form-input, .form-select {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #E5E2DC;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease);
}
.form-input::placeholder { color: var(--body-2); }
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: #333333;
}
/* iOS Safari zooms the page when focusing an input under 16px — pin to 16px on
   phones. Declared after the base rule so it wins on source order at <=760px. */
@media (max-width: 760px) {
  .form-input, .form-select { font-size: 16px; }
}
.form-submit {
  margin-top: 24px;
  width: 100%;
  background: var(--btn-dark);
  color: var(--on-dark);
  border-radius: 999px;
  padding: 16px 24px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background var(--t-fast) var(--ease);
}
.form-submit:hover { background: #1A1A1A; }
.form-submit:disabled { opacity: 0.6; cursor: default; }
.form-submit:disabled:hover { background: var(--btn-dark); }
.form-submit .arrow { transition: transform var(--t-fast) var(--ease); }
.form-submit:hover .arrow { transform: translateX(4px); }

/* honeypot — visually hidden, off-screen, never focusable by humans */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* inline submission error */
.form-error {
  margin-top: 18px;
  padding: 12px 16px;
  background: #FBECE7;
  border: 1px solid #E8C3B4;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--accent-2);
}
[dir="rtl"] .form-error { font-family: var(--sans-ar); }

/* success panel (replaces the form after submit) */
.contact-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  min-height: 280px;
}
.contact-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
}
.contact-success-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0 0;
}
[dir="rtl"] .contact-success-title { font-family: var(--sans-ar); }
.contact-success-text {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--body-2);
  max-width: 44ch;
  margin: 0;
}
[dir="rtl"] .contact-success-text { font-family: var(--sans-ar); }
.form-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--body-2);
}
.form-foot a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

/* =========================================================
   FAQ accordion
   ========================================================= */

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.faq-item.is-open { background: #FFFFFF; border-color: var(--line-2); box-shadow: var(--shadow-card); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-align: start;
}
[dir="rtl"] .faq-q { font-family: var(--sans-ar); text-align: start; }
.faq-q-icon {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: transform 0.28s var(--ease-out);
}
.faq-item.is-open .faq-q-icon { transform: rotate(45deg); }
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s var(--ease-out);
}
.faq-item.is-open .faq-a { max-height: 320px; }
.faq-a-inner {
  padding: 0 26px 22px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.65;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.faq-item.is-open .faq-a-inner { opacity: 1; transform: translateY(0); }

/* =========================================================
   ABOUT page bits
   ========================================================= */

.about-shot {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-warm);
}
.manifesto p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 36px;
  max-width: 30ch;
}
[dir="rtl"] .manifesto p { font-family: var(--serif-ar); letter-spacing: 0; }
.manifesto p + p { color: var(--body); }
/* scroll-linked focus state */
.manifesto p { opacity: 0.28; transition: opacity 0.4s var(--ease); }
.manifesto p.is-focused { opacity: 1; }

.benefit-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 800px) { .benefit-cards { grid-template-columns: 1fr; } }
.benefit-card {
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.benefit-card h3 {
  font-size: clamp(22px, 2.1vw, 28px);
  letter-spacing: -0.02em;
}
.benefit-card p { font-size: 15px; line-height: 1.65; }
.benefit-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--ink-2);
  color: var(--on-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

/* =========================================================
   MEDIA placeholders for the home cards
   ========================================================= */

.demo-pad {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.demo-pad-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(184, 106, 63, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg-warm), #FFFFFF);
}
.demo-pad-frame {
  position: relative;
  width: 88%;
  height: 80%;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(15,15,15,0.10), 0 1px 0 rgba(15,15,15,0.04);
  display: flex;
  overflow: hidden;
}

/* =========================================================
   Hero stagger entrance — runs on page load (not scroll)
   ========================================================= */

/* Hero entrance — pure CSS keyframes that auto-play on mount.
   `both` fill-mode holds the start state during the stagger delay and the
   end state afterward, so no JS class toggling is needed (robust against
   rAF throttling inside preview iframes). */
@keyframes heroIn {
  from { opacity: 0.001; transform: translateY(22px); filter: blur(10px); }
  to   { opacity: 1;     transform: translateY(0);    filter: blur(0);    }
}
.hero .hero-eyebrow { animation: heroIn 0.8s var(--ease-out) 0.05s both; }
.hero .hero-h1      { animation: heroIn 0.9s var(--ease-out) 0.18s both; }
.hero .hero-sub     { animation: heroIn 0.8s var(--ease-out) 0.42s both; }
.hero .hero-actions { animation: heroIn 0.8s var(--ease-out) 0.62s both; }

@media (prefers-reduced-motion: reduce) {
  .hero .hero-eyebrow,
  .hero .hero-h1,
  .hero .hero-sub,
  .hero .hero-actions { animation: none; opacity: 1; transform: none; filter: none; }
}

/* =========================================================
   Helpers
   ========================================================= */
.muted { color: var(--body); }
.tac { text-align: center; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.flex { display: flex; }
.gap-3 { gap: 12px; }


/* ============================================================
   Inline mocks inside demo-pad-frame — scale to thumbnail size
   ============================================================ */
.demo-pad-frame .mck {
  min-height: 0 !important;
  height: 100%;
  width: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 12px;
}
.feat-card-media .demo-pad-frame .mck { font-size: 11px; }

/* compact a few inner heights when used as thumbnails */
.feat-card-media .mck-bld-canvas { min-height: 0 !important; }
.feat-card-media .mck-wf-grid { grid-template-columns: repeat(2, 1fr) !important; }
.feat-card-media .mck-wf .mck-wf-newcard { display: none; }

/* For Drafting/Contract mocks shown as thumbnails — keep grids visible */
.feat-card-media .mck-doc-page,
.feat-card-media .mck-edit-page,
.feat-card-media .mck-doc-side,
.feat-card-media .mck-edit-side { padding: 14px 18px; font-size: 11.5px; line-height: 1.5; }


.nav-mid {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Hamburger toggle + mobile menu panel — hidden on desktop */
.nav-toggle { display: none; }
.nav-mobile { display: none; }

@media (max-width: 760px) {
  .nav-mid { display: none; }
  .nav-right .navlink { display: none; }

  .nav-inner { gap: 14px; }

  /* Hamburger button — 44px touch target, theme-aware */
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-inline-start: 2px;
    border-radius: 10px;
    flex: none;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 1.6px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.3s var(--ease-out), opacity 0.2s var(--ease-out);
  }
  .nav.is-dark .nav-toggle { color: var(--on-dark); }
  .nav.is-light .nav-toggle { color: var(--ink); }
  /* keep the toggle visible/legible while the menu overlay is open */
  .nav.is-menu-open .nav-toggle { color: var(--ink); }
  .nav.is-menu-open.is-dark .nav-toggle { color: var(--on-dark); }

  /* hamburger → X */
  .nav.is-menu-open .nav-toggle span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
  .nav.is-menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.is-menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

  /* Slim the inline CTA so logo + CTA + toggle fit on a 360px phone */
  .nav .nav-cta { padding: 8px 14px; }

  /* Dropdown panel */
  .nav-mobile {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.38s var(--ease-out), opacity 0.25s var(--ease-out);
    border-top: 1px solid transparent;
  }
  .nav.is-menu-open .nav-mobile {
    max-height: 80vh;
    opacity: 1;
  }
  /* Solid (fully opaque) surfaces — a translucent panel + nested
     backdrop-filter let the page text bleed through on the light theme. */
  .nav.is-dark .nav-mobile {
    background: #0F0F0F;
    border-top-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.55);
  }
  .nav.is-light .nav-mobile {
    background: var(--bg);
    border-top-color: var(--line);
    box-shadow: 0 24px 48px -24px rgba(15, 15, 15, 0.18);
  }
  .nav-mobile-inner {
    display: flex;
    flex-direction: column;
    padding: 6px var(--gutter) 22px;
  }
  .nav-mobile-link {
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 500;
    padding: 15px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav.is-light .nav-mobile-link { border-bottom-color: var(--line); }
  .nav.is-dark .nav-mobile-link { color: var(--on-dark); }
  .nav.is-light .nav-mobile-link { color: var(--ink); }
  .nav-mobile-link.is-active { color: var(--accent); }
  .nav-mobile-cta {
    margin-top: 18px;
    width: 100%;
    padding: 14px 22px;
    font-size: 15px;
  }
  .nav.is-dark .nav-mobile-cta { background: #FFFFFF; color: var(--ink); }
}

/* ===========================================================
   NAV — Product hover mega-menu (chevron flips, panel fades in)
   =========================================================== */
.nav-dd { position: relative; display: inline-flex; }
.nav-dd-trigger { display: inline-flex; align-items: center; gap: 5px; }
.navlink .chev {
  display: inline-block;
  transform-origin: 50% 55%;
  transition: transform var(--t-fast) var(--ease-out), opacity var(--t-fast) var(--ease-out);
}
.nav-dd:hover .chev,
.nav-dd:focus-within .chev { transform: rotate(180deg); opacity: 1; }

.nav-mega {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 80;
  padding-top: 14px;               /* invisible bridge: no gap to flicker through */
  transform: translateX(-50%) translateY(-6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out),
              visibility 0s linear var(--t-base);
}
.nav-dd:hover .nav-mega,
.nav-dd:focus-within .nav-mega,
.nav-mega:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out),
              visibility 0s;
}
.nav-mega-card {
  width: 560px;
  max-width: calc(100vw - 40px);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  padding: 18px;
}
.nav-mega-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 10px 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.nav-mega-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.nav-mega-tag { font-size: 13px; color: var(--body); }
.nav-mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.nav-mega-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease-out);
}
.nav-mega-item:hover { background: var(--bg-cream); }
.nav-mega-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-mega-item-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.nav-mega-arrow {
  font-size: 13px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.nav-mega-item:hover .nav-mega-arrow { opacity: 1; transform: translateX(0); }
.nav-mega-item-desc { font-size: 12px; line-height: 1.45; color: var(--body-2); }

@media (max-width: 760px) { .nav-mega { display: none; } }

/* ===========================================================
   CONTACT — book-a-demo split (vertical intro + form)
   =========================================================== */
.contact-section {
  padding-top: clamp(118px, 14vw, 170px);
  padding-bottom: clamp(64px, 8vw, 104px);
  background: var(--bg);
}
.contact-split {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.contact-intro { position: sticky; top: clamp(96px, 12vh, 132px); }
.contact-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 14px 0 18px;
}
.contact-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  max-width: 44ch;
}
.contact-points {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.contact-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--body);
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.contact-points li:first-child { border-top: none; padding-top: 4px; }
.contact-point-mark { color: var(--accent); flex: none; }
.contact-form { margin: 0; width: 100%; }

@media (max-width: 920px) {
  .contact-split { grid-template-columns: 1fr; gap: 34px; }
  .contact-intro { position: static; }
}

/* ===========================================================
   FOOTER — phone layout (from the builder's Phone mode export)
   Wide screens keep the desktop footer; below ~600px it stacks:
   tagline -> Navigation -> Legal, then the cropped wathiq, then
   the © / Made-in-Saudi bar on its own lines.
   =========================================================== */
@media (max-width: 600px) {
  .footer { padding-top: 56px; }
  .footer-grid {
    grid-template-columns: 1fr;     /* stack tagline / Navigation / Legal */
    gap: 26px;
    padding-bottom: 34px;
  }
  .footer-brand { max-width: none; }
  .footer-wordmark {
    height: clamp(50px, 16vw, 78px);    /* full-bleed wathiq, boldly cropped like desktop */
    margin-top: 20px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    padding: 18px 0;
  }
}

/* Very small phones — scale the footer down a touch so it never feels oversized */
@media (max-width: 380px) {
  .footer { padding-top: 44px; }
  .footer-grid { gap: 20px; padding-bottom: 26px; }
  .footer-brand p { font-size: 13.5px; }
  .footer-col h4 { font-size: 10px; margin-bottom: 12px; }
  .footer-col a { font-size: 13.5px; line-height: 1.9; }
  .footer-wordmark { height: clamp(34px, 13.5vw, 50px); margin-top: 12px; }
  .footer-bottom { font-size: 11px; padding: 14px 0; }
}

/* ===========================================================
   BIG SCREENS — spread the nav + hero toward the edges.
   Logo and "Request a Demo" kept symmetric (equal margins).
   Tuned in the layout playground (_layout-playground.html).
   =========================================================== */
@media (min-width: 1500px) {
  .nav .container  { max-width: 1288px; }
  .nav-left  { margin-inline-start: -68px; }
  .nav-right { margin-inline-end:  -68px; }
  .hero .container { max-width: none; margin-inline: 0; padding-inline-start: 132px; }
  .hero-inner { padding-block: 160px 194px; }
}

/* ===========================================================
   ARABIC / RTL — type tuning, language switch, dual-lang hero
   =========================================================== */

/* Arabic script must never carry letter-spacing (it breaks cursive joining),
   and the Latin display classes set negative tracking — zero it out in RTL. */
html[dir="rtl"] body,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4,
html[dir="rtl"] .h-display, html[dir="rtl"] .h-1, html[dir="rtl"] .h-2, html[dir="rtl"] .h-3,
html[dir="rtl"] .hero-h1, html[dir="rtl"] .hero-sub, html[dir="rtl"] .cta-band h2,
html[dir="rtl"] .contact-title, html[dir="rtl"] .contact-lead, html[dir="rtl"] .layer-title,
html[dir="rtl"] .layer-lead, html[dir="rtl"] .pill-link-l .label, html[dir="rtl"] .manifesto p,
html[dir="rtl"] .benefit-card h3, html[dir="rtl"] .eyebrow, html[dir="rtl"] .btn,
html[dir="rtl"] .navlink, html[dir="rtl"] .label-mono, html[dir="rtl"] .nav-mega-eyebrow,
html[dir="rtl"] .nav-mega-tag, html[dir="rtl"] .pshow-title, html[dir="rtl"] .form-label,
html[dir="rtl"] .form-submit, html[dir="rtl"] .faq-q, html[dir="rtl"] .lang-switch,
html[dir="rtl"] .pshow-tab-label {
  letter-spacing: 0;
}

/* Long-form serif paragraphs read better in the Text cut than the Display cut. */
html[dir="rtl"] .manifesto p { font-family: var(--serif-text-ar); }

/* Mirror the hero video (poster + video + lighting overlay) in Arabic so its
   motion and light read naturally with the right-to-left layout. The hero text
   is a separate layer (.hero-inner) and is NOT flipped. */
html[dir="rtl"] .hero-video { transform: scaleX(-1); }

/* Arabic hero: full-opacity white text. The English headline is full white
   too (.muted now 100%); English still dims only the subhead (78%), while
   Arabic keeps the whole hero at 100% white for maximum legibility. */
html[dir="rtl"] .hero-h1,
html[dir="rtl"] .hero-h1 .muted,
html[dir="rtl"] .hero-sub,
html[dir="rtl"] .hero-eyebrow { color: #FFFFFF; }

/* Arrows point the other way in RTL (the glyph itself is flipped in JSX; this
   fixes the mega-menu arrow's slide-in offset direction). */
html[dir="rtl"] .nav-mega-arrow { transform: translateX(4px); }
html[dir="rtl"] .nav-mega-item:hover .nav-mega-arrow { transform: translateX(0); }

/* Dual-language static content (the hero lives as static HTML for instant
   paint): show only the active language's copy. lang is set on <html> by the
   inline head bootstrap before first paint, so there is no flash. */
/* Show only the active language's copy — but NOT the language-switch items
   themselves (they intentionally offer both languages as choices). */
html[lang="en"] [data-lang="ar"]:not(.lang-menu-item):not(.nav-mobile-link),
html[lang="ar"] [data-lang="en"]:not(.lang-menu-item):not(.nav-mobile-link) { display: none !important; }

/* Language switch — globe + target-language label */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  opacity: 0.9;
  transition: opacity var(--t-fast) var(--ease);
  white-space: nowrap;
}
.lang-switch:hover { opacity: 0.55; }
.lang-switch svg { width: 16px; height: 16px; display: block; opacity: 0.85; }
[dir="rtl"] .lang-switch { font-family: var(--sans-ar); }
.nav.is-dark .lang-switch { color: var(--on-dark); }
.nav.is-light .lang-switch { color: var(--ink); }

/* Mobile menu language row (lives inside the mobile panel, desktop-hidden) */
.nav-mobile-lang {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: start;
}
.nav-mobile-lang svg { width: 18px; height: 18px; opacity: 0.8; }

@media (max-width: 760px) {
  /* the desktop switch hides; the mobile menu carries its own language row */
  .nav-right .lang-switch { display: none; }
}

/* The hero logo marquee is decorative. In Arabic, force its internal geometry
   to LTR and keep the NORMAL scroll so it behaves identically to the proven
   English strip. The pre-existing RTL `direction` (flex max-content overflow)
   + reversed animation left a phase where the strip showed empty / the logos
   appeared late or intermittently. Forcing LTR makes them always present. */
html[dir="rtl"] .hero-marquee,
html[dir="rtl"] .hero-marquee-track { direction: ltr; }
html[dir="rtl"] .hero-marquee-track { animation-direction: normal; }

/* Arabic needs looser line-height than the tight Latin display values, or
   stacked heading lines overlap (dots + descenders collide — e.g. the
   "foundation" headline). */
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4,
html[dir="rtl"] .h-display, html[dir="rtl"] .h-1, html[dir="rtl"] .h-2,
html[dir="rtl"] .hero-h1, html[dir="rtl"] .cta-band h2, html[dir="rtl"] .contact-title,
html[dir="rtl"] .pshow-title, html[dir="rtl"] .layer-title,
html[dir="rtl"] .pill-link-l .label, html[dir="rtl"] .benefit-card h3 {
  line-height: 1.4;
}
html[dir="rtl"] .manifesto p { line-height: 1.7; }

/* ...but keep the home hero headline tight, like it was before (it's only two
   large lines, so it doesn't need the extra leading). */
html[dir="rtl"] .hero-h1 { line-height: 1.12; }

/* ============================================================
   FOOTER WORDMARK CROP — per view (desktop/tablet/phone) × per language.
   The giant wordmark is full-width with overflow:hidden, so the .footer-bottom
   divider line crops it. Two things make it read right:
     1) Keep the divider FLUSH with the crop — zero the bottom gap — so the line
        always cuts the characters and never floats below them. (A stray
        margin-bottom on the RTL mark + a mobile .footer-bottom margin-top used
        to push the line away, which read as "the line isn't cutting the word".)
     2) height sets how big the mark is; svg translateY chooses where the line
        lands. Tuned separately for ltr/rtl at each breakpoint.
   ============================================================ */
.footer-wordmark { margin-bottom: 0; }
.footer-bottom   { margin-top: 0; }

/* DESKTOP (base) */
html[dir="ltr"] .footer-wordmark { height: clamp(135px, 15vw, 240px); }
html[dir="ltr"] .footer-wordmark svg { transform: translateY(-8%); }
html[dir="rtl"] .footer-wordmark { height: clamp(144px, 16vw, 256px); }
html[dir="rtl"] .footer-wordmark svg { transform: translateY(-9%); }

/* TABLET */
@media (max-width: 900px) {
  html[dir="ltr"] .footer-wordmark { height: clamp(84px, 14vw, 126px); }
  html[dir="ltr"] .footer-wordmark svg { transform: translateY(-11%); }
  html[dir="rtl"] .footer-wordmark { height: clamp(93px, 15.5vw, 140px); }
  html[dir="rtl"] .footer-wordmark svg { transform: translateY(-10%); }
}

/* PHONE */
@media (max-width: 600px) {
  html[dir="ltr"] .footer-wordmark { height: clamp(51px, 16vw, 96px); }
  html[dir="ltr"] .footer-wordmark svg { transform: translateY(-4%); }
  html[dir="rtl"] .footer-wordmark { height: clamp(54px, 17vw, 102px); }
  html[dir="rtl"] .footer-wordmark svg { transform: translateY(-2%); }
}

/* Language switch as a globe button that opens a small language menu. */
.lang-switch-wrap { position: relative; display: inline-flex; }
.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 150px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              visibility 0s linear var(--t-fast);
  z-index: 90;
}
.lang-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}
.lang-menu-item {
  text-align: start;
  padding: 9px 14px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease);
}
[dir="rtl"] .lang-menu-item { font-family: var(--sans-ar); }
.lang-menu-item:hover { background: var(--bg-cream); }
html[lang="ar"] .lang-menu-item[data-lang="ar"],
html[lang="en"] .lang-menu-item[data-lang="en"] { color: var(--accent); font-weight: 600; }

/* Each language option always renders in its OWN font, regardless of the page's
   language — so "العربية" shows in Thmanyah even on the English site, and
   "English" shows in DM Sans even on the Arabic site. */
.lang-menu-item[data-lang="ar"],
.nav-mobile-link[data-lang="ar"] {
  font-family: 'Thmanyah Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
}
.lang-menu-item[data-lang="en"],
.nav-mobile-link[data-lang="en"] {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

/* Active language in the mobile menu */
html[lang="ar"] .nav-mobile-link[data-lang="ar"],
html[lang="en"] .nav-mobile-link[data-lang="en"] { color: var(--accent); }

/* Mobile menu: globe + label heading the two language choices */
.nav-mobile-lang-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 4px 4px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-3);
}
.nav-mobile-lang-head svg { width: 16px; height: 16px; }
[dir="rtl"] .nav-mobile-lang-head { font-family: var(--sans-ar); letter-spacing: 0; text-transform: none; font-size: 13px; }
.nav.is-light .nav-mobile-lang-head { border-top-color: var(--line); color: var(--body-2); }
