/* Alimina Studio: one stylesheet for EN, FR and AR.
   Uses logical properties (inline-start/end) so the Arabic page mirrors automatically. */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.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"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.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"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.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: 400; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.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: 500; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-500-normal.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: 600; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.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; }

:root {
  --bg: #faf7f2;          /* warm off-white */
  --surface: #ffffff;
  --tint: #eef3f1;        /* pale teal for alternating sections */
  --ink: #12262b;
  --muted: #55676c;
  --line: #e3ddd2;
  --brand: #0f3a40;       /* deep teal-navy */
  --brand-ink: #ffffff;
  --accent: #c2603a;      /* terracotta */
  --accent-soft: #f6e3da;
  --focus: #c2603a;
  --shadow: 0 1px 2px rgb(18 38 43 / 6%), 0 8px 24px rgb(18 38 43 / 6%);
  --radius: 14px;
  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1b1e;
    --surface: #112629;
    --tint: #0e2226;
    --ink: #e9efee;
    --muted: #a3b4b6;
    --line: #22393d;
    --brand: #7cc1bd;
    --brand-ink: #0b1b1e;
    --accent: #e48b63;
    --accent-soft: #3a2a23;
    --focus: #e48b63;
    --shadow: none;
  }
}
:lang(ar) { --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, "Segoe UI", Tahoma, Arial, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
:lang(ar) body, body:lang(ar) { line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.45; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
bdi { unicode-bidi: isolate; }

.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.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; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--brand); color: var(--brand-ink); padding: 0.5rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { top: 1rem; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; font-weight: 600; font-size: 1.15rem; color: var(--ink); margin: 0; }
.brand .light { font-weight: 400; color: var(--muted); }
.mark { width: 1.6em; height: 1.6em; flex: none; }
.mark-arch { stroke: var(--brand); }
.mark-dot { fill: var(--accent); }
.nav { display: flex; gap: 1.4rem; margin-inline-start: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.97rem; }
.nav a:hover { color: var(--ink); }
.lang-switch { display: flex; align-items: center; gap: 0.35rem; font-weight: 500; }
.lang-switch a { text-decoration: none; color: var(--muted); padding: 0.2rem 0.45rem; border-radius: 6px; min-width: 2.2rem; text-align: center; }
.lang-switch a[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--font); font-size: 1.1rem; line-height: 1; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="page"] { color: var(--brand-ink); background: var(--brand); }
.lang-switch .dot { color: var(--line); }
@media (max-width: 760px) {
  .nav { display: none; }
  .lang-switch { margin-inline-start: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.25rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 500; text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.btn svg { width: 1.25em; height: 1.25em; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.text-link { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--accent); font-weight: 500; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.ext { width: 1em; height: 1em; }
[dir="rtl"] .ext { transform: scaleX(-1); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow, .kicker { color: var(--accent); font-weight: 600; font-size: 0.92rem; letter-spacing: 0.02em; margin-bottom: 0.9rem; }
:lang(ar) .eyebrow, :lang(ar) .kicker { letter-spacing: 0; }
.lead { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem); color: var(--muted); max-width: 40em; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block: 1.6rem 1.4rem; }
.hero-art { justify-self: center; width: 100%; max-width: 460px; }
.hero-art svg { display: block; width: 100%; height: auto; overflow: visible; }
[dir="rtl"] .hero-art svg { transform: scaleX(-1); }
.a-blob { fill: var(--tint); }
.a-card { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.a-surface { fill: var(--surface); }
.a-line { fill: var(--line); }
.a-brand { fill: var(--brand); }
.a-on-brand { fill: var(--brand-ink); }
.a-accent { fill: var(--accent); }
.a-soft { fill: var(--accent-soft); }
.a-soft-strong { fill: var(--accent); opacity: 0.45; }
.a-tint { fill: var(--tint); }
.a-arch { stroke: var(--brand); }
.a-shadow { filter: drop-shadow(0 6px 14px rgb(18 38 43 / 10%)); }
@media (prefers-color-scheme: dark) { .a-shadow { filter: none; } }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 340px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-tint { background: var(--tint); }
.section-intro { color: var(--muted); max-width: 44em; font-size: 1.08rem; }
.group + .group { margin-top: clamp(3rem, 6vw, 4.5rem); }
.group-head { margin-bottom: 1.6rem; }

.cards { display: grid; gap: 1.1rem; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .cards-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .cards-3, .cards-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card-no { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.6rem; font-variant-numeric: tabular-nums; }
.card-text { color: var(--muted); }
.features { list-style: none; padding: 0; margin: 0.2rem 0 0; display: grid; gap: 0.55rem; }
.features li { position: relative; padding-inline-start: 1.5rem; font-size: 0.98rem; }
.features li::before {
  content: ""; position: absolute; inset-inline-start: 0.1rem; top: 0.62em;
  width: 0.55rem; height: 0.55rem; background: var(--accent); transform: rotate(45deg); border-radius: 1px;
}
:lang(ar) .features li::before { top: 0.8em; }

.care {
  margin-top: clamp(2.5rem, 5vw, 3.5rem); padding: clamp(1.5rem, 4vw, 2.2rem);
  border-radius: var(--radius); background: var(--brand); color: var(--brand-ink);
  display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem; align-items: center;
}
.care .kicker { color: inherit; opacity: 0.8; }
.care h2 { margin: 0; }
.care p:last-child { margin: 0; }
@media (max-width: 760px) { .care { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; counter-reset: step; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 600; margin-bottom: 0.9rem;
}
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin-top: 1.8rem; }
@media (max-width: 960px) { .work-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .work-grid { grid-template-columns: 1fr; } }
.work-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.work-shot { display: block; aspect-ratio: 16 / 10; background: var(--tint); border-bottom: 1px solid var(--line); overflow: hidden; }
.work-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s ease; }
.work-card:hover .work-shot img { transform: scale(1.03); }
.work-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.work-body p { color: var(--muted); font-size: 0.98rem; }
.work-role { color: var(--accent) !important; font-weight: 500; font-size: 0.9rem !important; margin-bottom: 0.35rem; }
.tags { list-style: none; padding: 0; margin: 0 0 1.1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li { font-size: 0.8rem; padding: 0.15rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.work-body .text-link { margin-top: auto; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-role { color: var(--accent); font-weight: 500; }
.solo { border-inline-start: 3px solid var(--accent); padding-inline-start: 1rem; color: var(--muted); }
.highlights { margin: 0; display: grid; gap: 0.9rem; }
.highlights div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.highlights dt { font-weight: 600; margin-bottom: 0.2rem; }
.highlights dd { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ---------- Principles ---------- */
.principles { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem 2rem; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .principles { grid-template-columns: 1fr; } }
.principles li { border-top: 2px solid var(--accent); padding-top: 1rem; }
.principles p { color: var(--muted); margin: 0; }

/* ---------- Contact ---------- */
.contact { background: var(--brand); color: var(--brand-ink); }
.contact .section-intro, .contact .muted { color: inherit; opacity: 0.85; }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 860px) { .contact-inner { grid-template-columns: 1fr; } }
.contact-links { display: grid; gap: 0.8rem; }
.contact-link {
  display: flex; align-items: center; gap: 1rem; margin: 0;
  padding: 1rem 1.2rem; border-radius: var(--radius); text-decoration: none;
  background: color-mix(in srgb, var(--brand-ink) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-ink) 22%, transparent);
}
a.contact-link:hover { background: color-mix(in srgb, var(--brand-ink) 18%, transparent); }
.contact-link svg { width: 1.7rem; height: 1.7rem; flex: none; }
.contact-link span { display: grid; }
.contact-link strong { font-weight: 600; }
.contact-link bdi { opacity: 0.9; word-break: break-all; }
.contact-link.is-soon { opacity: 0.7; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); font-size: 0.93rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; align-items: center; justify-content: space-between; }
.footer-inner p { margin: 0; }
.brand-small { font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.brand-small .mark { width: 1.3em; height: 1.3em; }

/* ---------- Privacy page ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.3rem; margin-top: 2rem; }

/* ---------- Language chooser (root, 404) ---------- */
.chooser { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.chooser-inner .brand { justify-content: center; font-size: 1.3rem; margin-bottom: 1.5rem; }
.chooser-links { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.chooser-links a { padding: 0.7rem 1.4rem; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 500; background: var(--surface); }
.chooser-links a:hover { border-color: var(--brand); }

/* ---------- Founder page (not indexed by search engines) ---------- */
.founder .highlights { margin-block: 1.8rem; }
.founder-contact { margin-block: 1.8rem; }
.founder-contact .contact-link { background: var(--surface); border-color: var(--line); color: var(--ink); }
.founder-contact a.contact-link:hover { border-color: var(--brand); background: var(--surface); }
