/* Al-Amaanah United International — shared styles (Arabic RTL + English LTR)
   Uses logical properties (margin-inline, padding-block, inset-inline…) so one
   stylesheet serves both directions. */

:root {
  --navy: #023259;
  --navy-700: #0b4a7d;
  --navy-900: #01223d;
  --navy-50: #eef3f8;
  --green: #2d861c;
  --green-700: #236b15;
  --green-400: #5fbf4a;
  --green-50: #edf5ea;
  --sand-50: #f6f3ec;
  --ink: #10243a;
  --muted: #4b5f74;
  --line: #dde5ee;
  --white: #fff;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgb(2 50 89 / .06), 0 8px 24px rgb(2 50 89 / .08);
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 112px);
  --header-h: 76px;

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body { font-size: 1.0625rem; line-height: 1.9; }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 .5em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.45; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

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

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

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tint { background: var(--navy-50); }
.section--sand { background: var(--sand-50); }

/* Eyebrow with the logo's twin diamonds */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green-700); margin: 0 0 14px;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .95rem; }
.eyebrow::before {
  content: ""; width: 22px; height: 8px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 8'%3E%3Cpath d='M4 0 8 4 4 8 0 4ZM14 0l4 4-4 4-4-4Z' fill='%232d861c'/%3E%3C/svg%3E") center / contain no-repeat;
}

.section-head { max-width: 720px; margin-block-end: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
.section-head p { color: var(--muted); font-size: 1.0625rem; }
.section-head--center { margin-inline: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: var(--white); }
.btn--primary:hover { background: var(--green-700); color: var(--white); }
.btn--ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--ghost:hover { background: var(--navy); color: var(--white); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn .arrow { width: 18px; height: 18px; flex: none; }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 18px rgb(2 50 89 / .06); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; flex: none; }
.brand img { height: 44px; width: auto; }

.site-nav { margin-inline-start: auto; }
.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 10px;
  color: var(--navy); text-decoration: none; font-weight: 500;
}
.site-nav a:hover { background: var(--navy-50); color: var(--navy); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--navy); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.lang-switch:hover { border-color: var(--navy); color: var(--navy); }
.header-cta { min-height: 42px; padding: 8px 20px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); color: var(--navy); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; inset-inline: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px rgb(2 50 89 / .08);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 12px 8px; border-bottom: 1px solid var(--navy-50); border-radius: 0; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 420px) {
  .brand img { height: 36px; }
  .lang-switch { padding: 6px 10px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 10%, rgb(45 134 28 / .08), transparent 60%),
    linear-gradient(180deg, var(--white), var(--navy-50));
}
[dir="rtl"] .hero { background:
    radial-gradient(900px 500px at 15% 10%, rgb(45 134 28 / .08), transparent 60%),
    linear-gradient(180deg, var(--white), var(--navy-50)); }
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(48px, 8vw, 104px);
}
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.25rem); letter-spacing: -.02em; margin-block-end: .35em; }
html[lang="ar"] .hero h1 { letter-spacing: 0; }
.hero h1 .accent { color: var(--green); }
.hero-sub { font-size: clamp(1.25rem, 2.2vw, 1.5rem); color: var(--navy-700); font-weight: 500; margin-block-end: .75em; }
.hero-lead { font-size: 1.0625rem; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 28px 32px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.hero-tags li {
  padding: 6px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line);
  font-size: .9rem; color: var(--navy); font-weight: 500;
}
.hero-art img { width: 100%; max-width: 560px; margin-inline: auto; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 380px; }
}

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-art img { width: 100%; max-width: 480px; margin-inline: auto; }
.prose p { color: var(--muted); font-size: 1.0625rem; }
.prose h3 { font-size: 1.25rem; margin-block-start: 1.5em; }

.callout {
  margin-block-start: 28px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--green-50); border-inline-start: 4px solid var(--green);
}
.callout h3 { margin: 0 0 .35em; font-size: 1.125rem; }
.callout p { margin: 0; color: var(--ink); }

.experience { margin-block-start: clamp(48px, 7vw, 80px); }
.experience h3 { font-size: 1.25rem; margin-block-end: 18px; }
.experience-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; }
.experience-grid li {
  padding: 22px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line);
}
.experience-grid strong { display: block; color: var(--navy); font-size: 1.0625rem; margin-block-end: 4px; }
.experience-grid span { color: var(--muted); font-size: .95rem; }
.experience-grid .highlight { background: var(--navy); border-color: var(--navy); }
.experience-grid .highlight strong { color: var(--white); font-size: 1.75rem; line-height: 1.2; }
.experience-grid .highlight span { color: #c9d7e6; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-art img { max-width: 360px; }
  .experience-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .experience-grid { grid-template-columns: 1fr; } }

/* ---------- Values ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; }
.value {
  padding: 28px 24px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow);
}
.value .diamond {
  width: 44px; height: 44px; margin-block-end: 18px; border-radius: 10px;
  background: var(--navy-50); display: grid; place-items: center;
}
.value .diamond::after { content: ""; width: 14px; height: 14px; background: var(--green); transform: rotate(45deg); }
.value h3 { font-size: 1.125rem; margin-block-end: .4em; }
.value p { color: var(--muted); margin: 0; font-size: .975rem; }
@media (max-width: 900px) { .values { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

/* ---------- Services (alternating rows) ---------- */
.services { display: grid; gap: clamp(48px, 7vw, 88px); }
.service { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 72px); align-items: center; }
.service:nth-child(even) .service-art { order: 2; }
.service-art img { width: 100%; border-radius: var(--radius-lg); }
.service-num { font-weight: 700; color: var(--green); font-size: .95rem; letter-spacing: .1em; margin-block-end: 8px; }
.service h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.service p { color: var(--muted); font-size: 1.0625rem; }
.checklist { list-style: none; display: grid; gap: 10px; margin-block-start: 18px; }
.checklist li { position: relative; padding-inline-start: 26px; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; inset-inline-start: 4px; top: .7em;
  width: 9px; height: 9px; background: var(--green); transform: rotate(45deg);
}
html[lang="ar"] .checklist li::before { top: .8em; }
.services-note {
  margin-block-start: clamp(40px, 6vw, 64px); padding: 22px 26px; border-radius: var(--radius);
  border: 1px dashed var(--navy-700); color: var(--navy); background: var(--white);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
}
.services-note p { margin: 0; }
@media (max-width: 800px) {
  .service { grid-template-columns: 1fr; }
  .service:nth-child(even) .service-art { order: 0; }
  .service-art img { max-width: 480px; }
}

/* ---------- Saudi Made ---------- */
.made-art { margin-block: 8px clamp(32px, 5vw, 56px); }
.made-art img { width: 100%; }
@media (max-width: 640px) {
  /* Let the wide illustration bleed edge-to-edge and crop slightly so it stays legible */
  .made-art { margin-inline: calc(-1 * var(--gutter)); overflow: hidden; }
  .made-art img { width: 150%; max-width: none; margin-inline-start: -25%; }
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; counter-reset: step; }
.step {
  position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow);
}
.step-label {
  display: inline-block; padding: 4px 12px; border-radius: 999px; margin-block-end: 14px;
  font-size: .85rem; font-weight: 700; background: var(--green-50); color: var(--green-700);
}
.step--future { background: transparent; box-shadow: none; border: 2px dashed rgb(45 134 28 / .5); }
.step h3 { font-size: 1.25rem; margin-block-end: .35em; }
.step p { margin: 0; color: var(--muted); }
.made-cta {
  margin-block-start: 28px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: center;
  text-align: center; color: var(--navy); font-weight: 500;
}
.made-cta p { margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items: start; }
.contact-info {
  position: relative; overflow: hidden;
  padding: clamp(28px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--navy); color: #d5e1ee;
}
.contact-info::after {
  content: ""; position: absolute; inset: auto -40px -40px auto; width: 220px; height: 220px; opacity: .08;
  background: url("../assets/img/logomark.svg") center / contain no-repeat;
  filter: brightness(0) invert(1);
}
[dir="rtl"] .contact-info::after { inset: auto auto -40px -40px; }
.contact-info h3 { color: var(--white); font-size: 1.375rem; }
.contact-info p { color: #c3d3e4; }
.contact-list { list-style: none; display: grid; gap: 20px; margin-block-start: 28px; position: relative; z-index: 1; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon {
  width: 44px; height: 44px; flex: none; border-radius: 12px; background: rgb(255 255 255 / .08);
  display: grid; place-items: center; color: var(--green-400);
}
.contact-list .icon svg { width: 22px; height: 22px; }
.contact-list small { display: block; color: #9fb4ca; font-size: .85rem; }
.contact-list a, .contact-list span { color: var(--white); font-weight: 500; text-decoration: none; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; color: var(--white); }
@media (max-width: 480px) {
  .contact-list .icon { width: 38px; height: 38px; }
  .contact-list a { font-size: .9375rem; }
}

.contact-form {
  padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 500; color: var(--navy); font-size: .95rem; }
.field .req { color: var(--green-700); }
.field .opt { color: var(--muted); font-weight: 400; font-size: .85rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fbfcfe; color: var(--ink);
  font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); background: var(--white); box-shadow: 0 0 0 4px rgb(45 134 28 / .15);
}
.field [aria-invalid="true"] { border-color: #c0392b; }
.field input[type="email"], .field input[type="tel"] { direction: ltr; }
[dir="rtl"] .field input[type="email"], [dir="rtl"] .field input[type="tel"] { text-align: right; }
/* Honeypot: visually hidden without off-screen offsets (which create sideways scroll in RTL) */
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.contact-form { position: relative; }
.turnstile-wrap { min-height: 65px; }
.privacy-note { font-size: .875rem; color: var(--muted); margin: 0; }
.form-footer { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.form-status { margin: 0; padding: 0; border-radius: 12px; font-weight: 500; }
.form-status:not(:empty) { padding: 14px 16px; }
.form-status.is-success { background: var(--green-50); color: var(--green-700); }
.form-status.is-error { background: #fdecea; color: #a12b1f; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; color: #b9cadb; padding-block: 56px 28px;
  background-color: var(--navy-900);
  /* Subtle 8-point star geometric pattern */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1.2' transform='translate(28 28)'%3E%3Crect x='-12' y='-12' width='24' height='24'/%3E%3Crect x='-12' y='-12' width='24' height='24' transform='rotate(45)'/%3E%3C/g%3E%3C/svg%3E");
}
.site-footer::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--green), var(--green-400));
}
.footer-top { display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: center; justify-content: space-between; }
.footer-brand img { height: 52px; width: auto; }
.footer-slogan { margin: 14px 0 0; color: var(--white); font-weight: 500; font-size: 1.0625rem; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; }
.footer-nav a { color: #d5e1ee; text-decoration: none; }
.footer-nav a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  margin-block-start: 36px; padding-block-start: 22px; border-top: 1px solid rgb(255 255 255 / .1);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .9rem;
}
.footer-bottom a { color: #d5e1ee; }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); }
.notfound img { width: 160px; margin: 0 auto 24px; }
.notfound .btn { margin: 8px; }

/* ---------- Message from the General Manager ---------- */
.gm {
  position: relative; max-width: 980px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 44px); align-items: start;
  padding: clamp(28px, 5vw, 56px); border-radius: var(--radius-lg);
  background: var(--white); box-shadow: var(--shadow);
  border-inline-start: 6px solid var(--green);
}
.gm-mark {
  width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green);
}
.gm-mark svg { width: 38px; height: 38px; }
[dir="rtl"] .gm-mark svg { transform: scaleX(-1); }
.gm-quote { margin: 0 0 28px; }
.gm-quote p { font-size: clamp(1.1rem, 1.9vw, 1.3rem); line-height: 1.75; color: var(--navy); font-weight: 500; margin-block-end: .8em; }
.gm-quote p:last-child { margin-block-end: 0; }
html[lang="ar"] .gm-quote p { line-height: 2; }
.gm-sign { display: flex; align-items: center; gap: 14px; padding-block-start: 22px; border-top: 1px solid var(--line); }
.gm-avatar {
  width: 54px; height: 54px; flex: none; border-radius: 50%; background: var(--navy);
  display: grid; place-items: center;
}
.gm-avatar img { width: 34px; height: auto; filter: brightness(0) invert(1); }
.gm-sign strong { display: block; color: var(--navy); font-size: 1.125rem; line-height: 1.4; }
.gm-role { display: block; color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) {
  .gm { grid-template-columns: 1fr; }
  .gm-mark { width: 56px; height: 56px; border-radius: 16px; }
  .gm-mark svg { width: 30px; height: 30px; }
}
