/* ============================================================
   unshift — style.css  v5  (black & white galaxy)
   ============================================================ */

:root {
  --bg: #000000;
  --fg: #ffffff;
  --fg2: #aaaaaa;
  --fg3: #333333;
  --border: rgba(255, 255, 255, 0.15);
  --border2: rgba(255, 255, 255, 0.35);
  --panel-bg: rgba(0, 0, 0, 0.94);
  --accent: #ffffff;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #000;
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}
button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
}

/* ── Galaxy canvas (always behind everything) ── */
#bg-pattern {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Loader ── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.7s var(--ease),
    visibility 0.7s;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #555;
  animation: blink 0.9s ease infinite alternate;
}
@keyframes blink {
  from {
    opacity: 0.15;
  }
  to {
    opacity: 0.8;
  }
}

/* ── Pages ── */
.page {
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
.page.active {
  opacity: 1;
  pointer-events: all;
}

/* ── Page logo ── */
.page-logo {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 20;
  display: flex;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  padding-bottom: 4px;
  border-bottom: 2px solid #fff;
  font-family: "CustomDigitalFont", monospace;
}
.logo-box {
  font-size: 17px;
  margin-right: 2px;
}
.logo-text {
  letter-spacing: 0.08em;
  font-size: 19px;
}

/* ── Vision split layout ── */
.vision-panel {
  position: absolute;
  top: 50%;
  left: 28px;
  transform: translateY(-50%);
  z-index: 20;
  width: min(380px, 40vw);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
}
.vision-panel::-webkit-scrollbar { display: none; }

.vision-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.vision-content.hidden { display: none; }

.vision-body {
  font-size: clamp(13px, 1.25vw, 16px);
  line-height: 1.9;
  color: var(--fg2);
  font-family: var(--font);
}
.vision-quote {
  margin-top: 6px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.22);
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.0vw, 13px);
  color: rgba(255,255,255,0.38);
  line-height: 1.75;
  font-style: italic;
}

/* Ghost label — right half in LTR */
.canvas-label {
  position: absolute;
  top: 50%;
  left: 68%;
  transform: translate(-50%, -50%);
  z-index: 6;
  font-family: var(--font-mono);
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.10);
  pointer-events: none;
  user-select: none;
  text-shadow:
    2px 0 0 rgba(255,100,200,0.18),
    -2px 0 0 rgba(100,220,255,0.18);
  animation: glitch 6s ease infinite;
  white-space: nowrap;
}

/* ── RTL overrides ── */
html[dir="rtl"] .vision-panel {
  left: auto;
  right: 28px;
  text-align: right;
}
html[dir="rtl"] .vision-quote {
  padding-left: 0;
  padding-right: 12px;
  border-left: none;
  border-right: 1px solid rgba(255,255,255,0.22);
}
/* Ghost label flips to left half in RTL (cube is on left) */
html[dir="rtl"] .canvas-label {
  left: 30%;
}

/* ── Responsive ── */

/* Large screens (>1200px): more breathing room */
@media (min-width: 1200px) {
  .vision-panel { width: min(440px, 38vw); }
  .vision-body  { font-size: 13px; }
}

/* Medium (768–1024px): tighten panel, keep side-by-side */
@media (max-width: 1024px) {
  .vision-panel { width: min(320px, 44vw); }
  .vision-body  { font-size: 11px; line-height: 1.8; }
  .canvas-label { font-size: clamp(32px, 5.5vw, 70px); }
}

/* Tablet portrait / large mobile (481–767px): stack vertically */
@media (max-width: 767px) {
  .vision-panel {
    width: calc(100vw - 32px);
    top: auto;
    left: 16px;
    right: 16px;
    bottom: 24px;
    transform: none;
    padding-top: 0;
    max-height: 42vh;
  }
  html[dir="rtl"] .vision-panel { left: 16px; right: 16px; }
  .canvas-label {
    top: 30%;
    left: 50%;
    font-size: clamp(28px, 8vw, 52px);
  }
  html[dir="rtl"] .canvas-label { left: 50%; }
  .vision-body  { font-size: 11px; }
  .vision-quote { font-size: 10px; }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
  .vision-panel {
    bottom: 16px;
    max-height: 38vh;
  }
  .canvas-label { font-size: clamp(24px, 7vw, 40px); top: 28%; }
}

@keyframes glitch {
  0%, 88%, 100% {
    text-shadow: 2px 0 0 rgba(255,100,200,0.18), -2px 0 0 rgba(100,220,255,0.18);
  }
  90% {
    text-shadow: -5px 0 0 rgba(255,100,200,0.4), 5px 0 0 rgba(100,220,255,0.4);
    letter-spacing: 0.17em;
  }
  93% {
    text-shadow: 3px 1px 0 rgba(255,100,200,0.25), -3px -1px 0 rgba(100,220,255,0.25);
  }
}

/* ── Tagline (kept for other uses) ── */
.tagline {
  position: absolute;
  top: 88px;
  left: 28px;
  z-index: 20;
  font-size: 13px;
  line-height: 1.85;
  color: var(--fg2);
}

/* ── Hero canvases (transparent, sit above galaxy) ── */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* ── Bottom CTA ── */
.bottom-cta {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg2);
  padding-bottom: 2px;
  border-bottom: 1px solid #333;
  transition:
    color 0.3s,
    border-color 0.3s;
  white-space: nowrap;
}
.bottom-cta:hover {
  color: #fff;
  border-color: #fff;
}

/* ── Services: corner intro ── */
.svc-corner-intro {
  position: absolute;
  top: 80px;          /* below logo */
  left: 28px;
  z-index: 20;
  width: min(320px, 30vw);
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.35);
  line-height: 1.85;
}
html[dir="rtl"] .svc-corner-intro {
  left: auto;
  right: 28px;
  text-align: right;
}

/* ── Works / Services overlay — centered ── */
.work-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  text-align: center;
  pointer-events: none;
  width: min(600px, 70vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* Fade animation triggered by JS */
@keyframes svcFade {
  from { opacity: 0; margin-top: 10px; }
  to   { opacity: 1; margin-top: 0px; }
}
.work-overlay.svc-fade {
  animation: svcFade 0.45s var(--ease) both;
}

/* ── Service icon ── */
.svc-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
}
.svc-icon svg {
  width: 100%;
  height: 100%;
  stroke: #ffffff;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.work-title {
  font-size: clamp(22px, 3.2vw, 42px);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: #fff;
  font-weight: 700;
  line-height: 1.15;
}
.more-details {
  font-family: var(--font);
  font-size: clamp(13px, 1.3vw, 17px);
  letter-spacing: 0.02em;
  color: var(--fg2);
  line-height: 1.75;
  max-width: 500px;
  pointer-events: none;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.20);
  pointer-events: none;
  animation: hintBlink 2.5s ease infinite;
  white-space: nowrap;
}
@keyframes hintBlink {
  0%,100% { opacity: 0.15; }
  50%      { opacity: 0.45; }
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .svc-corner-intro {
    top: 52px;
    left: 14px;
    right: 14px;
    width: auto;
    font-size: 11px;
  }
  html[dir="rtl"] .svc-corner-intro { right: 14px; left: 14px; }
  .work-overlay { width: 88vw; gap: 12px; }
  .svc-icon { width: 48px; height: 48px; }
  .work-title { font-size: clamp(20px, 6vw, 28px); }
  .more-details { font-size: 12px; }
}

/* ── Pagination ── */
.pagination {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--fg2);
}
.pag-btn {
  font-size: 18px;
  color: var(--fg2);
  transition: color 0.2s;
  padding: 0 4px;
}
.pag-btn:hover {
  color: #fff;
}

/* ════════════════════════════════════════════
   CONTACT PAGE — single centered column
════════════════════════════════════════════ */
.contact-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: min(640px, 88vw);
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-bottom: 12px;
}
.contact-wrap::-webkit-scrollbar { display: none; }

/* ── Heading ── */
.contact-heading h2 {
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.2;
}
.contact-heading p {
  font-size: clamp(12px, 1.1vw, 14px);
  color: var(--fg2);
  line-height: 1.85;
}
.contact-cta {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: clamp(10px, 0.95vw, 12px);
  color: rgba(255,255,255,0.30);
  letter-spacing: 0.06em;
  line-height: 1.7;
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 12px;
}
html[dir="rtl"] .contact-cta {
  border-left: none;
  border-right: 1px solid rgba(255,255,255,0.15);
  padding-left: 0;
  padding-right: 12px;
}

/* ── Social grid — 3 × 2 ── */
.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.social-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.50);
  transition: color 0.22s, border-color 0.22s, background 0.22s;
  white-space: nowrap;
  text-decoration: none;
}
.social-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: color 0.22s;
}
.social-btn:hover { color: #fff; background: rgba(255,255,255,0.04); }

/* Per-brand hover colours */
.social-btn[data-color="#1877F2"]:hover { border-color:#1877F2; }
.social-btn[data-color="#1877F2"]:hover svg { color:#1877F2; }
.social-btn[data-color="#ffffff"]:hover  { border-color:rgba(255,255,255,0.7); }
.social-btn[data-color="#E1306C"]:hover  { border-color:#E1306C; }
.social-btn[data-color="#E1306C"]:hover svg { color:#E1306C; }
.social-btn[data-color="#0A66C2"]:hover  { border-color:#0A66C2; }
.social-btn[data-color="#0A66C2"]:hover svg { color:#0A66C2; }
.social-btn[data-color="#69C9D0"]:hover  { border-color:#69C9D0; }
.social-btn[data-color="#69C9D0"]:hover svg { color:#69C9D0; }
.social-btn[data-color="#FFFC00"]:hover  { border-color:#FFFC00; }
.social-btn[data-color="#FFFC00"]:hover svg { color:#FFFC00; }

/* ── Form ── */
.contact-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cf-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
}
.cf-optional {
  font-size: 9px;
  color: rgba(255,255,255,0.22);
  letter-spacing: 0.06em;
  text-transform: none;
}
.cf-input, .cf-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 3px;
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.cf-input:focus, .cf-select:focus {
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.07);
}
.cf-input::placeholder { color: rgba(255,255,255,0.16); }
.cf-select option { background: #111; color: #fff; }

.cf-phone-row {
  display: flex;
  gap: 8px;
}
.cf-select {
  flex: 0 0 108px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.3)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
}
.cf-phone-num { flex: 1; }
.cf-textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.7;
}

/* Submit */
.cf-submit {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 26px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.40);
  border-radius: 3px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, color 0.22s;
}
.cf-submit:hover { background:#fff; border-color:#fff; color:#000; }
.cf-submit:hover svg { stroke:#000; }

/* Copyright */
.contact-copyright {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,0.16);
  white-space: nowrap;
  pointer-events: none;
}

/* ── RTL ── */
html[dir="rtl"] .contact-wrap   { text-align: right; }
html[dir="rtl"] .cf-label       { letter-spacing: 0.04em; }
html[dir="rtl"] .cf-phone-row   { flex-direction: row-reverse; }
html[dir="rtl"] .cf-submit      { align-self: flex-end; }
html[dir="rtl"] .contact-copyright { left: 50%; }

/* ── Mobile ── */
@media (max-width: 640px) {
  .contact-wrap {
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: 92vw;
    max-height: calc(100vh - 110px);
    gap: 20px;
  }
  .social-grid   { grid-template-columns: 1fr 1fr; }
  .cf-row        { grid-template-columns: 1fr; }
  .cf-submit     { align-self: stretch; justify-content: center; }
  html[dir="rtl"] .cf-submit { align-self: stretch; }
}

/* ── Global nav ── */
#global-nav {
  position: fixed;
  top: 32px;
  right: 110px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.nav-sep {
  color: #333;
  font-size: 11px;
}
.nav-item {
  color: var(--fg2);
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.nav-item:hover,
.nav-item.active {
  color: #fff;
  border-color: #fff;
}

/* ── Settings button ── */
#settings-btn {
  position: fixed;
  top: 20px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 64px;
  height: 52px;
  border: 1px solid var(--border2);
  border-radius: 2px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--fg2);
  transition:
    color 0.2s,
    border-color 0.2s;
}
#settings-btn:hover {
  color: #fff;
  border-color: #fff;
}
.gear {
  font-size: 16px;
  transition: transform 0.5s;
  display: block;
  line-height: 1;
}
#settings-btn:hover .gear {
  transform: rotate(90deg);
}
.settings-label {
  font-size: 9px;
  letter-spacing: 0.08em;
}

/* ── Settings panel ── */
#settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  width: min(360px, 88vw);
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  padding: 36px 28px;
  overflow-y: auto;
  transform: translateX(100%);
  transition:
    transform 0.55s var(--ease),
    visibility 0.55s;
  visibility: hidden;
}
#settings-panel.open {
  transform: translateX(0);
  visibility: visible;
}
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}
.settings-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: #fff;
}
.settings-close {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg2);
  transition: color 0.2s;
}
.settings-close:hover {
  color: #fff;
}
.settings-group {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.settings-group:last-child {
  border-bottom: none;
}
.s-group-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg2);
  font-weight: 400;
  margin-bottom: 18px;
}
.s-sub {
  margin-bottom: 20px;
}
.s-sub-title {
  font-size: 13px;
  color: #fff;
  margin-bottom: 5px;
}
.s-desc {
  font-size: 11px;
  color: var(--fg2);
  line-height: 1.7;
  margin-bottom: 12px;
}
.s-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.s-btn {
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  border: 1px solid var(--border2);
  border-radius: 2px;
  color: var(--fg2);
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.s-btn.active,
.s-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

@media (max-width: 640px) {
  /* ── Header: logo top-left, toggle top-right ── */
  .page-logo {
    top: 14px;
    left: 14px;
    font-size: 14px;
    border-bottom-width: 1.5px;
  }
  .logo-text { font-size: 14px; }

  /* Nav: floating pill pinned to bottom center — always centered regardless of dir */
  #global-nav {
    position: fixed;
    top: auto !important;
    bottom: 16px;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    font-size: 11px;
    gap: 10px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    white-space: nowrap;
  }
  /* RTL nav: same centering, override the global RTL rule */
  html[dir="rtl"] #global-nav {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }

  /* Toggle: top-right (LTR) / top-left (RTL) */
  #lang-toggle  { top: 14px; right: 14px; }
  html[dir="rtl"] #lang-toggle { right: auto; left: 14px; }

  #lang-switch  { width: 54px; height: 24px; border-radius: 12px; }
  .lang-knob    { top: 2px; right: 2px; width: 18px; height: 18px; }
  #lang-switch[aria-checked="true"] .lang-knob { transform: translateX(-30px); }
  .lang-switch-label     { font-size: 8px; }
  .lang-switch-label.en  { left: 7px; }
  .lang-switch-label.ar  { right: 7px; }

  /* Vision page: text bottom strip, cube + label in upper zone */
  .vision-panel {
    width: 100%;
    left: 0;
    right: 0;
    top: auto;
    bottom: 52px;
    transform: none;
    padding: 0 16px;
    max-height: 42vh;
    overflow-y: auto;
  }
  html[dir="rtl"] .vision-panel { left: 0; right: 0; text-align: right; }

  .vision-body  { font-size: 12px; line-height: 1.75; }
  .vision-quote { font-size: 10px; }

  /* VISION / الرؤية ghost label — bigger, upper-center */
  .canvas-label {
    top: 26%;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    font-size: clamp(36px, 11vw, 56px);
    letter-spacing: 0.10em;
  }
  html[dir="rtl"] .canvas-label {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
  }

  /* Logo RTL */
  html[dir="rtl"] .page-logo { left: auto; right: 14px; }

  /* Tagline (other pages) */
  .tagline { top: 60px; left: 14px; font-size: 11px; }
  html[dir="rtl"] .tagline { left: auto; right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .canvas-label {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@font-face {
  font-family: "CustomDigitalFont";
  src: url("../fonts/Organix.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CustomDigitalFont";
  src: url("../fonts/Organix.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* ── Language toggle switch ── */
#lang-toggle {
  position: fixed;
  top: 20px;
  right: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
}

/* The pill track */
#lang-switch {
  position: relative;
  width: 64px;
  height: 28px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.55);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.3s;
  flex-shrink: 0;
  overflow: hidden;
}
#lang-switch:hover {
  border-color: #fff;
}

/* Label inside the track (EN / AR) */
.lang-switch-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #fff;
  pointer-events: none;
  transition: opacity 0.3s;
  font-family: var(--font-mono);
  user-select: none;
}
/* EN label sits on the left side */
.lang-switch-label.en {
  left: 8px;
  opacity: 1;
}
/* AR label sits on the right side */
.lang-switch-label.ar {
  right: 8px;
  opacity: 0;
}

/* Outlined circular knob — right side when EN */
.lang-knob {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: transparent;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* AR active — knob slides to left, labels swap */
#lang-switch[aria-checked="true"] .lang-knob {
  transform: translateX(-36px);
}
#lang-switch[aria-checked="true"] .lang-switch-label.en { opacity: 0; }
#lang-switch[aria-checked="true"] .lang-switch-label.ar { opacity: 1; }
#lang-switch[aria-checked="true"] { border-color: rgba(255,255,255,0.8); }

/* ── RTL layout overrides ── */
html[dir="rtl"] .page-logo  { left: auto; right: 28px; }
html[dir="rtl"] .tagline    { left: auto; right: 28px; text-align: right; }
html[dir="rtl"] .tagline h3 { text-align: right; }
html[dir="rtl"] #global-nav { right: auto; left: 110px; }
html[dir="rtl"] #lang-toggle { right: auto; left: 16px; }
html[dir="rtl"] #settings-panel {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
}
html[dir="rtl"] #settings-panel.open { transform: translateX(0); }
html[dir="rtl"] .about-body { text-align: right; }

@media (max-width: 640px) {
  html[dir="rtl"] #global-nav  { left: 86px;  right: auto; }
  html[dir="rtl"] #lang-toggle { left: 12px;  right: auto; }
  html[dir="rtl"] .page-logo   { right: 16px; left: auto; }
  html[dir="rtl"] .tagline     { right: 16px; left: auto; }
}
