/* ==========================================================================
   HUDA AL BASSAM INTERIORS — MINIMALIST LUXURY ANIMATIONS
   Color Scheme: Warm Ivory (#F5F1E9), Champagne (#B7A486), Espresso (#292522)
   ========================================================================== */

/* 1. LUXURY CUSTOM CURSOR (DESKTOP) */
@media (hover: hover) and (pointer: fine) {
  body.cursor-active {
    cursor: none;
  }
  
  body.cursor-active a,
  body.cursor-active button,
  body.cursor-active label,
  body.cursor-active .project-card,
  body.cursor-active .material-card,
  body.cursor-active .arcca-vibe-card {
    cursor: none;
  }

  body.cursor-active input,
  body.cursor-active textarea {
    cursor: text;
  }

  body.cursor-active select {
    cursor: pointer;
  }

  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background-color: #292522;
    border: 1px solid #FAF8F4;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
  }

  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(41, 37, 34, 0.65);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999998;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, width 0.35s cubic-bezier(0.16, 1, 0.3, 1), height 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background-color 0.3s ease;
  }

  /* Visible once user moves mouse */
  body.cursor-active .cursor-dot,
  body.cursor-active .cursor-ring {
    opacity: 1;
    visibility: visible;
  }

  /* Force hide cursor completely only while preloader is active */
  .arcca-loader:not(.is-loaded) ~ .cursor-dot,
  .arcca-loader:not(.is-loaded) ~ .cursor-ring {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  /* When hovering over text inputs, suppress outer ring so text caret is clean */
  body.cursor-input .cursor-ring {
    opacity: 0;
    visibility: hidden;
  }
  body.cursor-input .cursor-dot {
    opacity: 0.3;
  }

  /* Hover states */
  body.cursor-hover .cursor-ring {
    width: 58px;
    height: 58px;
    border-color: #292522;
    background-color: rgba(41, 37, 34, 0.1);
  }

  body.cursor-hover .cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #292522;
  }

  body.cursor-drag .cursor-ring {
    width: 64px;
    height: 64px;
    border-style: dashed;
    border-color: #292522;
  }
}

/* 2. SUBPAGE PRELOADER */
.site-preloader {
  position: fixed;
  inset: 0;
  background-color: #FAF8F4;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.7s ease;
}

.site-preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  text-align: center;
  position: relative;
}

.preloader-monogram {
  width: 90px;
  height: 90px;
  margin: 0 auto 20px;
  position: relative;
  animation: preloaderPulse 2.2s infinite ease-in-out;
}

.preloader-monogram svg,
.preloader-monogram img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preloader-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: #292522;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.preloader-tagline {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: #4A423B;
}

.preloader-progress-bar {
  width: 140px;
  height: 1.5px;
  background: #E2DED6;
  margin: 24px auto 0;
  position: relative;
  overflow: hidden;
}

.preloader-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #292522;
  animation: preloaderFill 1.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes preloaderFill {
  0% { width: 0%; }
  50% { width: 65%; }
  100% { width: 100%; }
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); opacity: 0.88; }
  50% { transform: scale(1.03); opacity: 1; }
}

/* 3. SCROLL REVEAL STYLES (GSAP / CSS FALLBACK) */
.reveal-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade-up.is-inview {
  opacity: 1;
  transform: translateY(0);
}

/* 4. CARD FADE IN KEYFRAME */
@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RTL & Arabic Zero Letter-Spacing & Uniform Typography */
html[dir="rtl"] *,
html[lang="ar"] * {
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

html[dir="rtl"] .arcca-word-mask,
html[lang="ar"] .arcca-word-mask {
  margin-right: 0 !important;
  margin-left: 0.12em !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  letter-spacing: 0 !important;
}

html[dir="rtl"] .arcca-word,
html[lang="ar"] .arcca-word {
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}
