/* Home page (English and Arabic). Logical properties keep the Arabic (right-to-left) page mirrored. */
:root {
  --cream: #f7f1e1;
  --cream-2: #efe6cc;
  --paper: #fffcf3;
  --ink: #13301b;
  --ink-2: #3e5543;
  --leaf: #7cc36b;
  --leaf-deep: #3f8a3a;
  --bean: #e2cca0;
  --rule: #e0d5b6;
  --button-ink: #13301b;
  --shadow: 0 1px 2px rgb(19 48 27 / .06), 0 8px 24px rgb(19 48 27 / .08);
  --display: 'Nunito', 'Atkinson Hyperlegible', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #10231a;
    --cream-2: #16301f;
    --paper: #183423;
    --ink: #f3ecd8;
    --ink-2: #c3cdb9;
    --leaf: #8fd17a;
    --leaf-deep: #9ad788;
    --rule: #2a4a33;
    --shadow: 0 1px 2px rgb(0 0 0 / .25), 0 10px 28px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  padding-inline: clamp(16px, 5vw, 56px);
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1080px; margin: 0 auto; }

header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 22px;
}
.logo { display: block; line-height: 0; }
.logo img { height: 34px; width: auto; }
nav { display: flex; gap: clamp(14px, 3vw, 28px); font-weight: 700; }
nav a { text-decoration: none; color: var(--ink-2); }
nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--leaf); text-underline-offset: 6px; text-decoration-thickness: 3px; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center;
  gap: clamp(24px, 5vw, 64px); padding-block: clamp(28px, 7vw, 88px) clamp(36px, 7vw, 80px);
}
.hero h1 {
  margin: 0 0 18px; font: 900 clamp(2.4rem, 6vw, 4.3rem)/1.02 var(--display); letter-spacing: -0.02em; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--leaf-deep); }
.hero p { margin: 0; max-width: 52ch; font-size: 1.15rem; color: var(--ink-2); }
.promises { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; font-weight: 700; }
.promises li { display: flex; align-items: center; gap: 8px; }
.promises li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); }
.symbol { justify-self: center; width: min(320px, 100%); aspect-ratio: 1; }
.symbol img { width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .symbol img { animation: settle 1.4s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes settle { from { transform: rotate(-45deg) scale(.85); opacity: 0; } }
}

h2 { font: 800 clamp(1.6rem, 3.2vw, 2.1rem)/1.15 var(--display); margin: 0 0 6px; letter-spacing: -0.01em; }
.section-intro { margin: 0 0 26px; color: var(--ink-2); }

.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-bottom: clamp(40px, 7vw, 80px); }
#focus .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 20px; padding: 24px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow);
}
.app-head { display: flex; align-items: center; gap: 14px; }
.app-icon { width: 60px; height: 60px; border-radius: 14px; flex: none; object-fit: contain; }
.app h3 { margin: 0; font: 800 1.35rem/1.15 var(--display); }
.app .kind { font-size: .85rem; color: var(--ink-2); font-weight: 700; }
.app p { margin: 0; color: var(--ink-2); flex: 1; }
.job {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding-block: 6px; padding-inline: 10px 14px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  background: color-mix(in oklab, var(--leaf) 24%, transparent); color: var(--ink);
}
.job svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.app ul { margin: 0; padding-inline-start: 1.1em; color: var(--ink-2); font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700;
  padding: 11px 18px; border-radius: 999px; background: var(--leaf); color: var(--button-ink);
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn.ghost { background: transparent; border: 2px solid var(--rule); color: var(--ink); padding: 9px 16px; }
.btn.ghost:hover { border-color: var(--leaf); }

.about {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start;
  border-top: 1px solid var(--rule); padding-block: clamp(32px, 6vw, 60px);
}
.about img { width: 56px; height: 56px; }
.about p { margin: 0 0 10px; max-width: 64ch; color: var(--ink-2); }

footer { border-top: 1px solid var(--rule); padding-block: 24px 36px; color: var(--ink-2); font-size: .92rem;
  display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
footer a { color: inherit; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .symbol { order: -1; width: min(180px, 50%); justify-self: start; }
  .apps, #focus .apps { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  header.top { flex-wrap: wrap; row-gap: 10px; }
  nav a.hide-sm { display: none; }
  .about { grid-template-columns: 1fr; }
}

/* Language switch (every page) */
.lang-switch { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding-block: 12px 0; font-size: .95rem; font-weight: 700; }
.lang-switch a { color: var(--ink-2); text-decoration: none; padding: 4px 10px; border-radius: 999px; }
.lang-switch a:hover { text-decoration: underline; text-underline-offset: 4px; }
.lang-switch a[aria-current="page"] { color: var(--ink); background: color-mix(in oklab, var(--leaf) 22%, transparent); }
.lang-switch .sep { color: var(--rule); }
.lang-switch [lang="ar"] { font-family: 'IBM Plex Sans Arabic', var(--body); font-size: 1.05rem; }
.lang-switch [lang="en"] { font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; }

/* Arabic pages */
:root[lang="ar"] {
  --display: 'IBM Plex Sans Arabic', 'Nunito', system-ui, sans-serif;
  --body: 'IBM Plex Sans Arabic', 'Atkinson Hyperlegible', system-ui, sans-serif;
}
:root[lang="ar"] body { line-height: 1.8; }
:root[lang="ar"] .hero h1, :root[lang="ar"] h2 { letter-spacing: 0; line-height: 1.3; }
:root[lang="ar"] .hero h1 { font-weight: 700; }
:root[lang="ar"] .app h3, :root[lang="ar"] h2 { font-weight: 700; }
