/* ============================================================
   YEIP — Landing / marketing page
   Shares the app's earthy palette (see yeip.css) but is fully
   self-contained: the dashboard shell is fixed-height/overflow
   hidden, which would break a page meant to scroll.
   ============================================================ */

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

:root {
  --forest:       #3e6675;
  --forest-dk:    #26364b;
  --forest-md:    #3e6675;
  --sage:         #f2fff5;
  --sage-lt:      #b0c9b4;
  --sage-dim:     #99ae9e;

  --cream:        #faf9f6;
  --parchment:    #34625d;
  --parchment-lt: #659791;
  --tan:          #d6cfc0;
  --tan-lt:       #e8e3d8;

  --critical:     #c0392b;
  --severe:       #cd853f;
  --moderate:     #b8a832;
  --normal:       #4a7c59;

  --text-dark:    #202220;
  --text-body:    #3c4440;
  --text-muted:   #6b7570;
  --text-faint:   #93a09a;
  --text-on-dark: #ffffff;

  /* WSI weight-bar accents, distinct from status colors above */
  --w-gw:   #26485a;
  --w-rain: #3e6675;
  --w-aq:   #6f9a92;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body.landing {
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.landing.lang-ar { font-family: 'Tajawal', var(--font-sans); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
i.ti { line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ── Page transition overlay ───────────────────────────────
   Plays on "Enter Dashboard" clicks (see landing.js). The dashboard's
   own app shell (static/css/yeip.css) defines the same two classes and
   starts with .is-active already applied, fading it back out on
   arrival — the two page loads read as one continuous motion. */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--forest-dk);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-transition-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-transition-mark {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transform: scale(0.7);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.page-transition-overlay.is-active .page-transition-mark { transform: scale(1); }

.page-transition-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Buttons ─────────────────────────────────────────────── */
.l-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.l-btn-primary {
  background: var(--forest-dk);
  color: var(--text-on-dark);
  box-shadow: 0 2px 10px rgba(38, 54, 75, 0.25);
}
.l-btn-primary:hover { background: var(--forest); transform: translateY(-1px); }

.l-btn-ghost {
  background: transparent;
  color: var(--forest-dk);
  border: 1.5px solid var(--tan);
}
.l-btn-ghost:hover { border-color: var(--forest-dk); background: rgba(38,54,75,0.04); }

.l-btn-sm { padding: 7px 14px; font-size: 12.5px; }
.l-btn-lg { padding: 15px 30px; font-size: 15.5px; }

/* ── Nav ─────────────────────────────────────────────────── */
.l-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(250, 249, 246, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.l-nav.is-scrolled {
  background: rgba(250, 249, 246, 0.92);
  border-bottom-color: var(--tan);
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}

.l-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
}

.l-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  color: var(--forest-dk);
  letter-spacing: 0.2px;
  flex-shrink: 0;
}
.l-brand img { width: 28px; height: 28px; border-radius: 6px; }

.l-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;
}
.l-nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.l-nav-links a:hover { color: var(--forest-dk); }

.l-nav-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.l-lang-switch {
  display: flex;
  border: 1px solid var(--tan);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.l-lang-switch a {
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.l-lang-switch a.active { background: var(--forest-dk); color: var(--text-on-dark); }
.l-lang-switch a:not(.active):hover { background: var(--tan-lt); }

@media (max-width: 860px) {
  .l-nav-links { display: none; }
}

/* ── Hero ────────────────────────────────────────────────── */
.l-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  text-align: center;
}

.l-hero-inner { max-width: 780px; margin: 0 auto; }

.l-hero-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--tan-lt);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 22px;
}

.l-hero-title {
  font-size: clamp(32px, 5.2vw, 54px);
  font-weight: 800;
  line-height: 1.18;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}
.l-hero-title span { display: block; }
.l-hero-title-accent { color: var(--forest); }

.l-hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 34px;
}

.l-hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.l-hero-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-faint);
}

.l-hero-note i { font-size: 14px; color: var(--parchment); }

.l-hero-stats {
  max-width: 980px;
  margin: 72px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--tan);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.l-stat {
  background: #fff;
  padding: 22px 16px;
  text-align: center;
}
.l-stat-value {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: var(--forest-dk);
  line-height: 1.1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.l-stat-static { font-size: 22px; }
.l-stat-label { font-size: 11.5px; color: var(--text-faint); line-height: 1.4; }

@media (max-width: 700px) {
  .l-hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Sections (generic) ─────────────────────────────────── */
.l-section { padding: 88px 24px; }
.l-section-alt { background: var(--tan-lt); }
.l-section-inner { max-width: 1080px; margin: 0 auto; }

.l-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--parchment);
  margin-bottom: 12px;
}

.l-section-title {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.3px;
  margin-bottom: 16px;
  max-width: 680px;
}

.l-section-sub {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 48px;
}

/* ── Problem grid ────────────────────────────────────────── */
.l-problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.l-problem-card {
  background: #fff;
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
}
.l-problem-card i { font-size: 26px; color: var(--forest); margin-bottom: 14px; }
.l-problem-card h3 { font-size: 16.5px; color: var(--text-dark); margin-bottom: 8px; }
.l-problem-card p { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }

@media (max-width: 860px) {
  .l-problem-grid { grid-template-columns: 1fr; }
}

/* ── Pipeline ────────────────────────────────────────────── */
.l-pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.l-pipeline-line {
  position: absolute;
  top: 44px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--tan) 0 8px, transparent 8px 16px);
  z-index: 0;
}

.l-pipeline-step {
  position: relative;
  z-index: 1;
  background: var(--cream);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}

.l-pipeline-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--tan);
  margin-bottom: 10px;
}
.l-pipeline-step i { font-size: 24px; color: var(--forest); margin-bottom: 12px; }
.l-pipeline-step h3 { font-size: 15.5px; color: var(--text-dark); margin-bottom: 8px; }
.l-pipeline-step p { font-size: 13px; line-height: 1.55; color: var(--text-muted); }

@media (max-width: 860px) {
  .l-pipeline { grid-template-columns: 1fr; }
  .l-pipeline-line { display: none; }
}

/* ── WSI formula ─────────────────────────────────────────── */
.l-wsi-formula {
  background: #fff;
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  margin-bottom: 26px;
}

.l-wsi-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--tan-lt);
}
.l-wsi-row:last-child { border-bottom: none; }

.l-wsi-label { flex: 0 0 260px; font-size: 13.5px; color: var(--text-dark); font-weight: 500; }
.l-wsi-label em { font-style: normal; color: var(--text-faint); font-weight: 400; }

.l-wsi-track {
  flex: 1;
  height: 10px;
  background: var(--tan-lt);
  border-radius: 6px;
  overflow: hidden;
}
.l-wsi-fill { height: 100%; width: 0%; border-radius: 6px; transition: width 1.1s cubic-bezier(.4,0,.2,1); }

.l-wsi-pct { flex: 0 0 44px; text-align: end; font-size: 13px; font-weight: 700; color: var(--text-dark); }

@media (max-width: 700px) {
  .l-wsi-row { flex-wrap: wrap; }
  .l-wsi-label { flex-basis: 100%; }
  .l-wsi-pct { order: 3; }
}

.l-wsi-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.l-scale-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.l-scale-item strong { color: var(--text-dark); }
.l-scale-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Modules grid ────────────────────────────────────────── */
.l-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.l-module-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
}
.l-module-card.is-soon { opacity: 0.72; }
.l-module-card i { font-size: 24px; color: var(--forest); margin-bottom: 14px; }
.l-module-card h3 { font-size: 15.5px; color: var(--text-dark); margin-bottom: 8px; }
.l-module-card p { font-size: 13px; line-height: 1.55; color: var(--text-muted); }

.l-module-badge {
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--tan-lt);
  color: var(--text-faint);
}
.l-module-badge.is-live { background: #eaf3ec; color: var(--normal); }

@media (max-width: 860px) {
  .l-modules-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .l-modules-grid { grid-template-columns: 1fr; }
}

/* ── Sources grid ────────────────────────────────────────── */
.l-sources-grid {
  display: grid;
  /* auto-fit rather than a fixed repeat(4,...) — was written for
     exactly 4 cards; a 5th (elevation/SRTM) left one card alone at 25%
     width in its own row instead of the grid distributing evenly. */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.l-source-card {
  background: var(--forest-dk);
  color: var(--sage);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}
.l-source-card h3 { font-size: 16px; color: #fff; margin-bottom: 8px; }
.l-source-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--sage-lt);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 12px;
}
.l-source-card p { font-size: 12.5px; line-height: 1.6; color: var(--sage-lt); }

@media (max-width: 860px) {
  .l-sources-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .l-sources-grid { grid-template-columns: 1fr; }
}

/* ── Final CTA band ──────────────────────────────────────── */
.l-cta-band {
  background: linear-gradient(135deg, var(--forest-dk), var(--forest));
  padding: 80px 24px;
  text-align: center;
}
.l-cta-inner { max-width: 640px; margin: 0 auto; }
.l-cta-inner h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.35;
}
.l-cta-sub {
  font-size: 14.5px;
  color: var(--sage-lt);
  margin-bottom: 28px;
}
.l-cta-inner .l-btn-primary { background: #fff; color: var(--forest-dk); }
.l-cta-inner .l-btn-primary:hover { background: var(--sage-lt); }

.l-cta-features {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
}
.l-cta-features li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--sage-lt);
}
.l-cta-features i { font-size: 14px; color: #fff; }

/* ── Footer ──────────────────────────────────────────────── */
.l-footer {
  background: var(--forest-dk);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 30px 24px;
}
.l-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.l-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sage-lt);
}
.l-footer-brand img { width: 22px; height: 22px; border-radius: 5px; }
.l-footer-brand > div { display: flex; flex-direction: column; gap: 3px; }
.l-footer-tag { font-size: 11px; font-weight: 400; color: var(--sage-dim); }
.l-footer-links { display: flex; gap: 20px; }
.l-footer-links a { font-size: 12.5px; color: var(--sage-lt); }
.l-footer-links a:hover { color: #fff; }

/* ── Scroll-reveal base state (animated by landing.js) ──── */
.l-reveal {
  opacity: 0;
  transform: translateY(24px);
}
.no-js .l-reveal,
.reduced-motion .l-reveal {
  opacity: 1;
  transform: none;
}

/* ── Page header (non-hero inner pages: How it Works, Methodology,
   Contact) — same vocabulary as .l-hero (eyebrow/title/sub) but
   compact, no stats strip/CTAs, since these pages aren't the front
   door. ──────────────────────────────────────────────────────── */
.l-page-header {
  max-width: 780px;
  margin: 0 auto;
  padding: 72px 24px 8px;
  text-align: center;
}
.l-page-header .l-eyebrow { display: inline-block; }
.l-page-header h1 {
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-dark);
  letter-spacing: -0.4px;
  margin-bottom: 16px;
}
.l-page-header p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ── Module detail list (How it Works — one full-width row per
   module, more room for "simple and detailed" explanations than the
   homepage's compact 3-column module cards). ──────────────────── */
.l-module-detail-list { display: flex; flex-direction: column; gap: 18px; }

.l-module-detail {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
}
.l-module-detail.is-soon { opacity: 0.8; }

.l-module-detail-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--tan-lt);
  color: var(--forest);
  font-size: 20px;
}

.l-module-detail-body { flex: 1; min-width: 0; }
.l-module-detail-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.l-module-detail-head h3 { font-size: 17px; color: var(--text-dark); }
.l-module-detail-body p { font-size: 14px; line-height: 1.65; color: var(--text-muted); }
.l-module-detail-body p + p { margin-top: 8px; }

/* Reuses .l-module-badge's look (defined above) at inline position
   instead of absolute, since this layout has room for it inline. */
.l-module-detail .l-module-badge {
  position: static;
  display: inline-block;
}

@media (max-width: 700px) {
  .l-module-detail { flex-direction: column; }
}

/* ── Contact form ────────────────────────────────────────── */
.l-contact-form {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.l-form-group { margin-bottom: 20px; }
.l-form-group:last-of-type { margin-bottom: 0; }

.l-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 7px;
}

.l-form-input,
.l-form-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text-dark);
  background: var(--cream);
  border: 1.5px solid var(--tan);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color 0.15s ease;
}
.l-form-input:focus,
.l-form-textarea:focus { outline: none; border-color: var(--forest); }
.l-form-textarea { resize: vertical; min-height: 120px; }

.l-form-input.has-error,
.l-form-textarea.has-error { border-color: var(--critical); }
.l-form-error {
  display: block;
  font-size: 12px;
  color: var(--critical);
  margin-top: 5px;
}

.l-form-submit { width: 100%; justify-content: center; margin-top: 6px; }

.l-form-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.l-form-banner.is-success { background: #eaf3ec; color: var(--normal); }
.l-form-banner i { font-size: 17px; }
