/* Lamis Co. — shared design system (single source of truth).
   Owned by Frida. Pages import this file and must not redefine tokens.
   Font: Manrope (geometric sans) + Tajawal/Cairo fallback for Arabic.
   Add in <head>: Manrope + Tajawal via Google Fonts. */

:root {
  /* Palette — fresh clean primary (teal) + warm affordable-luxury accent (amber). */
  --color-bg: #f6f8f7;
  --color-surface: #ffffff;
  --color-surface-tint: #eef4f2;
  --color-ink: #14201d;
  --color-ink-soft: #33403c;
  --color-muted: #66756f;
  --color-line: rgb(20 32 29 / 6%);
  --color-line-strong: rgb(20 32 29 / 12%);
  --color-primary: #0e7c74;
  --color-primary-deep: #0a5f59;
  --color-primary-ink: #ffffff;
  --color-accent: #d99a2b;
  --color-accent-deep: #a96f14;
  --color-accent-ink: #241a05;
  --color-success: #1d7a4c;
  --color-danger: #b3382e;
  --color-focus: #0e7c74;

  /* Semantic tokens. */
  --surface-page: var(--color-bg);
  --surface-raised: var(--color-surface);
  --surface-tint: var(--color-surface-tint);
  --text: var(--color-ink);
  --text-soft: var(--color-ink-soft);
  --text-muted: var(--color-muted);
  --border: var(--color-line);
  --border-strong: var(--color-line-strong);
  --action: var(--color-primary);
  --action-ink: var(--color-primary-ink);
  --highlight: var(--color-accent);

  /* Spacing scale (4px base). */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius scale. Cards sit at 20px. */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-card: 20px;
  --radius-pill: 999px;

  /* Shadows: resting + hover lift. */
  --shadow-rest: 0 1px 2px rgb(20 32 29 / 5%), 0 8px 24px -12px rgb(20 32 29 / 18%);
  --shadow-lift: 0 2px 4px rgb(20 32 29 / 6%), 0 18px 44px -16px rgb(20 32 29 / 28%);
  --shadow-nav: 0 1px 0 rgb(20 32 29 / 6%), 0 10px 30px -18px rgb(20 32 29 / 25%);

  /* Layout. */
  --container: min(100% - 48px, 1200px);
  --nav-height: 68px;

  /* Fluid type scale. */
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8rem);
  --text-sm: clamp(0.85rem, 0.83rem + 0.15vw, 0.925rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.3rem);
  --text-xl: clamp(1.35rem, 1.2rem + 0.8vw, 1.75rem);
  --text-2xl: clamp(1.7rem, 1.45rem + 1.3vw, 2.4rem);
  --text-display: clamp(2.2rem, 1.7rem + 2.6vw, 3.6rem);
  --leading-tight: 1.12;
  --leading-snug: 1.3;
  --leading-body: 1.65;

  --font-sans: "Manrope", "Tajawal", "Cairo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-arabic: "Tajawal", "Cairo", "Manrope", "Segoe UI", system-ui, sans-serif;
}

/* Base reset. */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
body {
  background-color: var(--surface-page);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--action); text-underline-offset: 3px; }
a:hover { color: var(--color-primary-deep); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: var(--leading-snug); letter-spacing: -0.01em; font-weight: 800; }
h1 { font-size: var(--text-display); line-height: var(--leading-tight); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
p, li { max-width: 68ch; }
::selection { background: rgb(14 124 116 / 18%); }

/* Layout primitives. */
.container { width: var(--container); margin-inline: auto; }
.section { background-color: var(--surface-page); color: var(--text); padding-block: var(--space-16); }
.section--raised { background-color: var(--surface-raised); }
.section--tint { background-color: var(--surface-tint); }
.section__head { max-width: 720px; margin-block-end: var(--space-8); }
.section__kicker {
  display: inline-block; font-size: var(--text-sm); font-weight: 700;
  color: var(--action); margin-block-end: var(--space-2);
}
.section__lede { color: var(--text-muted); font-size: var(--text-lg); }

/* Grid utilities. */
.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }

/* Topbar nav. */
.nav {
  position: sticky; top: 0; z-index: 50;
  background-color: var(--surface-raised); color: var(--text);
  border-block-end: 1px solid var(--border);
  box-shadow: var(--shadow-nav);
}
.nav__inner {
  width: var(--container); margin-inline: auto; min-height: var(--nav-height);
  display: flex; align-items: center; gap: var(--space-6);
}
.nav__brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--text); font-weight: 800; }
.nav__brand img { width: 40px; height: 40px; object-fit: contain; }
.nav__links { display: flex; align-items: center; gap: var(--space-2); margin-inline-start: auto; list-style: none; padding: 0; }
.nav__links a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding-inline: var(--space-3); border-radius: var(--radius-sm);
  color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: var(--text-sm);
  transition: color 160ms ease, background-color 160ms ease;
}
.nav__links a:hover { color: var(--text); background-color: var(--surface-tint); }
.nav__links a[aria-current="page"] { color: var(--action); background-color: rgb(14 124 116 / 10%); }
.nav__cta { margin-inline-start: var(--space-4); flex: none; }
.nav__toggle {
  display: none; margin-inline-start: auto;
  min-width: 44px; min-height: 44px; border: 1px solid var(--border-strong);
  background-color: var(--surface-raised); color: var(--text);
  border-radius: var(--radius-sm); font: inherit; font-weight: 700; cursor: pointer;
}

/* Mobile drawer. Visible by default pattern: drawer is a normal list toggled by .is-open. */
.nav-drawer {
  background-color: var(--surface-raised); color: var(--text);
  border-block-end: 1px solid var(--border);
  display: none;
}
.nav-drawer.is-open { display: block; }
.nav-drawer ul { list-style: none; padding: var(--space-4); display: grid; gap: var(--space-1); }
.nav-drawer a {
  display: flex; align-items: center; min-height: 48px;
  padding-inline: var(--space-4); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-weight: 600;
}
.nav-drawer a:hover { background-color: var(--surface-tint); }

/* Buttons. One primary CTA per surface; secondary actions use ghost. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding-inline: var(--space-5);
  border-radius: var(--radius-pill); border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: var(--text-sm);
  text-decoration: none; cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}
.btn-primary { background-color: var(--action); border-color: var(--action); color: var(--action-ink); box-shadow: var(--shadow-rest); }
.btn-primary:hover { background-color: var(--color-primary-deep); border-color: var(--color-primary-deep); color: var(--action-ink); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-ghost { background-color: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background-color: var(--surface-tint); border-color: var(--border-strong); color: var(--text); }
.btn-accent { background-color: var(--highlight); border-color: var(--highlight); color: var(--color-accent-ink); }
.btn-accent:hover { background-color: var(--color-accent-deep); border-color: var(--color-accent-deep); color: #fff; }

/* Language switch. */
.lang-switch {
  display: inline-flex; align-items: center; gap: var(--space-1);
  background-color: var(--surface-raised); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  padding: 4px;
}
.lang-switch a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding-inline: var(--space-4); border-radius: var(--radius-pill);
  font-size: var(--text-sm); font-weight: 700; text-decoration: none; color: var(--text-muted);
}
.lang-switch a[aria-current="true"] { background-color: var(--text); color: var(--surface-raised); }

/* Hero — layered radial glows plus masked grid overlay for depth, never flat. */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  background-color: var(--surface-tint); color: var(--text);
  background-image:
    radial-gradient(560px 380px at 12% 18%, rgb(14 124 116 / 22%), transparent 65%),
    radial-gradient(520px 360px at 88% 12%, rgb(217 154 43 / 20%), transparent 62%),
    radial-gradient(700px 480px at 55% 110%, rgb(14 124 116 / 12%), transparent 60%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgb(20 32 29 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(20 32 29 / 7%) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 90% 85% at 50% 20%, black 30%, transparent 75%);
}
.hero__inner {
  width: var(--container); margin-inline: auto;
  padding-block: var(--space-20) var(--space-16);
  display: flex; gap: var(--space-10); align-items: center;
}
/* Split-hero axis agreement: row layout pairs with 90deg sheen; column pairs with 180deg. */
.hero--split .hero__inner { flex-direction: row; }
.hero--split { background-image:
  linear-gradient(90deg, rgb(255 255 255 / 55%), transparent 55%),
  radial-gradient(560px 380px at 12% 18%, rgb(14 124 116 / 22%), transparent 65%),
  radial-gradient(520px 360px at 88% 12%, rgb(217 154 43 / 20%), transparent 62%),
  radial-gradient(700px 480px at 55% 110%, rgb(14 124 116 / 12%), transparent 60%);
}
.hero--stacked .hero__inner { flex-direction: column; align-items: flex-start; }
.hero--stacked { background-image:
  linear-gradient(180deg, rgb(255 255 255 / 55%), transparent 55%),
  radial-gradient(560px 380px at 12% 18%, rgb(14 124 116 / 22%), transparent 65%),
  radial-gradient(520px 360px at 88% 12%, rgb(217 154 43 / 20%), transparent 62%),
  radial-gradient(700px 480px at 55% 110%, rgb(14 124 116 / 12%), transparent 60%);
}
.hero__copy { flex: 1 1 55%; min-width: 0; }
.hero__media { flex: 1 1 45%; min-width: 0; }
.hero__media img { border-radius: var(--radius-card); box-shadow: var(--shadow-lift); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-block-start: var(--space-6); }

/* Card — explicit surface so cards never become invisible. */
.card {
  background-color: var(--surface-raised); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-rest);
  padding: var(--space-6);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.card--tint { background-color: var(--surface-tint); }
.card__media img { border-radius: var(--radius-md); }
.card__title { font-size: var(--text-lg); margin-block: var(--space-3) var(--space-2); }
.card__text { color: var(--text-muted); font-size: var(--text-sm); }

/* Facts row (1965 / 200000 / 1500 / 364). */
.stats {
  background-color: var(--surface-raised); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-rest);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}
.stat { padding: var(--space-8) var(--space-6); text-align: center; }
.stat + .stat { border-inline-start: 1px solid var(--border); }
.stat__value { font-size: var(--text-2xl); font-weight: 800; color: var(--action); }
.stat__label { color: var(--text-muted); font-size: var(--text-sm); margin-block-start: var(--space-1); }

/* Footer. */
.footer { background-color: #101815; color: #e8efec; padding-block: var(--space-16) var(--space-8); }
.footer a { color: #cfe3dc; }
.footer a:hover { color: #ffffff; }
.footer__inner { width: var(--container); margin-inline: auto; display: grid; gap: var(--space-8); grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.footer__brand { color: #ffffff; font-weight: 800; }
.footer__meta { color: #9fb3ac; font-size: var(--text-sm); }
.footer__base { width: var(--container); margin-inline: auto; margin-block-start: var(--space-10); padding-block-start: var(--space-4); border-block-start: 1px solid rgb(255 255 255 / 12%); display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.footer__base small { color: #9fb3ac; }

/* Reveal on scroll. Content is visible by default; JS adds .is-armed then .is-in. */
.reveal { opacity: 1; transform: none; }
.js .reveal.is-armed { opacity: 0; transform: translateY(14px); transition: opacity 420ms ease, transform 420ms ease; }
.js .reveal.is-armed.is-in { opacity: 1; transform: none; }

/* RTL: logical properties are used throughout; mirror what geometry requires. */
html[dir="rtl"] body { font-family: var(--font-arabic); letter-spacing: 0; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; }
html[dir="rtl"] .hero--split { background-image:
  linear-gradient(-90deg, rgb(255 255 255 / 55%), transparent 55%),
  radial-gradient(560px 380px at 88% 18%, rgb(14 124 116 / 22%), transparent 65%),
  radial-gradient(520px 360px at 12% 12%, rgb(217 154 43 / 20%), transparent 62%),
  radial-gradient(700px 480px at 45% 110%, rgb(14 124 116 / 12%), transparent 60%);
}
html[dir="rtl"] .hero--split .hero__inner { flex-direction: row-reverse; }

/* Responsive tiers. */
@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .hero--split .hero__inner { flex-direction: column; align-items: flex-start; }
  .hero--split { background-image:
    linear-gradient(180deg, rgb(255 255 255 / 55%), transparent 55%),
    radial-gradient(560px 380px at 12% 18%, rgb(14 124 116 / 22%), transparent 65%),
    radial-gradient(520px 360px at 88% 12%, rgb(217 154 43 / 20%), transparent 62%),
    radial-gradient(700px 480px at 55% 110%, rgb(14 124 116 / 12%), transparent 60%);
  }
  html[dir="rtl"] .hero--split .hero__inner { flex-direction: column; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { border-block-start: 1px solid var(--border); }
}
@media (max-width: 720px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-drawer { display: none; }
  .nav-drawer.is-open { display: block; }
  .nav__cta { margin-inline-start: 0; }
  .section { padding-block: var(--space-12); }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  :root { --nav-height: 60px; }
  h1 { font-size: clamp(1.8rem, 1.5rem + 4vw, 2.3rem); }
  h2 { font-size: clamp(1.4rem, 1.25rem + 2.5vw, 1.7rem); }
  .section { padding-block: var(--space-10); }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-inline-start: 0; border-block-start: 1px solid var(--border); }
  .btn, .nav__links a, .nav-drawer a, .lang-switch a, .nav__toggle {
    min-height: 44px;
  }
  .hero__inner { padding-block: var(--space-12) var(--space-10); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .js .reveal.is-armed { opacity: 1; transform: none; }
}
