/* Next Level Experience: home and event pages. Arabic first, so layout uses logical properties. */
:root {
    --bg: #0b0b0c;
    --surface: #161618;
    --surface-2: #1f1f22;
    --line: #2b2b2f;
    --text: #f5f3ef;
    --muted: #a7a29a;
    --accent: #eab308;
    --accent-ink: #111111;
    --night: #02233d;
    --sand: #ecdbc8;
    --radius: 16px;
    --gutter: 16px;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link { position: absolute; inset-inline-start: 8px; top: -48px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 12, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 32px; width: auto; }
.brand-divider { width: 1px; height: 20px; background: var(--accent); }
.brand-tag { color: var(--accent); font-size: 12px; letter-spacing: 0.18em; }
.header-nav { display: flex; align-items: center; gap: 20px; }
.nav-link { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav-link:hover { color: var(--text); }
.lang-switch { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.lang-switch:hover { border-color: var(--accent); color: var(--accent); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.button:hover { background: #facc15; }
.button-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.button-ghost:hover { background: var(--surface-2); }

/* Illustrated covers, used until an event has a real poster */
/* Chained with the container classes so they win over each container's own background. */
.card-media.illustrated, .hero-media.illustrated, .event-cover.illustrated { display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 90% at 50% 100%, #0a3a5e 0%, var(--night) 60%, #011626 100%); }
.illustrated img { width: 78%; height: auto !important; object-fit: contain !important; }
.card-media.illustrated.cat-events, .hero-media.illustrated.cat-events, .event-cover.illustrated.cat-events { background: radial-gradient(120% 90% at 50% 100%, #f6ebde 0%, var(--sand) 70%, #dcc5aa 100%); }
.illustrated.cat-events img { width: 46%; }

/* Featured strip */
.hero { position: relative; padding-top: 16px; }
.hero-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: var(--gutter); max-width: 1200px; margin-inline: auto; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; border-radius: var(--radius); overflow: hidden; text-decoration: none; min-height: 420px; display: flex; align-items: flex-end; background: var(--surface); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media.illustrated { align-items: flex-start; padding-top: 32px; }
.hero-media.illustrated img { width: min(80%, 520px); }
.hero-media.illustrated.cat-events img { width: min(42%, 260px); }
.hero-copy { position: relative; width: 100%; padding: 96px 20px 22px; background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 30%, rgba(0, 0, 0, 0)); }
.hero-kicker { margin: 0 0 4px; color: var(--accent); font-size: 14px; font-weight: 500; }
.hero-title { font-size: 30px; margin-bottom: 6px; }
.hero-meta { margin: 0 0 14px; color: #d6d1c9; }
.hero-dots { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.hero-dot { width: 24px; height: 24px; border: 0; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; }
.hero-dot::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: width 0.2s; }
.hero-dot[aria-current]::before { width: 20px; background: var(--accent); }

.intro { padding-block: 48px 8px; }
.intro h1 { font-size: 36px; margin-bottom: 8px; }

/* Event grid */
.events { padding-block: 32px 48px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 24px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform 0.2s, border-color 0.2s; }
.card:hover { transform: translateY(-2px); border-color: #3d3d42; }
.card[hidden] { display: none; }
.card-media { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; inset-block-end: 8px; inset-inline-start: 8px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-live { background: var(--accent); color: var(--accent-ink); }
.card-body { padding: 10px 12px 14px; }
.card-kicker { margin: 0 0 4px; color: var(--accent); font-size: 13px; font-weight: 500; }
.card-title { font-size: 16px; margin-bottom: 4px; }
.card-venue { margin: 0; color: var(--muted); font-size: 14px; }
.card-price { margin: 8px 0 0; font-weight: 700; font-size: 15px; }
.empty { padding: 32px 0; }

/* About */
.about { background: var(--surface); border-top: 1px solid var(--line); }
.about-row { display: flex; flex-direction: column; gap: 20px; padding-block: 40px; }
.about h2 { font-size: 24px; margin-bottom: 8px; }
.about p { margin: 0; max-width: 60ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px; }
.footer-row { display: flex; flex-direction: column; gap: 16px; }
.footer-brand { margin: 0; font-weight: 700; }
.footer-row p { margin: 0; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.footer-links a { color: var(--muted); }

/* Event page */
.event-page { padding-block: 16px 120px; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; font-size: 15px; }
.back-link::before { content: "→ "; }
[dir="ltr"] .back-link::before { content: "← "; }
.event-cover { aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; background: var(--surface-2); }
.event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-title { font-size: 30px; margin-bottom: 10px; }
.facts { list-style: none; padding: 0; margin: 0 0 8px; color: var(--muted); }
.facts li { padding-block: 2px; }
.event-section { border-top: 1px solid var(--line); padding-block: 22px; }
.event-section h2 { font-size: 19px; margin-bottom: 10px; }
.event-section p { margin: 0; color: #d6d1c9; }
.tiers, .things { list-style: none; padding: 0; margin: 0; }
.tier { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.tier-price { font-weight: 700; white-space: nowrap; }
.tier-sold-out { opacity: 0.55; }
.things li { position: relative; padding-inline-start: 20px; margin-bottom: 8px; color: #d6d1c9; }
.things li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.7em; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
.buy-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: rgba(22, 22, 24, 0.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.buy-title { display: none; margin: 0 0 4px; font-weight: 700; }
.buy-price { margin: 0; font-weight: 700; }

@media (max-width: 479px) {
    .hide-sm { display: none; }
}


@media (min-width: 768px) {
    :root { --gutter: 24px; }
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
    .card-body { padding: 14px 16px 18px; }
    .card-title { font-size: 19px; }
    .badge { inset-block-end: 12px; inset-inline-start: 12px; padding: 4px 12px; font-size: 13px; }
    .hero-slide { flex-basis: 86%; min-height: 460px; }
    .hero-title { font-size: 40px; }
    .hero-copy { padding: 120px 32px 32px; max-width: 720px; background: none; }
    .hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0) 65%); }
    .hero-copy { z-index: 1; }
    .about-row { flex-direction: row; align-items: center; justify-content: space-between; }
    .footer-row { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 1024px) {
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
    .event-cover { aspect-ratio: 16 / 9; }
    .event-cover.illustrated img { width: 50%; }
    .event-page { padding-bottom: 48px; }
    .buy-bar { position: sticky; top: 88px; flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
    .buy-title { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
