/* ===================================================================
   Dhikrayat — Design System
   Cinematic Editorial × Arabian Luxury
   =================================================================== */

:root {
    /* — Brand Palette — */
    --ink:           #0B0B0F;
    --ink-soft:      #2A2A33;
    --ink-muted:     #6B6B75;
    --off-white:     #F5F1E8;
    --sand:          #E8DFD0;
    --sand-soft:     #F0E9DC;
    --amber:         #F5B82E;
    --amber-deep:    #C8870D;
    --amber-glow:    rgba(245, 184, 46, 0.18);
    --border:        rgba(11, 11, 15, 0.08);
    --border-light:  rgba(245, 241, 232, 0.12);

    /* — Type — */
    --font-display-en: 'Fraunces', 'Times New Roman', serif;
    --font-display-ar: 'Tajawal', 'Cairo', 'Amiri', serif;
    --font-body-en:    'Inter Tight', system-ui, -apple-system, sans-serif;
    --font-body-ar:    'IBM Plex Sans Arabic', 'Tajawal', system-ui, sans-serif;
    --font-mono:       'JetBrains Mono', ui-monospace, monospace;

    /* — Easing — */
    --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart:  cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out-q:   cubic-bezier(0.76, 0, 0.24, 1);

    /* — Layout — */
    --container:       1320px;
    --container-narrow: 980px;
    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 24px;
    --r-pill: 999px;
}

/* — Reset — */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
    background: var(--off-white);
    color: var(--ink);
    font-family: var(--font-body-en);
    font-size: 17px;
    line-height: 1.55;
    overflow-x: hidden;
    font-feature-settings: "ss01", "ss02";
}
body[dir="rtl"] { font-family: var(--font-body-ar); }

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }

::selection { background: var(--amber); color: var(--ink); }

/* — Type ramp — */
h1, h2, h3, h4, h5 {
    font-family: var(--font-display-en);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.025em;
}
body[dir="rtl"] h1, body[dir="rtl"] h2, body[dir="rtl"] h3, body[dir="rtl"] h4 {
    font-family: var(--font-display-ar);
    letter-spacing: 0;
    line-height: 1.3;
}

h1 { font-size: clamp(2.8rem, 8vw, 7.5rem); font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 50; }
h2 { font-size: clamp(2.2rem, 5.5vw, 4.8rem); font-weight: 300; font-variation-settings: "opsz" 100, "SOFT" 30; }
h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 400; }
h4 { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 500; }

.eyebrow {
    font-family: var(--font-body-en);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.italic-serif {
    font-family: var(--font-display-en);
    font-style: italic;
    font-weight: 300;
}

.arabic-mark {
    font-family: var(--font-display-ar);
    font-weight: 500;
    direction: rtl;
    unicode-bidi: embed;
}

/* — Layout — */
.container       { max-width: var(--container); margin: 0 auto; padding: 0 1.75rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.75rem; }
.section { padding: clamp(5rem, 12vw, 10rem) 0; position: relative; }

/* — Buttons — */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--r-pill);
    transition: all 500ms var(--ease-out-expo);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
.btn-primary {
    background: var(--ink);
    color: var(--off-white);
}
.btn-primary:hover {
    background: var(--amber);
    color: var(--ink);
    transform: translateY(-2px);
}
.btn-amber {
    background: var(--amber);
    color: var(--ink);
}
.btn-amber:hover {
    background: var(--ink);
    color: var(--amber);
    transform: translateY(-2px);
}
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}
.btn-ghost:hover {
    background: var(--ink);
    color: var(--off-white);
}
.btn-ghost-light {
    background: transparent;
    color: var(--off-white);
    border: 1px solid rgba(245, 241, 232, 0.3);
}
.btn-ghost-light:hover {
    background: var(--amber);
    color: var(--ink);
    border-color: var(--amber);
}
.btn .arrow {
    transition: transform 400ms var(--ease-out-expo);
}
.btn:hover .arrow { transform: translateX(4px); }
body[dir="rtl"] .btn:hover .arrow { transform: translateX(-4px) scaleX(-1); }
body[dir="rtl"] .arrow { transform: scaleX(-1); }

/* — Reveal animations — */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s var(--ease-out-expo), transform 1.2s var(--ease-out-expo);
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 900ms var(--ease-out-expo), transform 900ms var(--ease-out-expo);
}
.reveal-stagger.in-view > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 500ms; }
.reveal-stagger.in-view > * { opacity: 1; transform: none; }

/* — Camera frame brackets (logo motif) — */
.frame-corners {
    position: relative;
}
.frame-corners::before,
.frame-corners::after {
    content: '';
    position: absolute;
    width: 32px;
    height: 32px;
    border: 2px solid var(--amber);
    pointer-events: none;
    transition: all 700ms var(--ease-out-expo);
}
.frame-corners::before {
    top: 12px;
    left: 12px;
    border-right: none;
    border-bottom: none;
}
.frame-corners::after {
    bottom: 12px;
    right: 12px;
    border-left: none;
    border-top: none;
}
.frame-corners:hover::before {
    top: 6px;
    left: 6px;
    width: 40px;
    height: 40px;
}
.frame-corners:hover::after {
    bottom: 6px;
    right: 6px;
    width: 40px;
    height: 40px;
}

/* — Film grain overlay — */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.06;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* — Custom cursor — */
.cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 8px; height: 8px;
    background: var(--amber);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 300ms var(--ease-out-expo), height 300ms var(--ease-out-expo), background 300ms ease;
    mix-blend-mode: difference;
}
.cursor-dot.hover {
    width: 60px;
    height: 60px;
    background: var(--off-white);
}
@media (hover: none), (pointer: coarse) { .cursor-dot { display: none; } }

/* — Marquee — */
.marquee {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--ink);
    color: var(--off-white);
    padding: 1.5rem 0;
}
.marquee-inner {
    display: flex;
    gap: 4rem;
    animation: marquee 40s linear infinite;
    white-space: nowrap;
    width: max-content;
}
.marquee-inner span {
    font-family: var(--font-display-en);
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 300;
    font-style: italic;
}
.marquee-inner .dot {
    color: var(--amber);
    font-style: normal;
    align-self: center;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* — Reduced motion — */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .marquee-inner { animation: none; }
}

/* — Responsive helpers — */
.hide-mobile { display: block; }
.show-mobile { display: none; }
@media (max-width: 768px) {
    .hide-mobile { display: none; }
    .show-mobile { display: block; }
    .section { padding: 4rem 0; }
}

/* RTL fine-tuning */
body[dir="rtl"] .marquee-inner { animation-direction: reverse; }
