/* ── Light Mode (Default) ── */
:root {
  --ink: #07191b;
  --ink-2: #555555;
  --muted: #888888;
  --line: #e8e8e8;
  --bg: #ffffff;
  --accent: #14473a;
  --font-sans: 'Montserrat', 'Inter', Arial, Helvetica, sans-serif;
  --font-foreign: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --pf-text-face: "Thmanyah Serif Text", "Thmanyah Sans", var(--font-sans);
  --nav-bg: rgba(255, 255, 255, 0.38);
  --nav-border: rgba(255, 255, 255, 0.75);
  --nav-shadow: 0 10px 32px -4px rgba(7, 25, 27, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.95);
  --dropdown-bg: rgba(255, 255, 255, 0.55);
  --dropdown-border: rgba(255, 255, 255, 0.8);
  --btn-border: #e2e2e2;
  --theme-transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  /* Particle color (light mode = completely black) */
  --particle-r: 0;
  --particle-g: 0;
  --particle-b: 0;
}

/* ── Dark Mode (Luxury Obsidian Black with Radiant Emerald Aurora) ── */
body.dark {
  --ink: #ffffff;
  --ink-2: #a6b6b0;
  --muted: #70827b;
  --line: rgba(255, 255, 255, 0.1);
  --bg: #030504;
  --accent: #00ffa5;
  --accent-glow: rgba(0, 255, 165, 0.6);
  --nav-bg: rgba(6, 10, 8, 0.40);
  --nav-border: rgba(255, 255, 255, 0.14);
  --nav-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.18);
  --dropdown-bg: rgba(8, 14, 11, 0.65);
  --dropdown-border: rgba(255, 255, 255, 0.16);
  --btn-border: rgba(255, 255, 255, 0.18);
  /* Particle color (dark mode = luminous white & emerald highlights) */
  --particle-r: 255;
  --particle-g: 255;
  --particle-b: 255;
}

/* ── Smooth global transition on theme switch ── */
body,
body * {
  transition: var(--theme-transition);
}

/* Exclude animations and transforms from transition override */
body canvas,
body .mote,
body [style*="transform"],
body .ambient-glow,
body .ambient-glow-center,
body .ambient-glow-1,
body .ambient-glow-2,
body .logo-float,
body .logo-float img {
  transition: none;
}

/* ── Thmanyah Arabic Fonts ── */
@font-face {
  font-family: 'Thmanyah Serif Text';
  src: url('../assets/fonts/thmanyahseriftext-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Text';
  src: url('../assets/fonts/thmanyahseriftext-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('../assets/fonts/thmanyahserifdisplay-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('../assets/fonts/thmanyahserifdisplay-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('../assets/fonts/thmanyahserifdisplay-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Sans';
  src: url('../assets/fonts/thmanyahsans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Sans';
  src: url('../assets/fonts/thmanyahsans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Sans';
  src: url('../assets/fonts/thmanyahsans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overflow-x: hidden;
  max-width: 100%;
}

/* ── Hide scrollbar gutter completely to eliminate 17px right gap, smooth scrolling remains active ── */
::-webkit-scrollbar {
  width: 0px !important;
  height: 0px !important;
  display: none !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background: transparent !important;
}

body.dark {
  scrollbar-color: transparent transparent;
}

body {
  background: transparent;
  color: var(--ink);
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

/* Accessible Skip Link & Main Content Landmark */
.skip-to-content:focus {
  left: 16px !important;
  top: 16px !important;
  width: auto !important;
  height: auto !important;
  padding: 10px 18px !important;
  background: var(--bg) !important;
  color: var(--ink) !important;
  border: 1px solid var(--accent) !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
  text-decoration: none !important;
}

#main-content {
  display: block;
  position: relative;
  width: 100%;
}

/* ── Portrait canvas ── */
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: transparent;
  transform-origin: 50% 68%;
  pointer-events: none;
}

body.dark #scene {
  filter: drop-shadow(0 0 12px rgba(0, 255, 165, 0.45)) drop-shadow(0 0 32px rgba(255, 255, 255, 0.25));
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
  pointer-events: all;
}



/* -- Entry overlay -- */
#entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #07191b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  cursor: pointer;
  transition: opacity 0.8s cubic-bezier(.4, 0, .2, 1), visibility 0.8s;
}

#entry-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#entry-overlay .entry-name {
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

#entry-overlay .entry-btn {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, transform 0.3s;
}

#entry-overlay .entry-btn svg {
  opacity: 0.75;
  transition: opacity 0.3s;
}

#entry-overlay:hover .entry-btn {
  border-color: rgba(255, 255, 255, 0.55);
  transform: scale(1.08);
}

#entry-overlay:hover .entry-btn svg {
  opacity: 1;
}

#entry-overlay .entry-label {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
}

/* ══════════════════════════════════════════════════════════════
   UNIFIED BADGE PILL SYSTEM (Matching Hero tag-chip exactly)
   ══════════════════════════════════════════════════════════════ */
.tag-chip,
.brands-badge-pill,
.projects-badge-pill,
.designs-badge-pill,
.expertise-badge-pill,
.testi-badge-pill,
.contact-badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all .2s ease;
  cursor: default;
}

.tag-chip:hover,
.brands-badge-pill:hover,
.projects-badge-pill:hover,
.designs-badge-pill:hover,
.expertise-badge-pill:hover,
.testi-badge-pill:hover,
.contact-badge-pill:hover {
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

body.dark .tag-chip,
body.dark .brands-badge-pill,
body.dark .projects-badge-pill,
body.dark .designs-badge-pill,
body.dark .expertise-badge-pill,
body.dark .testi-badge-pill,
body.dark .contact-badge-pill {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #e2ede8;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.dark .tag-chip:hover,
body.dark .brands-badge-pill:hover,
body.dark .projects-badge-pill:hover,
body.dark .designs-badge-pill:hover,
body.dark .expertise-badge-pill:hover,
body.dark .testi-badge-pill:hover,
body.dark .contact-badge-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(0, 255, 165, 0.4);
  box-shadow: 0 4px 16px rgba(0, 255, 165, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

body.lang-ar .tag-chip,
body.lang-ar .brands-badge-pill,
body.lang-ar .projects-badge-pill,
body.lang-ar .designs-badge-pill,
body.lang-ar .expertise-badge-pill,
body.lang-ar .testi-badge-pill,
body.lang-ar .contact-badge-pill,
html[lang="ar"] .tag-chip,
html[lang="ar"] .brands-badge-pill,
html[lang="ar"] .projects-badge-pill,
html[lang="ar"] .designs-badge-pill,
html[lang="ar"] .expertise-badge-pill,
html[lang="ar"] .testi-badge-pill,
html[lang="ar"] .contact-badge-pill {
  font-family: var(--pf-text-face), 'Thmanyah Serif Text', 'Thmanyah Sans', sans-serif !important;
  font-weight: 600;
  letter-spacing: 0;
}