/* =========================================================
   PRIME SELLERS — Website stylesheet
   Built on Brand Guidelines v1.2
   Colors: #0B3D2E · #22C55E · #D97706 (accent ≤ 10–15%) · #F1F5F4 · #FFFFFF
   Type:   Inter (English) · IBM Plex Sans Arabic (Arabic)
   Direction-agnostic: uses CSS logical properties so the same
   file serves LTR (/) and RTL (/ar/). The logo is never mirrored.
   ========================================================= */

:root {
  --dark: #0B3D2E;
  --green: #22C55E;
  --orange: #D97706;
  --light: #F1F5F4;
  --white: #FFFFFF;

  --text: var(--dark);
  --text-muted: #4A6259;         /* dark green, softened for secondary copy (AA on white & light) */
  --line: #D6E0DC;

  --font-en: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Inter", Tahoma, "Segoe UI", Arial, sans-serif;
  --font: var(--font-en);

  --max: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 14px;
  --radius-sm: 8px;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  --step-4: clamp(2.125rem, 1.4rem + 3vw, 3.375rem);
}

html[dir="rtl"] { --font: var(--font-ar); }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body { line-height: 1.85; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; line-height: 1.4; }
p { margin: 0; }

/* Emails, links, numbers and codes stay LTR even on Arabic pages (Guidelines §11) */
.ltr { direction: ltr; unicode-bidi: isolate; font-family: var(--font-en); }

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

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  background: var(--dark);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

/* Logo: horizontal minimum is 180px digital (Guidelines §05) — never mirrored */
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand picture { display: block; }
.brand img { width: 196px; min-width: 180px; height: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-muted);
  padding-block: 6px;
}
.nav-links a:hover { color: var(--dark); }

.lang-switch {
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  color: var(--dark);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
}
.lang-switch:hover { border-color: var(--dark); }
.lang-switch[lang="ar"] { font-family: var(--font-ar); }
.lang-switch[lang="en"] { font-family: var(--font-en); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 44px; height: 44px;
  cursor: pointer;
  color: var(--dark);
}
.menu-toggle svg { margin: auto; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { display: block; padding-block: 14px; border-bottom: 1px solid var(--light); font-size: var(--step-0); }
  .lang-switch { align-self: flex-start; margin-top: 16px; }
  .brand img { width: 180px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--dark); color: var(--white); }
.btn-primary:hover { background: #072A20; }
.btn-secondary { background: transparent; color: var(--dark); border-color: var(--dark); }
.btn-secondary:hover { background: var(--light); }
.btn-light { background: var(--white); color: var(--dark); }
.btn-light:hover { background: var(--light); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 112px) clamp(64px, 9vw, 120px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-rule {
  width: 64px;
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: var(--step-4);
  max-width: 15ch;
}
html[dir="rtl"] .hero h1 { max-width: 16ch; }
.hero-lead {
  margin-top: 24px;
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 54ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* Graphic system: pattern derived from the approved symbol, enlarged and cropped off the page edge (§12) */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  margin-inline-end: calc(-1 * var(--gutter) - 8vw);
  border-start-start-radius: 28px;
  border-end-start-radius: 28px;
  overflow: hidden;
  background: var(--light) url("../img/pattern.webp") center / cover no-repeat;
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  /* soften so the pattern never competes with the logo or content (§12) */
  background: linear-gradient(to bottom, rgba(255,255,255,0.3) 40%, rgba(255,255,255,0.9));
}
html[dir="rtl"] .hero-visual {
  /* Mirror the layout, not the symbol: the pattern image keeps its original orientation */
  border-radius: 0;
  border-start-start-radius: 28px;
  border-end-start-radius: 28px;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual {
    aspect-ratio: 16 / 9;
    margin-inline: calc(-1 * var(--gutter));
    border-radius: 0;
    order: -1;
  }
  html[dir="rtl"] .hero-visual { border-radius: 0; }
}

/* ---------- Pillars under hero ---------- */
.pillars {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pillar {
  padding: 32px 28px 34px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.pillar + .pillar { border-inline-start: 1px solid var(--line); }
.pillar:first-child { padding-inline-start: 0; }
.pillar p { font-weight: 600; font-size: var(--step-0); line-height: 1.5; }
.icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--light);
  color: var(--dark);
}
.icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) {
  .pillars-grid { grid-template-columns: 1fr; }
  .pillar { padding-inline: 0; padding-block: 22px; }
  .pillar + .pillar { border-inline-start: 0; border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section-light { background: var(--light); }

.section-head { max-width: 680px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { margin-top: 16px; color: var(--text-muted); font-size: var(--step-1); }
.section-head::before {
  content: "";
  display: block;
  width: 40px; height: 3px;
  background: var(--orange);
  border-radius: 2px;
  margin-bottom: 22px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
}
.about-block h3 { font-size: var(--step-2); margin-bottom: 14px; }
.about-block p { color: var(--text-muted); max-width: 52ch; }
.about-block + .about-block { margin-top: 40px; }

.clarity {
  background: var(--light);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px);
  align-self: start;
}
.clarity h3 { font-size: var(--step-1); margin-bottom: 8px; }
.clarity > p { color: var(--text-muted); margin-bottom: 18px; }
.clarity ul { list-style: none; margin: 0; padding: 0; }
.clarity li {
  position: relative;
  padding-block: 14px;
  padding-inline-start: 26px;
  border-top: 1px solid var(--line);
}
.clarity li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 50%;
  width: 10px; height: 2px;
  background: var(--dark);
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* How it works */
.paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.path {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
}
.path-dark { background: var(--dark); color: var(--white); border-color: var(--dark); }
.path h3 { font-size: var(--step-2); }
.path-intro { margin-top: 10px; color: var(--text-muted); }
.path-dark .path-intro { color: #C9DAD3; }

.steps { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}
.path-dark .steps li { border-top-color: rgba(255,255,255,0.16); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-en);
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--dark); /* orange is not used for small text on white (§09) */
  padding-top: 3px;
}
.path-dark .steps li::before { color: var(--green); }
.steps strong { display: block; font-weight: 600; margin-bottom: 4px; }
.steps span { color: var(--text-muted); font-size: var(--step--1); line-height: 1.6; display: block; }
.path-dark .steps span { color: #C9DAD3; }
.path .btn { margin-top: 28px; }

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

/* Values */
.values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid var(--dark);
}
.value { padding: 28px 24px 8px 0; }
html[dir="rtl"] .value { padding: 28px 0 8px 24px; }
.value + .value { padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
.value h3 { font-size: var(--step-1); margin-bottom: 10px; }
.value p { color: var(--text-muted); font-size: var(--step--1); line-height: 1.7; }
@media (max-width: 960px) {
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .value:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .values { grid-template-columns: 1fr; }
  .value, .value + .value { padding-inline: 0; border-inline-start: 0; }
  .value + .value { border-top: 1px solid var(--line); }
}

/* Contact */
.contact { background: var(--dark); color: var(--white); position: relative; overflow: hidden; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}
.contact h2 { font-size: var(--step-3); max-width: 16ch; }
.contact .lead { margin-top: 18px; color: #C9DAD3; font-size: var(--step-1); max-width: 42ch; }
.contact-details { margin-top: 36px; display: grid; gap: 14px; }
.contact-details a {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--white); font-weight: 600;
}
.contact-details a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-details .icon { background: rgba(255,255,255,0.1); color: var(--white); }

.form {
  background: var(--white);
  color: var(--dark);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  display: grid;
  gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-size: var(--step--1); font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--dark);
  background: var(--white);
  border: 1px solid #B9C9C2;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--dark); box-shadow: 0 0 0 3px rgba(34,197,94,0.35);
}
.field input[type="email"], .field input[type="tel"] { direction: ltr; text-align: start; }
html[dir="rtl"] .field input[type="email"], html[dir="rtl"] .field input[type="tel"] { text-align: right; }

.radio-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.radio-group legend { padding: 0; margin-bottom: 8px; font-size: var(--step--1); font-weight: 600; }
.radio-options { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-options label {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #B9C9C2; border-radius: 999px;
  padding: 9px 16px; cursor: pointer; font-weight: 600; font-size: var(--step--1);
}
.radio-options input { accent-color: var(--dark); margin: 0; }
.radio-options label:has(input:checked) { border-color: var(--dark); background: var(--light); }

.form-note { font-size: var(--step--1); color: var(--text-muted); }
.form-status { font-size: var(--step--1); font-weight: 600; min-height: 1.4em; }
.form .btn { justify-self: start; }

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

/* ---------- Footer ---------- */
.site-footer { padding-block: 48px 36px; border-top: 1px solid var(--line); }
.footer-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding-bottom: 28px; border-bottom: 1px solid var(--line);
}
.footer-top .brand img { width: 180px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; font-size: var(--step--1); color: var(--text-muted); font-weight: 600; }
.footer-links a:hover { color: var(--dark); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 24px; font-size: var(--step--1); color: var(--text-muted);
}

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: 80px; }
.notfound h1 { font-size: var(--step-3); margin-bottom: 14px; }
.notfound p { color: var(--text-muted); margin-bottom: 28px; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- One orchestrated load moment (hero only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { opacity: 0; transform: translateY(12px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
  .hero-copy > *:nth-child(2) { animation-delay: .08s; }
  .hero-copy > *:nth-child(3) { animation-delay: .16s; }
  .hero-copy > *:nth-child(4) { animation-delay: .24s; }
  .hero-visual { opacity: 0; animation: fade 1s ease .2s forwards; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }

@media print {
  .site-header, .hero-visual, .form { display: none; }
  body { color: #000; }
}
