/* AL.FESTIVAL: blue ground, black shapes, orange leaves, yellow accents (from the poster). */
:root {
  --blue: #137fa8;
  --blue-d: #0f6686;
  --blue-l: #4e9fbe;
  --orange: #f15a2f;
  --yellow: #f9ed53;
  --ink: #0e1013;
  --mute: #b9c6cf;
  --radius: 18px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Archivo Black", "Archivo", system-ui, sans-serif;
  --ar: "Lalezar", "Noto Sans Arabic", "Geeza Pro", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--ink) var(--pattern, url(/img/pattern.svg)) center top / 120px auto;
}
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--blue);
  border-inline: 5px solid var(--ink);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--blue) url(/img/leaves.svg) center 30% / cover no-repeat;
  border-bottom: 5px solid var(--ink);
  isolation: isolate;
}
.custom-colors .hero:not(.hero-img):not(.hero-art) { background-image: none; }
.hero-in { padding: 44px 20px 40px; text-align: center; }
/* header made from an uploaded image */
.hero-img { background-size: cover; background-repeat: no-repeat; }
.hero-art { background-image: none; }
.hero-art .art { overflow: hidden; background: var(--blue-d); }
.hero-art .art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-art .art.h-compact { height: clamp(200px, 44vw, 300px); }
.hero-art .art.h-medium { height: clamp(280px, 70vw, 440px); }
.hero-art .art.h-tall { height: clamp(420px, 110vw, 720px); }
.hero-art .art.h-full { height: auto; }
.hero-art .hero-in { padding: 22px 20px 26px; }
.hero-art .dates { margin-top: 0; }
.logo { margin: 0 0 8px; font-weight: 400; line-height: 0.95; transform: rotate(-4deg); }
.logo span { display: block; }
.logo-ar {
  font-family: var(--ar);
  font-size: clamp(60px, 19vw, 118px);
  color: var(--yellow);
  paint-order: stroke fill;
  -webkit-text-stroke: 0.1em var(--orange);
  text-shadow: 0.045em 0.055em 0 var(--ink);
  letter-spacing: 0;
}
.logo-en {
  font-family: var(--display);
  font-size: clamp(34px, 11vw, 86px);
  color: var(--ink);
  paint-order: stroke fill;
  -webkit-text-stroke: 0.14em var(--orange);
  transform: skewX(-8deg);
  margin-top: -0.06em;
  letter-spacing: -0.01em;
}
.logo-img { max-width: min(520px, 90%); height: auto; }
.dates {
  display: inline-block;
  margin: 26px 0 0;
  padding: 6px 16px;
  background: var(--ink);
  color: var(--yellow);
  border-radius: 99px;
  font: 800 clamp(16px, 4.2vw, 22px) var(--font);
  letter-spacing: 0.02em;
}
.tagline { margin: 14px auto 0; max-width: 34ch; font-weight: 800; font-size: 19px; color: var(--ink); text-shadow: 0 0 4px var(--blue), 0 0 8px var(--blue), 0 0 12px var(--blue); }
.about { margin: 12px auto 0; max-width: 52ch; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 16px; text-align: left; }
.hero .btn-lg { margin-top: 20px; }

/* ---------- buttons and chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border: 3px solid var(--ink); border-radius: 99px;
  font-weight: 800; font-size: 15px; text-decoration: none; text-align: center; line-height: 1.15;
  background: #fff; color: var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }
.btn-y { background: var(--yellow); }
.btn-o { background: var(--orange); }
.btn-line { background: transparent; color: #fff; border-color: #fff; }
.btn-line:hover { box-shadow: 0 4px 0 #fff; }
.btn-lg { min-height: 54px; padding: 12px 28px; font-size: 18px; }
.btn[aria-pressed="true"].btn-line { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

/* the wrappers vanish so that only the day row sticks to the top of the screen */
.bar, #filters { display: contents; }
.tabs { display: flex; gap: 8px; padding: 12px 14px 8px; background: var(--blue); }
.days { position: sticky; top: 0; z-index: 20; background: var(--blue); padding: 6px 14px 4px; border-bottom: 4px solid var(--ink); }
.more { padding: 10px 14px 12px; background: var(--blue); border-bottom: 5px solid var(--ink); }
.tab {
  flex: 1; padding: 9px 12px; border: 3px solid var(--ink); border-radius: 99px;
  background: var(--blue); color: var(--ink); font-weight: 800;
}
.tab[aria-selected="true"] { background: var(--ink); color: var(--yellow); }
.count { display: inline-block; min-width: 1.5em; padding: 0 6px; border-radius: 99px; background: var(--orange); color: var(--ink); font-size: 13px; }
.row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border: 3px solid var(--ink); border-radius: 99px;
  background: var(--blue); color: var(--ink); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.chip.day { flex-direction: column; gap: 0; padding: 5px 14px; border-radius: 16px; line-height: 1.15; min-width: 64px; }
.chip.day b { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; }
.chip.day span { font-size: 12px; font-weight: 600; }
.find { overflow: visible; padding: 0; }
.find input, .find select {
  min-height: 44px; padding: 8px 14px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; min-width: 0;
}
.find input { flex: 1 1 auto; }
.find select { flex: 0 1 42%; }

/* ---------- list ---------- */
main { padding: 8px 14px 24px; }
.day-h {
  position: sticky; top: var(--days-h, 0px); z-index: 5;
  margin: 18px -14px 12px; padding: 9px 18px;
  background: var(--ink); color: var(--yellow);
  font: 800 19px var(--font); text-transform: uppercase; letter-spacing: 0.03em;
}
.ev {
  position: relative; display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: start;
  margin: 0 0 12px; padding: 14px 12px 14px 14px;
  background: var(--ink); color: #fff; border-radius: var(--radius);
  border: 3px solid var(--ink);
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.ev:hover { border-color: var(--yellow); }
.ev-time b { display: block; font: 400 22px/1 var(--display); color: var(--yellow); }
.ev-time b.tba { font-size: 15px; color: var(--orange); padding-top: 4px; }
.ev-time span { display: block; margin-top: 4px; font-size: 14px; color: var(--mute); }
.ev-time span::before { content: "until "; font-size: 11px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 0 0;
  padding: 3px 10px 3px 8px; border-radius: 99px;
  background: var(--orange); color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: 0.01em;
}
.tag-tbc { background: var(--yellow); }
.ev h3 { margin: 8px 0 4px; font: 700 18px/1.22 var(--font); overflow-wrap: anywhere; }
.ev-open { all: unset; cursor: pointer; }
.ev-open::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.ev-open:focus-visible::after { outline: 3px solid var(--yellow); outline-offset: 2px; }
.meta { margin: 0; display: flex; gap: 6px; align-items: center; color: var(--mute); font-size: 14px; }
.ev-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; position: relative; z-index: 2; }
.ev-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; border: 2px solid var(--blue); pointer-events: none; }
.save {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 2px solid var(--blue); border-radius: 50%; background: transparent; color: var(--yellow);
}
.save .ico { width: 22px; height: 22px; }
.save[aria-pressed="true"] { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.empty { margin: 40px 10px; padding: 28px 20px; text-align: center; background: var(--ink); color: #fff; border-radius: var(--radius); }
.savedbar { margin: 12px 0 4px; padding: 16px; background: var(--ink); border-radius: var(--radius); color: #fff; text-align: center; }
.savedbar p { margin: 10px 0 0; font-size: 14px; color: var(--mute); }

/* ---------- pdf box + footer ---------- */
.pdfbox {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  margin: 8px 14px 24px; padding: 20px; background: var(--orange); border: 3px solid var(--ink); border-radius: 22px;
}
.pdfbox h2 { margin: 0; font: 400 22px/1.1 var(--display); }
.pdfbox p { margin: 4px 0 0; font-weight: 600; }
.foot { padding: 20px 18px 40px; background: var(--ink); color: var(--mute); text-align: center; font-size: 14px; }
.foot p { margin: 0 0 8px; }
.foot a { color: var(--yellow); }
.foot .small { font-size: 12px; }
.foot .btn { margin: 4px 0 12px; }
.foot .hint { max-width: 40ch; margin: 0 auto 12px; }

/* ---------- event sheet ---------- */
dialog#sheet {
  width: min(600px, calc(100% - 20px)); max-height: calc(100dvh - 24px); padding: 0; border: 3px solid var(--yellow);
  border-radius: 26px; background: var(--ink); color: #fff; overflow: auto; overscroll-behavior: contain;
}
dialog#sheet::backdrop { background: rgba(8, 24, 36, 0.78); }
.sheet-in { position: relative; }
.x {
  position: absolute; top: 10px; right: 10px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--yellow); color: var(--ink);
}
.sheet-img { display: block; width: 100%; max-height: 340px; object-fit: cover; background: var(--blue-d); }
.sheet-body { padding: 20px 20px 24px; }
.sheet-body .tags { margin: 0 0 12px; }
.sheet-body h2 { margin: 0 0 12px; font: 400 clamp(26px, 6vw, 34px)/1.08 var(--display); color: var(--yellow); overflow-wrap: anywhere; }
.when { margin: 0 0 10px; font-size: 17px; }
.where { display: flex; gap: 8px; margin: 0 0 14px; }
.where a { color: var(--yellow); font-weight: 700; }
.where small { color: var(--mute); }
.desc { margin: 0 0 20px; color: #e8eef2; }
.desc a { color: var(--yellow); }
.acts { display: grid; gap: 10px; }
@media (min-width: 520px) { .acts { grid-template-columns: 1fr 1fr; } .acts .btn-y { grid-column: 1 / -1; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  padding: 11px 20px; border-radius: 99px; background: var(--yellow); color: var(--ink); font-weight: 800; border: 3px solid var(--ink);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 480px) {
  .wrap { border-inline: 0; }
  .ev { grid-template-columns: 54px 1fr auto; gap: 10px; }
  .ev-thumb { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- stage timetable ---------- */
.day-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.day-tt { padding: 4px 14px; border: 2px solid var(--yellow); border-radius: 99px; background: transparent; color: var(--yellow); font: 800 12px var(--font); text-transform: none; letter-spacing: 0; }
.day-tt:hover { background: var(--yellow); color: var(--ink); }
.viewtoggle { display: flex; gap: 8px; margin: 6px 0 14px; }
.viewtoggle button { flex: 1; padding: 9px 12px; border: 3px solid var(--ink); border-radius: 99px; background: var(--blue); color: var(--ink); font-weight: 800; }
.viewtoggle button[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.tt { margin: 0 -14px 16px; }
.tt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 14px 10px; }
.tt-grid { display: grid; grid-template-columns: 46px repeat(var(--cols), minmax(158px, 1fr)); gap: 6px; min-width: min-content; }
.tt-head { display: flex; align-items: center; justify-content: center; height: 40px; margin-bottom: 6px; padding: 0 8px; border-radius: 12px; background: var(--ink); color: var(--yellow); font: 800 14px var(--font); text-align: center; }
.tt-times { position: sticky; left: 0; z-index: 2; background: var(--blue); }
.tt-times .tt-head { background: transparent; }
.tt-body { position: relative; border-radius: 12px; background: var(--ink) linear-gradient(to bottom, rgba(255, 255, 255, 0.16) 1px, transparent 1px) 0 0 / 100% var(--hour); }
.tt-times .tt-body { background: transparent; }
.tt-times i { position: absolute; right: 4px; padding-top: 2px; font: 700 12px/1 var(--font); font-style: normal; color: var(--ink); }
.tt-block {
  position: absolute; left: calc(var(--lane, 0) * 100% / var(--lanes, 1) + 4px); width: calc(100% / var(--lanes, 1) - 8px); display: flex; flex-direction: column; gap: 2px; overflow: hidden;
  padding: 6px 8px; border: 2px solid var(--ink); border-radius: 10px; background: var(--orange); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; text-decoration: none;
}
.tt-block b { font: 800 13px/1.15 var(--font); overflow-wrap: anywhere; }
.tt-block span { font: 600 11px/1.1 var(--font); }
.tt-block.short { flex-direction: row; align-items: center; gap: 6px; padding: 2px 8px; }
.tt-block.short span { display: none; }
.tt-block.tbc { border-style: dashed; background: var(--yellow); }
.tt-block:hover, .tt-block:focus-visible { background: var(--yellow); outline-offset: 0; }
.tt-later { margin: 10px 14px 0; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #fff; }
.tt-later ul { margin: 6px 0 0; padding-left: 18px; }
.tt-later button { all: unset; cursor: pointer; color: var(--yellow); text-decoration: underline; }
.tt-later small { color: var(--mute); }
.tt-hint { margin: 0 0 8px; font-size: 13px; font-weight: 700; }

.when .late { color: var(--yellow); font-weight: 700; }

.tt-actions { margin: 0 0 14px; }

.card-tt { position: relative; z-index: 2; margin-top: 10px; padding: 7px 16px; border: 2px solid var(--yellow); border-radius: 99px; background: var(--yellow); color: var(--ink); font: 800 13px var(--font); }
.card-tt:hover { background: transparent; color: var(--yellow); }
.acts .tt-open { grid-column: 1 / -1; }

/* event info above a timetable */
.hostinfo { margin: 0 0 16px; padding: 20px 18px 18px; background: var(--ink); color: #fff; border-radius: 22px; }
.hostinfo .tags { margin: 0 0 10px; }
.hostinfo h2 { margin: 0 0 10px; font: 400 clamp(26px, 6vw, 34px)/1.08 var(--display); color: var(--yellow); overflow-wrap: anywhere; }
.hostinfo .when { margin: 0 0 8px; }
.hostinfo .where { display: flex; gap: 8px; margin: 0 0 12px; }
.hostinfo .where a { color: var(--yellow); font-weight: 700; }
.hostinfo .where small { color: var(--mute); }
.hostinfo .desc { margin: 0 0 16px; color: #e8eef2; }
.hostinfo .desc a { color: var(--yellow); }
.hostinfo .acts { display: grid; gap: 10px; }
@media (min-width: 520px) { .hostinfo .acts { grid-template-columns: 1fr 1fr; } .hostinfo .acts .btn-y { grid-column: 1 / -1; } }
