/* LEVANTIERA — shared styles */
:root {
  --bg: #FAF8F4; --bg-elevated: #F5F1E8; --ink: #1C1A17; --ink-soft: #4A453E; --ink-muted: #8A8378;
  --accent: #8B6914; --accent-soft: #A88534; --secondary: #C4A882; --rule: #E8E0D4; --rule-strong: #D6CBB7;
  /* Dark horizontal bands (CTA / “Why” / milestones): stay visually dark — do NOT flip with --ink in dark theme */
  --band: #1C1A17;
  --on-band: #FAF8F4;
  --on-band-soft: rgba(250, 248, 244, 0.72);
  --on-band-faint: rgba(250, 248, 244, 0.18);
  --on-light-fill: #1C1A17; /* text on ivory / pale hover wipes */
  --serif: 'Playfair Display', Georgia, serif; --sans: 'DM Sans', -apple-system, sans-serif;
  --container: 1440px; --container-pad: clamp(20px, 4vw, 56px);
  --t-fast: 200ms; --t-med: 400ms; --t-slow: 800ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] {
  --bg: #14110D; --bg-elevated: #1F1B16; --ink: #F5EFE2; --ink-soft: #C8C0B0; --ink-muted: #8A8378;
  --accent: #C9A249; --accent-soft: #D9B864; --rule: #2A251D; --rule-strong: #3A3325;
  --band: #0B0A08;
  --on-band: #F5EFE2;
  --on-band-soft: rgba(245, 239, 226, 0.72);
  --on-band-faint: rgba(245, 239, 226, 0.16);
  --on-light-fill: #14110D;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); transition: background var(--t-med) var(--ease), color var(--t-med) var(--ease); }
body.no-anim *, body.no-anim *::before, body.no-anim *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
@media (hover: hover) and (pointer: fine) { body.cursor-on, body.cursor-on * { cursor: none !important; } }
h1, h2, h3, h4, h5 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 1.05; margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--bg); }
.label { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); }
.label-accent { color: var(--accent); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--container-pad); padding-right: var(--container-pad); }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 18px 0; transition: background var(--t-med) var(--ease), border-color var(--t-med) var(--ease), padding var(--t-med) var(--ease); border-bottom: 1px solid transparent; }
.nav-inner { display: flex; align-items: center; gap: 40px; }
.nav-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-logo img { width: 36px; height: 36px; display: block; }
.nav-logo .wordmark { font-family: var(--serif); font-size: 18px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink); }
.nav-links { display: flex; gap: 36px; margin-left: auto; }
.nav-links a { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); position: relative; padding: 4px 0; transition: color var(--t-fast); }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.lang-switch { display: flex; gap: 2px; font-size: 11px; letter-spacing: 0.12em; color: var(--ink-muted); }
.lang-switch button { background: transparent; border: 0; padding: 6px 8px; font: inherit; letter-spacing: inherit; color: var(--ink-muted); text-transform: uppercase; cursor: pointer; transition: color var(--t-fast); }
.lang-switch button.active { color: var(--ink); }
.lang-switch button:hover { color: var(--accent); }
.lang-switch .sep { color: var(--rule-strong); align-self: center; font-size: 9px; }
.btn-cta { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; padding: 12px 22px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); position: relative; overflow: hidden; transition: color var(--t-med) var(--ease), border-color var(--t-med) var(--ease); cursor: pointer; }
.btn-cta::before { content: ''; position: absolute; inset: 0; background: var(--accent); transform: translateX(-101%); transition: transform var(--t-med) var(--ease); }
.btn-cta:hover::before { transform: translateX(0); }
.btn-cta > * { position: relative; z-index: 1; }
.btn-cta:hover { color: #FAF8F4; border-color: var(--accent); }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; padding: 12px 22px; border: 1px solid var(--ink); background: transparent; color: var(--ink); position: relative; overflow: hidden; transition: color var(--t-med) var(--ease); cursor: pointer; }
.btn-ghost::before { content: ''; position: absolute; inset: 0; background: var(--ink); transform: translateX(-101%); transition: transform var(--t-med) var(--ease); }
.btn-ghost:hover::before { transform: translateX(0); }
.btn-ghost > * { position: relative; z-index: 1; }
.btn-ghost:hover { color: var(--bg); }
.nav.scrolled { background: color-mix(in oklab, var(--bg) 85%, transparent); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-bottom-color: var(--rule); padding: 12px 0; }
.nav.on-hero:not(.scrolled) .nav-logo .wordmark, .nav.on-hero:not(.scrolled) .nav-links a, .nav.on-hero:not(.scrolled) .lang-switch button, .nav.on-hero:not(.scrolled) .lang-switch .sep { color: rgba(250, 248, 244, 0.88); }
.nav.on-hero:not(.scrolled) .nav-links a:hover, .nav.on-hero:not(.scrolled) .nav-links a.active, .nav.on-hero:not(.scrolled) .lang-switch button.active { color: #FAF8F4; }
.nav.on-hero:not(.scrolled) .btn-cta { border-color: rgba(250, 248, 244, 0.4); background: transparent; color: #FAF8F4; }
.nav.on-hero:not(.scrolled) .btn-cta::before { background: #FAF8F4; }
.nav.on-hero:not(.scrolled) .btn-cta:hover { color: var(--ink); border-color: #FAF8F4; }
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--accent); width: 0%; z-index: 200; transition: width 80ms linear; pointer-events: none; }
.hamburger { display: none; background: transparent; border: 0; width: 32px; height: 32px; position: relative; cursor: pointer; }
.hamburger span { position: absolute; left: 4px; right: 4px; height: 1.5px; background: var(--ink); transition: transform var(--t-med) var(--ease), opacity var(--t-fast); }
.hamburger span:nth-child(1) { top: 11px; }
.hamburger span:nth-child(2) { top: 19px; }
.nav.on-hero:not(.scrolled) .hamburger span { background: #FAF8F4; }
.mobile-menu { position: fixed; inset: 0; background: var(--bg); z-index: 99; padding: 100px 32px 48px; transform: translateX(100%); transition: transform var(--t-slow) var(--ease); overflow-y: auto; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a { font-family: var(--serif); font-size: 36px; padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--ink); }
.mobile-menu .mobile-extras { margin-top: 32px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 900px) {
  .nav-links, .nav-right .btn-cta, .nav-right .lang-switch { display: none; }
  .hamburger { display: block; }
  .nav-inner { justify-content: space-between; }
}

/* FOOTER */
.footer { padding: 100px 0 40px; border-top: 1px solid var(--rule); background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 64px; margin-bottom: 80px; }
.footer-brand img { width: 56px; margin-bottom: 24px; }
.footer-brand .wordmark { font-family: var(--serif); font-size: 22px; letter-spacing: 0.32em; text-transform: uppercase; margin-bottom: 24px; }
.footer-brand p { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-soft); max-width: 320px; }
.footer-col h5 { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 20px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 14px; color: var(--ink-soft); transition: color var(--t-fast); }
.footer-col a:hover { color: var(--accent); }
.footer-col address { font-style: normal; font-size: 14px; color: var(--ink-soft); line-height: 1.8; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-muted); letter-spacing: 0.04em; }
.footer-bottom .lang-switch button { color: var(--ink-muted); }
.footer-bottom .lang-switch button.active { color: var(--ink); }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 20px; align-items: flex-start; }
}

/* REVEALS */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 80ms; } .reveal-delay-2 { transition-delay: 160ms; } .reveal-delay-3 { transition-delay: 240ms; } .reveal-delay-4 { transition-delay: 320ms; } .reveal-delay-5 { transition-delay: 400ms; } .reveal-delay-6 { transition-delay: 480ms; }
.split-words .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.split-words .word-inner { display: inline-block; transform: translateY(110%); transition: transform 900ms var(--ease-out); will-change: transform; }
.split-words.in .word-inner { transform: translateY(0); }

/* CURSOR — refined */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; will-change: transform; }
.cursor-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: opacity 220ms var(--ease), width 220ms var(--ease), height 220ms var(--ease);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--bg) 40%, transparent);
}
.cursor-ring {
  width: 28px; height: 28px;
  border: 1px solid color-mix(in oklab, var(--accent) 55%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 320ms var(--ease), height 320ms var(--ease), background 320ms var(--ease), border-color 320ms var(--ease), opacity 220ms var(--ease);
  background: transparent;
}
body.cursor-hover .cursor-ring {
  width: 48px; height: 48px;
  background: color-mix(in oklab, var(--accent) 10%, transparent);
  border-color: var(--accent);
}
body.cursor-hover .cursor-dot { width: 3px; height: 3px; }
body.cursor-text .cursor-ring {
  width: 72px; height: 72px;
  background: var(--accent);
  border-color: var(--accent);
}
body.cursor-text .cursor-ring::after {
  content: attr(data-cursor-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #FAF8F4;
  font-weight: 500;
}
body.cursor-text .cursor-dot { opacity: 0; }
body.cursor-down .cursor-ring { width: 20px; height: 20px; }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* TWEAKS */
.tweaks-fab { position: fixed; right: 24px; bottom: 24px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--ink); background: var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 90; box-shadow: 0 6px 24px rgba(0,0,0,0.08); transition: transform var(--t-fast); }
.tweaks-fab:hover { transform: scale(1.05); }
.tweaks-panel { position: fixed; right: 24px; bottom: 84px; width: 280px; background: var(--bg-elevated); border: 1px solid var(--rule); padding: 20px; z-index: 91; display: none; box-shadow: 0 18px 60px rgba(0,0,0,0.12); }
.tweaks-panel.open { display: block; }
.tweaks-panel h6 { font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 12px; font-weight: 500; }
.tweaks-row + .tweaks-row { margin-top: 18px; }
.toggle-group { display: flex; background: var(--bg); border: 1px solid var(--rule); padding: 2px; }
.toggle-group button { flex: 1; padding: 8px 10px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; background: transparent; border: 0; color: var(--ink-muted); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); font-family: var(--sans); }
.toggle-group button.active { background: var(--ink); color: var(--bg); }

/* RTL — Arabic typography (Amiri headline / Tajawal UI) needs looser metrics */
[dir="rtl"] .nav-links a::after { transform-origin: right; }
[dir="rtl"] .btn-cta::before, [dir="rtl"] .btn-ghost::before { transform: translateX(101%); }
[dir="rtl"] .btn-cta:hover::before, [dir="rtl"] .btn-ghost:hover::before { transform: translateX(0); }
[dir="rtl"] body {
  font-family: 'Tajawal', var(--sans);
  line-height: 1.85;
}
/* Default heading rule is too tight (1.05) — breaks Arabic ascenders/descenders */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5 {
  font-family: 'Amiri', Georgia, 'Times New Roman', serif;
  letter-spacing: 0;
  line-height: 1.55;
}
[dir="rtl"] p { line-height: 1.95; }
/* Editorial / oversized headlines */
[dir="rtl"] .page-h1,
[dir="rtl"] .hero-title {
  line-height: 1.52;
}
[dir="rtl"] .hero-title .line-inner { line-height: inherit; }
[dir="rtl"] .section-h {
  line-height: 1.48;
}
[dir="rtl"] blockquote.founder-q { line-height: 1.88; }
/* Italic serif for Latin .page-lede is wrong for Arabic — use readable body serif + air */
[dir="rtl"] .page-lede,
[dir="rtl"] .svc-lede {
  font-family: 'Amiri', 'Tajawal', serif;
  font-style: normal;
  line-height: 2.12;
}
[dir="rtl"] .page-header .page-lede {
  margin-top: 12px;
}
[dir="rtl"] .story-p,
[dir="rtl"] .founder-b,
[dir="rtl"] .svc-body,
[dir="rtl"] .values .value p,
[dir="rtl"] .ms-body p {
  font-family: 'Amiri', 'Tajawal', serif;
  line-height: 2.02;
}
[dir="rtl"] .hero-sub,
[dir="rtl"] .ticker-item,
[dir="rtl"] .step-d,
[dir="rtl"] .why-item p,
[dir="rtl"] .cat p {
  font-family: 'Tajawal', sans-serif;
  line-height: 1.88;
}
[dir="rtl"] .quote-main { line-height: 1.5; font-family: 'Amiri', serif; }
[dir="rtl"] .cta-banner p,
[dir="rtl"] .footer-brand p {
  font-family: 'Amiri', 'Tajawal', serif;
  line-height: 1.95;
}
[dir="rtl"] .split-words .word {
  padding-bottom: 0.48em;
  margin-bottom: 0;
}
[dir="rtl"] .faq-a p,
[dir="rtl"] .faq-item summary span,
[dir="rtl"] .p-step-body,
[dir="rtl"] .p-step-out {
  font-family: 'Amiri', 'Tajawal', serif;
  line-height: 2.02;
}
[dir="rtl"] .cta-banner h2 {
  font-family: 'Amiri', serif;
  line-height: 1.48;
}
[dir="rtl"] .mobile-menu nav a {
  font-family: 'Amiri', serif;
  line-height: 1.55;
}

.section-label { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.section-label .label { color: var(--accent); }
.section-label .rule { flex: 1; height: 1px; background: var(--rule); max-width: 80px; }
.ticker { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow: hidden; padding: 22px 0; background: var(--bg); }
.ticker-track { display: flex; gap: 64px; white-space: nowrap; animation: ticker 40s linear infinite; width: max-content; }
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-soft); display: flex; align-items: center; gap: 64px; }
.ticker-item .dot { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }
[dir="rtl"] .ticker-track { animation-direction: reverse; }
.cta-banner { padding: 140px 0; background: var(--band); color: var(--on-band); text-align: center; position: relative; overflow: hidden; }
.cta-banner h2 { color: var(--on-band); max-width: 1100px; margin: 0 auto 24px; }
.cta-banner p { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--on-band-soft); max-width: 600px; margin: 0 auto 48px; }
.cta-banner .btn-cta { background: var(--accent); border-color: var(--accent); color: var(--on-band); padding: 18px 36px; font-size: 13px; }
.cta-banner .btn-cta::before { background: var(--on-band); }
.cta-banner .btn-cta:hover { color: var(--on-light-fill); }
.lvt-img { position: relative; overflow: hidden; background: var(--bg-elevated); }
.lvt-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease); }
.lvt-img:hover img { transform: scale(1.04); }
.lvt-img .img-caption { position: absolute; bottom: 16px; left: 20px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.92); z-index: 2; }
.lvt-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.45)); pointer-events: none; z-index: 1; }
