/* ABC Translation Djibouti
   Palette: Lake Assal salt, Gulf of Tadjoura blue, basalt, ministry-stamp ink. */
:root {
  --salt: #f4f7f7;
  --paper: #ffffff;
  --gulf: #0d3b4c;
  --gulf-2: #145a6e;
  --basalt: #1d2427;
  --stone: #5b676b;
  --line: #d6dfe0;
  --ink: #3d3a9e;
  --ink-soft: #e9e8f7;
  --sand: #e8dcc2;
  --ok: #1f6f4a;
  --err: #a32121;
  --radius-s: 4px;
  --radius-m: 10px;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}
[dir="rtl"] {
  --font-sans: "IBM Plex Sans Arabic", "IBM Plex Sans", Tahoma, "Segoe UI", Arial, sans-serif;
  --font-serif: "IBM Plex Sans Arabic", "IBM Plex Sans", Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--basalt);
  background: var(--salt);
}
[dir="rtl"] body { line-height: 1.8; }
img, svg { max-width: 100%; }
a { color: var(--gulf-2); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-serif); color: var(--gulf); line-height: 1.2; font-weight: 600; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); }
h3 { font-size: 1.15rem; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.4; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--gulf); color: #fff; padding: 8px 14px; z-index: 100; border-radius: var(--radius-s); }
.skip:focus { top: 8px; }
.muted { color: var(--stone); font-size: .95rem; }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .4em; justify-content: center;
  padding: .7em 1.2em; border-radius: var(--radius-s); border: 2px solid transparent;
  font: 600 1rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-lg { padding: .9em 1.5em; font-size: 1.05rem; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2f2c85; color: #fff; }
.btn-ghost { border-color: var(--gulf); color: var(--gulf); background: transparent; }
.btn-ghost:hover { background: var(--gulf); color: #fff; }
.btn-light { background: #fff; color: var(--gulf); }
.btn-light:hover { background: var(--sand); color: var(--gulf); }
.btn-ghost-light { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gulf); flex-shrink: 0; }
.logo-mark { width: 40px; height: 40px; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 600 1.1rem var(--font-serif); }
[dir="rtl"] .brand-name { font-family: "IBM Plex Serif", Georgia, serif; }
.brand-branch { font-size: .82rem; color: var(--stone); }
.nav-panel { display: flex; align-items: center; gap: 16px; margin-inline-start: auto; }
.nav { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 9px; white-space: nowrap; text-decoration: none; color: var(--basalt); font-size: .95rem; border-radius: var(--radius-s); }
.nav a:hover { background: var(--salt); color: var(--gulf); }
.nav a[aria-current="page"], .nav a.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
/* Utility bar: contact + languages, on every page */
.topbar { background: var(--gulf); color: #d7e4e7; font-size: .85rem; }
.topbar-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; min-height: 38px; flex-wrap: wrap; }
.topbar-contact { display: flex; gap: 20px; margin: 0; flex-wrap: wrap; }
.topbar a { color: #e6eef0; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.lang-switch ul { display: flex; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.lang-switch a { display: block; padding: 8px 9px; white-space: nowrap; }
.lang-switch a[aria-current="true"] { color: var(--gulf); background: var(--sand); }
@media (max-width: 560px) { .topbar-contact { display: none; } .topbar-row { justify-content: center; } .lang-switch a { padding: 8px 7px; } }
.header-cta { white-space: nowrap; }
.nav-toggle { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; font: 500 .95rem var(--font-sans); color: var(--gulf); cursor: pointer; align-items: center; gap: 8px; }
.nav-toggle-bars { width: 18px; height: 12px; position: relative; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.nav-toggle-bars::after { content: ""; position: absolute; inset-inline: 0; top: 3px; border-top: 2px solid currentColor; }

@media (max-width: 1280px) {
  .nav a { white-space: normal; }
  .nav-toggle { display: inline-flex; }
  .nav-panel { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 16px var(--gutter) 24px; flex-direction: column; align-items: stretch; gap: 16px; box-shadow: 0 12px 24px rgba(13,59,76,.08); }
  .nav-panel.is-open { display: flex; }
  .nav { flex-direction: column; }
  .nav a { padding: 10px 4px; border-bottom: 1px solid var(--salt); font-size: 1.05rem; }
  .nav a[aria-current="page"], .nav a.is-active { box-shadow: none; }
  .header-cta { align-self: flex-start; }
}

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 16px 0 0; margin: 0; font-size: .875rem; color: var(--stone); }
.crumbs li + li::before { content: "/"; margin-inline-end: 4px; color: var(--line); }
.crumbs a { color: var(--stone); }

/* Hero (home) */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; padding-block: clamp(40px, 7vw, 88px); }
.hero-kicker { color: var(--ink); font-weight: 600; margin-bottom: .75em; }
.hero h1 { max-width: 20ch; }
.lead { font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem); color: #34403f; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { position: relative; aspect-ratio: 1 / 1.05; max-width: 440px; justify-self: center; width: 100%; }
.paper {
  position: absolute; inset: 6% 14% 0 4%;
  background: var(--salt); border: 1px solid var(--line); border-radius: 2px;
  box-shadow: 0 1px 0 var(--line), 8px 8px 0 -1px var(--paper), 8px 8px 0 0 var(--line);
  padding: 14% 12%; display: flex; flex-direction: column; gap: 14px;
  transform: rotate(-2.5deg);
}
[dir="rtl"] .paper { transform: rotate(2.5deg); inset: 6% 4% 0 14%; }
.paper span { display: block; height: 7px; background: var(--line); border-radius: 4px; }
.paper span:nth-child(1) { width: 55%; height: 10px; background: #c6d2d4; }
.paper span:nth-child(3) { width: 88%; }
.paper span:nth-child(5) { width: 70%; }
.paper span:nth-child(7) { width: 40%; margin-top: auto; }
.seal {
  position: absolute; width: 64%; inset-inline-end: 0; bottom: 4%;
  color: var(--ink); transform: rotate(-12deg); mix-blend-mode: multiply; opacity: .92;
  animation: stamp .7s cubic-bezier(.2,.9,.3,1.3) .25s both;
}
.seal-line { fill: none; stroke: currentColor; stroke-width: 4; }
.seal-line.thin { stroke-width: 1.5; }
.seal-ring { fill: currentColor; font: 600 17px var(--font-sans); direction: ltr; unicode-bidi: plaintext; }
.seal-abc { fill: currentColor; font: 600 46px "IBM Plex Serif", Georgia, serif; letter-spacing: 2px; }
.seal-city { fill: currentColor; font: 600 17px "IBM Plex Sans", Arial, sans-serif; letter-spacing: 6px; }
.seal-year { fill: currentColor; font: 500 15px "IBM Plex Sans", Arial, sans-serif; letter-spacing: 3px; }
@keyframes stamp { from { opacity: 0; transform: rotate(-12deg) scale(1.35); } to { opacity: .92; transform: rotate(-12deg) scale(1); } }

/* Lists */
.ticks { list-style: none; padding: 0; margin: 1em 0; }
.ticks li { position: relative; padding-inline-start: 30px; margin-bottom: .45em; }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .45em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(-45deg);
}
.cols { columns: 2 260px; column-gap: 32px; padding-inline-start: 1.2em; }
.cols li { break-inside: avoid; margin-bottom: .35em; }
.numbered { padding-inline-start: 1.4em; }
.numbered li { margin-bottom: .5em; padding-inline-start: .3em; }
.numbered li::marker { color: var(--ink); font-weight: 600; }

/* Sections */
.section { padding-block: clamp(40px, 6vw, 72px); }
.section-head { max-width: 68ch; margin-bottom: 28px; }
.section-head p { color: var(--stone); }
.band { background: var(--gulf); color: #e6eef0; }
.band h2, .band h3 { color: #fff; }

/* Service list: ruled rows, not cards */
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); column-gap: 40px; border-top: 1px solid var(--line); }
.svc-list li { border-bottom: 1px solid var(--line); }
.svc-list a { display: block; padding: 20px 0; text-decoration: none; color: inherit; }
.svc-list a:hover .svc-name { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
.svc-name { font-size: 1.2rem; margin: 0 0 .25em; }
.svc-short { margin: 0; color: var(--stone); font-size: .97rem; }

/* Steps: the real sequence on the page */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 0; margin: 0; }
.steps li { counter-increment: step; border-top: 2px solid rgba(255,255,255,.35); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font: 600 2.4rem/1 var(--font-serif); color: var(--sand); margin-bottom: 10px; }
.steps p { color: #cfdde1; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; }
.why-item { border-inline-start: 3px solid var(--sand); padding-inline-start: 18px; }
.why-item p { color: var(--stone); margin: 0; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 12px 0 28px; }
.chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; text-decoration: none; color: var(--gulf); font-size: .93rem; }
.chips a:hover { border-color: var(--ink); color: var(--ink); }

.country-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 32px; border-top: 1px solid var(--line); }
.country-list li { border-bottom: 1px solid var(--line); }
.country-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; color: var(--basalt); }
.country-list a:hover .ct-name { color: var(--ink); text-decoration: underline; }
.tag { font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-s); white-space: nowrap; }
.tag-apostille { background: var(--ink-soft); color: var(--ink); }
.tag-embassy { background: #f3ead6; color: #6b4e12; }
.procedure { margin-bottom: .6em; }

/* Page hero (inner pages) */
.page-hero { padding-block: 28px 32px; }
.page-hero h1 { max-width: 24ch; }
.page-hero.center h1, .page-hero.center .lead { margin-inline: auto; }

.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; padding-bottom: 48px; }
.with-aside.form-first { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 960px) { .with-aside, .with-aside.form-first { grid-template-columns: 1fr; gap: 32px; } }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose.narrow { padding-bottom: 56px; }

.contact-box { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: var(--radius-s); padding: 24px; position: sticky; top: 96px; }
.contact-box h2 { font-size: 1.3rem; }
.contact-box p { color: var(--stone); }
.contact-list { list-style: none; padding: 0; margin: 16px 0; }
.contact-list li { margin-bottom: 8px; overflow-wrap: anywhere; }
.contact-list span:first-child { display: block; font-size: .8rem; color: var(--stone); }
.contact-list.big li { font-size: 1.1rem; margin-bottom: 14px; }
@media (max-width: 960px) { .contact-box { position: static; } }

.note { background: var(--paper); border-inline-start: 4px solid var(--sand); padding: 20px 24px; margin: 32px 0; border-radius: var(--radius-s); }
.note h2 { font-size: 1.2rem; margin-top: 0; }
.note p { margin: 0; color: #3c4749; }

.faq { margin-top: 2em; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--gulf); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font: 400 1.4rem/1 var(--font-sans); color: var(--ink); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: #3c4749; padding-bottom: 12px; margin: 0; }

/* CTA band */
.cta-band { background: var(--gulf); color: #e6eef0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-block: 48px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; }
.cta-band-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Form */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: clamp(20px, 4vw, 40px); margin-bottom: 56px; }
.form-intro { color: var(--stone); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 500; font-size: .95rem; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=date], .field select, .field textarea {
  width: 100%; padding: 11px 12px; font: 400 1rem var(--font-sans); color: var(--basalt);
  background: #fbfcfc; border: 1px solid #b8c5c7; border-radius: var(--radius-s);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--ink-soft); }
.field input[type=file] { width: 100%; padding: 10px; border: 1px dashed #b8c5c7; border-radius: var(--radius-s); background: #fbfcfc; }
.field .help { font-size: .85rem; color: var(--stone); margin: 6px 0 0; }
.field.check { display: flex; gap: 10px; align-items: flex-start; }
.field.check input { margin-top: .35em; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--ink); }
.field.check label { font-weight: 400; font-size: .93rem; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--err); }
.field.is-invalid label { color: var(--err); }
.req { color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; gap: 20px; margin-top: 24px; flex-wrap: wrap; }
.form-status { margin: 0; font-weight: 500; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }

/* Footer */
.site-footer { background: var(--basalt); color: #b9c4c6; font-size: .95rem; }
.site-footer a { color: #e6eef0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; padding-block: 56px 32px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-h { font: 600 1rem var(--font-sans); color: #fff; margin-bottom: 14px; }
.brand-footer { color: #fff; margin-bottom: 16px; }
.brand-footer .logo-mark { color: var(--sand); }
.brand-footer .brand-branch { color: #b9c4c6; }
.footer-locs a { display: inline-block; margin-inline-end: 10px; font-size: .88rem; }
.site-footer .contact-list span:first-child { color: #8d9a9d; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid #2f393c; padding-block: 18px; font-size: .85rem; }
.footer-bottom p { margin: 0; }
.footer-langs a { margin-inline-start: 12px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Responsive hero */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { max-width: 230px; order: -1; }
}

/* Root language chooser */
.chooser { background: var(--gulf); min-height: 100vh; display: flex; }
.chooser-main { margin: auto; padding: 48px var(--gutter); width: 100%; max-width: 760px; }
.chooser-brand { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 32px; }
.chooser-brand .logo-mark { color: var(--sand); width: 52px; height: 52px; }
.chooser-brand .brand-branch { color: #b9cdd2; }
.chooser-404 { color: #fff; font-size: 4rem; }
.chooser-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid rgba(255,255,255,.2); }
.chooser-list li { border-bottom: 1px solid rgba(255,255,255,.2); }
.chooser-list a { display: flex; flex-direction: column; gap: 2px; padding: 18px 4px; color: #fff; text-decoration: none; }
.chooser-list a:hover strong { color: var(--sand); }
.chooser-list strong { font: 600 1.4rem var(--font-serif); }
.chooser-list a[lang="ar"] strong, .chooser-list a[lang="ar"] span { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.chooser-list span { color: #b9cdd2; font-size: .95rem; }
.chooser-contact { margin-top: 28px; display: flex; gap: 20px; flex-wrap: wrap; }
.chooser-contact a { color: #e6eef0; }

@media print {
  .site-header, .site-footer, .cta-band, .form-card, .contact-box { display: none; }
}
