/* ==========================================================================
   css/style.css — Master Studio Stylesheet
   Universal Portfolio Studio — v3.8 Workbench Architecture
   Carbon & Titanium Engineering Aesthetic · Linear / Raycast Precision
   ========================================================================== */

@import url('tokens.css');
@import url('components.css');
@import url('studio.css');

/* === Global Reset & Base Typography === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fg-muted);
}

/* Accessible High-Contrast Focus Visible Ring */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Custom Highlight Selection */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: inherit;
}

/* Utility Helpers */
.hidden {
  display: none !important;
}

.text-accent {
  color: var(--color-primary-light);
}

.text-muted {
  color: var(--fg-muted);
}

.font-mono {
  font-family: var(--font-mono);
}

/* === Cairo Arabic RTL Cascade === */
[dir="rtl"], [dir="rtl"] body {
  font-family: 'Cairo', var(--font-sans);
}

[dir="rtl"] .wb-brand-title {
  font-family: 'Cairo', var(--font-display);
}

[dir="rtl"] .studio-step-title {
  font-family: 'Cairo', var(--font-display);
}

[dir="rtl"] .theme-name {
  font-family: 'Cairo', var(--font-display);
}

/* Zero Horizontal Scroll & Mobile Safeguards */
html, body {
  max-width: 100vw;
  overflow-x: clip;
}

@media (max-width: 640px) {
  body {
    font-size: 0.9375rem;
  }
}
