/* ============ Tokens ============ */
/* Color identity follows tawasol.de: deep teal + warm amber on cream/sand. */
:root {
  --brand-dark: #01453f;   /* deep teal — headings, CTA band */
  --on-brand: #ffffff;     /* text on teal buttons */
  --on-accent: #01453f;    /* text on amber buttons */
  --bg: #fdf8ee;           /* cream */
  --surface: #ffffff;
  --surface-2: #f6eedd;    /* light sand */
  --text: #4a4238;         /* warm brown */
  --heading: #01453f;
  --muted: #6b6153;
  --border: #e6ddc9;       /* sand */
  --shadow: 0 1px 2px rgb(74 66 56 / .05), 0 8px 24px rgb(74 66 56 / .08);
  --header-bg: rgb(253 248 238 / .82);
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Geeza Pro", "SF Arabic", "Segoe UI", "Noto Sans Arabic", "Noto Kufi Arabic", Tahoma, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #3cbfae;        /* lifted teal so it reads on dark backgrounds */
  --on-brand: #04241f;
  --bg: #0b1715;           /* teal-black */
  --surface: #11221f;
  --surface-2: #162c28;
  --text: #ece4d4;         /* cream text */
  --heading: #fdf8ee;
  --muted: #b2a891;
  --border: #23403a;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 30px rgb(0 0 0 / .35);
  --header-bg: rgb(11 23 21 / .78);
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  transition: background-color .3s, color .3s;
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.85; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.02em; color: var(--heading); }
html[lang="ar"] :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.45; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.icon { width: 1.25em; height: 1.25em; flex: none; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.grad {
  color: var(--brand);
  background: linear-gradient(transparent 68%, color-mix(in srgb, var(--accent) 45%, transparent) 68%, color-mix(in srgb, var(--accent) 45%, transparent) 90%, transparent 90%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .85em 1.4em; border-radius: 999px; font-weight: 650; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 85%, #000); }
.btn-ghost { border-color: var(--border); background: var(--surface); color: var(--heading); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-light { background: var(--accent); color: var(--on-accent); }
.btn-light:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--brand); }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.logo-mark svg { width: 34px; height: 34px; }
.logo-text { color: var(--heading); }
.logo-text b { color: var(--brand); }
.logo, .logo-text { direction: ltr; }
.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 550; transition: color .2s, background .2s; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.menu-toggle { display: none; }

.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding-inline: 12px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 650; font-size: .9rem;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 160px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  display: grid;
}
.lang-list a { padding: 9px 12px; border-radius: 9px; }
.lang-list a:hover { background: var(--surface-2); }
.lang-list a[aria-current] { color: var(--brand); font-weight: 700; }

/* ============ Hero ============ */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 9vw, 110px); }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 15% 10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
    radial-gradient(500px 380px at 90% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .45;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--border); font-size: .85rem; font-weight: 650; color: var(--brand);
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 36em; margin-bottom: 2em; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 440px; width: 100%; justify-self: center; }
.orb {
  position: absolute; inset: 12%; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--brand-dark), var(--brand), var(--accent), var(--brand-dark));
  filter: blur(2px); opacity: .9; animation: spin 18s linear infinite;
  box-shadow: 0 30px 80px color-mix(in srgb, var(--brand) 40%, transparent);
}
.orb::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: var(--bg); opacity: .88; }
.glass {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow);
  font-weight: 650; font-size: .9rem; white-space: nowrap; animation: float 6s ease-in-out infinite;
}
.glass .icon { color: var(--brand); }
.g1 { top: 8%; inset-inline-start: 0; }
.g2 { top: 46%; inset-inline-end: 0; animation-delay: -2s; }
.g3 { bottom: 6%; inset-inline-start: 8%; animation-delay: -4s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ============ Sections ============ */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); margin-bottom: 10px; }
html[lang="ar"] .kicker { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.grid { display: grid; gap: 20px; }
/* Flex instead of grid so an incomplete last row is centered (e.g. 7 services → 3 + 3 + 1). */
.grid-3 { display: flex; flex-wrap: wrap; justify-content: center; }
.grid-3 > * { flex: 0 1 calc((100% - 40px) / 3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.card p:last-child { margin: 0; }
.card-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand);
}
.card-icon .icon { width: 24px; height: 24px; }

.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.stats { display: grid; gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; display: flex; align-items: baseline; gap: 16px; }
.stat strong { font-size: 2.2rem; font-weight: 800; color: var(--brand); min-width: 4ch; }
.stat span { color: var(--muted); font-weight: 600; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); border: 1px dashed var(--border); }
.step-num { display: block; font-size: 2.4rem; font-weight: 800; color: color-mix(in srgb, var(--brand) 45%, transparent); margin-bottom: 8px; line-height: 1; }
:root[data-theme="dark"] .step-num { color: color-mix(in srgb, var(--brand) 70%, transparent); }

.cta-wrap { padding-top: 0; }
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: clamp(32px, 5vw, 56px); border-radius: 28px; color: #fdf8ee;
  background: radial-gradient(420px 260px at 100% 0%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%), var(--brand-dark);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--brand) 30%, transparent);
}
.cta h2 { margin-bottom: .3em; color: #fdf8ee; }
.cta p { margin: 0; opacity: .9; max-width: 34em; }

.contact-card { display: flex; align-items: center; gap: 18px; }
.contact-card .card-icon { margin: 0; }
.contact-card strong { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
[dir="rtl"] .contact-card strong[dir="ltr"] { text-align: right; }

/* ============ Contact form ============ */
.contact-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.contact-cards { display: grid; gap: 16px; }
.contact-form { padding: clamp(22px, 3vw, 34px); }
.contact-form:hover { transform: none; }
.contact-form h3 { font-size: 1.3rem; margin-bottom: 1em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; font-weight: 600; font-size: .95rem; color: var(--heading); }
.field i, .consent i { color: #c2410c; font-style: normal; }
:root[data-theme="dark"] .field i, :root[data-theme="dark"] .consent i { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
.was-validated :is(input, textarea, select):invalid { border-color: #c2410c; }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.cf-turnstile { margin: 0 0 18px; min-height: 65px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); margin: 4px 0 20px; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.consent a { color: var(--brand); text-decoration: underline; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form-foot p { margin: 0; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.form-status { margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.form-status.ok { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--heading); }
.form-status.err { background: color-mix(in srgb, #c2410c 14%, transparent); color: #c2410c; }
:root[data-theme="dark"] .form-status.err { color: #fdba74; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ Location / map ============ */
.location { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; margin-top: 24px; }
.location-text h3 { font-size: 1.3rem; }
.location-text .welcome { font-size: 1.05rem; }
.location-text address { font-style: normal; color: var(--muted); margin: 0 0 22px; line-height: 1.7; }
.location .card:hover { transform: none; }
.map { position: relative; padding: 0; overflow: hidden; min-height: 360px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px;
  padding: 28px; text-align: center; color: var(--muted); font-size: .92rem;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 39px, var(--border) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--border) 39px 40px),
    var(--surface-2);
}
.map-consent p { max-width: 34em; margin: 0 0 16px; }
.map-consent a { color: var(--brand); text-decoration: underline; }
.map.loaded .map-consent { display: none; }
.map-hide {
  position: absolute; top: 12px; right: 56px; z-index: 2; /* physical side: Google's own info box sits top-left */
  font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--heading); border: 1px solid var(--border); box-shadow: var(--shadow);
}

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--border); padding-top: 56px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-grid h3 { font-size: .95rem; margin-bottom: 14px; }
.footer-grid > div > a:not(.logo):not(.icon-btn) { display: block; color: var(--muted); padding: 4px 0; width: fit-content; }
.footer-grid > div > a:hover { color: var(--brand); }
.footer-tag { margin-top: 14px; max-width: 28em; }
.socials { display: flex; gap: 8px; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 40px; padding: 22px 0; font-size: .9rem; }

/* ============ Legal / 404 / root ============ */
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-top: 18px; }
.legal h2 { font-size: 1.2rem; margin-top: 2em; }
.legal p { color: var(--muted); }
.legal a { color: var(--brand); }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted) !important; font-weight: 600; }
.back-icon { transform: scaleX(-1); }
[dir="rtl"] .back-icon { transform: none; }
.updated { margin: -6px 0 24px; font-size: .92rem; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 8px; }
.legal .toc h2 { margin: 0 0 10px; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
html[lang="ar"] .legal .toc h2 { letter-spacing: 0; text-transform: none; font-size: 1rem; }
.toc ol { margin: 0; padding-inline-start: 1.3em; columns: 2; column-gap: 32px; color: var(--muted); }
.toc li { break-inside: avoid; padding: 2px 0; }
.legal .toc a { color: var(--text); text-decoration: none; }
.legal .toc a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.note { background: var(--surface-2); border-inline-start: 3px solid var(--brand); padding: 12px 16px; border-radius: 10px; }
.center { text-align: center; }
.big404 { font-size: clamp(5rem, 16vw, 9rem); font-weight: 900; line-height: 1; margin: 0 0 .2em; }
.center-page { min-height: 100vh; display: grid; place-items: center; }
.choose { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; padding: 16px; }

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

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .grid-3 > * { flex-basis: calc((100% - 20px) / 2); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .about, .contact-layout, .location { grid-template-columns: 1fr; }
  .hero-visual { max-width: 340px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .menu-toggle { display: inline-grid; }
  .main-nav {
    position: absolute; top: 72px; inset-inline: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 12px; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 600px) {
  .grid-3, .grid-2, .steps, .footer-grid, .form-grid { grid-template-columns: 1fr; }
  .grid-3 > * { flex-basis: 100%; }
  .card { padding: 22px; }
  .glass { font-size: .8rem; padding: 10px 12px; }
  .g1 { inset-inline-start: 0; } .g2 { inset-inline-end: 0; }
  .cta { flex-direction: column; align-items: flex-start; }
}
