/* ==========================================================================
   almadanifirm.com — holding page
   --------------------------------------------------------------------------
   One page, no build, no framework, no external request. Everything it needs
   is in this directory: four font subsets, the wordmark, the favicon.

   PALETTE comes from the supplied logo artwork, sampled from the PDF rather
   than guessed: #1413ff and #f89801. Note that #1413ff is NOT the #0027c9 the
   main site uses — the new identity is a brighter blue. Two blues that close
   together sitting side by side read as a mistake rather than a pair, so this
   page commits to the logo's own colour throughout. Change --blue below if
   the firm would rather it matched the existing site.

   TYPOGRAPHY is IBM Plex Sans Arabic, as on the main site: one family that
   carries both languages, under the SIL Open Font License. The brand deck in
   the logo PDF specifies Euphemia UCAS, which cannot be used here — it is a
   licensed desktop font with no Arabic coverage and no right to redistribute
   it as a webfont. Flagged rather than silently substituted.
   ========================================================================== */

/* ---- fonts: the four subsets this page can actually draw from ------------ */

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-arabic-400-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-arabic-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-arabic-700-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-arabic-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ---- tokens -------------------------------------------------------------- */

:root {
  --blue:   #1413ff;          /* sampled from the logo artwork */
  --orange: #f89801;          /* the rule under the wordmark */
  --ink:    #14161d;
  --muted:  #5a616f;
  --line:   #e6e8ef;
  --paper:  #ffffff;
  --sunk:   #f7f8fb;

  --wrap: 42rem;
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

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

body {
  margin: 0;
  padding: clamp(2rem, 6vw, 5rem) 1.25rem clamp(3rem, 8vw, 6rem);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.85;
  /* A whisper of the brand blue at the top edge, so the page is not a blank
     sheet before the logo has painted. */
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--blue) 4%, transparent), transparent 22rem);
  background-repeat: no-repeat;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
}


/* ---- masthead ------------------------------------------------------------ */

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}

/* The wordmark is inline SVG so `currentColor` reaches it — the same file
   serves a light ground and a dark one, and only `color` changes. */
.logo {
  width: min(26rem, 82vw);
  height: auto;
  color: var(--blue);
}


/* ---- language switch ----------------------------------------------------- */

.lang {
  display: inline-flex;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sunk);
  /* Always left-to-right: the pair reads AR | EN in both directions, and
     flipping it makes the toggle appear to have moved when you use it. */
  direction: ltr;
}

.lang button {
  min-height: 2.25rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
}

.lang button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}


/* ---- the notice ---------------------------------------------------------- */

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.6rem, 1.15rem + 2.1vw, 2.6rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--blue);
  text-wrap: balance;
}

p { margin: 0 0 1.25rem; }
p:last-child { margin-bottom: 0; }

.lede { color: var(--ink); }
.note { color: var(--muted); }

/* The hairline from the logo, reused as the page's one divider. */
.rule {
  height: 1px;
  margin: clamp(2.25rem, 5vw, 3.25rem) 0;
  border: 0;
  background: var(--orange);
}


/* ---- contact ------------------------------------------------------------- */

h2 {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

:lang(ar) h2 { letter-spacing: 0; text-transform: none; }

.channels {
  display: grid;
  gap: 0.875rem;
  margin: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sunk);
}

.channel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  margin: 0;
}

.channel + .channel {
  padding-top: 0.875rem;
  border-top: 1px solid var(--line);
}

.channel dt {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--ink);
}

.channel dd {
  margin: 0;
  color: var(--muted);
}

/* Latin contact details keep their own direction inside Arabic text, so an
   email address or a phone number is never reordered around its punctuation. */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { color: color-mix(in srgb, var(--blue) 80%, #000); }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }

footer {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
  text-align: center;
}


/* ---- Arabic ------------------------------------------------------------- */

/* Arabic sits differently on the line: it has no ascender/descender rhythm to
   speak of, so the same leading reads tighter. */
[dir="rtl"] body,
[lang="ar"] { line-height: 1.95; }
[lang="ar"] h1 { letter-spacing: 0; }


@media (prefers-reduced-motion: no-preference) {
  .panel { animation: rise 0.5s ease both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}

@media print {
  .lang { display: none; }
  body { background: #fff; }
}
