:root {
  --ink: #0a192f; --surface: #0d1c32; --surface2: #13294a; --edge: #2a3a55;
  --text: #ebf1ff; --muted: #9fb0cc;
  --gold: #e9c176; --gold-light: #fed488; --gold-deep: #c9a456;
  --cool: #3a5a8f;
  --f-display: 'Libre Caslon Text', Georgia, serif;
  --card-bg: rgba(19, 41, 74, 0.5); --glass-bg: rgba(13, 28, 50, 0.6); --field-bg: rgba(10, 25, 47, 0.55);
  --nav-bg: rgba(10, 25, 47, 0.82); --menu-bg: rgba(13, 28, 50, 0.97);
  --btn-bg: var(--gold); --btn-fg: #0a192f;
}
html.light {
  --ink: #f9f9ff; --surface: #f0f3ff; --surface2: #e7eeff; --edge: #c5c6cd;
  --text: #111c2c; --muted: #44474d;
  --gold: #775a19; --gold-light: #8a6a20; --gold-deep: #5d4201;
  --card-bg: #ffffff; --glass-bg: rgba(255, 255, 255, 0.9); --field-bg: #ffffff;
  --nav-bg: rgba(249, 249, 255, 0.85); --menu-bg: rgba(240, 243, 255, 0.97);
  --btn-bg: #0d1c32; --btn-fg: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 96px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--ink);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .os-title, .brand-title {
  font-family: var(--f-display) !important; letter-spacing: -0.015em;
}

/* ---------- Brand gradient ---------- */
.gradient-text {
  background: linear-gradient(115deg, var(--gold-light) 0%, var(--gold) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn-gold {
  display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
  padding: 0.9rem 1.8rem; font-weight: 600;
  background: var(--btn-bg) !important; color: var(--btn-fg) !important; border-radius: 4px !important;
  box-shadow: none !important; border: 1px solid var(--btn-bg);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn-gold:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 12px 30px -16px rgba(0,0,0,0.5) !important; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
  padding: 0.9rem 1.8rem; font-weight: 600;
  border-radius: 4px !important; border: 1px solid var(--gold) !important; color: var(--gold-light) !important;
  transition: all 0.25s ease;
}
html.light .btn-ghost { color: var(--gold) !important; }
.btn-ghost:hover { background: rgba(233,193,118,0.08); transform: translateY(-2px); }

/* ---------- Page-load curtain ---------- */
#pageCurtain {
  position: fixed; inset: 0; z-index: 100; background: var(--ink);
  display: grid; place-items: center; transition: opacity 0.6s ease, visibility 0.6s;
}
#pageCurtain.gone { opacity: 0; visibility: hidden; }
.curtain-mark { width: 54px; height: 54px; opacity: 0.9; animation: spin3d 2.2s linear infinite; }
@keyframes spin3d { to { transform: rotateY(360deg); } }
img.curtain-mark { width: 64px; height: 64px; border-radius: 10px; object-fit: contain; }

/* ---------- Navbar ---------- */
#navbar { position: fixed; inset-inline: 0; top: 0; z-index: 50; transition: all 0.35s ease; }
#navbar .nav-inner {
  margin-inline: auto; max-width: 80rem; display: flex; align-items: center;
  justify-content: space-between; padding: 1.4rem 1.5rem; transition: padding 0.35s ease;
}
#navbar.shrink { background: var(--nav-bg); backdrop-filter: blur(16px); border-bottom: 1px solid var(--edge); }
#navbar.shrink .nav-inner { padding: 0.7rem 1.5rem; }
@media (min-width: 640px) { #navbar .nav-inner { padding-inline: 2rem; } }

.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-mark { display: inline-grid; place-items: center; transition: transform 0.5s ease; }
.brand:hover .brand-mark { transform: rotateY(180deg); }
.brand-title { font-weight: 700; font-size: 1.4rem; line-height: 1; }
.brand-sub { font-size: 9px; text-transform: uppercase; letter-spacing: 0.22em; color: var(--muted); }
.brand-img { width: 40px; height: 40px; border-radius: 6px; object-fit: contain; display: block; }

/* ---------- Layout helpers ---------- */
.wrap { margin-inline: auto; max-width: 80rem; padding-inline: 1.25rem; }
@media (min-width: 640px) { .wrap { padding-inline: 2rem; } }

.section-tag {
  font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; display: inline-flex; align-items: center; gap: 0.6rem;
}
.section-tag::before { content: ""; width: 28px; height: 1px; background: var(--gold); display: inline-block; }

/* ---------- Glass / gradient-border ---------- */
.glass {
  background: var(--glass-bg); border: 1px solid var(--edge);
  backdrop-filter: blur(10px); transition: border-color 0.3s ease, transform 0.3s ease;
}
.glass:hover { border-color: rgba(212, 175, 122, 0.45); }
html.light .glass { background: rgba(255, 255, 255, 0.7); }

.gborder { position: relative; border-radius: 1.2rem; }
.gborder::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(130deg, rgba(212,175,122,0.5), transparent 40%, transparent 60%, rgba(138,155,255,0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.35s ease;
  pointer-events: none;
}
.gborder:hover::before { opacity: 1; }

/* ---------- Tilt context ---------- */
[data-tilt] { transform-style: preserve-3d; will-change: transform; }

/* ---------- Contact fields ---------- */
.field-label { display: block; margin-bottom: 0.4rem; font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.field {
  width: 100%; border-radius: 4px !important; border: 1px solid var(--edge); background: var(--field-bg);
  padding: 0.8rem 1rem; color: var(--text); font-size: 0.94rem; font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field::placeholder { color: #5e594f; }
html.light .field { background: rgba(255, 255, 255, 0.85); }
html.light .field::placeholder { color: #9b9384; }
.field:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 122, 0.16); }
.field.invalid { border-color: #f0857a; box-shadow: 0 0 0 3px rgba(240, 133, 122, 0.15); }

/* ---------- Reveal base / reduced motion / focus ---------- */
[data-reveal] { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .curtain-mark { animation: none !important; }
}
a:focus-visible, button:focus-visible, .field:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ============================================================
   TUBELIGHT NAVBAR (no hamburger) - labels desktop / icons mobile
   ============================================================ */
.tubelight {
  display: flex; align-items: center; gap: 0.25rem;
  background: var(--field-bg); border: 1px solid var(--edge);
  backdrop-filter: blur(12px); padding: 0.3rem; border-radius: 9999px;
  box-shadow: 0 10px 34px -16px rgba(0, 0, 0, 0.6);
}
.tl-link {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600; padding: 0.5rem 1.15rem; border-radius: 9999px;
  color: var(--muted); text-decoration: none; transition: color 0.25s ease;
}
.tl-link:hover { color: var(--gold-light); }
.tl-link.active { color: var(--gold-light); }
.tl-ico { display: none; }
.tl-ico svg { width: 18px; height: 18px; }
.tl-link.active::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 9999px;
  background: rgba(252, 163, 17, 0.08);
}
.tl-link.active::before {
  content: ""; position: absolute; top: -3px; left: 50%; transform: translateX(-50%); z-index: -1;
  width: 2rem; height: 4px; background: var(--gold); border-radius: 0 0 6px 6px;
  box-shadow: 0 0 12px 3px rgba(252, 163, 17, 0.55), 0 6px 20px 5px rgba(252, 163, 17, 0.35);
}
@media (max-width: 1023px) {
  .tubelight { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1.1rem; top: auto; gap: 0.15rem; z-index: 50; }
  .tl-label { display: none; }
  .tl-ico { display: inline-flex; align-items: center; }
  .tl-link { padding: 0.6rem 0.7rem; }
  .tl-link.active::before { top: auto; bottom: -3px; border-radius: 6px 6px 0 0; }
  body { padding-bottom: 5.5rem; }   /* clear the fixed bottom bar */
  /* navbar's backdrop-filter would make the fixed bottom bar re-anchor to the
     top on scroll (filter creates a containing block) — drop it on mobile */
  #navbar.shrink { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.nav-tools { display: flex !important; align-items: center; gap: 0.6rem; }

/* ============================================================
   THEME TOGGLE - sliding pill
   ============================================================ */
.theme-toggle { width: 3.4rem; height: 1.8rem; padding: 0; border-radius: 9999px; border: 1px solid var(--edge); background: var(--field-bg); cursor: pointer; display: inline-flex; align-items: center; transition: background 0.3s, border-color 0.3s; }
.theme-toggle:hover { border-color: var(--gold); }
.tt-track { position: relative; width: 100%; height: 100%; }
.tt-knob {
  position: absolute; top: 50%; left: 3px; transform: translateY(-50%);
  width: 1.4rem; height: 1.4rem; border-radius: 9999px; background: var(--gold);
  display: grid; place-items: center; color: #10131c; transition: transform 0.3s ease, background 0.3s;
}
.tt-knob svg { width: 0.85rem; height: 0.85rem; }
html.light .tt-knob { transform: translate(1.6rem, -50%); }
#themeBtn .ico-sun, #themeBtn .ico-moon { display: none; }
#themeBtn .ico-moon { display: block; }
html.light #themeBtn .ico-sun { display: block; }
html.light #themeBtn .ico-moon { display: none; }

/* ============================================================
   ONE-PAGE - progress bar · roaming orb · dot nav · sections
   ============================================================ */
#oProgress { position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 60; background: rgba(255,255,255,0.06); }
#oProgress > i { display: block; height: 100%; width: 100%; transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold), var(--gold-light)); transition: transform 0.15s ease-out;
  filter: drop-shadow(0 0 3px rgba(201,164,86,0.4)); }
html.light #oProgress { background: rgba(20,33,61,0.08); }

#oGlobe { position: fixed; top: 0; left: 0; z-index: 1; pointer-events: none; will-change: transform;
  transition: transform 1400ms cubic-bezier(0.23,1,0.32,1), opacity 0.8s ease; }

.dotnav { position: fixed; right: 1.6rem; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 1.15rem; }
.dotnav .dot-row { position: relative; display: flex; align-items: center; justify-content: flex-end; }
.dotnav button { position: relative; width: 11px; height: 11px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.32); background: transparent; cursor: pointer; transition: all 0.3s; }
html.light .dotnav button { border-color: rgba(20,33,61,0.3); }
.dotnav button:hover { border-color: var(--gold); transform: scale(1.25); }
.dotnav button.active { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 12px rgba(201,164,86,0.6); }
.dotnav .dl { position: absolute; right: 1.5rem; white-space: nowrap; font-size: 0.74rem; font-weight: 600;
  padding: 0.3rem 0.7rem; border-radius: 0.45rem; background: var(--card-bg); border: 1px solid var(--edge);
  color: var(--text); opacity: 0; pointer-events: none; }
.dotnav button.active ~ .dl { animation: fadeOutLabel 2.6s ease forwards; }
@media (max-width: 1023px) { .dotnav { display: none; } }
@keyframes fadeOutLabel {
  0%, 70% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 0; transform: translateX(0.5rem) scale(0.95); }
}

/* one-page sections - faithful ScrollGlobe layout */
.osec { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 6rem 0; position: relative; z-index: 20; scroll-margin-top: 5rem; }
#hero.osec { padding-top: 7rem; min-height: 100vh; }
#contact.osec { padding-bottom: 6rem; }
.osec[data-align="center"] { align-items: center; text-align: center; }
.osec[data-align="left"] { align-items: flex-start; text-align: left; }
.osec .section-tag { margin-bottom: 0.9rem; }
.os-inner { width: 100%; max-width: 64rem; }

.osec [data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.osec [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .osec [data-reveal] { opacity: 1 !important; transform: none !important; } }

.os-title { font-family: var(--f-display); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em;
  font-size: clamp(2.2rem, 6vw, 5rem); }
#hero .os-title { font-size: clamp(2.6rem, 7vw, 5.4rem); }
.os-title .gradient-text { display: inline; }
.os-sub { display: block; font-size: 0.52em; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; margin-top: 0.5rem; }
.os-desc { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.7; max-width: 38rem; margin-top: 1.5rem; font-weight: 300; }
.osec[data-align="center"] .os-desc { margin-inline: auto; }

.os-ind { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.6rem; font-size: 0.8rem; color: var(--muted); }
.os-ind span { display: inline-flex; align-items: center; gap: 0.5rem; }
.os-ind i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: dotpulse 1.6s ease-in-out infinite; }
@keyframes dotpulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

.os-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.osec[data-align="center"] .os-actions { justify-content: center; }

/* ============================================================
   TALENT NETWORK ORB - recruiting visual (in #oGlobe)
   ============================================================ */
.talent-orb { width: 250px; height: 250px; overflow: visible; filter: drop-shadow(0 0 26px rgba(201,164,86,0.28)); }
.talent-orb .to-spin { transform-origin: 125px 125px; animation: orbSpin 60s linear infinite; }
@keyframes orbSpin { to { transform: rotate(360deg); } }
.talent-orb .to-ring { fill: none; stroke: rgba(201,164,86,0.28); stroke-width: 1.2; stroke-dasharray: 3 7; }
.talent-orb .to-ring2 { fill: none; stroke: rgba(229,229,229,0.14); stroke-width: 1; }
.talent-orb .to-line { stroke: rgba(201,164,86,0.3); stroke-width: 1; }
.talent-orb .to-node { fill: var(--surface2); stroke: var(--gold); stroke-width: 1.5; }
.talent-orb .to-node-ic { fill: var(--gold-light); }
.talent-orb .to-pulse { animation: dotpulse 3s ease-in-out infinite; }
.talent-orb .to-hub { fill: url(#hubGrad); }
.talent-orb .to-hub-ic { stroke: #16110a; fill: none; stroke-width: 1.6; }
@media (prefers-reduced-motion: reduce) { .talent-orb .to-spin, .talent-orb .to-pulse { animation: none !important; } }

/* ============================================================
   ONE-PAGE - distinct section designs (Services / Industries)
   ============================================================ */
/* SERVICES - numbered cards grid */
.svc-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2.2rem; max-width: 52rem; }
@media (min-width: 640px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
.svc-card { position: relative; overflow: hidden; border: 1px solid var(--edge); border-radius: 4px; padding: 1.5rem 1.4rem;
  background: var(--card-bg); transform-style: preserve-3d; will-change: transform; transition: transform 0.15s ease, border-color 0.3s, opacity 0.8s ease; }
.svc-card:hover { border-color: var(--gold); }
.svc-card::after { content: ""; position: absolute; top: 0; left: 0; height: 2px; width: 0; background: var(--gold); transition: width 0.4s ease; }
.svc-card:hover::after { width: 100%; }
.svc-num { font-family: var(--f-display); font-weight: 700; font-size: 2.2rem; line-height: 1; color: transparent;
  -webkit-text-stroke: 1px var(--gold); text-stroke: 1px var(--gold); display: block; margin-bottom: 0.6rem; opacity: 0.85; }
.svc-card h3 { font-family: var(--f-display); font-size: 1.15rem; }
.svc-card p { color: var(--muted); font-size: 0.92rem; margin-top: 0.4rem; line-height: 1.5; }

/* INDUSTRIES - compact sector grid */
.ind-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; margin-top: 2.2rem; text-align: left; }
@media (min-width: 768px) { .ind-grid { grid-template-columns: repeat(3, 1fr); } }
.ind-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1rem; border: 1px solid var(--edge); border-radius: 4px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s, opacity 0.6s ease; }
.ind-item:hover { border-color: var(--gold); background: var(--card-bg); transform: translateY(-3px); }
.ind-n { font-family: var(--f-display); font-weight: 700; font-size: 0.82rem; color: var(--gold); flex-shrink: 0; }
.ind-name { font-weight: 500; font-size: 0.95rem; }

/* distinct entrance variants per section */
#services [data-reveal] { transform: translateY(28px) scale(0.95); }
#industries [data-reveal] { transform: translateY(16px) scale(0.9); }

/* ============================================================
   CARDS STACK - sticky scroll-stacking (Process section)
   ============================================================ */
.stack-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 768px) { .stack-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.stack-intro { align-self: start; }
@media (min-width: 768px) {
  .stack-intro { position: sticky; top: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-block: 3rem; }
}
.stack-cards { display: flex; flex-direction: column; gap: 1.5rem; padding-bottom: 12vh; perspective: 1000px; }
.stack-card {
  position: sticky; border: 1px solid var(--edge); border-radius: 4px; padding: 1.8rem 1.9rem;
  background: var(--card-bg); backdrop-filter: blur(10px); transition: border-color 0.3s;
  box-shadow: 0 18px 50px -28px rgba(0,0,0,0.6); backface-visibility: hidden;
}
html.light .stack-card { box-shadow: 0 18px 50px -30px rgba(20,33,61,0.25); }
.stack-card:hover { border-color: var(--gold); }
.stack-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.stack-head h3 { font-family: var(--f-display); font-size: 1.4rem; font-weight: 700; }
.stack-num { font-family: var(--f-display); font-size: 1.6rem; font-weight: 700; color: var(--gold); }
.stack-card p { color: var(--muted); line-height: 1.6; }

/* Process section = sticky stack (tall, top-aligned) */
.osec-stack { min-height: auto !important; justify-content: flex-start !important; padding-block: 5rem; }
#process .stack-intro { top: 5rem; }
@media (min-width: 768px) { #process .stack-intro { min-height: 90vh; } }

/* ============================================================
   RTL / ARABIC  (html[dir="rtl"])
   ============================================================ */
[dir="rtl"] .dotnav { right: auto; left: 1.6rem; }
[dir="rtl"] .dotnav .dot-row { justify-content: flex-start; }
[dir="rtl"] .dotnav .dl { right: auto; left: 1.5rem; }
[dir="rtl"] .tt-knob { left: auto; right: 3px; }
html.light[dir="rtl"] .tt-knob { transform: translate(-1.6rem, -50%); }
[dir="rtl"] .svc-card::after { left: auto; right: 0; }
[dir="rtl"] .osec[data-align="left"] { text-align: right; }

/* language switch pill */
.lang-link { display: inline-grid; place-items: center; min-width: 2.4rem; height: 2.4rem; padding: 0 0.6rem;
  border: 1px solid var(--edge); border-radius: 9999px; color: var(--text); font-weight: 700; font-size: 0.82rem;
  text-decoration: none; transition: all 0.2s ease; }
.lang-link:hover { border-color: var(--gold); color: var(--gold-light); }

/* ============================================================
   MOBILE TUNING (<= 640px)
   ============================================================ */
@media (max-width: 640px) {
  /* sections flow naturally instead of one-screen-each */
  .osec { min-height: auto; padding: 4rem 0; justify-content: flex-start; }
  #hero.osec { min-height: 92vh; justify-content: center; padding-top: 5.5rem; }
  #contact.osec { padding-bottom: 4rem; }
  .os-inner { max-width: 100%; }
  /* readable, non-giant headings */
  .os-title { font-size: clamp(2rem, 8.5vw, 2.7rem); }
  #hero .os-title { font-size: clamp(2.1rem, 9vw, 3rem); }
  .os-desc { font-size: 1rem; }
  /* services: single column on phones */
  .svc-grid { grid-template-columns: 1fr; }
  /* process stack: keep sticky-stacking on phones too (single column) */
  .osec-stack { padding-block: 3.5rem; }
  .stack-intro { margin-bottom: 1.5rem; }
  .stack-cards { padding-bottom: 14vh; gap: 1.1rem; }
  /* cards keep their increasing top offsets → layered peek as you scroll */
  .stack-card p { font-size: 0.95rem; }
}
