/* Al-Mughwari design tokens + global RTL primitives.
   Tailwind handles utility classes via CDN. This file adds globals,
   brand-specific patterns Tailwind doesn't cover, and animations. */

:root {
    --color-midnight: #0A1628;
    --color-gold: #D4A853;
    --color-gold-light: #E5BF73;
    --color-gold-dark: #A8862F;
    --color-surface: #F8F6F1;
    --color-ink: #1A1A2E;
    --color-success: #1A7A4A;
    --color-danger: #C0392B;

    --radius-card: 12px;
    --radius-btn: 8px;
    --radius-input: 4px;
    --shadow-soft: 0 2px 12px rgba(10, 22, 40, 0.08);
    --transition: 300ms ease;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-surface);
    color: var(--color-ink);
    direction: rtl;
    text-align: right;
    margin: 0;
    line-height: 1.6;
}

[x-cloak] { display: none !important; }

.font-num,
.tabular {
    font-family: 'Barlow', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
    border-radius: 2px;
}

a, button, .btn, input, select, textarea {
    transition: background-color var(--transition),
                color var(--transition),
                border-color var(--transition),
                box-shadow var(--transition),
                transform var(--transition);
}

[data-rtl-flip] { transform: scaleX(-1); }

/* Line clamp utility (Tailwind has plugin but we want it raw) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Hero background gradient + texture ===== */
.hero-gradient {
    background:
        radial-gradient(circle at 80% 20%, rgba(212, 168, 83, 0.25), transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(212, 168, 83, 0.10), transparent 55%),
        linear-gradient(135deg, #0A1628 0%, #0E1D38 50%, #0A1628 100%);
    background-size: 200% 200%;
    animation: hero-shift 18s ease-in-out infinite;
}

@keyframes hero-shift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

.hero-noise {
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ===== Slow spin for hero decoration ===== */
.animate-spin-slow {
    animation: spin 40s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Marquee (RTL-aware horizontal scrolling) ===== */
.marquee {
    overflow: hidden;
    position: relative;
}
.marquee > * {
    display: inline-block;
    padding-inline-start: 100%;
    animation: marquee-rtl 35s linear infinite;
}
/* RTL: content slides from left edge toward right (visually reads right-to-left) */
@keyframes marquee-rtl {
    0%   { transform: translateX(0); }
    100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
    .marquee > *, .hero-gradient, .animate-spin-slow {
        animation: none !important;
    }
}

/* ===== Print styles ===== */
@media print {
    body { background: white; }
    header, footer, .no-print { display: none !important; }
}
