/* =========================================================
   ARID Foundation — Design System
   Brand colours sampled from the ARID globe logo
   ========================================================= */

:root {
  --arid-orange: #f59331;
  --arid-red: #ee3b24;
  --arid-crimson: #c41f2b;
  --arid-purple: #8b53d4;
  --arid-blue: #2f7fd0;
  --arid-navy: #10305a;
  --arid-deep: #0a1e3a;

  --ink: #16233a;
  --ink-soft: #4b5a72;
  --ink-mute: #74809a;
  --line: #e4e9f1;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --bg-tint: #eef3fb;

  --grad-brand: linear-gradient(120deg, var(--arid-red) 0%, var(--arid-orange) 42%, var(--arid-purple) 72%, var(--arid-blue) 100%);
  --grad-warm: linear-gradient(120deg, var(--arid-red), var(--arid-orange));
  --grad-cool: linear-gradient(120deg, var(--arid-purple), var(--arid-blue));

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(16, 48, 90, .06);
  --shadow: 0 14px 38px rgba(16, 48, 90, .10);
  --shadow-lg: 0 26px 60px rgba(16, 48, 90, .16);
  --maxw: 1200px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Tajawal", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
body[dir="rtl"] { font-family: "Tajawal", "Segoe UI", system-ui, sans-serif; }

img { max-width: 100%; display: block; }
a { color: var(--arid-blue); text-decoration: none; }
a:hover { color: var(--arid-purple); }

h1, h2, h3, h4 { line-height: 1.28; margin: 0 0 .6em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-inline-start: 1.35em; }
li { margin-bottom: .45em; }

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

.skip-link {
  position: absolute; inset-inline-start: -999px; top: 8px; z-index: 999;
  background: var(--arid-navy); color: #fff; padding: .7rem 1.2rem; border-radius: 8px;
}
.skip-link:focus { inset-inline-start: 8px; color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout helpers ---------- */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(3.2rem, 7vw, 6rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: linear-gradient(180deg, var(--bg-tint), var(--bg-soft)); }

.section-head { max-width: 760px; margin: 0 auto clamp(2rem, 4vw, 3.2rem); text-align: center; }
.section-head p { color: var(--ink-soft); margin-bottom: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--arid-purple); margin-bottom: .85rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 3px; border-radius: 3px;
  background: var(--grad-brand);
}
.section-head .eyebrow { justify-content: center; }

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.7rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: 0 12px 26px rgba(139, 83, 212, .32); }
.btn--primary:hover { color: #fff; box-shadow: 0 18px 34px rgba(139, 83, 212, .42); }
.btn--ghost { background: #fff; color: var(--arid-navy); border-color: rgba(16, 48, 90, .16); }
.btn--ghost:hover { color: var(--arid-purple); border-color: var(--arid-purple); }
.btn--light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .45); backdrop-filter: blur(6px); }
.btn--light:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.btn--sm { padding: .6rem 1.15rem; font-size: .93rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 8px 26px rgba(16, 48, 90, .1); border-bottom-color: var(--line); }

.header-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 76px; padding: .5rem 0;
}

/* ---------- Logo mark ----------
   The official logo file is the user's original 1024x1024 PNG. It is a
   normal RGBA image: 93.7% fully transparent (alpha=0), zero painted black
   pixels. The black seen in some viewers is just transparency composited
   onto black.
   So we use the file AS-IS — no blend mode, no recolouring — and only crop
   the wide empty padding away with background-size / background-position.
   Artwork bbox measured on the canvas: x 242-765, y 357-655; shown with a
   small margin (x 238-770, y 353-659) so nothing can ever be clipped. */
.logo-mark {
  display: inline-block;
  flex-shrink: 0;
  aspect-ratio: 532 / 306;
  background-image: url("../images/arid-logo.png");
  background-repeat: no-repeat;
  background-size: 192.48% auto;
  background-position: 48.37% 49.16%;
}
.logo-mark--sm { width: 94px; }
.logo-mark--md { width: 126px; }
.logo-mark--hero { display: block; width: 240px; margin: 0 auto 1.2rem; }
.logo-mark--wide { display: block; width: 228px; margin: 0 auto 1.2rem; }

.brand { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.02rem; color: var(--arid-navy); font-weight: 800; }
.brand-text span { font-size: .7rem; color: var(--ink-mute); letter-spacing: .06em; text-transform: uppercase; }

.main-nav { margin-inline-start: auto; }
.main-nav ul {
  display: flex; align-items: center; gap: .2rem;
  list-style: none; margin: 0; padding: 0;
}
.main-nav a {
  display: block; padding: .55rem .85rem; border-radius: 10px;
  color: var(--ink); font-weight: 600; font-size: .98rem;
  transition: background .2s, color .2s;
}
.main-nav a:hover { background: var(--bg-tint); color: var(--arid-purple); }
.main-nav a[aria-current="page"] { color: var(--arid-purple); background: var(--bg-tint); }

.header-tools { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: .45rem .85rem; font: inherit; font-size: .9rem; font-weight: 700;
  color: var(--arid-navy); cursor: pointer; transition: border-color .2s, color .2s;
}
.lang-btn:hover { border-color: var(--arid-purple); color: var(--arid-purple); }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + .5rem);
  min-width: 172px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: .4rem; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.lang-switch.is-open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .6rem;
  background: none; border: 0; padding: .5rem .7rem; border-radius: 8px;
  font: inherit; font-size: .93rem; color: var(--ink); cursor: pointer; text-align: start;
}
.lang-menu button:hover { background: var(--bg-tint); }
.lang-menu button[aria-selected="true"] { color: var(--arid-purple); font-weight: 800; background: var(--bg-tint); }
.lang-menu .tag { font-size: .74rem; color: var(--ink-mute); font-weight: 700; }

.nav-toggle {
  display: none; background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  width: 44px; height: 42px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center; color: var(--arid-navy);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1100px 620px at 12% 8%, rgba(238, 59, 36, .42), transparent 62%),
              radial-gradient(900px 620px at 88% 18%, rgba(47, 127, 208, .45), transparent 60%),
              linear-gradient(140deg, #0a1e3a 0%, #16305c 52%, #0f2547 100%);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 9vw, 7rem);
}
.hero::after {
  content: ""; position: absolute; inset-inline-end: -140px; bottom: -180px;
  width: 520px; height: 520px; border-radius: 50%;
  background: var(--grad-brand); opacity: .17; filter: blur(10px);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center; position: relative; z-index: 2;
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); color: #fff; margin-bottom: 1rem; }
.hero .lead { font-size: clamp(1rem, 1.35vw, 1.15rem); color: rgba(255, 255, 255, .86); max-width: 60ch; }
.hero .eyebrow { color: #ffd9a8; }
.hero .eyebrow::before { background: var(--grad-warm); }
.hero .btn-row { margin-top: 1.8rem; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid rgba(255, 255, 255, .18); }
.hero-badges div { min-width: 120px; }
.hero-badges strong { display: block; font-size: 1.6rem; color: #ffd9a8; line-height: 1.1; }
.hero-badges span { font-size: .84rem; color: rgba(255, 255, 255, .72); }

.hero-card {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 26px; padding: 1.6rem;
  backdrop-filter: blur(10px);
}

.hero-card ul { list-style: none; padding: 0; margin: 0; }
.hero-card li {
  display: flex; align-items: flex-start; gap: .7rem;
  font-size: .95rem; color: rgba(255, 255, 255, .9); margin-bottom: .7rem;
}
.hero-card li i { color: var(--arid-orange); margin-top: .28rem; }

/* Page hero (inner pages) */
.page-hero {
  position: relative; color: #fff; overflow: hidden;
  background: radial-gradient(800px 420px at 88% 0%, rgba(139, 83, 212, .5), transparent 62%),
              linear-gradient(135deg, #0d2342, #1a3a6b);
  padding: clamp(2.6rem, 6vw, 4.5rem) 0 clamp(2.4rem, 5vw, 3.6rem);
}
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: .5rem; }
.page-hero p { color: rgba(255, 255, 255, .82); max-width: 68ch; margin-bottom: 0; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; font-size: .87rem; color: rgba(255, 255, 255, .68); margin-bottom: .9rem; padding: 0; list-style: none; }
.breadcrumb a { color: rgba(255, 255, 255, .9); }
.breadcrumb a:hover { color: #ffd9a8; }

/* =========================================================
   Cards & grids
   ========================================================= */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px;
  background: var(--grad-brand); opacity: 0; transition: opacity .3s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #d8e2f2; }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.18rem; margin-bottom: .55rem; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-soft); font-size: .97rem; }

.card-icon {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  font-size: 1.4rem; color: #fff; margin-bottom: 1.1rem; background: var(--grad-warm);
}
.card-icon--cool { background: var(--grad-cool); }
.card-icon--brand { background: var(--grad-brand); }

.card--link { display: block; color: inherit; }
.card--link:hover { color: inherit; }
.card-more { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; font-weight: 700; font-size: .92rem; color: var(--arid-purple); }
[dir="rtl"] .card-more i, [dir="rtl"] .link-arrow i { transform: scaleX(-1); }

/* Value / list rows */
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  display: flex; gap: .9rem; align-items: flex-start; padding: .85rem 0;
  border-bottom: 1px dashed var(--line);
}
.feature-list li:last-child { border-bottom: 0; }
.feature-list i { color: var(--arid-purple); font-size: 1.05rem; margin-top: .3rem; }
.feature-list strong { display: block; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(1.8rem, 4vw, 3.4rem); align-items: center; }

/* Stat strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.3rem; text-align: center; box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-size: 2rem; line-height: 1.1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: .9rem; color: var(--ink-soft); }

/* Quote */
.quote-block {
  background: var(--bg-soft); border-inline-start: 5px solid var(--arid-purple);
  border-radius: var(--radius-sm); padding: 1.6rem 1.8rem;
}
.quote-block p { font-size: 1.05rem; color: var(--ink); margin: 0; }

/* =========================================================
   Projects
   ========================================================= */
.project-card {
  display: flex; flex-direction: column; gap: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.project-card::after {
  content: ""; position: absolute; inset-inline-end: -60px; top: -60px;
  width: 170px; height: 170px; border-radius: 50%; background: var(--grad-cool); opacity: .08;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.project-card h3 { margin-bottom: 0; font-size: 1.22rem; }
.project-tag {
  align-self: flex-start; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: .3rem .75rem; border-radius: 999px; color: var(--arid-purple); background: rgba(139, 83, 212, .1);
}
.project-card p { color: var(--ink-soft); margin: 0; }
.project-card ul { margin: 0; }
.project-card li { font-size: .95rem; color: var(--ink-soft); }
.site-link {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: auto;
  font-weight: 800; color: var(--arid-blue); font-size: .95rem;
}
.site-link:hover { color: var(--arid-purple); }

/* =========================================================
   Activities table
   ========================================================= */
.activities-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.4rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: .42rem 1rem; font: inherit; font-size: .9rem; font-weight: 700;
  color: var(--ink-soft); cursor: pointer; transition: all .22s var(--ease);
}
.chip:hover { border-color: var(--arid-purple); color: var(--arid-purple); }
.chip[aria-pressed="true"] { background: var(--grad-brand); color: #fff; border-color: transparent; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
table.data-table caption { text-align: start; padding: 1rem 1.2rem .4rem; color: var(--ink-mute); font-size: .9rem; }
table.data-table th, table.data-table td { padding: .95rem 1.1rem; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
table.data-table thead th {
  background: var(--bg-tint); color: var(--arid-navy); font-size: .84rem;
  letter-spacing: .06em; text-transform: uppercase; font-weight: 800; white-space: nowrap;
  position: sticky; top: 0;
}
table.data-table tbody tr { transition: background .2s; }
table.data-table tbody tr:hover { background: #fbfcff; }
table.data-table tbody tr:last-child td { border-bottom: 0; }
table.data-table td.title-cell { font-weight: 700; color: var(--arid-navy); max-width: 340px; }

.status-pill {
  display: inline-block; padding: .25rem .7rem; border-radius: 999px;
  font-size: .78rem; font-weight: 800; white-space: nowrap;
}
.status-pill--done { background: rgba(47, 127, 208, .12); color: #1f66ad; }
.status-pill--ongoing { background: rgba(245, 147, 49, .16); color: #b96a09; }
.status-pill--planned { background: rgba(139, 83, 212, .14); color: #6c34b8; }

.table-state { padding: 2.6rem 1.4rem; text-align: center; color: var(--ink-soft); }
.table-state i { font-size: 1.6rem; color: var(--arid-purple); display: block; margin-bottom: .6rem; }

/* Activities card view (mobile) */
.activity-cards { display: none; gap: 1rem; }
.activity-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.activity-card header { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; }
.activity-card h3 { font-size: 1.05rem; margin: 0; }
.activity-card dl { margin: .9rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem .8rem; font-size: .92rem; }
.activity-card dt { color: var(--ink-mute); font-weight: 700; }
.activity-card dd { margin: 0; color: var(--ink-soft); }

/* =========================================================
   Charter document
   ========================================================= */
.doc-shell {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.doc-toolbar {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1rem 1.4rem; background: var(--bg-tint); border-bottom: 1px solid var(--line);
}
.doc-meta { font-size: .88rem; color: var(--ink-soft); }
.doc-search { display: flex; gap: .5rem; align-items: center; }
.doc-search input {
  font: inherit; font-size: .93rem; padding: .55rem .95rem; min-width: 210px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
}
.doc-search input:focus { border-color: var(--arid-purple); outline: none; }

.doc-body {
  padding: clamp(1.4rem, 4vw, 3rem);
  max-height: 74vh; overflow-y: auto;
  font-size: 1.02rem; line-height: 1.95;
}
.doc-body::after { content: ""; display: block; clear: both; }
.doc-page-label {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute); border-bottom: 1px dashed var(--line);
  padding-bottom: .5rem; margin: 2.2rem 0 1rem;
}
.doc-page-label:first-child { margin-top: 0; }
.doc-body p { margin: 0 0 1rem; }
.doc-body .doc-title { font-size: 1.5rem; margin-bottom: 1.2rem; }
.doc-body .doc-heading { font-size: 1.22rem; color: var(--arid-navy); margin: 1.8rem 0 .7rem; }
.doc-body .doc-article {
  font-weight: 800; color: var(--arid-purple); font-size: 1.08rem;
  margin: 1.5rem 0 .5rem;
}
.doc-body .doc-list { padding-inline-start: 1.5rem; margin-bottom: 1.1rem; }
.doc-body .doc-list li { margin-bottom: .5rem; }
.doc-body mark { background: #ffe9a8; padding: 0 .15em; border-radius: 3px; }
.doc-note { font-size: .88rem; color: var(--ink-mute); }
.doc-loading { display: grid; place-items: center; gap: .8rem; padding: 3.5rem 1rem; text-align: center; color: var(--ink-soft); }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--arid-purple);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.doc-toc { position: sticky; top: 96px; }
.doc-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; max-height: 62vh; overflow-y: auto; }
.doc-toc a {
  display: block; padding: .45rem .7rem; border-radius: 8px; font-size: .92rem;
  color: var(--ink-soft); border-inline-start: 3px solid transparent;
}
.doc-toc a:hover { background: var(--bg-tint); color: var(--arid-purple); border-inline-start-color: var(--arid-purple); }

.doc-layout { display: grid; grid-template-columns: 290px 1fr; gap: 1.6rem; align-items: start; }

/* =========================================================
   Contact
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 700; font-size: .93rem; margin-bottom: .4rem; color: var(--arid-navy); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; font: inherit; font-size: .97rem; padding: .8rem 1rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--arid-purple); outline: none; box-shadow: 0 0 0 4px rgba(139, 83, 212, .12);
}
.form-note { font-size: .84rem; color: var(--ink-mute); }
.form-status { margin-top: 1rem; border-radius: var(--radius-sm); padding: .9rem 1.1rem; font-size: .93rem; font-weight: 600; display: none; }
.form-status.is-visible { display: block; }
.form-status--ok { background: rgba(47, 127, 208, .1); color: #1c5f9f; border: 1px solid rgba(47, 127, 208, .3); }
.form-status--err { background: rgba(238, 59, 36, .08); color: #b3261a; border: 1px solid rgba(238, 59, 36, .3); }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px dashed var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list i { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-tint); color: var(--arid-purple); }
.contact-list strong { display: block; font-size: .95rem; }
.contact-list span { font-size: .93rem; color: var(--ink-soft); }

.map-frame { border: 0; width: 100%; height: 300px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* =========================================================
   CTA + Footer
   ========================================================= */
.cta-band {
  background: var(--grad-brand); color: #fff; border-radius: 26px;
  padding: clamp(2rem, 5vw, 3.4rem); text-align: center; box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .92); max-width: 62ch; margin-inline: auto; }
.cta-band .btn--ghost { background: #fff; color: var(--arid-crimson); border-color: #fff; }

.site-footer { background: var(--arid-deep); color: rgba(255, 255, 255, .74); padding: clamp(2.6rem, 5vw, 4rem) 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: rgba(255, 255, 255, .74); }
.site-footer a:hover { color: #ffd9a8; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; font-size: .94rem; }
.footer-brand .logo-mark { margin-bottom: 1rem; }.footer-brand p { font-size: .93rem; }
.footer-bottom {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; justify-content: space-between;
  font-size: .86rem;
}
.social-row { display: flex; gap: .6rem; margin-top: 1rem; }
.social-row a {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: #fff; transition: background .2s, transform .2s;
}
.social-row a:hover { background: var(--grad-brand); transform: translateY(-3px); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Back to top */
.to-top {
  position: fixed; inset-inline-end: 1.2rem; bottom: 1.2rem; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad-brand); color: #fff; box-shadow: var(--shadow);
  display: grid; place-items: center; opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s, transform .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { transform: translateY(-3px); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc { position: static; }
  .doc-toc ol { max-height: none; display: flex; flex-wrap: wrap; gap: .3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: 76px 0 auto 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 1rem 1.25rem 1.4rem; transform: translateY(-12px);
    opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
    max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: .15rem; }
  .main-nav a { padding: .8rem 1rem; font-size: 1.02rem; }
  .table-wrap { display: none; }
  .activity-cards { display: grid; }
  .doc-body { max-height: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand .logo-mark { width: 76px; }
  .brand-text strong { font-size: .92rem; }
  .brand-text span { display: none; }
  .hero-badges { gap: 1rem; }
  .hero-badges strong { font-size: 1.3rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .doc-search input { min-width: 0; width: 100%; }
  .doc-search { width: 100%; }
  .container { width: min(100% - 1.8rem, var(--maxw)); }
}

/* Print */
@media print {
  .site-header, .site-footer, .to-top, .doc-toolbar, .doc-toc, .page-hero .btn-row { display: none !important; }
  .doc-body { max-height: none; overflow: visible; }
  .doc-shell { border: 0; box-shadow: none; }
}

/* =========================================================
   Direction-aware spacing (RTL / LTR)
   ========================================================= */
[dir="rtl"] .main-nav { margin-inline-start: auto; }
[dir="ltr"] .main-nav { margin-inline-start: auto; }
