/* ==========================================
   ArbiMax Base Styles v2.0 - Reference-inspired Foundation
   ========================================== */

/* ==========================================
   MODERN CSS RESET
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ==========================================
   ROOT DOCUMENT SETUP
   ========================================== */
html {
  font-family: var(--am-font-ui);
  font-size: var(--am-text-base);
  line-height: var(--am-line-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  direction: rtl; /* RTL default */
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, var(--am-bg-grad-from) 0%, var(--am-bg-grad-via) 50%, var(--am-bg-grad-to) 100%);
  background-attachment: fixed;
  color: var(--am-text);
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--am-font-ui);
  line-height: var(--am-line-normal);
}

/* ==========================================
   TYPOGRAPHY DEFAULTS
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--am-font-ui);
  font-weight: var(--am-font-weight-semibold);
  line-height: var(--am-line-tight);
  color: var(--am-text);
  margin: 0;
}

h1 { font-size: var(--am-text-4xl); }
h2 { font-size: var(--am-text-3xl); }
h3 { font-size: var(--am-text-2xl); }
h4 { font-size: var(--am-text-xl); }
h5 { font-size: var(--am-text-lg); }
h6 { font-size: var(--am-text-base); }

p {
  margin: 0;
  line-height: var(--am-line-normal);
}

a {
  color: var(--am-accent);
  text-decoration: none;
  transition: color var(--am-duration-normal) var(--am-ease);
}

a:hover {
  color: var(--am-text);
}

/* ==========================================
   FORM ELEMENT DEFAULTS
   ========================================== */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================
   SELECTION STYLING
   ========================================== */
::selection {
  background: var(--am-accent);
  color: var(--am-cta);
}

::-moz-selection {
  background: var(--am-accent);
  color: var(--am-cta);
}

/* ==========================================
   FOCUS OUTLINE (Accessibility)
   ========================================== */
:focus {
  outline: 2px solid var(--am-accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ==========================================
   SCROLLBAR STYLING (Global)
   ========================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--am-bg);
}

::-webkit-scrollbar-thumb {
  background: #2d2a3d;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--am-accent);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #2d2a3d var(--am-bg);
}

/* ==========================================
   REDUCED MOTION RESPECT
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================
   RTL/LTR UTILITIES
   ========================================== */
.ltr {
  direction: ltr;
  text-align: left;
}

.rtl {
  direction: rtl;
  text-align: right;
}

/* Financial data should always be LTR */
.financial-data {
  direction: ltr;
  text-align: left;
  font-family: var(--am-font-mono);
}

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */
.full-height {
  min-height: 100vh;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
  scrollbar-width: thin;
  scrollbar-color: var(--am-scroll-thumb) var(--am-scroll-track);
}

/* ==========================================
   SELECTION & FOCUS
   ========================================== */
::selection {
  background-color: var(--am-accent);
  color: var(--am-text);
}

:focus-visible {
  outline: 2px solid var(--am-accent);
  outline-offset: 2px;
}

/* ==========================================
   TYPOGRAPHY BASE
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--am-font-weight-semibold);
  line-height: var(--am-line-tight);
}

p {
  margin: 0;
  line-height: var(--am-line-normal);
}

/* ==========================================
   LINKS
   ========================================== */
a {
  color: var(--am-accent);
  text-decoration: none;
  transition: all var(--am-duration-fast) var(--am-ease);
}

a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* ==========================================
   IMAGES & MEDIA
   ========================================== */
img {
  max-width: 100%;
  height: auto;
}

svg {
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================
   REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}