/* ==========================================================================
   Raasmal Arabi — shared stylesheet
   Every value below is copied verbatim from the design export (Design System v3).
   Page layouts keep their original inline styles; this file only carries what the
   design runtime used to inject: base rules, keyframes, hover states, language
   switching, and the few interactive states of the Home page.
   ========================================================================== */

/* ---- Base ---------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
#site { font-family: 'Archivo', sans-serif; color: #101736; background: #F3F6FC; }
main { display: block; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
a { color: #2E6BFF; text-decoration: none; }
a:hover { color: #38C6F4; }
/* width/height attributes are only used for aspect-ratio (CLS); CSS keeps control of size */
img { width: auto; height: auto; }
[id] { scroll-margin-top: 84px; }


/* ---- Navigation breakpoints (from the design) ---------------------------- */
@media (max-width: 1180px) { .nav-links { display: none !important; } .nav-burger { display: block !important; } }
@media (max-width: 620px) { .nav-cta { display: none !important; } }

/* ---- Keyframes ----------------------------------------------------------- */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spinRev { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes orbDrift { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,-40px) scale(1.15); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes dashFlow { from { background-position: 0 0; } to { background-position: 40px 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ---- Forms (Contact) ----------------------------------------------------- */
input::placeholder, textarea::placeholder { color: #9AAAC8; }
input:focus, textarea:focus, select:focus { outline: 2px solid #2E6BFF; outline-offset: 0; border-color: #2E6BFF; }

/* ---- Hover states (design `style-hover` → classes; !important mirrors the runtime) */
.hv-navy:hover { color: #12125E !important; }
.hv-blue:hover { color: #2E6BFF !important; }
.hv-menu:hover { background: #F3F6FC !important; color: #2E6BFF !important; }
.hv-chip:hover { border-color: #2E6BFF !important; color: #2E6BFF !important; }
.hv-chip-dark:hover { border-color: #38C6F4 !important; color: #38C6F4 !important; }
.hv-chip-yellow:hover { border-color: #FFE482 !important; color: #FFE482 !important; }
.hv-card-link:hover { transform: translateY(-5px) !important; box-shadow: 0 20px 48px rgba(46,107,255,0.15) !important; color: #101736 !important; }
.hv-card:hover { transform: translateY(-5px) !important; box-shadow: 0 20px 48px rgba(46,107,255,0.15) !important; }
.hv-card-lg:hover { transform: translateY(-6px) !important; box-shadow: 0 24px 56px rgba(46,107,255,0.16) !important; }
.hv-card-lg-link:hover { transform: translateY(-6px) !important; box-shadow: 0 24px 56px rgba(46,107,255,0.16) !important; color: #101736 !important; }
.hv-card-navy:hover { transform: translateY(-6px) !important; box-shadow: 0 24px 56px rgba(18,18,94,0.3) !important; }
.hv-card-yellow-link:hover { transform: translateY(-5px) !important; box-shadow: 0 20px 48px rgba(255,203,5,0.4) !important; color: #12125E !important; }
.hv-stat-blue:hover { transform: translateY(-4px) !important; box-shadow: 0 16px 40px rgba(61,110,181,0.4) !important; }
.hv-stat-charcoal:hover { transform: translateY(-4px) !important; box-shadow: 0 16px 40px rgba(51,53,58,0.4) !important; }
.hv-stat-yellow:hover { transform: translateY(-4px) !important; box-shadow: 0 16px 40px rgba(255,203,5,0.4) !important; }
.hv-stat-navy:hover { transform: translateY(-4px) !important; box-shadow: 0 16px 40px rgba(18,18,94,0.4) !important; }
.hv-white:hover { color: #FFFFFF !important; }
.hv-cyan:hover { color: #38C6F4 !important; }
.hv-steel:hover { color: #9AC3E8 !important; }
.hv-btn-white:hover { background: #EAF4FF !important; color: #12125E !important; }
.hv-cta-sm:hover { box-shadow: 0 0 36px rgba(56,198,244,0.65) !important; color: #FFFFFF !important; }
.hv-cta-md:hover { box-shadow: 0 0 44px rgba(56,198,244,0.65) !important; color: #FFFFFF !important; }
.hv-cta-md-btn:hover { box-shadow: 0 0 44px rgba(56,198,244,0.65) !important; }
.hv-cta-lg:hover { box-shadow: 0 0 48px rgba(56,198,244,0.7) !important; color: #FFFFFF !important; }
.hv-cta-dark:hover { box-shadow: 0 0 48px rgba(56,198,244,0.75) !important; color: #FFFFFF !important; }
.hv-toggle:hover { border-color: #2E6BFF !important; color: #2E6BFF !important; }

/* ---- Home: hero slideshow ------------------------------------------------- */
.hero-dot { height: 8px; width: 8px; border-radius: 999px; border: none; cursor: pointer; padding: 0; background: rgba(154,195,232,0.35); box-shadow: none; transition: all 300ms ease; }
.hero-dot.is-active { width: 34px; background: linear-gradient(90deg, #2E6BFF, #38C6F4); box-shadow: 0 0 12px rgba(56,198,244,0.6); }
.hero-slide[inert] { pointer-events: none; }

/* ---- Home: capture card image cycle -------------------------------------- */
.cap-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; filter: drop-shadow(0 10px 22px rgba(0,0,0,0.45)); opacity: 0; transform: rotate(-10deg) scale(0.92); transform-origin: 50% 50%; transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.cap-img.is-active { opacity: 1; transform: rotate(0deg) scale(1); }
.cap-word { color: #A3B1D4; font-weight: 400; transition: color 0.4s ease; }
.cap-word.is-active { color: #FFCB05; font-weight: 600; }

/* ---- Home: pillar tabs ----------------------------------------------------- */
.pillar-tab { display: flex; gap: 16px; align-items: flex-start; width: 100%; box-sizing: border-box; padding: 22px 24px; border-radius: 14px; cursor: pointer; text-align: left; font-family: 'Archivo', sans-serif; transition: all 250ms ease; background: rgba(255,255,255,0.55); border: 1px solid #E2E9F5; box-shadow: none; transform: none; color: inherit; }
.pillar-tab.is-active { background: #FFFFFF; border: 1px solid rgba(46,107,255,0.5); box-shadow: 0 16px 40px rgba(46,107,255,0.15); transform: translateX(8px); }
.pillar-num { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 700; line-height: 1.15; color: #9AAAC8; }
.pillar-tab.is-active .pillar-num { background: linear-gradient(120deg, #2E6BFF, #38C6F4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pillar-arrow { margin-left: auto; font-size: 18px; line-height: 1.4; color: #C6D4EC; transform: none; transition: all 250ms ease; }
.pillar-tab.is-active .pillar-arrow { color: #2E6BFF; transform: translateX(4px); }

/* ---- Contact form states --------------------------------------------------- */
.form-error { font-size: 12px; color: #B42318; line-height: 1.4; }
[aria-invalid="true"] { border-color: #B42318 !important; }
.form-status { font-size: 14px; line-height: 1.6; border-radius: 10px; padding: 12px 14px; margin: 0; }
.form-status[data-state="error"] { background: #FEF3F2; border: 1px solid #FECDCA; color: #B42318; }
.form-status[data-state="sending"] { background: #F3F6FC; border: 1px solid #E2E9F5; color: #47506E; }
.turnstile-slot { min-height: 65px; }
.turnstile-slot:empty { display: none; }
.btn-primary[disabled] { opacity: 0.7; cursor: progress; }

/* ---- Accessibility helpers ------------------------------------------------- */
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: #12125E; color: #FFFFFF; font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 8px; transition: top 150ms ease; }
.skip-link:focus { top: 12px; color: #FFFFFF; outline: 2px solid #38C6F4; }
.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; }
:focus-visible { outline: 2px solid #2E6BFF; outline-offset: 2px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible), summary:focus:not(:focus-visible) { outline: none; }

/* ---- Responsive safety (same layout on desktop, no clipping on 320px phones) */
.wrap-sm { flex-wrap: wrap; }
@media (max-width: 400px) {
  .hero-actions { flex-wrap: wrap; }
}

/* ---- Motion preferences ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---- Print --------------------------------------------------------------- */
@media print {
  .nav-burger, .skip-link, [data-section="ticker"], canvas { display: none !important; }
  * { animation: none !important; }
}

/* ---- Arabic / right-to-left (pages under /ar) ------------------------------ */
html[dir="rtl"] #site { font-family: 'IBM Plex Sans Arabic', 'Archivo', sans-serif; }
html[dir="rtl"] .pillar-tab { text-align: right; font-family: 'IBM Plex Sans Arabic', sans-serif; }
html[dir="rtl"] .pillar-tab.is-active { transform: translateX(-8px); }
html[dir="rtl"] .pillar-arrow { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .pillar-tab.is-active .pillar-arrow { transform: translateX(-4px); }
html[dir="rtl"] [style*="dashFlow"] { animation-direction: reverse; }
html[dir="rtl"] .skip-link { left: auto; right: 12px; }
html[dir="rtl"] input[type="email"] { direction: ltr; text-align: right; }
