/* ==========================================================
   Tasheel for Inspection & Conformity — tasheelgroup.ly
   One stylesheet for both Arabic (RTL) and English (LTR).
   Uses logical properties so layout mirrors automatically.
   ========================================================== */

:root {
  --brand: #7a5ea8;
  --brand-600: #654a92;
  --brand-700: #523b78;
  --brand-50: #f5f2fa;
  --brand-100: #ebe4f5;
  --ink: #1d1929;
  --ink-2: #2a2539;
  --text: #2e2a3a;
  --muted: #6c6780;
  --line: #e8e4ef;
  --bg: #ffffff;
  --bg-soft: #f8f7fb;
  --ok: #2f9e6e;
  --err: #c2414b;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(29, 25, 41, .05), 0 8px 24px -12px rgba(29, 25, 41, .12);
  --container: 1180px;
  --header-h: 76px;

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
:lang(ar) { --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:lang(ar) body, body:lang(ar) { line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
@media (max-width: 600px) { .container { padding-inline: 16px; } }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 26px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.28); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.5); }
.btn:disabled { opacity: .6; cursor: wait; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(29,25,41,.4); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand img { width: 40px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: .04em; }
:lang(ar) .brand-name { letter-spacing: 0; font-size: 21px; }
.brand-sub { font-size: 12.5px; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--text); font-weight: 500; font-size: 15.5px;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { color: var(--brand-600); background: var(--brand-50); }
.nav .lang-switch {
  margin-inline-start: 8px; border: 1.5px solid var(--line);
  padding: 7px 14px; border-radius: 999px; font-weight: 600;
}
.nav .lang-switch:hover { border-color: var(--brand); background: transparent; }
.lang-switch .ar { font-family: "IBM Plex Sans Arabic", sans-serif; }
.lang-switch .en { font-family: "IBM Plex Sans", sans-serif; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  align-items: center; justify-content: center; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset-inline: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; padding: 12px 16px 20px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(29,25,41,.35);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 12px 14px; font-size: 17px; }
  .nav .lang-switch { margin: 8px 0 0; text-align: center; }
  .brand-sub { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1000px 520px at 85% -10%, rgba(122,94,168,.55), transparent 60%),
    radial-gradient(700px 480px at -10% 110%, rgba(122,94,168,.35), transparent 60%),
    var(--ink);
}
[dir="rtl"] .hero {
  background:
    radial-gradient(1000px 520px at 15% -10%, rgba(122,94,168,.55), transparent 60%),
    radial-gradient(700px 480px at 110% 110%, rgba(122,94,168,.35), transparent 60%),
    var(--ink);
}
.hero::before { /* subtle grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.25fr .75fr;
  align-items: center; gap: 48px; padding-block: 104px 112px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-600); margin-bottom: 18px;
}
:lang(ar) .eyebrow { letter-spacing: 0; font-size: 15px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.hero .eyebrow { color: #c9b8ea; }

.hero h1 { color: #fff; font-size: clamp(38px, 5.6vw, 66px); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 24px; }
:lang(ar) .hero h1 { letter-spacing: 0; line-height: 1.3; }
.hero h1 span { display: block; }
.hero h1 span:nth-child(2) { color: #c9b8ea; }
.hero-lead { font-size: 19px; color: rgba(255,255,255,.78); max-width: 600px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; display: grid; place-items: center; }
.hero-visual .ring {
  position: absolute; width: 118%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1);
}
.hero-visual .ring.r2 { width: 88%; border-color: rgba(255,255,255,.14); }
.hero-visual img { position: relative; width: min(100%, 320px); filter: drop-shadow(0 30px 60px rgba(0,0,0,.35)); }

.sector-strip { position: relative; border-top: 1px solid rgba(255,255,255,.1); }
.sector-strip ul { display: grid; grid-template-columns: repeat(5, 1fr); }
.sector-strip a {
  display: flex; align-items: center; gap: 12px; height: 100%;
  padding: 22px 18px; color: rgba(255,255,255,.82); font-weight: 500; font-size: 15px; line-height: 1.35;
  border-inline-start: 1px solid rgba(255,255,255,.1);
  transition: background-color .2s, color .2s;
}
.sector-strip li:first-child a { border-inline-start: 0; }
.sector-strip a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sector-strip svg { width: 22px; height: 22px; flex: none; color: #c9b8ea; }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-block: 72px 64px; }
  .hero-visual { display: none; }
  .sector-strip ul { grid-template-columns: repeat(2, 1fr); }
  .sector-strip li a { border-inline-start: 0; border-top: 1px solid rgba(255,255,255,.08); padding: 16px 4px; }
  .sector-strip li:nth-child(even) a { padding-inline-start: 16px; border-inline-start: 1px solid rgba(255,255,255,.08); }
  .sector-strip li:last-child { grid-column: 1 / -1; }
  .sector-strip li:last-child a { border-inline-start: 0; padding-inline-start: 4px; }
}
@media (max-width: 600px) {
  .hero-lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---------- Sections ---------- */
.section { padding-block: 104px; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -.015em; }
:lang(ar) .section-head h2 { letter-spacing: 0; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }
@media (max-width: 600px) { .section { padding-block: 72px; } .section-head { margin-bottom: 40px; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.about-grid .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.about-body p { font-size: 18px; }
.about-body p:first-child { font-size: 21px; color: var(--ink); font-weight: 500; line-height: 1.6; }
.about-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.about-points li {
  padding: 20px; border-radius: var(--radius); background: var(--brand-50);
  color: var(--ink); font-weight: 600; font-size: 15.5px; line-height: 1.45;
}
.about-points svg { width: 26px; height: 26px; color: var(--brand); margin-bottom: 12px; display: block; }
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-grid .section-head { position: static; }
}
@media (max-width: 600px) { .about-points { grid-template-columns: 1fr; } .about-body p:first-child { font-size: 19px; } }

/* ---------- Services ---------- */
.services { display: grid; gap: 24px; }
.service {
  display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px;
  padding: 44px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.service-head { display: flex; flex-direction: column; }
.service-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.service-icon {
  width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;
  background: var(--brand); color: #fff;
}
.service-icon svg { width: 28px; height: 28px; }
.service-num { font-size: 15px; font-weight: 700; color: var(--brand); letter-spacing: .08em; opacity: .7; }
.service h3 { font-size: 28px; margin-bottom: 14px; }
.service-head p { color: var(--muted); margin: 0; }
.service-body h4 { font-size: 13.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
:lang(ar) .service-body h4 { text-transform: none; letter-spacing: 0; font-size: 15px; }
.service-body p { margin-bottom: 1em; }
.service-body p:last-child { margin: 0; }

.checklist li { position: relative; padding-inline-start: 34px; padding-block: 10px; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 15px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a5ea8' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
:lang(ar) .checklist li::before { top: 17px; }

.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.method {
  padding: 18px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line);
}
.method b { display: block; font-size: 26px; color: var(--brand); letter-spacing: .02em; line-height: 1.1; margin-bottom: 6px; font-family: "IBM Plex Sans", sans-serif; }
.method span { font-size: 15px; color: var(--ink); font-weight: 500; line-height: 1.4; display: block; }

@media (max-width: 960px) { .service { grid-template-columns: 1fr; gap: 28px; padding: 32px; } }
@media (max-width: 600px) { .service { padding: 24px 20px; } .service h3 { font-size: 24px; } .methods { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Vision / Mission / Values ---------- */
.vmv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.vmv-card {
  position: relative; padding: 36px 32px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
}
.vmv-card::after {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--brand);
}
.vmv-card .service-icon { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 22px; background: var(--brand-50); color: var(--brand); }
.vmv-card .service-icon svg { width: 26px; height: 26px; }
.vmv-card h3 { font-size: 23px; }
.vmv-card p { margin: 0; color: var(--text); }
.values { display: flex; flex-wrap: wrap; gap: 8px; }
.values li {
  padding: 7px 14px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700);
  font-weight: 600; font-size: 14.5px; line-height: 1.4;
}
@media (max-width: 960px) { .vmv { grid-template-columns: 1fr; } }

/* ---------- Certificates ---------- */
.certs { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.certs .cert { flex: 0 1 340px; }
.cert {
  display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text);
  transition: transform .2s, box-shadow .2s;
}
a.cert:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(29,25,41,.05), 0 20px 40px -18px rgba(29,25,41,.3); color: var(--text); }
.cert-media {
  aspect-ratio: 4 / 5; background: var(--bg-soft); display: grid; place-items: center;
  border-bottom: 1px solid var(--line); padding: 18px; position: relative;
}
.cert-media img { width: 100%; height: 100%; object-fit: contain; }
.cert-media .placeholder { display: none; text-align: center; color: var(--muted); font-size: 14.5px; padding: 12px; }
.cert-media .placeholder svg { display: block; width: 48px; height: 48px; color: var(--brand); margin: 0 auto 12px; opacity: .8; }
.cert.missing .cert-media img { display: none; }
.cert.missing .cert-media .placeholder { display: block; }
.cert.missing { pointer-events: none; }
.cert-info { padding: 20px 22px; }
.cert-info h3 { font-size: 18px; margin-bottom: 4px; }
.cert-info p { margin: 0; font-size: 14.5px; color: var(--muted); }
.cert-wide { text-align: center; color: var(--muted); margin: 36px auto 0; max-width: 620px; font-size: 15.5px; }
@media (max-width: 600px) { .certs .cert { flex-basis: 100%; } }

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid; grid-template-columns: .85fr 1.15fr; border-radius: var(--radius-lg); overflow: hidden;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.contact-aside {
  position: relative; overflow: hidden; padding: 48px 40px; color: rgba(255,255,255,.82);
  background: radial-gradient(500px 360px at 100% 0%, rgba(122,94,168,.6), transparent 70%), var(--ink);
}
.contact-aside h2 { color: #fff; font-size: clamp(28px, 3vw, 38px); }
.contact-aside .eyebrow { color: #c9b8ea; }
.contact-aside > p { font-size: 17.5px; margin-bottom: 32px; }
.contact-aside .mark {
  position: absolute; width: 240px; inset-inline-end: -40px; bottom: -40px; opacity: .07; pointer-events: none;
}
.contact-list { display: grid; gap: 14px; position: relative; }
.contact-list a, .contact-list div {
  display: flex; align-items: center; gap: 14px; color: #fff; font-weight: 500;
  padding: 14px 16px; border-radius: var(--radius); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.contact-list a:hover { background: rgba(255,255,255,.1); color: #fff; }
.contact-list svg { width: 20px; height: 20px; flex: none; color: #c9b8ea; }
.contact-list small { display: block; color: rgba(255,255,255,.6); font-size: 13px; font-weight: 400; line-height: 1.3; }
.contact-list .ltr { direction: ltr; unicode-bidi: isolate; }

.contact-form { padding: 48px 44px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.field label .req { color: var(--brand); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--text); width: 100%;
  padding: 13px 15px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(122,94,168,.15);
}
.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; }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.form-note { font-size: 14px; color: var(--muted); margin: 0; }
.form-status { display: none; margin-top: 18px; padding: 14px 16px; border-radius: 10px; font-weight: 500; }
.form-status.ok { display: block; background: #e8f6ef; color: #1f6b4a; }
.form-status.err { display: block; background: #fbecee; color: #8f2a33; }

@media (max-width: 960px) { .contact-wrap { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .contact-aside, .contact-form { padding: 32px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.66); padding-block: 64px 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand img { width: 150px; margin-bottom: 18px; }
.footer-brand p { max-width: 360px; margin: 0; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: 14px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}
.no-js .reveal { opacity: 1; transform: none; }
