/* LivinArab — styles (LTR + RTL via logical properties) */
:root {
  --ink: #16202E;
  --ink-2: #223044;
  --sand: #F4EDE1;
  --dune: #E8DDCB;
  --brass: #A67C3D;
  --brass-light: #D9B98A;
  --oasis: #1E5B57;
  --oasis-dark: #174744;
  --text: #1F1F1F;
  --muted: #5B5A55;
  --line: #DED2BE;
  --white: #FFFFFF;
  --ok: #2F6B45;
  --no: #9A3B2E;

  --display: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(22, 32, 46, .06), 0 14px 34px -14px rgba(22, 32, 46, .22);
  --container: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
html[lang="ar"] {
  --display: "Noto Naskh Arabic", "IBM Plex Sans Arabic", Tahoma, serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body { margin: 0; background: var(--sand); color: var(--text); font-family: var(--body); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
html[lang="ar"] body { font-size: 1.1rem; line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--oasis); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--brass-light); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; color: var(--ink); line-height: 1.15; margin: 0 0 .5em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.45; font-weight: 600; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.3rem); letter-spacing: -.02em; }
html[lang="ar"] h1 { letter-spacing: 0; font-size: clamp(2.1rem, 5vw, 3.7rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 68ch; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -100px; background: var(--ink); color: var(--white); padding: .6rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 1rem; color: var(--white); }
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container.narrow { max-width: 840px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 1rem/1.2 var(--body); padding: .95rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.btn-primary { background: var(--oasis); color: var(--white); }
.btn-primary:hover { background: var(--oasis-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--sand); }
.btn-small { padding: .6rem 1.05rem; font-size: .92rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.text-link { font-weight: 600; color: var(--oasis); text-decoration-color: var(--brass); text-decoration-thickness: 2px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(244, 237, 225, .93); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: "IBM Plex Serif", Georgia, serif; font-size: 1.4rem; font-weight: 600; margin-inline-end: auto; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: 1.6rem; margin: 0; padding: 0; }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; font-size: .97rem; }
.site-nav a:not(.btn):hover { color: var(--oasis); }
.lang-switch { font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; border: 1.5px solid var(--line); border-radius: 999px; padding: .4rem .85rem; }
.lang-switch:hover { border-color: var(--brass); color: var(--ink); }
.lang-switch[lang="ar"] { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.lang-switch[lang="en"] { font-family: "IBM Plex Sans", system-ui, sans-serif; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); transition: transform .25s var(--ease); content: ""; }
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; top: -7px; }
.nav-toggle-bar::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: calc(72px + env(safe-area-inset-top, 0px)) 0 auto 0; background: var(--sand); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.5rem; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s var(--ease), visibility .2s; box-shadow: var(--shadow); }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li a:not(.btn) { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .site-nav .btn { margin-top: 1rem; width: 100%; }
}

/* Sections */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-dune { background: var(--dune); }
.section-ink { background: var(--ink); color: #D9DEE6; }
.section-ink h2, .section-ink h3 { color: var(--sand); }
.section-ink a { color: var(--brass-light); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); max-width: 660px; }
.section-head p { color: var(--muted); font-size: 1.125rem; }
.section-ink .section-head p { color: #B9C2CF; }
.section-head.centered { text-align: center; margin-inline: auto; }
.section-head.centered p { margin-inline: auto; }
.section-cta { margin: 2.5rem 0 0; }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.lede { font-size: clamp(1.15rem, 1.7vw, 1.3rem); line-height: 1.6; color: #3A3F47; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin: 2rem 0 1.75rem; }
.trust-note { font-size: .92rem; color: var(--muted); border-inline-start: 2px solid var(--brass); padding-inline-start: 1rem; max-width: 54ch; }

/* Signature: bilingual source ledger */
.ledger { margin: 0; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.5rem, 3vw, 2.25rem); border-top: 4px solid var(--brass); }
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.ledger-head strong { color: var(--ink); font-weight: 600; }
.ledger-claim { font-family: var(--display); font-size: 1.2rem; line-height: 1.65; margin-bottom: 1.4rem; }
.cite { font-family: var(--body); font-size: .7rem; font-weight: 600; color: var(--oasis); }
.ledger-sources { list-style: none; margin: 0; padding: 1.2rem 0 0; border-top: 1px dashed var(--line); display: grid; gap: .55rem; }
.ledger-sources li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .95rem; padding: .55rem .8rem; border-radius: var(--radius-sm); background: var(--sand); transition: background-color .3s; }
.ledger-sources li.is-lit { background: #EADFC9; }
.src-num { color: var(--oasis); font-weight: 600; margin-inline-end: .35rem; }
.src-lang { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--brass); border: 1px solid var(--brass-light); border-radius: 4px; padding: 0 .35rem; margin-inline-start: .45rem; vertical-align: 1px; }
.src-tag { font-size: .78rem; font-weight: 600; white-space: nowrap; padding: .2rem .55rem; border-radius: 999px; }
.src-tag.ok { color: var(--ok); background: #E2EDE4; }
.src-tag.no { color: var(--no); background: #F4E1DC; }
li.rejected .src-name { text-decoration: line-through; text-decoration-color: rgba(154, 59, 46, .5); color: var(--muted); }
.ledger figcaption { margin-top: 1.2rem; font-size: .92rem; color: var(--muted); font-style: italic; }
html[lang="ar"] .ledger figcaption { font-style: normal; }
@media (prefers-reduced-motion: no-preference) {
  .js .ledger-sources li { opacity: 0; transform: translateY(6px); animation: srcIn .6s var(--ease) forwards; }
  .js .ledger-sources li:nth-child(1) { animation-delay: .45s; }
  .js .ledger-sources li:nth-child(2) { animation-delay: .7s; }
  .js .ledger-sources li:nth-child(3) { animation-delay: .95s; }
  .js .ledger-sources li:nth-child(4) { animation-delay: 1.3s; }
  @keyframes srcIn { to { opacity: 1; transform: none; } }
}

/* Region strip */
.region { border-block: 1px solid var(--line); background: var(--white); }
.region-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.75rem; padding: 1.1rem 0; font-size: .95rem; color: var(--muted); }
.region-inner strong { color: var(--ink); font-weight: 600; margin-inline-end: .5rem; }
.region-inner span { white-space: nowrap; }

/* Services */
.services { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service { background: var(--white); border-radius: var(--radius); padding: 2rem 1.75rem; border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.service:hover { border-color: var(--brass-light); box-shadow: var(--shadow); }
.service p { color: var(--muted); margin: 0; font-size: 1rem; }
.service-icon { width: 40px; height: 40px; margin-bottom: 1.2rem; fill: none; stroke: var(--oasis); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Bilingual Wikipedia section */
.twin { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.twin-card { background: var(--white); border-radius: var(--radius); padding: 2rem; border: 1px solid var(--line); }
.twin-card h3 { display: flex; align-items: center; gap: .6rem; }
.twin-card .badge { font-family: var(--body); font-size: .8rem; font-weight: 600; background: var(--sand); color: var(--oasis); border-radius: 999px; padding: .15rem .6rem; }
.twin-card ul { margin: 1rem 0 0; padding-inline-start: 1.2rem; color: var(--muted); }
.twin-card li { margin-bottom: .45rem; }

/* Process */
.process { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; position: relative; }
.process::before { content: ""; position: absolute; top: 27px; inset-inline: 28px; height: 2px; background: linear-gradient(90deg, var(--brass), rgba(166, 124, 61, .2)); }
html[dir="rtl"] .process::before { background: linear-gradient(270deg, var(--brass), rgba(166, 124, 61, .2)); }
.step-num { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ink); border: 2px solid var(--brass); color: var(--brass-light); font-family: "IBM Plex Serif", Georgia, serif; font-size: 1.15rem; font-weight: 600; margin-bottom: 1.4rem; position: relative; }
.step h3 { font-size: 1.2rem; }
.step p { color: #B9C2CF; font-size: .98rem; }
.notice { font-size: .95rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.25rem; max-width: none; }
.notice-ink { background: rgba(255, 255, 255, .05); border-color: rgba(217, 185, 138, .35); color: #D9DEE6; }

/* Tool */
.tool { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 3rem); }
.tool-progress { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; counter-reset: prog; }
.tool-progress li { counter-increment: prog; font-size: .85rem; font-weight: 600; color: var(--muted); padding-top: .7rem; border-top: 3px solid var(--line); transition: border-color .3s, color .3s; }
.tool-progress li span::before { content: counter(prog) ". "; }
.tool-progress li.is-active { border-top-color: var(--oasis); color: var(--oasis); }
.tool-progress li.is-done { border-top-color: var(--brass); color: var(--ink); }
.saved-note { font-size: .85rem; color: var(--muted); margin: -1rem 0 1.5rem; }

.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tool-step > legend { font-family: var(--display); font-size: 1.55rem; color: var(--ink); margin-bottom: 1.2rem; padding: 0; }
.step-help { color: var(--muted); font-size: .98rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.field { margin-bottom: 1.25rem; }
.field > label, .choice-group > legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .45rem; color: var(--text); }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.help { font-size: .875rem; color: var(--muted); margin: .4rem 0 0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--sand); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .8rem .95rem; transition: border-color .2s, background-color .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--oasis); background: var(--white); box-shadow: 0 0 0 3px rgba(30, 91, 87, .18); }
input[type="email"], input[type="tel"], input[type="url"], .ltr-input { direction: ltr; text-align: start; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="url"], html[dir="rtl"] .ltr-input { text-align: right; }
textarea { resize: vertical; min-height: 110px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231E5B57' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-inline-end: 2.5rem; }
html[dir="rtl"] select { background-position: left 1rem center; }
.phone-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; direction: ltr; }
[aria-invalid="true"] { border-color: var(--no) !important; }
.field-msg { display: block; color: var(--no); font-size: .85rem; margin-top: .35rem; }
.counter { display: block; font-size: .82rem; color: var(--muted); margin-top: .35rem; }
.counter strong { color: var(--oasis); }

.choice-group { margin-bottom: 1.5rem !important; }
.pills { display: flex; flex-wrap: wrap; gap: .55rem; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.pill span { display: inline-block; padding: .6rem 1.15rem; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 500; cursor: pointer; transition: all .2s; background: var(--sand); }
.pill input:checked + span { background: var(--oasis); border-color: var(--oasis); color: var(--white); }
.pill input:focus-visible + span { outline: 3px solid var(--brass-light); outline-offset: 2px; }
.choice-group.is-invalid .pill span { border-color: var(--no); }

.checks { display: grid; gap: .55rem; }
.check { display: flex; gap: .85rem; align-items: flex-start; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--sand); transition: border-color .2s, background-color .2s; font-size: .98rem; line-height: 1.5; }
.check:hover { border-color: var(--brass-light); }
.check:has(input:checked) { background: #E6EFEC; border-color: var(--oasis); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--oasis); }
.check-consent { background: transparent; border: 0; padding: .25rem 0; margin: .5rem 0 1rem; font-size: .92rem; }
.check-consent:has(input:checked) { background: transparent; }
.check-consent.is-invalid span { color: var(--no); }

.dropzone { position: relative; border: 1.5px dashed var(--brass); border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center; background: var(--sand); transition: background-color .2s, border-color .2s; }
.dropzone.is-over { background: #EADFC9; border-color: var(--oasis); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone-title { font-weight: 600; color: var(--ink); margin: 0 auto .25rem; }
.dropzone-file { font-size: .92rem; color: var(--oasis); font-weight: 600; margin: .5rem auto 0; }
.dropzone-clear { position: relative; z-index: 2; margin-top: .5rem; font: inherit; font-size: .85rem; background: none; border: 0; color: var(--no); text-decoration: underline; cursor: pointer; }

.form-error:not(:empty) { color: var(--no); background: #F8ECE8; border-radius: var(--radius-sm); padding: .75rem 1rem; margin: 0 0 1rem; font-size: .95rem; }
.tool-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.tool-nav [data-next], .tool-nav [data-submit] { margin-inline-start: auto; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Result */
.result:focus { outline: none; }
.result-meter { height: 10px; background: var(--dune); border-radius: 999px; overflow: hidden; }
.result-meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--oasis), var(--brass)); border-radius: 999px; transition: width 1.1s var(--ease); }
html[dir="rtl"] .result-meter span { background: linear-gradient(270deg, var(--oasis), var(--brass)); }
.result h3 { font-size: 1.75rem; margin-top: 1.5rem; }
.result-gaps { margin: 1.5rem 0; padding: 1.25rem 1.5rem; background: var(--sand); border-radius: var(--radius); }
.result-gaps h4 { margin: 0 0 .6rem; font-size: 1rem; color: var(--ink); }
.result-gaps ul { margin: 0; padding-inline-start: 1.2rem; }
.result-gaps li { margin-bottom: .45rem; color: #3A3F47; }
.restart { font: inherit; font-size: .92rem; background: none; border: 0; padding: 0; color: var(--oasis); text-decoration: underline; cursor: pointer; }
.lead { margin-top: 2.5rem; background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--line); padding: clamp(1.5rem, 4vw, 3rem); }
.lead h3 { font-size: 1.75rem; }
.lead > p { color: var(--muted); }

/* PR */
.pr-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.pull { margin: 2rem 0 1rem; padding: 0; padding-inline-start: 1.5rem; border-inline-start: 3px solid var(--brass); font-family: var(--display); font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.55; color: var(--ink); }
.pr-list { list-style: none; margin: 0; padding: 1.25rem 1.75rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.pr-list li { padding: .8rem 0; border-bottom: 1px solid var(--line); font-weight: 500; display: flex; align-items: center; gap: .75rem; }
.pr-list li:last-child { border-bottom: 0; }
.pr-list li::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); background: var(--brass); flex: none; }

/* Why */
.why { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; border-top: 2px solid var(--ink); }
.why > div { padding: 1.75rem 1.4rem 0 0; }
.why > div + div { padding-inline: 1.4rem 0; border-inline-start: 1px solid var(--line); }
html[dir="rtl"] .why > div:first-child { padding: 1.75rem 0 0 1.4rem; }
.why dt { font-family: var(--display); font-size: 1.3rem; color: var(--ink); margin-bottom: .6rem; }
.why dd { margin: 0; color: var(--muted); font-size: .98rem; }

/* About */
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.about-media img { border-radius: var(--radius-lg); }
.lede-sm { font-family: var(--display); font-size: 1.28rem; line-height: 1.6; color: var(--ink); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding-block: 1.35rem; padding-inline: 0 3rem; position: relative; font-family: var(--display); font-size: 1.25rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; inset-inline-end: .5rem; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--oasis); border-bottom: 2px solid var(--oasis); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: #3A3F47; padding-bottom: 1.35rem; margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-direct { margin-top: 2rem; }
.contact-direct a { direction: ltr; unicode-bidi: embed; }
.form-card { background: var(--white); color: var(--text); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem); }
.form-card a { color: var(--oasis); }
.form-success h3 { font-size: 1.55rem; }
.form-success:focus { outline: none; }

/* WhatsApp */
.wa-float { position: fixed; inset-inline-end: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; gap: .5rem; background: var(--oasis); color: var(--white); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .8rem 1.1rem; border-radius: 999px; box-shadow: var(--shadow); }
.wa-float:hover { background: var(--oasis-dark); color: var(--white); }
.wa-float svg { width: 20px; height: 20px; fill: currentColor; }

/* Footer */
.site-footer { background: #0F1722; color: #AEB7C4; padding: 4rem 0 2rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(217, 185, 138, .2); }
.footer-brand { font-family: "IBM Plex Serif", Georgia, serif; font-size: 1.7rem; color: var(--sand); margin-bottom: .35rem; }
.footer-tag { font-size: .95rem; margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: .55rem 2.5rem; }
.footer-links a { color: #DDE3EA; text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: var(--brass-light); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.75rem; font-size: .85rem; }
.footer-base p { margin: 0; }

/* Legal / 404 */
.page { padding: clamp(3rem, 7vw, 5rem) 0 6rem; }
.page .container { max-width: 780px; }
.page h2 { font-size: 1.55rem; margin-top: 2.5rem; }
.page p { color: #3A3F47; }
.page-404 { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.page-404 p { margin-inline: auto; }
.page-404 .ar { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.page-404 .ar h1 { font-family: "Noto Naskh Arabic", serif; line-height: 1.5; }

/* Responsive */
@media (max-width: 1080px) {
  .process { grid-template-columns: 1fr; gap: 0; }
  .process::before, html[dir="rtl"] .process::before { top: 28px; bottom: 28px; inset-inline-start: 27px; inset-inline-end: auto; width: 2px; height: auto; background: linear-gradient(var(--brass), rgba(166, 124, 61, .2)); }
  .step { display: grid; grid-template-columns: 56px 1fr; gap: 1.5rem; padding-bottom: 2rem; }
  .step-num { margin: 0; }
  .why { grid-template-columns: repeat(2, 1fr); border-top: 0; gap: 1.5rem; }
  .why > div, .why > div + div, html[dir="rtl"] .why > div:first-child { padding: 1.5rem 0 0; border-inline-start: 0; border-top: 2px solid var(--ink); }
}
@media (max-width: 900px) {
  .hero-grid, .pr-grid, .about-grid, .contact-grid, .twin { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr 1fr; }
  .about-media { max-width: 480px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .services, .grid-2, .why { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .tool-progress li { font-size: .72rem; }
  .tool-progress li span::before { content: counter(prog); display: block; font-size: 1rem; }
  .ledger-sources li { flex-direction: column; align-items: flex-start; gap: .3rem; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: .55rem 1.5rem; }
  .tool-nav .btn { flex: 1; }
  .wa-float span { display: none; }
  .wa-float { padding: .9rem; }
  .lang-switch { padding: .35rem .7rem; }
}
