/* =====================================================================
   Arab Invest Group — design system
   Navy & Gold · classic trade house · bilingual EN / AR
   ===================================================================== */

:root {
  /* palette */
  --navy-900: #081a30;
  --navy-800: #0e2a47;
  --navy-700: #143a5e;
  --navy-600: #1d4d77;
  --gold:      #c9a23f;
  --gold-soft: #ddc079;
  --gold-deep: #a9842b;
  --cream:     #f7f3ea;
  --cream-2:   #efe8d8;
  --paper:     #fffdf8;
  --ink:       #16202c;
  --muted:     #5d6b7a;
  --line:      rgba(14, 42, 71, 0.12);
  --line-gold: rgba(201, 162, 63, 0.35);

  /* type */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ar-serif: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --ar-sans:  "Cairo", "Segoe UI", Tahoma, sans-serif;

  --maxw: 1180px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* language-driven font swap */
html[lang="ar"] { --serif: var(--ar-serif); --sans: var(--ar-sans); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

html[lang="ar"] body { font-weight: 400; line-height: 1.9; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
.section { padding-block: clamp(64px, 9vw, 128px); }
.center { text-align: center; }

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.1; color: var(--navy-800); letter-spacing: 0.005em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-block;
  margin-bottom: 1.1rem;
}
html[lang="ar"] .eyebrow { letter-spacing: 0.12em; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 60ch; }

p + p { margin-top: 1rem; }

/* gold hairline rule */
.rule { width: 64px; height: 2px; background: var(--gold); border: 0; margin: 1.5rem 0; }
.center .rule { margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--sans); font-weight: 500; font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.95em 1.9em; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.4s var(--ease);
}
html[lang="ar"] .btn { letter-spacing: 0.02em; text-transform: none; font-size: 0.95rem; }
.btn-gold { background: var(--gold); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-soft); transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(201,162,63,0.6); }
.btn-ghost { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-ink { border-color: var(--navy-800); color: var(--navy-800); }
.btn-ink:hover { background: var(--navy-800); color: #fff; transform: translateY(-2px); }
.btn .arrow { transition: transform 0.4s var(--ease); }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }

/* =====================================================================
   Header / nav
   ===================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-block: 18px;
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.site-header.scrolled {
  background: rgba(8, 26, 48, 0.92);
  backdrop-filter: blur(12px);
  padding-block: 12px;
  box-shadow: 0 1px 0 rgba(201,162,63,0.2);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand .mark { width: 36px; height: 36px; flex: none; }
.brand .name { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; line-height: 1; letter-spacing: 0.02em; color: #fff; }
.brand .name small { display: block; font-family: var(--sans); font-weight: 400; font-size: 0.56rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold-soft); margin-top: 4px; }
html[lang="ar"] .brand .name small { letter-spacing: 0.1em; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  color: rgba(255,255,255,0.82); font-size: 0.82rem; font-weight: 400;
  letter-spacing: 0.06em; position: relative; padding-block: 4px;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--gold); transition: width 0.35s var(--ease);
}
html[dir="rtl"] .nav-links a::after { left: auto; right: 0; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-tools { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  background: transparent; border: 1px solid rgba(255,255,255,0.3); color: #fff;
  font-family: var(--sans); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.1em; line-height: 1;
  padding: 0.5em 0.9em; border-radius: var(--radius); cursor: pointer;
  transition: all 0.3s var(--ease);
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold-soft); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 30px; height: 22px; position: relative; }
.nav-toggle span { position: absolute; left: 0; height: 2px; width: 100%; background: #fff; transition: all 0.35s var(--ease); }
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 10px; }
.nav-toggle span:nth-child(3) { top: 20px; }
body.menu-open .nav-toggle span:nth-child(1) { top: 10px; transform: rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* =====================================================================
   Hero
   ===================================================================== */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(29,77,119,0.55), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, #0a2440 100%),
    var(--navy-900);
  color: #fff; overflow: hidden;
}
.hero::before { /* geometric khatam pattern veil */
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23c9a23f' stroke-width='1' stroke-opacity='0.10'%3E%3Cpath d='M40 6 L48 32 L74 40 L48 48 L40 74 L32 48 L6 40 L32 32 Z'/%3E%3Ccircle cx='40' cy='40' r='30'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px; opacity: 0.6;
  mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-gold), transparent); }
.hero .wrap { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 60px; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero .lead { color: rgba(255,255,255,0.78); margin-top: 1.4rem; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.6rem; }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2; color: rgba(255,255,255,0.5); font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-hint .line { width: 1px; height: 38px; background: linear-gradient(var(--gold), transparent); animation: drop 2.2s var(--ease) infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* hero stat strip */
.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 64px); margin-top: 3.4rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.12); }
.hero-stats .stat .num { font-family: var(--serif); font-size: 2.2rem; color: var(--gold-soft); line-height: 1; }
.hero-stats .stat .lbl { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-top: 6px; }
html[lang="ar"] .hero-stats .stat .lbl { letter-spacing: 0.02em; }

/* =====================================================================
   Generic sections
   ===================================================================== */
.bg-cream { background: var(--cream); }
.bg-navy { background: var(--navy-800); color: #fff; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy .lead { color: rgba(255,255,255,0.75); }

.section-head { max-width: 64ch; }
.section-head.center { margin-inline: auto; }

/* two-column intro */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 84px); align-items: center; }
.split .col-media { position: relative; }
.figure {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  aspect-ratio: 4 / 5; box-shadow: 0 30px 60px -30px rgba(8,26,48,0.5);
}
.figure::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(201,162,63,0.4); pointer-events: none; }

/* =====================================================================
   Sector cards
   ===================================================================== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; margin-top: 3rem; }
.card {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 38px 30px; overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.bg-cream .card { background: var(--paper); }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
html[dir="rtl"] .card::before { transform-origin: right; }
.card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -28px rgba(8,26,48,0.4); border-color: var(--line-gold); }
.card:hover::before { transform: scaleX(1); }
.card .ic { width: 48px; height: 48px; color: var(--gold-deep); margin-bottom: 22px; }
.card .ic svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.4; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.97rem; }
.card .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.card .tags span { font-size: 0.72rem; letter-spacing: 0.04em; color: var(--navy-700); background: var(--cream-2); border-radius: 100px; padding: 4px 11px; }

/* =====================================================================
   Value / feature rows
   ===================================================================== */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px 36px; margin-top: 3rem; }
.value .num { font-family: var(--serif); font-size: 1.1rem; color: var(--gold); letter-spacing: 0.2em; }
.value h3 { font-size: 1.25rem; margin: 12px 0 8px; }
.value p { color: var(--muted); font-size: 0.95rem; }
.bg-navy .value p { color: rgba(255,255,255,0.7); }
.bg-navy .value h3 { color: #fff; }
.value .div { width: 38px; height: 1px; background: var(--line-gold); margin-bottom: 18px; }

/* =====================================================================
   Footprint / presence
   ===================================================================== */
.footprint { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-top: 3rem; }
.place { border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius); padding: 26px 24px; transition: border-color 0.4s var(--ease), background 0.4s var(--ease); }
.place:hover { border-color: var(--line-gold); background: rgba(255,255,255,0.03); }
.place .flag { font-size: 1.6rem; }
.place .country { font-family: var(--serif); font-size: 1.5rem; color: #fff; margin-top: 8px; }
.place .role { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-soft); margin-top: 4px; }
html[lang="ar"] .place .role { letter-spacing: 0.02em; }

/* =====================================================================
   CTA band
   ===================================================================== */
.cta-band { position: relative; background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 4 L36 24 L56 30 L36 36 L30 56 L24 36 L4 30 L24 24 Z' fill='none' stroke='%23c9a23f' stroke-opacity='0.12'/%3E%3C/svg%3E"); background-size: 90px; opacity: 0.5; }
.cta-band .wrap { position: relative; z-index: 2; }

/* =====================================================================
   Contact
   ===================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 72px); }
.contact-list { display: flex; flex-direction: column; gap: 26px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item .ic { width: 26px; height: 26px; color: var(--gold-deep); flex: none; margin-top: 3px; }
.contact-item .ic svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.5; }
.contact-item .lbl { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .contact-item .lbl { letter-spacing: 0.02em; }
.contact-item .val { font-size: 1.05rem; color: var(--navy-800); }
.contact-item a.val:hover { color: var(--gold-deep); }

.form { display: grid; gap: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
html[dir="rtl"] .hp { left: auto; right: -9999px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .field label { letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 15px; transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,63,0.14); }
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-status { font-size: 0.92rem; padding: 10px 0; min-height: 1.2em; }
.form-status.ok { color: #2f7d4f; }
.form-status.err { color: #b3402f; }

/* page hero (interior pages) */
.page-hero { position: relative; background: linear-gradient(160deg, var(--navy-900), var(--navy-800)); color: #fff; padding-top: 150px; padding-bottom: 70px; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M40 8 L47 33 L72 40 L47 47 L40 72 L33 47 L8 40 L33 33 Z' fill='none' stroke='%23c9a23f' stroke-opacity='0.10'/%3E%3C/svg%3E"); background-size: 110px; mask-image: linear-gradient(90deg, transparent, #000); -webkit-mask-image: linear-gradient(90deg, transparent, #000); }
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; }
.page-hero .crumb { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 1rem; }
html[lang="ar"] .page-hero .crumb { letter-spacing: 0.04em; }

/* prose */
.prose p { color: var(--muted); margin-bottom: 1.1rem; max-width: 68ch; }
.prose p strong { color: var(--navy-800); font-weight: 600; }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.7); padding-block: 64px 30px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand p { font-size: 0.92rem; max-width: 36ch; color: rgba(255,255,255,0.6); }
.footer-col h4 { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 16px; font-weight: 600; }
html[lang="ar"] .footer-col h4 { letter-spacing: 0.02em; }
.footer-col a, .footer-col span { display: block; font-size: 0.92rem; color: rgba(255,255,255,0.65); margin-bottom: 10px; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--gold-soft); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.footer-bottom a:hover { color: var(--gold-soft); }

/* =====================================================================
   Reveal animation
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.40s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .scroll-hint .line { animation: none; } html { scroll-behavior: auto; } }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px); flex-direction: column;
    align-items: flex-start; justify-content: center; gap: 26px; padding: 40px;
    background: rgba(8,26,48,0.98); backdrop-filter: blur(14px);
    transform: translateX(100%); transition: transform 0.5s var(--ease);
  }
  html[dir="rtl"] .nav-links { inset: 0 auto 0 0; transform: translateX(-100%); }
  body.menu-open .nav-links { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split .col-media { order: -1; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .hero .figure { display: none; }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 20px; }
  .hero-stats { gap: 24px 36px; }
}
