/* ==========================================================================
   Egyptouring — base.css
   Design tokens, reset, typography, layout primitives, utilities.
   All spacing/positioning uses logical properties so the layout mirrors
   automatically when <html dir="rtl">.
   ========================================================================== */

:root {
  /* Palette — deep navy, gold, sand, ivory, turquoise */
  --navy-950: #060f1c;
  --navy-900: #0b1b30;
  --navy-800: #112640;
  --navy-700: #1a3554;
  --navy-600: #2c4c72;
  --gold-600: #a47c2a;
  --gold-500: #c59d4a;
  --gold-400: #d8b76e;
  --gold-300: #ead7a8;
  --ivory: #fbf8f2;
  --sand-100: #f5eee0;
  --sand-200: #ebdfc8;
  --sand-300: #dcc9a4;
  --sand-500: #b0966a;
  --turq-700: #0b6360;
  --turq-600: #0f7f7c;
  --turq-500: #18a19b;
  --turq-300: #86d3cd;
  --ink: #17212e;
  --ink-soft: #465162;
  --muted: #768091;
  --line: rgba(23, 33, 46, .12);
  --line-light: rgba(255, 255, 255, .16);
  --white: #fff;
  --danger: #b3402e;
  --success: #1c7c54;

  /* Type */
  --font-display: 'Cormorant Garamond', 'El Messiri', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tracking-caps: .2em;

  /* Shape & depth */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(11, 27, 48, .06);
  --shadow: 0 14px 40px -12px rgba(11, 27, 48, .18);
  --shadow-lg: 0 30px 70px -20px rgba(11, 27, 48, .35);

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 9vw, 8rem);
  --header-h: 84px;

  --ease: cubic-bezier(.22, .7, .2, 1);
}

/* Arabic: swap font priority, loosen leading, never letter-space (it breaks joins) */
:root[lang='ar'] {
  --font-display: 'El Messiri', 'Cormorant Garamond', serif;
  --font-body: 'Tajawal', 'Manrope', system-ui, sans-serif;
  --tracking-caps: 0;
}
:root[lang='ar'] * { letter-spacing: 0 !important; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
:root[lang='ar'] body { font-size: 1.06rem; line-height: 1.9; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
:focus-visible { outline: 2px solid var(--turq-500); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-400); color: var(--navy-900); }
[hidden] { display: none !important; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--navy-900);
  text-wrap: balance;
}
:root[lang='ar'] :is(h1, h2, h3, h4, .display) { line-height: 1.35; font-weight: 600; }
h1 { font-size: clamp(2.7rem, 6.4vw, 5.4rem); font-weight: 500; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); font-weight: 500; }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); }
h4 { font-size: 1.2rem; }
:root[lang='ar'] h1 { font-size: clamp(2.2rem, 5.2vw, 4.3rem); }
:root[lang='ar'] h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); }
p { text-wrap: pretty; }
em.accent { font-style: italic; color: var(--gold-500); }
:root[lang='ar'] em.accent { font-style: normal; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .8rem;
  font-size: .74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--tracking-caps); color: var(--gold-600);
}
:root[lang='ar'] .eyebrow { font-size: .92rem; }
.eyebrow::before {
  content: ''; inline-size: 34px; block-size: 1px; background: currentColor; flex: none;
}
.on-dark .eyebrow, .eyebrow.on-dark { color: var(--gold-400); }
.lead { font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: var(--ink-soft); max-inline-size: 62ch; }
.on-dark { color: rgba(255, 255, 255, .82); }
.on-dark :is(h1, h2, h3, h4) { color: var(--white); }
.on-dark .lead { color: rgba(255, 255, 255, .78); }

/* ---------- Layout ---------- */
.container { inline-size: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.container--narrow { --container: 880px; }
.section { padding-block: var(--section); position: relative; }
.section--sand { background: var(--sand-100); }
.section--navy { background: var(--navy-900); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.section-head { display: grid; gap: 1.1rem; margin-block-end: clamp(2.2rem, 4.5vw, 3.8rem); max-inline-size: 760px; }
.section-head--center { text-align: center; justify-items: center; margin-inline: auto; }
.section-head--center .eyebrow::after { content: ''; inline-size: 34px; block-size: 1px; background: currentColor; }
.section-head--split {
  max-inline-size: none; grid-template-columns: 1fr auto; align-items: end; column-gap: 2rem;
}
.section-head--split > div:first-child { display: grid; gap: 1.1rem; max-inline-size: 720px; }
@media (max-width: 720px) { .section-head--split { grid-template-columns: minmax(0, 1fr); } }

.grid { display: grid; gap: clamp(1.2rem, 2.4vw, 2rem); }
.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)); }
@media (max-width: 1020px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); } }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; gap: 1.2rem; align-content: start; }
.stack--lg { gap: 1.8rem; }
.cluster { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; }

/* ---------- Egyptian ornament ---------- */
/* Zig-zag water line (the hieroglyph "n") used as a quiet recurring motif */
.nile-line {
  block-size: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10'%3E%3Cpath d='M0 8l5-6 5 6 5-6 5 6' fill='none' stroke='%23c59d4a' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x center;
  opacity: .75;
}
.ornament { display: flex; align-items: center; justify-content: center; gap: .9rem; color: var(--gold-500); }
.ornament::before, .ornament::after { content: ''; inline-size: 64px; block-size: 1px; background: currentColor; opacity: .6; }
.ornament i { inline-size: 8px; block-size: 8px; background: currentColor; transform: rotate(45deg); }

/* ---------- Utilities ---------- */
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
  position: fixed; inset-block-start: -80px; inset-inline-start: 16px; z-index: 300;
  background: var(--gold-500); color: var(--navy-900); padding: .7rem 1.2rem; border-radius: 0 0 8px 8px; font-weight: 700;
  transition: inset-block-start .2s;
}
.skip-link:focus { inset-block-start: 0; }
.text-center { text-align: center; }
.mt-lg { margin-block-start: clamp(2rem, 4vw, 3.2rem); }
.icon { inline-size: 1.25em; block-size: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
[dir='rtl'] .icon--flip { transform: scaleX(-1); }
.no-scroll { overflow: hidden; }

/* ---------- Scroll reveal (only when JS is on) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal--zoom { transform: scale(.96); }

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

/* Header shrinks after scrolling; sticky sub-navs follow via the same token */
:root.scrolled { --header-h: 70px; }
