:root {
    --ink: #16212e;
    --ink-soft: #3a4756;
    --paper: #f7f5f0;
    --paper-2: #efeae0;
    --rule: #d8d1c2;
    --accent: #8a1c2b;
    --accent-2: #c9a24a;
    --shadow: 0 10px 30px rgba(22, 33, 46, 0.08);
    --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* ---- Lenis recommended CSS ---- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: auto; }

body {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    background-color: var(--paper);
    color: var(--ink);
    line-height: 1.75;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.serif { font-family: 'Playfair Display', 'Tajawal', serif; }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 20% 10%, rgba(201, 162, 74, 0.04) 0, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(138, 28, 43, 0.03) 0, transparent 40%);
    z-index: 0;
}

/* ======= Top Nav ======= */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(247, 245, 240, 0.85);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--rule);
}
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    letter-spacing: 0.3px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(138, 28, 43, 0.15);
}
.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color .2s ease;
    position: relative;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a::after {
    content: '';
    position: absolute;
    right: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width .25s ease;
}
.nav-links a:hover::after { width: 100%; }
@media (max-width: 640px) { .nav-links { display: none; } }

/* ======= Hero ======= */
.hero {
    position: relative;
    padding: 90px 24px 70px;
    background:
        linear-gradient(180deg, rgba(247,245,240,0) 0%, var(--paper) 100%),
        linear-gradient(135deg, #0b1a2b 0%, #16212e 60%, #1f2d3d 100%);
    color: #f3ede1;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(201,162,74,0.12) 0, transparent 45%),
        radial-gradient(circle at 85% 70%, rgba(138,28,43,0.18) 0, transparent 50%);
    pointer-events: none;
}
/* React Bits — Light Rays container */
.hero-rays {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.6s ease;
    /* fade out towards the paper-coloured bottom of the hero */
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 95%);
            mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 95%);
}
.hero-rays.is-ready { opacity: 1; }
.hero-rays canvas { width: 100% !important; height: 100% !important; display: block; }

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 50px;
    align-items: center;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 20px;
}
.eyebrow .line { width: 36px; height: 1px; background: var(--accent-2); display: inline-block; }
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.1rem, 4.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}
.hero h1 .accent { color: var(--accent-2); font-style: italic; }
/* React Bits — BlurText */
.blur-text { display: flex; flex-wrap: wrap; column-gap: 0; margin: 0; font: inherit; }
.blur-text > span { display: inline-block; will-change: transform, filter, opacity; }
@media (max-width: 820px) { .blur-text { justify-content: center; } }

.hero-sub { font-size: 1.15rem; color: #d7cfbe; margin-bottom: 22px; font-weight: 500; }
.hero-bio { font-size: 1.02rem; color: #c7bfae; line-height: 1.95; margin-bottom: 32px; max-width: 540px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.btn-primary {
    background: var(--accent-2);
    color: #1a1a1a;
    box-shadow: 0 8px 20px rgba(201,162,74,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(201,162,74,0.4); }
.btn-ghost { background: transparent; color: #f3ede1; border: 1px solid rgba(243,237,225,0.3); }
.btn-ghost:hover { background: rgba(243,237,225,0.08); transform: translateY(-2px); }

/* React Bits — StarBorder */
.star-border-container {
    display: inline-block;
    position: relative;
    border-radius: 50px;
    overflow: hidden;
    text-decoration: none;
    transition: transform .25s ease;
}
.star-border-container:hover { transform: translateY(-2px); }
.star-border-container .border-gradient-bottom,
.star-border-container .border-gradient-top {
    position: absolute;
    width: 300%;
    height: 50%;
    opacity: 0.7;
    border-radius: 50%;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    z-index: 0;
}
.star-border-container .border-gradient-bottom { bottom: -12px; right: -250%; animation-name: star-movement-bottom; }
.star-border-container .border-gradient-top { top: -12px; left: -250%; animation-name: star-movement-top; }
.star-border-container .inner-content { position: relative; z-index: 1; }
.star-border-container .inner-content.btn-primary:hover { transform: none; }
@keyframes star-movement-bottom {
    0% { transform: translate(0%, 0%); opacity: 1; }
    100% { transform: translate(-100%, 0%); opacity: 0; }
}
@keyframes star-movement-top {
    0% { transform: translate(0%, 0%); opacity: 1; }
    100% { transform: translate(100%, 0%); opacity: 0; }
}

.hero-portrait { position: relative; justify-self: center; }
.portrait-frame {
    width: 260px;
    height: 320px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.45);
    position: relative;
    transform: rotate(-2deg);
    background: #222;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; display: block; filter: contrast(1.03) saturate(1.05); }
.portrait-frame::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(243,237,225,0.25);
    border-radius: 3px;
    pointer-events: none;
}
.portrait-badge {
    position: absolute;
    bottom: -18px; left: -18px;
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(138,28,43,0.35);
    transform: rotate(-2deg);
}

@media (max-width: 820px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero-bio { margin-left: auto; margin-right: auto; }
    .hero-ctas { justify-content: center; }
    .eyebrow { justify-content: center; }
    .portrait-frame { width: 220px; height: 270px; margin: 0 auto; }
}

/* ======= Stats (count-up) ======= */
.stats {
    position: relative;
    z-index: 1;
    max-width: 920px;
    margin: 10px auto 0;
    padding: 0 24px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.stat {
    padding: 26px 20px;
    text-align: center;
    border-inline-start: 1px solid var(--rule);
}
.stat:first-child { border-inline-start: none; }
.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    display: inline-block;
}
.stat-label { display: block; color: var(--ink-soft); font-size: 0.92rem; margin-top: 6px; }
@media (max-width: 520px) {
    .stat { border-inline-start: none; border-top: 1px solid var(--rule); }
    .stat:first-child { border-top: none; }
}

/* ======= Section Header ======= */
.section-head { max-width: 920px; margin: 70px auto 20px; padding: 0 24px; text-align: center; }
.section-head .eyebrow { color: var(--accent); margin-bottom: 12px; }
.section-head .eyebrow .line { background: var(--accent); }
.section-head h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    color: var(--ink);
    margin-bottom: 10px;
    font-weight: 700;
}
.section-head p { color: var(--ink-soft); font-size: 1rem; }

/* ======= Main ======= */
main { position: relative; z-index: 1; }
.container { max-width: 920px; margin: 0 auto; padding: 40px 24px 60px; }

/* ======= Timeline ======= */
.timeline { position: relative; padding-right: 44px; }
.timeline::before {
    content: '';
    position: absolute;
    right: 10px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), var(--rule) 60%, transparent);
    transform-origin: top;
}
.timeline-empty { text-align: center; color: var(--ink-soft); padding: 40px 0; }

.event { position: relative; margin-bottom: 70px; padding-right: 10px; }
.event::before {
    content: '';
    position: absolute;
    right: -40px;
    top: 10px;
    width: 14px;
    height: 14px;
    background: var(--paper);
    border: 2px solid var(--accent);
    border-radius: 50%;
    transition: all .3s ease;
}
.event:hover::before {
    background: var(--accent);
    transform: scale(1.15);
    box-shadow: 0 0 0 5px rgba(138,28,43,0.12);
}
.event-card {
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 28px 30px;
    box-shadow: var(--shadow);
    transition: transform .3s ease, box-shadow .3s ease;
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(22,33,46,0.1); }
.event-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.event-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.event-date i { font-size: 0.85rem; }
.event-tag {
    font-size: 0.72rem;
    background: var(--paper-2);
    color: var(--ink-soft);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}
.event-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.55rem;
    color: var(--ink);
    margin-bottom: 14px;
    font-weight: 700;
    line-height: 1.3;
}
.event-description { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 24px; line-height: 1.9; white-space: pre-line; }

/* ======= Media Gallery ======= */
.media-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.media-gallery.full-video { grid-template-columns: 1fr; }
.media-gallery + .media-gallery { margin-top: 12px; }
.media-item {
    border-radius: var(--radius);
    overflow: hidden;
    background: #0e0e0e;
    box-shadow: 0 4px 14px rgba(22,33,46,0.08);
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
}
.media-item:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(22,33,46,0.15); }
.media-item img { width: 100%; height: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; }

/* Video Facade */
.video-facade {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000 center/cover no-repeat;
    cursor: pointer;
    overflow: hidden;
}
.video-facade::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.55));
    z-index: 1;
}
.video-facade .play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    transition: transform .25s ease, background .25s ease;
}
.video-facade:hover .play-btn { transform: translate(-50%, -50%) scale(1.08); background: #fff; }
.video-facade .play-btn i { color: var(--accent); font-size: 1.8rem; margin-right: -4px; }
.video-facade .vf-label {
    position: absolute;
    bottom: 16px; right: 20px;
    z-index: 2;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.video-facade .vf-label i { color: var(--accent-2); }
.video-facade.loaded { cursor: default; }
.video-facade.loaded::before,
.video-facade.loaded .play-btn,
.video-facade.loaded .vf-label { display: none; }
.video-facade iframe,
.video-facade video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

/* ======= Footer ======= */
footer {
    background: linear-gradient(135deg, #0b1a2b 0%, #16212e 100%);
    color: #e8e2d2;
    padding: 60px 24px 40px;
    margin-top: 40px;
    position: relative;
}
footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.footer-grid {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: start;
}
.footer-brand { font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 10px; color: #fff; }
.footer-brand .accent { color: var(--accent-2); font-style: italic; }
.footer-tag { color: #b5ad9c; font-size: 0.95rem; line-height: 1.9; max-width: 380px; }
.footer-title { font-size: 0.82rem; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-2); margin-bottom: 18px; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.contact-list a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #e8e2d2;
    text-decoration: none;
    font-size: 0.98rem;
    transition: color .2s ease;
    direction: ltr;
    text-align: right;
}
.contact-list a:hover { color: var(--accent-2); }
.contact-list i {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    color: var(--accent-2);
}
.footer-copy {
    max-width: 920px;
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    color: #8a8373;
    font-size: 0.85rem;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
    .contact-list a { justify-content: center; }
}

/* ======= Responsive ======= */
@media (max-width: 640px) {
    .hero { padding: 60px 20px 50px; }
    .event-card { padding: 22px 20px; }
    .event-title { font-size: 1.3rem; }
    .event-description { font-size: 1rem; }
    .timeline { padding-right: 32px; }
    .event::before { right: -28px; width: 12px; height: 12px; }
    .timeline::before { right: 5px; }
    .media-gallery { grid-template-columns: 1fr; }
    .video-facade .play-btn { width: 58px; height: 58px; }
    .video-facade .play-btn i { font-size: 1.4rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .hero-rays { opacity: 1; }
    .star-border-container .border-gradient-bottom,
    .star-border-container .border-gradient-top { display: none; }
}
