:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #12212a;
  --ink-soft: #4b5b65;
  --muted: #7a8791;
  --line: #e6ddd0;
  --brand: #0f4c5c;
  --brand-700: #0a3947;
  --brand-50: #e7f0f2;
  --accent: #e9c46a;
  --accent-700: #c9a24a;
  --coral: #e76f51;
  --teal: #2a9d8f;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(18, 33, 42, 0.06), 0 1px 1px rgba(18, 33, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(18, 33, 42, 0.08), 0 2px 6px rgba(18, 33, 42, 0.04);
  --shadow-lg: 0 20px 50px rgba(15, 76, 92, 0.18);
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-ar: 'Cairo', 'Inter', system-ui, sans-serif;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[dir="rtl"] body { font-family: var(--font-ar); }

img, svg { display: block; max-width: 100%; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-700); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 243, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 96px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); font-weight: 700;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-logo {
  display: block;
  height: 72px;
  width: auto;
  max-width: 320px;
}

.nav { margin-inline-start: auto; display: flex; gap: 6px; }
.nav a {
  color: var(--ink-soft); font-weight: 500; padding: 8px 14px; border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--brand-50); color: var(--brand-700); }

.lang-switch {
  display: inline-flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px; gap: 2px;
}
.lang-btn {
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 12px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 13px;
  color: var(--ink-soft);
}
.lang-btn.is-active {
  background: var(--brand); color: #fff;
}

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 140px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(233, 196, 106, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(42, 157, 143, 0.12), transparent 60%),
    linear-gradient(180deg, #fbf8f3 0%, #fbf8f3 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 820px; }

/* 3D Scene */
.scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  perspective: 1400px;
  perspective-origin: 50% 55%;
  overflow: hidden;
}
.scene-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.layer {
  position: absolute;
  left: 50%;
  display: flex;
  justify-content: center;
  transform-style: preserve-3d;
  will-change: transform;
}
.layer img { display: block; width: 100%; height: auto; }

/* Back: globe */
.layer-globe {
  bottom: 12%;
  width: 680px;
  margin-left: -340px;
  transform: translateZ(-520px) scale(1.45);
  opacity: 0.18;
  filter: blur(1px);
}
.layer-globe img {
  animation: slow-spin 160s linear infinite;
  transform-origin: 50% 50%;
}

/* Far skyline strip */
.layer-far {
  bottom: 0;
  width: 180%;
  margin-left: -90%;
  transform: translateZ(-320px) scale(1.25);
  opacity: 0.35;
  filter: blur(0.6px);
}

/* Mid skyline (main logo motif) */
.layer-mid {
  bottom: -4%;
  width: 130%;
  margin-left: -65%;
  transform: translateZ(-120px) scale(1.05);
  opacity: 0.7;
}

/* Foreground monument */
.layer-front {
  bottom: -8%;
  width: 280px;
  margin-left: -480px;
  transform: translateZ(120px);
  filter: drop-shadow(0 20px 30px rgba(10, 57, 71, 0.25));
}
html[dir="rtl"] .layer-front { margin-left: 200px; }

@keyframes slow-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Soft horizon haze, sits above layers but below content */
.scene::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 35%;
  background: linear-gradient(180deg, transparent 0%, rgba(251, 248, 243, 0.6) 60%, rgba(251, 248, 243, 0.95) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Languages marquee — replaces the second skyline divider */
.languages-band {
  position: relative;
  background: linear-gradient(180deg, var(--bg) 0%, #f4ede0 100%);
  border-top: 1px solid rgba(15, 76, 92, 0.08);
  border-bottom: 1px solid rgba(15, 76, 92, 0.08);
  padding: 36px 0;
  overflow: hidden;
}
.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
  animation: marquee 50s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

.m-item {
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand);
  line-height: 1;
}
.m-item.ar {
  font-family: 'Cairo', 'Inter', sans-serif;
  color: var(--brand-700);
  font-weight: 700;
}
.m-item.accent { color: var(--accent-700); }

.m-dot {
  font-size: 24px;
  color: var(--accent);
  opacity: 0.7;
  line-height: 1;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

html[dir="rtl"] .marquee-track { animation-direction: reverse; }

@media (max-width: 720px) {
  .languages-band { padding: 24px 0; }
  .marquee-track { gap: 20px; animation-duration: 35s; }
  .m-dot { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none !important; }
}

@media (max-width: 900px) {
  .layer-front { width: 200px; margin-left: -340px; }
  .layer-globe { width: 520px; margin-left: -260px; }
}

@media (max-width: 720px) {
  .scene { perspective: 900px; }
  .layer-front { width: 160px; margin-left: -180px; bottom: -6%; transform: translateZ(80px); }
  html[dir="rtl"] .layer-front { margin-left: 20px; }
  .layer-mid { width: 170%; margin-left: -85%; }
  .layer-globe { width: 400px; margin-left: -200px; bottom: 20%; }
  .skyline-divider img { max-height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .layer-globe img { animation: none !important; }
  .scene-stage { transition: none !important; }
}

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-50);
  padding: 6px 12px; border-radius: 999px;
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 20px;
  color: var(--ink);
}
.accent { color: var(--brand); }
.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 0 32px;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 12px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, background .15s, color .15s, border-color .15s, box-shadow .15s;
  text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--brand-700); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-soft); color: var(--ink); }

.hero-badges {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 18px; flex-wrap: wrap;
  color: var(--ink-soft); font-weight: 500; font-size: 14px;
}
.hero-badges li { display: inline-flex; align-items: center; gap: 8px; }
.flag-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--c, var(--brand));
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: linear-gradient(180deg, #f4ede0 0%, #fbf8f3 100%); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
}
.section-lead { color: var(--ink-soft); font-size: 17px; margin: 0; }

/* Cards */
.cards {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s, border-color .2s;
  overflow: hidden;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d9cfbf; }
.card-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand);
  margin-bottom: 16px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 {
  margin: 0 0 8px;
  font-size: 19px; letter-spacing: -0.01em;
}
.card p { color: var(--ink-soft); margin: 0 0 16px; font-size: 15px; }
.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list li {
  font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px;
  background: #f4ede0; color: var(--brand-700);
}
.card-highlight {
  background: linear-gradient(160deg, #0f4c5c 0%, #0a3947 100%);
  color: #fff; border-color: transparent;
}
.card-highlight p { color: rgba(255,255,255,0.78); }
.card-highlight .card-icon { background: rgba(233, 196, 106, 0.18); color: var(--accent); }
.card-highlight .tag-list li { background: rgba(233, 196, 106, 0.18); color: var(--accent); }
.badge {
  position: absolute; top: 20px; inset-inline-end: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--accent); color: #3a2d00;
  padding: 5px 10px; border-radius: 999px;
}

/* About */
.about-grid {
  display: grid; gap: 48px;
  grid-template-columns: 1.3fr 1fr;
  align-items: start;
}
.about-grid h2 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.02em; margin: 8px 0 18px; }
.about-grid p { color: var(--ink-soft); margin: 0 0 16px; }
.feature-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.feature-list li {
  padding-inline-start: 28px; position: relative; color: var(--ink);
}
.feature-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 9px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(233, 196, 106, 0.25);
}
.about-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-sm);
}
.about-card h3 { margin: 0 0 16px; font-size: 18px; }
.about-card dl { margin: 0; display: grid; gap: 14px; }
.about-card dt { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.about-card dd { margin: 2px 0 0; color: var(--ink); font-weight: 500; }

/* Contact */
.contact-grid {
  display: grid; gap: 48px;
  grid-template-columns: 1fr 1.1fr;
  align-items: start;
}
.contact-grid h2 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.02em; margin: 8px 0 14px; }
.contact-grid > div > p { color: var(--ink-soft); margin: 0 0 28px; }

.contact-info { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-info li { display: grid; gap: 2px; }
.contact-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  box-shadow: var(--shadow-sm);
}
.hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label {
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.optional { color: var(--muted); font-weight: 400; }
.field input,
.field select,
.field textarea {
  font: inherit;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 76, 92, 0.12);
}
.field textarea { resize: vertical; min-height: 120px; }

.field.check label {
  display: flex; gap: 10px; align-items: flex-start;
  font-weight: 400; color: var(--ink-soft); font-size: 14px;
}
.field.check input { margin-top: 3px; }
.field.check a { text-decoration: underline; }

.form-status { grid-column: 1 / -1; margin: 0; font-size: 14px; min-height: 1.4em; }
.form-status.is-success { color: #0f6b4a; }
.form-status.is-error { color: #b3261e; }

/* Footer */
.site-footer {
  background: #0a3947;
  color: #d9e5e9;
  padding: 56px 0 24px;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.footer-brand {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.footer-brand .brand-logo { height: 64px; max-width: 260px; }
.brand-logo-inverted {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.footer-tag { margin: 0; color: #9db3b9; font-size: 14px; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { color: #d9e5e9; font-weight: 500; font-size: 14px; }
.footer-nav a:hover { color: var(--accent); }
.copy { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 18px; margin: 8px 0 0; font-size: 13px; color: #9db3b9; }

/* Legal pages */
.legal {
  padding: 80px 0 72px;
  max-width: 840px;
}
.legal h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.02em; margin: 0 0 8px;
}
.legal h2 {
  font-size: 20px; margin: 36px 0 10px;
}
.legal h3 { font-size: 16px; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-inline-start: 22px; }
.legal .back { display: inline-block; margin-bottom: 24px; color: var(--brand); font-weight: 600; }
.legal .back::before { content: "← "; }
html[dir="rtl"] .legal .back::before { content: "→ "; }

/* RTL adjustments */
html[dir="rtl"] .nav { margin-inline-start: auto; }
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
html[dir="rtl"] .contact-label,
html[dir="rtl"] .about-card dt,
html[dir="rtl"] .brand-sub,
html[dir="rtl"] .tag-list li,
html[dir="rtl"] .badge { letter-spacing: 0; }
html[dir="rtl"] .hero h1 { letter-spacing: 0; line-height: 1.2; }
html[dir="rtl"] .section-head h2,
html[dir="rtl"] .about-grid h2,
html[dir="rtl"] .contact-grid h2,
html[dir="rtl"] .legal h1 { letter-spacing: 0; }

/* Responsive */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-form { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 56px; }
  .section { padding: 64px 0; }
  .footer-inner { grid-template-columns: 1fr; text-align: start; }
}

@media (max-width: 620px) {
  .nav { display: none; }
  .header-inner { gap: 12px; }
  .brand-logo { height: 56px; }
  .hero h1 { font-size: 34px; }
  .card { padding: 22px; }
  .contact-form { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
