/* ==========================================================================
   Prophets Stories — NOOR Design System v4
   Warm ink · Champagne · Gentle editorial calm
   Overrides style.css — load after base stylesheet
   ========================================================================== */

:root {
    /* Warm ink surfaces */
    --bg: #13121a;
    --bg-deep: #0e0d12;
    --panel: #1b1923;
    --panel-strong: #22202b;
    --panel-soft: #16141c;
    --line: rgba(237, 232, 224, 0.09);

    /* Soft readable type */
    --txt: #ede8e0;
    --mut: #a8a29a;
    --dim: #736d66;
    --text: var(--txt);
    --muted: var(--mut);
    --soft: #d4cec4;
    --silver: #ddd6cb;

    /* Champagne accent — warm, gentle, spiritual */
    --gold: #c4a574;
    --gold2: #e8dcc4;
    --grad: linear-gradient(115deg, #e8dcc4 0%, #b8956a 100%);
    --accent-gold: var(--gold);
    --accent-gradient: var(--grad);
    --accent-gradient-soft: linear-gradient(115deg, rgba(232, 220, 196, 0.12), rgba(196, 165, 116, 0.07));

    /* Accent aliases */
    --accent-teal: var(--gold);
    --accent-cyan: var(--gold2);
    --accent-violet: var(--gold);
    --accent-blue: var(--gold2);
    --accent-emerald: var(--gold);
    --accent-rose: var(--gold2);
    --border: var(--line);
    --border-strong: rgba(196, 165, 116, 0.28);
    --glow: rgba(196, 165, 116, 0.1);
    --glow-strong: rgba(196, 165, 116, 0.16);
    --glow-gold: rgba(196, 165, 116, 0.2);
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-ambient: 0 2px 8px rgba(0, 0, 0, 0.16);
    --shadow-soft: 0 4px 22px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-elevated: 0 14px 44px rgba(0, 0, 0, 0.26), 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-warm-glow: 0 10px 36px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(196, 165, 116, 0.07);
    --shadow-blue-glow: var(--shadow-warm-glow);
    --window-ray: 0 0 0 0 transparent;

    /* Surfaces */
    --glass-surface: var(--panel);
    --glass-surface-deep: var(--bg-deep);
    --glass-surface-button: var(--panel-strong);
    --glass-border: var(--line);
    --glass-border-strong: rgba(237, 232, 224, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.06);
    --glass-highlight-soft: rgba(255, 255, 255, 0.03);
    --glass-fill: rgba(255, 255, 255, 0.025);
    --glass-blur: none;
    --glass-bevel: none;
    --glass-window-shadow: var(--shadow-elevated);
    --glass-button-shadow: var(--shadow-soft);
    --glass-button-shadow-hover: var(--shadow-elevated);
    --glass-shadow: var(--glass-window-shadow);
    --glass-tint: none;

    /* Layout — softer geometry */
    --radius: 10px;
    --radius-lg: 14px;
    --window-radius: 14px;
    --nav-height: 72px;
    --max: 1180px;
    --ease: cubic-bezier(0.25, 0.8, 0.35, 1);

    /* Typography scale */
    --text-xs: 0.72rem;
    --text-sm: 0.84rem;
    --text-base: 1rem;
    --text-lg: 1.08rem;
    --text-xl: 1.22rem;
    --hero-title: clamp(2rem, 3.6vw, 3rem);
    --hero-title-ar: clamp(1.75rem, 2.8vw, 2.35rem);

    /* NOOR aliases */
    --atelier-track: 0.08em;
    --atelier-micro: 0.74rem;
}

/* ── Base overrides ── */
html {
    background: var(--bg);
}

body {
    background: var(--bg);
    color: var(--txt);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.78;
    font-weight: 400;
    background-image:
        radial-gradient(1200px 700px at 50% -20%, rgba(196, 165, 116, 0.07), transparent 62%),
        radial-gradient(900px 600px at 100% 100%, rgba(232, 220, 196, 0.04), transparent 58%),
        radial-gradient(800px 500px at 0% 80%, rgba(255, 255, 255, 0.02), transparent 55%);
}

h1, h2, h3, h4, h5, h6,
.hero h1,
.section-title,
.modal-header h2 {
    font-family: "Cormorant Garamond", "Amiri", Georgia, serif;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

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

::selection {
    color: var(--bg-deep);
    background: rgba(232, 220, 196, 0.55);
}

/* ── Hide legacy decorative layers ── */
.site-background,
.spotlight,
.visual-halo,
.cursor-glow,
.background-mesh,
.background-light,
.background-wave,
.background-noise,
.support-glow {
    display: none !important;
}

/* ── Utilities ── */
.gx {
    color: transparent;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Micro-labels: eyebrow, kicker, tag */
.eyebrow,
.kicker,
.tag,
.status-badge,
.window-kicker,
.card-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mut);
    font-family: Inter, sans-serif;
    font-size: var(--atelier-micro);
    font-weight: 500;
    letter-spacing: var(--atelier-track);
    text-transform: none;
    line-height: 1.35;
}

.status-badge {
    position: relative;
    isolation: isolate;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--mut);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(196, 165, 116, 0.55);
    animation: atelierPulse 2s ease-in-out infinite;
}

@keyframes atelierPulse {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1); }
}

/* Hero index numbers — idx-no gold underline */
.feature-index,
.benefit-index,
.card-meta,
.hero-index .idx-no,
.idx-no {
    position: relative;
    display: inline-block;
    color: var(--gold);
    font-family: Outfit, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: var(--atelier-track);
    text-transform: uppercase;
}

.feature-index::after,
.benefit-index::after,
.card-meta::after,
.idx-no::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    margin-top: 4px;
    background: var(--grad);
    border-radius: 1px;
}

/* Flat card base */
.card,
.story-card,
.feature-card,
.metric-card,
.benefit-card,
.testimonial-card,
.floating-window,
.showcase-window,
.support-panel,
.resource-panel,
.resource-link,
.agent-panel {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.gradient-border {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--panel) !important;
    box-shadow: var(--shadow-soft) !important;
    animation: none !important;
}

.gradient-border::before,
.btn::before,
.btn::after,
.floating-donate-button::before,
.floating-donate-button::after,
.agent-toggle::before,
.agent-panel::before,
.agent-close::before,
.agent-close::after,
.lang-picker-toggle::before,
.story-card::before {
    display: none !important;
}

/* Contour rings removed for gentle NOOR surfaces */
.gradient-border::after,
.card::after,
.story-card::after,
.feature-card::after,
.metric-card::after,
.benefit-card::after,
.testimonial-card::after,
.floating-window::after,
.showcase-window::after,
.support-panel::after,
.resource-panel::after,
.resource-link::after,
.agent-panel::after,
.hero-index::before,
.timeline-shell::after,
.modal-content::after,
.featured-video-card::after,
.miracle-card::after,
.editorial-ad__panel::after,
.story-video-window::after,
.lang-picker-menu::after,
.status-badge::after,
.loader-mark::after,
.nav-toggle::after,
.lang-picker-toggle::after,
.close-btn::after,
.miracles-search::after,
.hero-index-link::after,
.nav-donate::after,
.noscript-archive::after,
.story-notice::after,
.agent-toggle::after {
    display: none !important;
    content: none !important;
}

/* ── Reveal animation ── */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

.reveal.in,
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Skip link ── */
.skip-link {
    position: fixed;
    top: -120px;
    left: 16px;
    z-index: 10001;
    padding: 9px 16px;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    color: var(--bg);
    background: var(--grad);
    box-shadow: var(--shadow-soft);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--atelier-track);
    text-transform: uppercase;
    transition: top 200ms ease, box-shadow 200ms ease;
}

.skip-link:focus {
    top: 14px;
    outline: none;
    box-shadow: 0 4px 16px rgba(196, 165, 116, 0.25);
}

/* ── Loader ── */
.loader {
    background: var(--bg);
}

.loader-ring {
    border-color: var(--line);
}

.loader-ring::before {
    border-top-color: var(--gold);
    border-right-color: rgba(196, 165, 116, 0.25);
}

.loader-ring::after {
    border-bottom-color: var(--gold2);
    border-left-color: rgba(232, 220, 196, 0.2);
}

.loader-mark {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.loader-mark span {
    background: var(--gold);
    border-radius: var(--radius);
    width: 8px;
    height: 8px;
}

.loader-mark span:nth-child(2) {
    background: var(--gold2);
}

.loader-mark span:nth-child(3) {
    background: var(--mut);
}

/* ── Scroll progress ── */
.scroll-progress {
    height: 2px;
    background: var(--grad);
    box-shadow: 0 0 12px rgba(196, 165, 116, 0.45);
}

/* ── Navigation (site-head) ── */
.navbar {
    position: sticky;
    top: 0;
    inset: auto;
    z-index: 1000;
    padding: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(19, 18, 26, 0.82);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    box-shadow: none;
    transition: background 320ms var(--ease), box-shadow 320ms var(--ease);
}

.navbar.is-scrolled {
    inset: auto;
    background: rgba(19, 18, 26, 0.94);
    box-shadow: var(--shadow-soft);
}

.nav-content {
    max-width: var(--max);
    min-height: var(--nav-height);
    margin: 0 auto;
    padding: 0 24px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.navbar.is-scrolled .nav-content {
    min-height: 60px;
    padding: 0 24px;
    border: none;
    background: transparent;
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Brand lockup — AMAADOR-style */
.logo {
    gap: 12px;
    color: var(--txt);
    font-family: Outfit, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.logo-mark {
    display: none;
}

.brand-lockup {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45em;
    font-family: Outfit, sans-serif;
    font-weight: 600;
    letter-spacing: 0.18em;
    font-size: 0.88rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.brand-lockup-nav {
    letter-spacing: 0.14em;
}

.brand-lockup-nav .brand-accent {
    letter-spacing: 0.22em;
}

.brand-main {
    color: var(--txt);
}

.brand-accent {
    color: var(--gold);
    font-weight: 500;
}

.logo.brand:hover {
    color: var(--txt);
    text-decoration: none;
}

.logo.brand:hover .brand-main {
    color: #fff;
}

.brand-lockup.sm {
    font-size: 0.78rem;
    letter-spacing: 0.26em;
}

.nav-links a.top {
    position: relative;
    padding: 10px 14px;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
}

.nav-links a.top::after {
    content: "";
    position: absolute;
    left: 14px;
    bottom: 4px;
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: width 300ms var(--ease);
}

html[lang="ar"] .nav-links a.top::after {
    left: auto;
    right: 14px;
}

.nav-links a.top:hover,
.nav-links a.top:focus-visible {
    color: var(--txt);
    background: transparent;
}

.nav-links a.top:hover::after {
    width: 22px;
}

.nav-links {
    gap: 2px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius);
    color: var(--mut);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 200ms ease, background 200ms ease;
}

.nav-links a:hover {
    color: var(--txt);
    background: rgba(255, 255, 255, 0.04);
    transform: none;
}

.nav-toggle {
    position: relative;
    isolation: isolate;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.nav-toggle span {
    background: var(--txt);
}

.nav-toggle:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.nav-donate {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    color: var(--gold);
    background: transparent;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: var(--atelier-track);
    text-transform: uppercase;
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: color 200ms ease, background 200ms ease, border-color 200ms ease;
}

.nav-donate:hover {
    color: var(--bg);
    background: var(--grad);
    border-color: transparent;
    transform: none;
    filter: none;
    box-shadow: var(--shadow-soft);
}

/* ── Language picker ── */
.lang-picker-toggle {
    position: relative;
    isolation: isolate;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--mut);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lang-picker-toggle:hover,
.lang-picker-toggle[aria-expanded="true"] {
    color: var(--txt);
    border-color: rgba(255, 255, 255, 0.12);
    transform: none;
    filter: none;
    box-shadow: var(--shadow-soft);
}

.lang-picker-icon {
    color: var(--dim);
}

.lang-picker-chevron {
    border-color: var(--mut);
}

.lang-picker-menu {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    box-shadow: var(--shadow-blue-glow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.lang-picker-option {
    color: var(--mut);
    font-size: 0.82rem;
    transition: color 180ms ease, background 180ms ease;
}

.lang-picker-option:hover {
    color: var(--txt);
    background: rgba(255, 255, 255, 0.04);
}

.lang-picker-option.active {
    color: var(--gold);
    background: rgba(196, 165, 116, 0.08);
    border-inline-start: 2px solid var(--gold);
}

.lang-picker-option.active::before {
    display: none;
}

/* ── Hero (particles-host + hero-grid) ── */
.hero.section-shell {
    width: 100%;
    max-width: none;
    margin: 0;
}

.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: stretch;
    width: 100%;
    max-width: none;
    min-height: calc(100vh - var(--nav-height));
    margin: 0;
    padding: clamp(32px, 4vw, 64px) clamp(20px, 4vw, 64px);
    overflow: hidden;
}

/* hero — soft ambient glow only */
.hero::before {
    display: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 50% 18%, rgba(196, 165, 116, 0.09), transparent 68%),
        radial-gradient(ellipse 50% 40% at 85% 75%, rgba(232, 220, 196, 0.05), transparent 70%);
    opacity: 1;
}

.hero-copy,
.hero-visual {
    position: relative;
    z-index: 2;
}

#heroParticles {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.28;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    grid-template-areas: "copy index";
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    width: 100%;
    margin: 0;
}

html[dir="rtl"] .hero-grid {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    grid-template-areas: "index copy";
}

.hero-copy {
    grid-area: copy;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-width: none;
    min-width: 0;
    padding-inline: clamp(0px, 2vw, 32px);
}

.hero-index {
    grid-area: index;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(27, 25, 35, 0.72);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.hero-index-head {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
}

.hero-index-label {
    margin: 0;
    color: var(--gold2);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: Outfit, sans-serif;
}

.hero-index .idx-no {
    position: relative;
    margin: 0;
    padding-bottom: 8px;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--txt);
}

.hero-index .idx-no::after {
    position: absolute;
    left: 0;
    right: auto;
    bottom: 0;
    width: 40px;
    height: 2px;
    margin-top: 0;
    background: var(--gold);
}

html[lang="ar"] .hero-index .idx-no::after {
    left: auto;
    right: 0;
}

.hero-index ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-prophet-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 165, 116, 0.45) transparent;
}

.hero-index::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 2;
    height: 36px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(16, 16, 18, 0.98), transparent);
}

.hero-prophet-list::-webkit-scrollbar {
    width: 4px;
}

.hero-prophet-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(196, 165, 116, 0.35);
}

.hero-index li {
    margin: 0 0 8px;
    padding: 0;
}

.hero-index-link {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.01);
    transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.hero-index-link:hover,
.hero-index-link:focus-visible {
    border-color: rgba(196, 165, 116, 0.28);
    background: rgba(196, 165, 116, 0.05);
    transform: translateX(2px);
}

html[dir="rtl"] .hero-index-link:hover,
html[dir="rtl"] .hero-index-link:focus-visible {
    transform: translateX(-2px);
}

.hero-index-no {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(196, 165, 116, 0.22);
    border-radius: 50%;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: var(--gold2);
    font-family: Outfit, sans-serif;
    background: rgba(8, 8, 9, 0.55);
}

html[lang="ar"] .hero-index-no {
    font-family: inherit;
}

.hero-index-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: calc(var(--radius-lg) - 1px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-index-pattern {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #101012 0%, #080809 100%);
}

.hero-index-link[data-pattern="1"] .hero-index-pattern {
    background-image:
        repeating-linear-gradient(45deg, rgba(196, 165, 116, 0.055) 0 1px, transparent 1px 12px),
        linear-gradient(180deg, #121215 0%, #0a0a0d 100%);
}

.hero-index-link[data-pattern="2"] .hero-index-pattern {
    background-image:
        radial-gradient(circle at center, rgba(196, 165, 116, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, #101012 0%, #080809 100%);
    background-size: 14px 14px, auto;
}

.hero-index-link[data-pattern="3"] .hero-index-pattern {
    background-image:
        repeating-conic-gradient(from 0deg at 50% 50%, rgba(196, 165, 116, 0.05) 0deg 12deg, transparent 12deg 24deg),
        linear-gradient(135deg, #14120f 0%, #0b0a08 100%);
}

.hero-index-link[data-pattern="4"] .hero-index-pattern {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%236E96CC' stroke-opacity='0.08' stroke-width='1'%3E%3Cpath d='M28 4l12 7v14l-12 7-12-7V11z'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(180deg, #0f1112 0%, #090b0c 100%);
}

.hero-index-link[data-pattern="5"] .hero-index-pattern {
    background-image:
        repeating-linear-gradient(90deg, rgba(196, 165, 116, 0.045) 0 1px, transparent 1px 18px),
        linear-gradient(180deg, #131215 0%, #0d0c0f 100%);
}

.hero-index-link[data-pattern="6"] .hero-index-pattern {
    background-image:
        radial-gradient(ellipse 90% 70% at 50% 0%, rgba(196, 165, 116, 0.14) 0%, transparent 68%),
        linear-gradient(180deg, #100f12 0%, #0a090b 100%);
}

.hero-index-calligraphy {
    position: relative;
    z-index: 1;
    padding: 6px 10px;
    color: var(--gold2);
    font-family: "Aref Ruqaa", "Amiri", serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    background: linear-gradient(180deg, #f5f0e8 0%, #e8dcc4 55%, #c4a574 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

.hero-index li a {
    display: grid;
}

.hero-index li b {
    display: none;
}

.hero h1 .gx {
    display: inline;
    color: transparent;
    -webkit-text-fill-color: transparent;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero h1 {
    max-width: none;
    margin: 16px 0 18px;
    color: var(--txt);
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    font-weight: 500;
    line-height: 1.12;
}

.hero h1 span {
    display: inline;
    color: inherit;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: unset;
    filter: none;
}

.hero h1 span.gx {
    color: transparent;
    -webkit-text-fill-color: transparent;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero p,
.hero .sub {
    max-width: 40rem;
    margin: 0;
    color: var(--mut);
    font-size: clamp(1rem, 1.35vw, 1.08rem);
    line-height: 1.8;
}

.hero-actions {
    margin-top: 28px;
}

/* ── Buttons ── */
.btn {
    min-height: 44px;
    padding: 0 20px;
    border-radius: var(--radius);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: var(--atelier-track);
    text-transform: uppercase;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.btn-primary {
    position: relative;
    isolation: isolate;
    color: var(--bg);
    border: 1px solid transparent;
    background: var(--grad);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
    filter: brightness(1.08);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft), 0 0 20px rgba(196, 165, 116, 0.22);
}

.btn-secondary {
    color: var(--txt);
    border: 1px solid var(--line);
    background: transparent;
    box-shadow: none;
}

.btn-secondary:hover {
    color: var(--gold);
    border-color: rgba(196, 165, 116, 0.35);
    background: rgba(196, 165, 116, 0.04);
    transform: translateY(-1px);
    filter: none;
    box-shadow: none;
}

.btn-lg {
    min-height: 46px;
    padding: 0 24px;
    font-size: 0.78rem;
}

.btn:active,
.btn.is-pressed {
    transform: translateY(0) scale(0.98);
    filter: brightness(0.95);
    box-shadow: none;
}

/* ── Metric cards ── */
.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: none;
    margin-top: 36px;
}

.metric-card,
.hero-metrics .metric-card {
    padding: 14px 16px;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-lg);
    background: var(--panel) !important;
    box-shadow: var(--shadow-soft) !important;
    transition: border-color 240ms ease, box-shadow 240ms ease;
}

.metric-card:hover {
    border-color: rgba(196, 165, 116, 0.28);
    transform: none;
    box-shadow: var(--shadow-elevated) !important;
}

.metric-card strong,
.hero-metrics strong,
.metric-card .n {
    display: block;
    color: transparent;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    font-family: Outfit, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

.metric-card span,
.hero-metrics span,
.metric-card .l {
    display: block;
    margin-top: 6px;
    color: var(--dim);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.45;
    white-space: normal;
}

/* ── Hero visual / floating windows ── */
.floating-window,
.showcase-window {
    padding: 0;
    overflow: hidden;
}

.window-topbar {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-soft);
}

.window-topbar span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line);
}

.window-topbar span:first-child {
    background: var(--gold);
}

.window-content {
    padding: 20px;
}

.window-content h2 {
    margin: 8px 0;
    color: var(--txt);
    font-family: Outfit, sans-serif;
    font-size: 1.35rem;
}

.window-content p {
    color: var(--mut);
    font-size: 0.9rem;
}

.preview-line span {
    background: var(--line);
}

.preview-line span:first-child {
    background: var(--grad);
}

.window-mini {
    padding: 14px;
}

.window-mini strong {
    color: var(--gold);
    font-family: Outfit, sans-serif;
}

.mini-bars i,
.mini-toggle i {
    background: var(--line);
}

.mini-bars i:first-child,
.mini-toggle i {
    background: var(--gold);
}

/* ── Sections ── */
.section-shell {
    padding-block: 96px;
}

.section-divider {
    height: 1px;
    margin: 0 auto;
    max-width: var(--max);
    background: var(--line);
    border: none;
}

.section-heading {
    margin-bottom: 48px;
}

.section-heading p {
    max-width: 620px;
    color: var(--soft);
    font-size: 1rem;
    line-height: 1.75;
}

.section-title {
    margin: 12px 0 16px;
    color: var(--txt);
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 500;
    line-height: 1.15;
}

/* ── Timeline (premium chronology rail) ── */
.timeline-shell {
    position: relative;
    isolation: isolate;
    margin: 0 0 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.008) 100%);
    overflow: hidden;
    box-shadow: var(--shadow-blue-glow);
}

.timeline-shell::before {
    content: "";
    display: block;
    height: 3px;
    background: var(--grad);
    position: relative;
    z-index: 6;
}

.timeline-shell__chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
}

.timeline-shell__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold2);
    font-family: Outfit, sans-serif;
}

.timeline-shell__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 4px 10px;
    border: 1px solid rgba(196, 165, 116, 0.28);
    border-radius: 999px;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    font-family: Outfit, sans-serif;
}

.timeline-shell .timeline-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: grab;
    touch-action: pan-x;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 28px;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 165, 116, 0.45) transparent;
}

.timeline-shell .timeline-wrapper:active {
    cursor: grabbing;
}

.timeline-shell .timeline-wrapper::-webkit-scrollbar {
    height: 4px;
}

.timeline-shell .timeline-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.timeline-shell .timeline-wrapper::-webkit-scrollbar-thumb {
    background: rgba(196, 165, 116, 0.45);
    border-radius: 999px;
}

.timeline-fade {
    position: absolute;
    top: 0;
    bottom: 4px;
    width: 36px;
    pointer-events: none;
    z-index: 2;
}

.timeline-fade--start {
    inset-inline-start: 0;
    background: linear-gradient(90deg, var(--panel) 0%, transparent 100%);
}

.timeline-fade--end {
    inset-inline-end: 0;
    background: linear-gradient(270deg, var(--panel) 0%, transparent 100%);
}

.timeline-shell .timeline-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    min-width: max-content;
    height: auto;
    padding: 24px 28px 20px;
    gap: 0;
}

.timeline-track {
    position: absolute;
    inset-inline: 28px;
    top: 54px;
    height: 1px;
    pointer-events: none;
}

.timeline-shell .timeline-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.12) 8%,
        rgba(255, 255, 255, 0.12) 92%,
        transparent 100%
    );
}

.timeline-shell .timeline-node {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 128px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    border: 0;
    border-radius: 0;
    color: var(--dim);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    scroll-snap-align: center;
    transition: color 200ms ease, transform 200ms ease;
}

.timeline-index {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    color: var(--gold2);
    font-family: Outfit, sans-serif;
    opacity: 0.85;
}

.timeline-marker {
    position: relative;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
}

.timeline-shell .timeline-dot {
    width: 8px;
    height: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: var(--panel-strong);
    box-shadow: var(--shadow-soft);
    transition: transform 220ms ease, background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.timeline-shell .timeline-label {
    max-width: 116px;
    margin: 0;
    color: var(--mut);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    letter-spacing: 0;
    text-transform: none;
    transition: color 220ms ease, transform 220ms ease;
}

.timeline-shell .timeline-node:hover,
.timeline-shell .timeline-node:focus-visible {
    border-color: transparent;
    background: transparent;
    outline: none;
}

.timeline-shell .timeline-node:hover .timeline-label,
.timeline-shell .timeline-node:focus-visible .timeline-label,
.timeline-shell .timeline-node.is-active .timeline-label {
    color: var(--txt);
    transform: translateY(-1px);
}

.timeline-shell .timeline-node:hover .timeline-dot,
.timeline-shell .timeline-node:focus-visible .timeline-dot {
    transform: scale(1.15);
    border-color: rgba(196, 165, 116, 0.65);
    background: rgba(196, 165, 116, 0.35);
    box-shadow: 0 0 10px rgba(196, 165, 116, 0.28);
}

.timeline-shell .timeline-node.is-active .timeline-marker::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(196, 165, 116, 0.42);
}

.timeline-shell .timeline-node.is-active .timeline-dot {
    width: 10px;
    height: 10px;
    border-color: var(--gold);
    background: var(--gold);
    box-shadow: 0 0 14px rgba(196, 165, 116, 0.45);
}

.timeline-shell .timeline-node.is-active .timeline-index {
    color: var(--gold);
    opacity: 1;
}

html[lang="ar"] .timeline-shell .timeline-container {
    direction: rtl;
}

html[lang="ar"] .timeline-shell .timeline-label {
    font-family: "Amiri", Inter, serif;
    font-weight: 700;
    line-height: 1.45;
}

html[lang="ar"] .timeline-index,
html[lang="ar"] .timeline-shell__count,
html[lang="ar"] .timeline-shell__eyebrow {
    font-family: inherit;
}

/* ── Story grid & cards ── */
.grid {
    gap: 20px;
}

.story-card {
    --card-surface: #111114;
    --card-preview: #0a0a0d;
    --card-accent: rgba(196, 165, 116, 0.14);
    --card-accent-strong: rgba(196, 165, 116, 0.32);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    background: var(--card-surface);
    color: inherit;
    text-align: start;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition:
        border-color 280ms ease,
        transform 320ms var(--ease),
        box-shadow 320ms ease;
}

.story-card[data-pattern="1"] {
    --card-surface: #111114;
    --card-preview: #0b0b0e;
    --card-accent: rgba(196, 165, 116, 0.12);
}

.story-card[data-pattern="2"] {
    --card-surface: #101012;
    --card-preview: #0a0a0c;
    --card-accent: rgba(232, 220, 196, 0.1);
}

.story-card[data-pattern="3"] {
    --card-surface: #12110f;
    --card-preview: #0c0b09;
    --card-accent: rgba(196, 165, 116, 0.16);
}

.story-card[data-pattern="4"] {
    --card-surface: #0f1112;
    --card-preview: #090b0c;
    --card-accent: rgba(200, 180, 140, 0.11);
}

.story-card[data-pattern="5"] {
    --card-surface: #131215;
    --card-preview: #0d0c0f;
    --card-accent: rgba(196, 165, 116, 0.13);
}

.story-card[data-pattern="6"] {
    --card-surface: #100f12;
    --card-preview: #0a090b;
    --card-accent: rgba(232, 220, 196, 0.12);
}

.story-card:hover,
.story-card:focus-visible {
    border-color: rgba(196, 165, 116, 0.28);
    background: var(--card-surface);
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.story-card__preview {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--card-preview);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.story-card__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.95;
    background:
        radial-gradient(circle at 18% 22%, var(--card-accent) 0%, transparent 42%),
        radial-gradient(circle at 82% 78%, rgba(255, 255, 255, 0.03) 0%, transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 38%, rgba(0, 0, 0, 0.28) 100%),
        var(--card-preview);
    transition: transform 520ms var(--ease), opacity 320ms ease;
}

.story-card:hover .story-card__pattern,
.story-card:focus-visible .story-card__pattern {
    transform: scale(1.04);
    opacity: 1;
}

.story-card[data-pattern="1"] .story-card__pattern,
.featured-video-card[data-pattern="1"] .featured-video-card__pattern,
.miracle-card[data-pattern="1"] .miracle-card__pattern {
    background-image:
        repeating-linear-gradient(45deg, rgba(196, 165, 116, 0.055) 0 1px, transparent 1px 14px),
        repeating-linear-gradient(-45deg, rgba(196, 165, 116, 0.035) 0 1px, transparent 1px 14px),
        radial-gradient(circle at 50% 120%, rgba(196, 165, 116, 0.12) 0%, transparent 52%),
        linear-gradient(180deg, #121215 0%, #0a0a0d 100%);
}

.story-card[data-pattern="2"] .story-card__pattern,
.featured-video-card[data-pattern="2"] .featured-video-card__pattern,
.miracle-card[data-pattern="2"] .miracle-card__pattern {
    background-image:
        radial-gradient(circle at center, rgba(196, 165, 116, 0.08) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(180deg, #101012 0%, #080809 100%);
    background-size: 18px 18px, 36px 36px, auto;
    background-position: 0 0, 9px 9px, center;
}

.story-card[data-pattern="3"] .story-card__pattern,
.featured-video-card[data-pattern="3"] .featured-video-card__pattern,
.miracle-card[data-pattern="3"] .miracle-card__pattern {
    background-image:
        repeating-conic-gradient(from 0deg at 50% 50%, rgba(196, 165, 116, 0.04) 0deg 10deg, transparent 10deg 20deg),
        linear-gradient(135deg, #14120f 0%, #0b0a08 100%);
}

.story-card[data-pattern="4"] .story-card__pattern,
.featured-video-card[data-pattern="4"] .featured-video-card__pattern,
.miracle-card[data-pattern="4"] .miracle-card__pattern {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%236E96CC' stroke-opacity='0.08' stroke-width='1'%3E%3Cpath d='M28 4l12 7v14l-12 7-12-7V11z'/%3E%3Cpath d='M28 18l6 3.5v7L28 32l-6-3.5v-7z'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(180deg, #0f1112 0%, #090b0c 100%);
}

.story-card[data-pattern="5"] .story-card__pattern,
.featured-video-card[data-pattern="5"] .featured-video-card__pattern,
.miracle-card[data-pattern="5"] .miracle-card__pattern {
    background-image:
        repeating-linear-gradient(90deg, rgba(196, 165, 116, 0.045) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 24px),
        linear-gradient(180deg, #131215 0%, #0d0c0f 100%);
}

.story-card[data-pattern="6"] .story-card__pattern,
.featured-video-card[data-pattern="6"] .featured-video-card__pattern,
.miracle-card[data-pattern="6"] .miracle-card__pattern {
    background-image:
        radial-gradient(ellipse 90% 60% at 50% 0%, rgba(196, 165, 116, 0.14) 0%, transparent 68%),
        repeating-linear-gradient(135deg, rgba(232, 220, 196, 0.04) 0 2px, transparent 2px 10px),
        linear-gradient(180deg, #100f12 0%, #0a090b 100%);
}

.story-card__preview-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(8, 8, 9, 0.08) 0%, rgba(8, 8, 9, 0.55) 100%),
        linear-gradient(135deg, rgba(196, 165, 116, 0.06) 0%, transparent 48%);
    pointer-events: none;
}

.story-card__calligraphy {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 28px 18px 22px;
    text-align: center;
    pointer-events: none;
}

.story-card__calligraphy-name {
    display: block;
    max-width: 92%;
    color: var(--gold2);
    font-family: "Aref Ruqaa", "Amiri", serif;
    font-size: clamp(1.85rem, 4.8vw, 2.55rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.01em;
    text-shadow:
        0 2px 18px rgba(0, 0, 0, 0.55),
        0 0 28px rgba(196, 165, 116, 0.16);
    background: linear-gradient(180deg, #f5f0e8 0%, #e8dcc4 42%, #c4a574 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

.story-card__calligraphy-honorific {
    display: block;
    color: rgba(232, 220, 196, 0.72);
    font-family: "Amiri", serif;
    font-size: clamp(0.72rem, 1.8vw, 0.82rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.story-card[data-pattern="1"] .story-card__calligraphy-name,
.story-card[data-pattern="3"] .story-card__calligraphy-name,
.story-card[data-pattern="5"] .story-card__calligraphy-name {
    font-size: clamp(1.75rem, 4.4vw, 2.35rem);
}

.story-card:hover .story-card__calligraphy-name,
.story-card:focus-visible .story-card__calligraphy-name {
    filter: drop-shadow(0 0 14px rgba(196, 165, 116, 0.28));
}

.story-card__index {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-start: 12px;
    z-index: 3;
    min-width: 34px;
    padding: 5px 8px;
    border: 1px solid rgba(196, 165, 116, 0.28);
    border-radius: 999px;
    background: rgba(8, 8, 9, 0.72);
    color: var(--gold2);
    font-family: Outfit, sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
    backdrop-filter: blur(6px);
}

.story-card__glyph {
    position: absolute;
    inset-block-end: 12px;
    inset-inline-end: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(196, 165, 116, 0.35);
    border-radius: 50%;
    background: rgba(8, 8, 9, 0.78);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.story-card__glyph::before {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(196, 165, 116, 0.45);
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(196, 165, 116, 0.12);
}

.story-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
    padding: 18px 18px 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, transparent 18%),
        var(--card-surface);
}

.story-card .card-meta {
    margin: 0;
    color: var(--gold2);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.story-card .card-meta::after {
    width: 28px;
    margin-top: 6px;
}

.story-card .card-title {
    margin: 10px 0 6px;
    color: var(--txt);
    font-family: Outfit, sans-serif;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.3;
}

.story-card .card-arabic {
    margin: 0 0 8px;
    color: var(--gold2);
    font-family: Amiri, serif;
    font-size: 0.92rem;
    line-height: 1.45;
    opacity: 0.92;
}

.story-card .card-excerpt {
    display: -webkit-box;
    margin: 0;
    color: var(--mut);
    font-size: 0.84rem;
    line-height: 1.65;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card .card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    padding-top: 16px;
    color: var(--gold);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: var(--atelier-track);
    text-transform: uppercase;
}

.story-card .card-action::after {
    content: "→";
    font-size: 0.85em;
    transition: transform 220ms ease;
}

.story-card:hover .card-action::after,
.story-card:focus-visible .card-action::after {
    transform: translateX(3px);
}

html[lang="ar"] .story-card {
    text-align: right;
}

html[lang="ar"] .story-card .card-title {
    font-family: Amiri, serif;
    font-size: 1.12rem;
}

html[lang="ar"] .story-card:hover .card-action::after,
html[lang="ar"] .story-card:focus-visible .card-action::after {
    transform: translateX(-3px);
}

html[lang="ar"] .story-card .card-action::after {
    content: "←";
}

.story-card p {
    color: var(--mut);
}

/* ── Feature cards ── */
.feature-grid {
    gap: 12px;
}

.feature-card {
    padding: 24px;
    transition: border-color 240ms ease;
}

.feature-card:hover {
    border-color: rgba(196, 165, 116, 0.25);
    transform: none;
    box-shadow: var(--shadow-soft);
}

.feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--gold);
    background: rgba(196, 165, 116, 0.06);
}

.feature-card h3 {
    color: var(--txt);
    font-family: Outfit, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--mut);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ── Showcase ── */
.showcase-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.showcase-copy h2 {
    color: var(--txt);
    font-family: Outfit, sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.showcase-copy p {
    color: var(--mut);
}

.showcase-dashboard strong {
    color: var(--gold);
    font-family: Outfit, sans-serif;
}

.dashboard-ring {
    border-color: var(--line);
    border-top-color: var(--gold);
}

.dashboard-list span {
    background: var(--line);
}

.showcase-card-one small,
.showcase-card-two small {
    color: var(--dim);
    font-size: var(--atelier-micro);
    letter-spacing: var(--atelier-track);
    text-transform: uppercase;
}

/* ── Benefit cards ── */
.benefit-card {
    padding: 24px;
}

.benefit-icon {
    color: var(--gold);
}

.benefit-card h3 {
    color: var(--txt);
    font-family: Outfit, sans-serif;
}

.benefit-card p {
    color: var(--mut);
}

/* ── Testimonials ── */
.testimonial-card {
    padding: 28px;
}

.testimonial-card blockquote {
    color: var(--txt);
    font-size: 1rem;
    line-height: 1.7;
}

.testimonial-card figcaption {
    margin-top: 16px;
    color: var(--gold);
    font-size: var(--atelier-micro);
    font-weight: 600;
    letter-spacing: var(--atelier-track);
    text-transform: uppercase;
}

/* ── Support panel ── */
.support-panel {
    padding: 48px;
    text-align: center;
}

.support-panel h2 {
    color: var(--txt);
    font-family: Outfit, sans-serif;
}

.support-panel p {
    color: var(--mut);
    max-width: 520px;
    margin-inline: auto;
}

/* ── Resource panel ── */
.resource-panel {
    padding: 32px;
}

.resource-link {
    padding: 18px 20px;
    transition: border-color 200ms ease, background 200ms ease;
}

.resource-link:hover {
    border-color: rgba(196, 165, 116, 0.3);
    background: var(--panel-strong);
    transform: none;
}

.resource-link span {
    color: var(--mut);
    font-size: 0.82rem;
}

.resource-link strong {
    color: var(--txt);
    font-family: Outfit, sans-serif;
}

.resource-arrow {
    color: var(--gold);
}

/* ── Modal (modal-premium) ── */
.modal-backdrop {
    background: rgba(8, 8, 9, 0.88);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.modal-content {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    box-shadow: var(--shadow-elevated);
    overflow: hidden;
}

.modal-content::before {
    content: "";
    display: block;
    height: 3px;
    background: var(--grad);
    position: relative;
    z-index: 6;
}

.close-btn {
    position: relative;
    isolation: isolate;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--mut);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-size: 1.25rem;
}

.close-btn:hover {
    color: var(--txt);
    border-color: rgba(255, 255, 255, 0.14);
    transform: none;
    filter: none;
    box-shadow: none;
}

.modal-header {
    border-bottom: 1px solid var(--line);
}

.modal-header h2 {
    color: var(--txt);
    font-family: Outfit, sans-serif;
}

.modal-header h3 {
    color: var(--gold2);
}

.story-content {
    color: var(--soft);
    line-height: 1.75;
    font-size: 0.98rem;
}

.story-content h4 {
    color: var(--txt);
    font-family: Outfit, sans-serif;
}

/* ── Story video window ── */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.story-video-window {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    box-shadow: var(--shadow-blue-glow);
    overflow: hidden;
}

.story-video-window__chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.22);
}

.story-video-window__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold2);
    font-family: Outfit, sans-serif;
}

.story-video-window__external {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 7px 12px;
    border: 1px solid rgba(196, 165, 116, 0.35);
    border-radius: 999px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.story-video-window__external:hover,
.story-video-window__external:focus-visible {
    color: var(--txt);
    border-color: rgba(196, 165, 116, 0.65);
    background: rgba(196, 165, 116, 0.08);
}

.story-video-window__external::after {
    content: "↗";
    font-size: 0.85em;
    opacity: 0.85;
}

.story-video-window__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.story-video-window__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.story-video-window__meta {
    padding: 16px 18px 18px;
    border-top: 1px solid var(--line);
}

.story-video-window__meta h4 {
    margin: 0 0 0.65rem;
    font-family: Outfit, sans-serif;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--txt);
}

.story-video-window__meta p {
    margin: 0;
    color: var(--mut);
    line-height: 1.65;
    font-size: 0.94rem;
}

.story-video-window__source {
    margin-top: 0.85rem !important;
    font-size: 0.82rem !important;
    color: rgba(239, 237, 232, 0.55) !important;
}

.story-video-window__source span:first-child {
    color: var(--gold2);
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ── Featured videos (home showcase) ── */
.featured-videos-section {
    position: relative;
}

.featured-videos-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(196, 165, 116, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.featured-videos-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    position: relative;
}

.featured-video-card {
    --card-preview: #0a0a0d;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.featured-video-card:hover,
.featured-video-card:focus-within {
    border-color: rgba(196, 165, 116, 0.3);
    transform: translateY(-3px);
    box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(196, 165, 116, 0.08);
}

.featured-video-card__player {
    position: relative;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--card-preview);
    cursor: pointer;
}

.featured-video-card__player.is-playing {
    aspect-ratio: 16 / 9;
    cursor: default;
}

.featured-video-card__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.featured-video-card__pattern {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #101012 0%, #080809 100%);
}

.featured-video-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(8, 8, 9, 0.05) 0%, rgba(8, 8, 9, 0.5) 100%),
        linear-gradient(135deg, rgba(196, 165, 116, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.featured-video-card__calligraphy {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    pointer-events: none;
}

.featured-video-card__calligraphy-name {
    font-family: "Aref Ruqaa", "Amiri", serif;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    background: linear-gradient(180deg, #f5f0e8 0%, #e8dcc4 55%, #c4a574 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

.featured-video-card__duration {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    z-index: 3;
    padding: 4px 8px;
    border: 1px solid rgba(196, 165, 116, 0.22);
    border-radius: 999px;
    background: rgba(8, 8, 9, 0.72);
    color: var(--gold2);
    font-family: Outfit, sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.featured-video-card__play {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: background 0.2s ease;
}

.featured-video-card__play:hover,
.featured-video-card__play:focus-visible {
    background: rgba(0, 0, 0, 0.42);
}

.featured-video-card__play-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(196, 165, 116, 0.5);
    background: rgba(8, 8, 9, 0.78);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-video-card__play-icon::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid var(--gold);
}

.featured-video-card__meta {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0;
    min-height: 168px;
    padding: 14px 14px 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, transparent 20%),
        var(--panel);
}

.featured-video-card__title {
    margin: 0 0 8px;
    font-family: Outfit, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--txt);
}

.featured-video-card__desc {
    display: -webkit-box;
    flex: 1 1 auto;
    margin: 0;
    color: var(--mut);
    line-height: 1.55;
    font-size: 0.76rem;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-video-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.featured-video-card__youtube,
.featured-video-card__story-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--gold);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.featured-video-card__youtube:hover,
.featured-video-card__youtube:focus-visible,
.featured-video-card__story-link:hover,
.featured-video-card__story-link:focus-visible {
    color: var(--txt);
    border-color: rgba(196, 165, 116, 0.45);
    background: rgba(196, 165, 116, 0.08);
}

@media (max-width: 1100px) {
    .featured-videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .featured-videos-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
        scrollbar-width: thin;
        scrollbar-color: rgba(196, 165, 116, 0.35) transparent;
    }

    .featured-video-card {
        flex: 0 0 min(240px, 78vw);
        scroll-snap-align: start;
        min-height: 360px;
    }

    .featured-video-card__meta {
        min-height: 150px;
    }
}

html[lang="ar"] .featured-video-card__title {
    font-family: Amiri, serif;
    font-size: 0.92rem;
}

.story-notice {
    position: relative;
    isolation: isolate;
    margin: 1.75rem 0;
    padding: 14px 16px;
    border: 1px solid rgba(196, 165, 116, 0.35);
    border-radius: var(--radius-lg);
    border-inline-start: 3px solid var(--gold);
    background: rgba(196, 165, 116, 0.06);
    color: var(--gold2);
    font-size: 0.88rem;
    line-height: 1.65;
    box-shadow: var(--shadow-soft);
}

/* ── Footer (site-foot) ── */
.footer {
    position: relative;
    border-top: none;
    background: var(--bg-deep);
    padding: 40px 24px 48px;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad);
}

.footer-inner .logo {
    font-size: 0.85rem;
}

.footer p {
    color: var(--dim);
}

.footer-links a {
    color: var(--mut);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-meta {
    color: var(--dim);
}

.footer-meta a:hover {
    color: var(--gold);
}

/* ── Floating actions (donate-float FAB) ── */
.floating-actions {
    bottom: 24px;
    right: 24px;
    gap: 10px;
}

html[lang="ar"] .floating-actions {
    right: auto;
    left: 24px;
}

.floating-donate-button,
.donate-float {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 17px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    color: var(--gold);
    background: rgba(12, 12, 14, 0.92);
    box-shadow: var(--shadow-elevated), var(--window-ray);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
    isolation: auto;
    white-space: nowrap;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    transition: background 350ms ease, color 350ms ease, border-color 350ms ease;
}

.floating-donate-button::after,
.donate-float::after {
    display: none;
    content: none;
}

.floating-donate-button::before,
.donate-float::before {
    content: "♥";
    position: static;
    inset: auto;
    display: inline !important;
    width: auto;
    height: auto;
    margin-inline-end: 0;
    border-radius: 0;
    background: none;
    pointer-events: auto;
    font-size: 0.88rem;
    color: inherit;
}

.donate-float-label,
.donate-float-word {
    white-space: nowrap;
}

.floating-donate-button:hover,
.donate-float:hover {
    background: var(--gold);
    color: #141414;
    border-color: var(--gold);
    text-decoration: none;
    transform: none;
    filter: none;
    box-shadow: var(--glass-window-shadow);
}

.floating-action-orb {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    color: var(--bg);
    background: var(--grad);
    box-shadow: var(--shadow-soft);
    font-size: 0.72rem;
    font-weight: 800;
}

/* ── Agent panel ── */
.agent-toggle {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    box-shadow: var(--shadow-blue-glow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.agent-toggle:hover,
.agent-toggle[aria-expanded="true"] {
    border-color: rgba(196, 165, 116, 0.3);
    transform: none;
    filter: none;
    box-shadow: var(--shadow-elevated), var(--contour-inset-top);
}

.agent-orb {
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--gold);
    box-shadow: var(--shadow-soft);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.agent-toggle-copy strong {
    color: var(--txt);
    font-family: Outfit, sans-serif;
    font-size: 0.82rem;
}

.agent-toggle-copy small {
    color: var(--dim);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.agent-panel {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    box-shadow: var(--shadow-blue-glow);
}

.agent-panel h2 {
    color: var(--txt);
    font-family: Outfit, sans-serif;
    font-size: 1.1rem;
}

.agent-panel p {
    color: var(--mut);
    font-size: 0.88rem;
}

.agent-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--mut);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.agent-close:hover {
    color: var(--txt);
    transform: none;
    filter: none;
    box-shadow: var(--shadow-soft);
}

.agent-actions {
    gap: 8px;
}

.agent-actions button,
.agent-actions a {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--mut);
    background: var(--panel);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: var(--atelier-track);
    text-transform: uppercase;
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}

.agent-actions button:hover,
.agent-actions a:hover {
    color: var(--gold);
    border-color: rgba(196, 165, 116, 0.35);
    background: rgba(196, 165, 116, 0.06);
    transform: none;
    box-shadow: var(--shadow-soft);
}

/* ── Tilt cards — flatten motion ── */
.tilt-card:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
}

/* ── RTL (Arabic) ── */
html[lang="ar"] {
    direction: rtl;
}

html[lang="ar"] body,
html[lang="ar"] .arabic-text,
html[lang="ar"] .story-content,
html[lang="ar"] .story-video-window__meta {
    font-family: "Amiri", Inter, serif;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .section-title {
    font-family: "Amiri", serif;
    letter-spacing: 0;
}

html[lang="ar"] .hero h1 {
    font-family: "Amiri", serif;
    font-size: clamp(1.85rem, 3.8vw, 2.85rem);
    line-height: 1.35;
    max-width: none;
}

html[lang="ar"] .hero p,
html[lang="ar"] .hero .sub {
    font-family: Inter, sans-serif;
    font-size: var(--text-base);
    line-height: 1.85;
}

html[lang="ar"] .brand-lockup {
    text-transform: none;
    letter-spacing: 0.06em;
    font-size: 0.92rem;
}

html[lang="ar"] .brand-main {
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: Outfit, sans-serif;
}

html[lang="ar"] .nav-links a,
html[lang="ar"] .nav-donate,
html[lang="ar"] .btn,
html[lang="ar"] .status-badge,
html[lang="ar"] .metric-card span,
html[lang="ar"] .hero-metrics span {
    text-transform: none;
    letter-spacing: 0;
    font-family: Inter, sans-serif;
}

html[lang="ar"] .nav-links a {
    font-size: 0.88rem;
}

html[lang="ar"] .btn {
    font-size: 0.95rem;
}

html[lang="ar"] .metric-card span,
html[lang="ar"] .hero-metrics span {
    font-size: 0.84rem;
}

html[lang="ar"] .hero-copy {
    text-align: start;
}

html[lang="ar"] .hero-index li a:hover {
    transform: none;
}

html[lang="ar"] .nav-links,
html[lang="ar"] .nav-actions,
html[lang="ar"] .hero-actions,
html[lang="ar"] .hero-metrics,
html[lang="ar"] .footer-inner,
html[lang="ar"] .agent-panel-top,
html[lang="ar"] .agent-actions {
    direction: rtl;
}

html[lang="ar"] .lang-picker-option.active {
    border-inline-start: 2px solid var(--gold);
    border-inline-end: none;
}

html[lang="ar"] .close-btn {
    right: auto;
    left: 18px;
}

html[lang="ar"] .story-notice {
    border-inline-start: 3px solid var(--gold);
    border-inline-end: 1px solid rgba(196, 165, 116, 0.35);
}

html[lang="ar"] .skip-link {
    left: auto;
    right: 16px;
}

/* ── Responsive: 960px ── */
@media (max-width: 960px) {
    .hero {
        display: flex;
        min-height: auto;
        padding: 48px 20px 64px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "copy"
            "index";
        gap: 28px;
        min-height: auto;
        width: 100%;
    }

    html[dir="rtl"] .hero-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "copy"
            "index";
    }

    .hero-copy {
        padding-inline: 0;
    }

    .hero-index {
        height: auto !important;
        max-height: min(52vh, 420px) !important;
    }

    .showcase-section {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section-shell {
        padding-block: 64px;
    }

    .support-panel {
        padding: 32px 24px;
    }

    .nav-menu {
        position: fixed;
        inset: var(--nav-height) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 16px;
        border-bottom: 1px solid var(--line);
        background: var(--bg);
        transform: translateY(-110%);
        opacity: 0;
        visibility: hidden;
        transition: transform 320ms var(--ease), opacity 320ms ease, visibility 320ms ease;
    }

    .nav-menu.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .nav-links a {
        padding: 12px 14px;
    }

    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid var(--line);
    }

    .lang-picker,
    .lang-picker-toggle,
    .nav-donate {
        width: 100%;
        justify-content: center;
    }

    .floating-actions {
        bottom: 16px;
        right: 16px;
    }

    html[lang="ar"] .floating-actions {
        right: auto;
        left: 16px;
    }
}

/* ── Responsive: 640px ── */
@media (max-width: 640px) {
    .nav-content {
        padding: 0 16px;
    }

    .section-shell {
        width: calc(100% - 32px);
        padding-block: 48px;
    }

    .hero h1 {
        font-size: clamp(1.65rem, 6vw, 2rem);
    }

    html[lang="ar"] .hero h1 {
        font-size: clamp(1.5rem, 5.5vw, 1.85rem);
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .feature-grid,
    .benefit-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-links {
        gap: 12px;
    }

    .modal-header h2 {
        font-size: 2rem;
        padding-inline-end: 40px;
    }

    .modal-header h3 {
        font-size: 1.5rem;
    }

    .floating-donate-button span:last-child {
        display: none;
    }

    .floating-donate-button {
        padding: 0;
        width: 44px;
        height: 44px;
        justify-content: center;
        border-radius: var(--radius-lg);
    }

    .agent-toggle-copy {
        display: none;
    }

    .agent-toggle {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }

    .agent-panel {
        width: calc(100vw - 32px);
        max-width: 360px;
        inset-inline-end: 0;
    }

    .timeline-shell {
        border-radius: var(--radius);
    }

    .timeline-shell .timeline-container {
        padding-inline: 18px;
    }

    .timeline-shell .timeline-node {
        width: 112px;
    }

    .timeline-shell .timeline-label {
        max-width: 104px;
        font-size: 0.72rem;
    }

    .story-card {
        padding: 0;
    }

    .story-card__body {
        padding: 16px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "copy"
            "index";
    }

    .hero-index {
        max-height: min(48vh, 360px) !important;
    }
}

/* ── Miracles page ── */
.miracles-main {
    padding-top: 0;
    padding-bottom: 0;
}

.miracles-hero.section-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-top: calc(var(--nav-height) + clamp(24px, 4vw, 48px));
    padding-bottom: clamp(28px, 4vw, 48px);
    padding-inline: clamp(20px, 4vw, 64px);
}

.miracles-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.miracles-hero::before {
    display: none;
}

.miracles-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 50% 18%, rgba(196, 165, 116, 0.09), transparent 68%),
        radial-gradient(ellipse 50% 40% at 85% 75%, rgba(232, 220, 196, 0.05), transparent 70%);
    opacity: 1;
}

.miracles-hero-grid {
    position: relative;
    z-index: 2;
}

.miracles-hero-copy h1 {
    font-family: Outfit, sans-serif;
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    line-height: 1.1;
    margin: 0.5rem 0 1rem;
    color: var(--txt);
}

.miracles-hero-copy p {
    color: var(--mut);
    line-height: 1.7;
    margin: 0;
    max-width: 58ch;
}

.miracles-hero__meta {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.miracles-hero__count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 14px;
    border: 1px solid rgba(196, 165, 116, 0.28);
    border-radius: 999px;
    color: var(--mut);
    font-size: 0.82rem;
}

.miracles-hero__count strong {
    color: var(--gold);
    font-family: Outfit, sans-serif;
    font-size: 1rem;
}

.miracles-search {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: min(100%, 480px);
    margin-top: 0.5rem;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(12, 12, 14, 0.72);
    backdrop-filter: blur(8px);
}

.miracles-search__icon {
    color: var(--gold2);
    font-size: 1rem;
}

.miracles-search input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--txt);
    font: inherit;
    outline: none;
}

.miracles-search input::placeholder {
    color: var(--dim);
}

.miracles-content {
    padding-top: clamp(24px, 3vw, 40px);
    padding-bottom: 80px;
}

.miracles-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.miracle-card {
    position: relative;
    isolation: isolate;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.008) 100%);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.miracle-card:hover {
    border-color: rgba(196, 165, 116, 0.28);
    box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(196, 165, 116, 0.08);
}

.miracle-card__preview {
    position: relative;
    aspect-ratio: 21 / 6;
    min-height: 96px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: #0a0a0c;
}

.miracle-card__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.95;
    background:
        radial-gradient(circle at 18% 22%, rgba(232, 220, 196, 0.1) 0%, transparent 42%),
        radial-gradient(circle at 82% 78%, rgba(255, 255, 255, 0.03) 0%, transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 38%, rgba(0, 0, 0, 0.28) 100%),
        #0a0a0c;
    transition: transform 520ms var(--ease), opacity 320ms ease;
}

.miracle-card:hover .miracle-card__pattern {
    transform: scale(1.03);
    opacity: 1;
}

.miracle-card__calligraphy {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 12px 18px;
    text-align: center;
    pointer-events: none;
}

.miracle-card__calligraphy-name {
    display: block;
    max-width: 92%;
    font-family: "Aref Ruqaa", "Amiri", serif;
    font-size: clamp(1.6rem, 3.8vw, 2.35rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.01em;
    text-shadow:
        0 2px 18px rgba(0, 0, 0, 0.55),
        0 0 28px rgba(196, 165, 116, 0.16);
    background: linear-gradient(180deg, #f5f0e8 0%, #e8dcc4 42%, #c4a574 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

.miracle-card__calligraphy-honorific {
    display: block;
    color: rgba(232, 220, 196, 0.72);
    font-family: "Amiri", serif;
    font-size: clamp(0.68rem, 1.4vw, 0.78rem);
    font-weight: 400;
    line-height: 1.2;
}

.miracle-card__preview-index {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 12px;
    z-index: 3;
    min-width: 34px;
    padding: 5px 8px;
    border: 1px solid rgba(196, 165, 116, 0.28);
    border-radius: 999px;
    background: rgba(8, 8, 9, 0.72);
    color: var(--gold2);
    font-family: Outfit, sans-serif;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.miracle-card__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line);
}

.miracle-card__head h2 {
    margin: 0 0 0.35rem;
    font-family: Outfit, sans-serif;
    font-size: 1.15rem;
    color: var(--txt);
}

.miracle-card__head p {
    margin: 0;
    color: var(--mut);
    font-size: 0.92rem;
    line-height: 1.55;
}

.miracle-card__badge {
    flex-shrink: 0;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--gold2);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.miracle-list {
    list-style: none;
    margin: 0;
    padding: 8px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.miracle-item {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.miracle-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.miracle-item__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.miracle-item__head strong {
    color: var(--txt);
    font-family: Outfit, sans-serif;
    font-size: 0.95rem;
}

.miracle-item__type {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(196, 165, 116, 0.1);
    border: 1px solid rgba(196, 165, 116, 0.22);
    color: var(--gold2);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: Outfit, sans-serif;
}

.miracle-item p {
    margin: 0 0 6px;
    color: var(--mut);
    line-height: 1.65;
    font-size: 0.92rem;
}

.miracle-item cite {
    display: block;
    color: var(--dim);
    font-style: normal;
    font-size: 0.78rem;
}

.miracle-card__foot {
    padding: 0 20px 18px;
}

.miracle-card__story-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 8px 14px;
    border: 1px solid rgba(196, 165, 116, 0.35);
    border-radius: 999px;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.miracle-card__story-link:hover,
.miracle-card__story-link:focus-visible {
    color: var(--txt);
    background: rgba(196, 165, 116, 0.08);
    border-color: rgba(196, 165, 116, 0.55);
}

.miracles-disclaimer {
    margin-top: 40px;
    padding: 16px 18px;
    border: 1px solid rgba(196, 165, 116, 0.22);
    border-radius: var(--radius-lg);
    color: var(--dim);
    font-size: 0.86rem;
    line-height: 1.6;
}

.nav-links .top.is-active {
    color: var(--gold);
}

html[lang="ar"] .miracle-card__head h2,
html[lang="ar"] .miracle-item__head strong,
html[lang="ar"] .miracles-hero-copy h1 {
    font-family: "Amiri", serif;
}

@media (max-width: 960px) {
    .miracles-hero-index {
        max-height: min(48vh, 360px) !important;
        height: auto !important;
    }

    .miracle-card__head {
        grid-template-columns: 1fr;
    }

    .miracle-card__badge {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .miracles-content {
        padding-bottom: 64px;
    }

    .miracle-card__preview {
        aspect-ratio: 16 / 7;
        min-height: 88px;
    }
}

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

    .magnetic,
    .tilt-card {
        transform: none !important;
    }
}

/* ── ATELIER cursor (EHS One) ── */
html.fx-cursor,
html.fx-cursor body,
html.fx-cursor a,
html.fx-cursor button,
html.fx-cursor label {
    cursor: none;
}

html.fx-cursor input,
html.fx-cursor textarea {
    cursor: text;
}

.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    margin: -2.5px 0 0 -2.5px;
    border-radius: 50%;
    background: var(--gold);
}

.cursor-ring {
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border-radius: 50%;
    border: 1px solid rgba(239, 237, 232, 0.35);
    transition: border-color 300ms ease;
}

html.cursor-on-btn .cursor-ring {
    border-color: var(--gold);
}

html.cursor-on-donate .cursor-ring {
    border-color: var(--gold2);
}

.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 340px;
    height: 340px;
    margin: -170px 0 0 -170px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(circle, rgba(196, 165, 116, 0.05), transparent 65%);
    will-change: transform;
}

@media (pointer: coarse), (max-width: 960px) {
    .cursor-dot,
    .cursor-glow,
    .cursor-ring {
        display: none;
    }

    html.fx-cursor,
    html.fx-cursor body,
    html.fx-cursor a,
    html.fx-cursor button {
        cursor: auto;
    }
}

/* ── Desktop navigation (EHS flat header) ── */
@media (min-width: 961px) {
    .nav-toggle {
        display: none !important;
    }

    .nav-menu {
        display: flex !important;
        position: static !important;
        flex: 1;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 18px !important;
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-links {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .nav-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        width: auto;
        max-width: none;
        margin: 0;
    }

    .nav-content {
        flex-wrap: nowrap;
        align-items: center;
    }
}

/* ── Final typography overrides (beat legacy style.css) ── */
.hero h1 {
    font-size: clamp(2rem, 4.2vw, 3.2rem) !important;
    font-weight: 500 !important;
    line-height: 1.12 !important;
}

html[lang="ar"] .hero h1 {
    font-size: clamp(1.85rem, 3.8vw, 2.85rem) !important;
    line-height: 1.35 !important;
}

.section-heading p {
    font-size: var(--text-base);
    line-height: 1.75;
}

.hero-cta-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.agent-toggle-copy strong {
    font-size: 0.88rem;
}

.agent-toggle-copy small {
    font-size: 0.76rem;
    color: var(--dim);
}

/* ── Noscript crawlable archive ── */
.noscript-archive {
    position: relative;
    isolation: isolate;
    margin-top: 32px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.noscript-archive h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: var(--txt);
}

.noscript-archive p {
    margin: 0 0 16px;
    color: var(--mut);
    font-size: 0.92rem;
    line-height: 1.65;
}

.noscript-archive ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 16px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.noscript-archive li a {
    color: var(--mut);
    font-size: 0.88rem;
    text-decoration: none;
}

.noscript-archive li a:hover {
    color: var(--gold);
}

/* ── Editorial ad placements (AdSense) ── */
.editorial-ad {
    padding-block: clamp(12px, 2.5vw, 20px);
}

.editorial-ad__panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.008) 100%);
    box-shadow: var(--shadow-soft);
}

.editorial-ad__panel::before {
    content: "";
    display: block;
    height: 3px;
    background: var(--grad);
    position: relative;
    z-index: 6;
}

.editorial-ad__chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
}

.editorial-ad__eyebrow {
    margin: 0;
    color: var(--gold2);
    font-family: Outfit, sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.editorial-ad__tag {
    flex-shrink: 0;
    padding: 3px 9px;
    border: 1px solid rgba(196, 165, 116, 0.22);
    border-radius: 999px;
    color: var(--dim);
    font-family: Outfit, sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.editorial-ad__frame {
    position: relative;
    min-height: 96px;
    padding: 14px 18px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(196, 165, 116, 0.06), transparent 68%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 28%),
        var(--panel-soft);
}

.editorial-ad__frame::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, black 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, black 20%, transparent 78%);
}

.editorial-ad__unit {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 68px;
    overflow: hidden;
    border-radius: var(--radius);
}

.editorial-ad__unit iframe {
    border-radius: var(--radius);
}

.editorial-ad--banner .editorial-ad__frame {
    min-height: 108px;
}

.editorial-ad--compact .editorial-ad__frame {
    min-height: 80px;
    padding: 10px 14px;
}

.editorial-ad.is-live .editorial-ad__frame::before {
    opacity: 0.18;
}

.editorial-ad.is-live .editorial-ad__tag {
    color: var(--mut);
    border-color: rgba(196, 165, 116, 0.28);
}

@media (max-width: 640px) {
    .editorial-ad__frame {
        min-height: 84px;
        padding: 12px 14px;
    }

    .editorial-ad--banner .editorial-ad__frame {
        min-height: 92px;
    }
}

/* ── NOOR gentle polish ── */
.hero h1,
.section-title,
.miracles-hero-copy h1 {
    font-size: var(--hero-title);
    font-weight: 500;
}

.hero p,
.hero .sub,
.section-heading p {
    font-size: 1.02rem;
    color: var(--soft);
}

.btn {
    border-radius: 999px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.btn-primary {
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    box-shadow: var(--shadow-elevated);
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.story-card__pattern,
.featured-video-card__pattern,
.miracle-card__pattern,
.hero-index-pattern {
    opacity: 0.72;
}

.story-card__calligraphy-name,
.featured-video-card__calligraphy-name,
.miracle-card__calligraphy-name {
    background: linear-gradient(180deg, #f5f0e8 0%, #e8dcc4 45%, #c4a574 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.35));
}

.hero-index-link {
    border-radius: calc(var(--radius-lg) - 2px);
    background: rgba(255, 255, 255, 0.015);
}

.hero-index-link:hover,
.hero-index-link:focus-visible {
    background: rgba(196, 165, 116, 0.06);
    transform: none;
    border-color: rgba(196, 165, 116, 0.18);
}

.featured-video-card:hover,
.featured-video-card:focus-within {
    transform: translateY(-2px);
}

.miracle-card:hover {
    transform: translateY(-1px);
}

.timeline-shell,
.modal-content,
.support-panel,
.resource-panel {
    background: rgba(27, 25, 35, 0.88);
}

.footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
}

@keyframes atelierPulse {
    0%, 100% { opacity: 0.45; transform: scale(0.92); }
    50% { opacity: 0.85; transform: scale(1); }
}
