@font-face { font-family: Rubik; src: url("fonts/Rubik.6d3102fa3319.ttf"); font-weight: 400; font-display: swap; }
@font-face { font-family: Rubik; src: url("fonts/Rubik-Medium.e785acbf5775.ttf"); font-weight: 500; font-display: swap; }
@font-face { font-family: Rubik; src: url("fonts/Rubik-Bold.627d0e537f4a.ttf"); font-weight: 700; font-display: swap; }

:root {
  --purple: #531688;
  --navy: #150F66;
  --teal: #40B8C1;
  --success: #ADD672;
  --danger: #E57967;
  --bg: #F7F5FB;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body {
  font-family: Rubik, "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--navy);
  line-height: 1.7;
}
img { max-width: 100%; }
a { color: var(--purple); }

.container { max-width: 640px; margin: 0 auto; padding: 0 1rem; }

/* hero */
.hero {
  background: linear-gradient(160deg, var(--purple), var(--navy));
  color: #fff;
  text-align: center;
  padding: 3rem 1rem 4.5rem;
}
.hero img.logo { width: 170px; filter: brightness(0) invert(1); }
/* artwork hero: image carries the name, dates and «التسجيل مجاناً».
   Sides on wide screens are filled with a blurred copy of the same file
   (letterbox blur) so nothing is cropped and no dead space is left. */
.hero-art { padding: 0; background: #12073A; position: relative; overflow: hidden; }
.hero-art::before {
  content: ""; position: absolute; inset: 0;
  background: url("img/hero.53aabf2d4139.webp") center / cover no-repeat;
  filter: blur(48px) brightness(.5) saturate(1.2); transform: scale(1.15);
}
.hero-art > * { position: relative; }
/* natural aspect ratio, no max-height and no object-fit → the box is exactly
   the poster, so there is never a letterbox strip above or below it */
.hero-img { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.hero h1 { font-size: 2rem; margin: 1rem 0 .3rem; }
.hero .meta { color: var(--teal); font-weight: 500; font-size: 1.15rem; }
.hero .free { display: inline-block; background: var(--teal); color: var(--navy); border-radius: 999px; padding: .2rem 1.2rem; font-weight: 700; margin-top: 1rem; }

section { padding: 2.5rem 0; }
h2 { text-align: center; margin-bottom: 1.5rem; color: var(--purple); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.card {
  background: #fff; border-radius: 16px; padding: 1.2rem 1rem; text-align: center;
  box-shadow: 0 2px 10px rgb(21 15 102 / 8%);
}
.card .icon { width: 30px; height: 30px; color: var(--teal); }
.card h3 { font-size: 1rem; margin-top: .5rem; }
.card .sub { font-size: .82rem; line-height: 1.55; opacity: .72; margin-top: .3rem; }

/* sprite icons: stroke-only, inherit text colour */
.icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

details {
  background: #fff; border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: .6rem;
  box-shadow: 0 1px 6px rgb(21 15 102 / 6%);
}
details summary { font-weight: 500; cursor: pointer; }
details p { padding-top: .6rem; color: #444; }

.sticky-cta {
  position: fixed; bottom: 0; inset-inline: 0; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 40%);
  text-align: center; z-index: 10;
}
.btn {
  display: inline-block; background: var(--purple); color: #fff; border: 0;
  border-radius: 999px; padding: .9rem 2.8rem; font: 700 1.15rem Rubik;
  cursor: pointer; text-decoration: none; width: 100%; max-width: 420px;
}
.btn:active { transform: scale(.98); }
.btn.secondary { background: #fff; color: var(--purple); border: 2px solid var(--purple); }
.btn.teal { background: var(--teal); color: var(--navy); }

/* multi-step form */
fieldset.step { border: 0; padding: 0; }
body.js .step { display: none; }
body.js .step.active { display: block; animation: slide .25s ease; }
@keyframes slide { from { opacity: 0; transform: translateX(-12px); } }
.steps-bar { margin-bottom: 1.6rem; }
.steps-track { background: #E4E0F0; border-radius: 99px; height: 8px; overflow: hidden; }
.steps-fill { background: var(--teal); height: 100%; border-radius: 99px; transition: width .25s; }
.steps-labels { display: flex; justify-content: space-between; margin-top: .4rem; font-size: .85rem; color: #999; }
.steps-labels .done { color: var(--purple); font-weight: 700; }
.step-nav { display: flex; gap: .7rem; }
.step-nav .btn { width: auto; flex: 1; }
.step-nav #back { flex: 0 0 30%; }

/* form */
form .field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 500; margin-bottom: .35rem; }
/* every text-ish input, including rows added by JS with no type attribute */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select {
  width: 100%; padding: .85rem 1rem; border: 1.5px solid #D8D3E8; border-radius: 12px;
  font: 400 1rem Rubik; background: #fff; color: var(--navy);
}
input:focus, select:focus { outline: 2px solid var(--teal); border-color: var(--teal); }

label .opt { font-weight: 400; font-size: .8rem; color: #8b86a3; }
.req { color: var(--danger); font-weight: 700; }
.req-legend { margin-bottom: 1rem; }
.hint { font-size: .82rem; color: #8b86a3; margin-bottom: .5rem; }
.companion-row { display: flex; gap: .5rem; margin-bottom: .6rem; align-items: stretch; }
.companion-row input { flex: 1 1 50%; min-width: 0; padding: .7rem .9rem; }
.companion-row .row-del {
  flex: 0 0 44px; border: 1.5px solid #F0DAD6; border-radius: 12px; background: #FFF5F3;
  color: var(--danger); font-size: 1.25rem; line-height: 1; cursor: pointer; transition: .15s;
}
.companion-row .row-del:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
#companions:empty + #add-companion { margin-top: .2rem; }
.btn.small { width: auto; padding: .5rem 1rem; font-size: .9rem; }
.radio-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.radio-row label {
  flex: 1; border: 1.5px solid #D8D3E8; border-radius: 12px; background: #fff;
  padding: .8rem; text-align: center; cursor: pointer; font-weight: 500; min-width: 100px;
}
.radio-row input { display: none; }
.radio-row label:has(input:checked) { border-color: var(--purple); background: var(--purple); color: #fff; }
.radio-row label.disabled { opacity: .45; pointer-events: none; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { width: 1.3rem; height: 1.3rem; accent-color: var(--purple); margin-top: .2rem; }
.errors { background: #FDECEA; color: #B3261E; border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; }
.notice { background: #FFF6E5; border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; }
.near-full { color: var(--danger); font-size: .85rem; font-weight: 500; }

/* done card */
.ticket {
  background: #fff; border-radius: 24px; padding: 2rem 1.5rem; text-align: center;
  box-shadow: 0 6px 30px rgb(21 15 102 / 15%); margin-top: -3rem;
}
.ticket .code { font-size: 2rem; font-weight: 700; color: var(--purple); letter-spacing: .15em; direction: ltr; }
.ticket img.qr { width: min(260px, 70vw); margin: 1rem auto; }
.actions { display: grid; gap: .7rem; margin: 1.5rem 0 3rem; }

.logos { display: flex; justify-content: center; gap: 2rem; opacity: .5; flex-wrap: wrap; }
.logos span { background: #fff; border-radius: 10px; padding: .8rem 1.6rem; }
