/* MIND — Event registration */
:root {
  --wine: #5e0d13;
  --red: #c8202b;
  --red-dark: #a81a24;
  --ink: #16161d;
  --muted: #6a6a75;
  --line: #e3e3e8;
  --line-strong: #cfcfd6;
  --mist: #f6f6f8;
  --good: #0e6b3b;
  --bad: #d92d20;
  --font: 'Readex Pro', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55;
  color: var(--ink); background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 12px; }
button { font: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }

.shell { display: grid; grid-template-columns: minmax(400px, 41%) minmax(0, 1fr); min-height: 100vh; }

/* ===================== Panel ===================== */
.panel { background: var(--wine); color: #fff; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.panel-in { min-height: 100%; display: flex; flex-direction: column; padding: 44px clamp(32px, 4.5vw, 64px) 36px; }
.panel-logo img { height: 34px; width: auto; display: block; filter: brightness(0) invert(1); }

.event { margin-top: clamp(40px, 9vh, 96px); }
.date-mark { display: flex; align-items: flex-end; gap: 18px; margin: 0 0 28px; }
.date-mark .day { font-size: clamp(112px, 11vw, 176px); font-weight: 300; line-height: .78; letter-spacing: -.05em; }
.date-mark .rest { display: flex; flex-direction: column; padding-bottom: 4px; }
.date-mark .rest span:first-child { font-size: 20px; font-weight: 500; }
.date-mark .rest span:last-child { font-size: 15px; color: rgba(255, 255, 255, .66); }

.event h1 { font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; line-height: 1.55; max-width: 26em; }
.facts-list { margin: 28px 0 0; display: grid; gap: 14px; }
.facts-list div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.facts-list dt { font-size: 14px; color: rgba(255, 255, 255, .6); }
.facts-list dd { margin: 0; font-size: 15px; }

.about { margin-top: 24px; }
.about summary { cursor: pointer; font-size: 14px; font-weight: 500; width: fit-content; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 4px; }
.about summary::-webkit-details-marker { display: none; }
.about-body { margin-top: 14px; font-size: 14px; color: rgba(255, 255, 255, .82); max-height: 38vh; overflow-y: auto; padding-right: 6px; }

.summary { margin-top: auto; padding-top: 40px; }
.sum { margin: 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .16); }
.sum div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 14px; color: rgba(255, 255, 255, .72); }
.sum dd { margin: 0; color: #fff; font-variant-numeric: tabular-nums; }
.sum .discount, .sum .discount dd { color: #ffd0d3; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 4px; }
.sum-total span { font-size: 15px; color: rgba(255, 255, 255, .72); }
.sum-total strong { font-size: clamp(28px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sum-hint { font-size: 13px; color: #ffd0d3; margin: 0; }
.sum-hint:empty { display: none; }
.panel-foot { margin: 28px 0 0; font-size: 13px; color: rgba(255, 255, 255, .6); }
.panel a:focus-visible, .panel summary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 2px; }

/* ===================== Main ===================== */
.main { padding: 48px clamp(24px, 6vw, 96px) 72px; }
.main-in { max-width: 600px; }

.stepper { list-style: none; display: flex; gap: 8px; margin: 0 0 48px; padding: 0; }
.stepper li { flex: 1; min-width: 0; }
.stepper button {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px 0 0;
  background: none; border: 0; border-top: 3px solid var(--line); color: var(--muted);
  font-size: 13px; text-align: left; cursor: default;
}
.stepper .n { font-variant-numeric: tabular-nums; }
.stepper .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper .is-done button { border-top-color: var(--ink); color: var(--ink); cursor: pointer; }
.stepper .is-done button:hover .l { text-decoration: underline; }
.stepper .is-current button { border-top-color: var(--red); color: var(--ink); font-weight: 500; }
.stepper button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.step + .step { margin-top: 64px; }
.wizard .step { display: none; margin: 0; }
.wizard .step.is-active { display: block; animation: step-in .28s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step-head { margin-bottom: 32px; }
.step-head h2 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; margin-bottom: 10px; }
.step-head h2:focus { outline: none; }
.step-head p { color: var(--muted); max-width: 34em; margin: 0; }

.alert { background: #fef3f2; color: #a01f16; border-radius: 12px; padding: 14px 18px; margin: -24px 0 32px; font-size: 15px; }
.alert:focus { outline: 2px solid var(--bad); outline-offset: 2px; }

/* ===================== Fields ===================== */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin: 0 0 22px; min-width: 0; border: 0; padding: 0; }
label, legend { display: block; font-size: 14px; font-weight: 500; margin: 0 0 8px; padding: 0; }
.opt { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.hint { font-size: 14px; color: var(--muted); margin: -4px 0 12px; }

input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
  display: block; width: 100%; height: 50px; padding: 0 16px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 112px; padding: 13px 16px; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2316161d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center;
}
input::placeholder, textarea::placeholder { color: #a3a3ad; }
input:hover, select:hover, textarea:hover { border-color: #a9a9b3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(22, 22, 29, .08); }
input:disabled, select:disabled, textarea:disabled { background: var(--mist); }
.has-error > input, .has-error > select, .has-error > textarea { border-color: var(--bad); }
.has-error > input:focus, .has-error > select:focus, .has-error > textarea:focus { box-shadow: 0 0 0 4px rgba(217, 45, 32, .12); }
.field-error { color: var(--bad); font-size: 13px; margin: 8px 0 0; }

/* Option cards */
.cards { display: grid; gap: 10px; }
.cards.two { grid-template-columns: 1fr 1fr; }
.cards.four { grid-template-columns: 1fr 1fr; }
.card-opt { position: relative; margin: 0; font-weight: 400; cursor: pointer; }
.card-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.card-body {
  display: block; height: 100%; padding: 16px 18px 16px 50px; pointer-events: none;
  border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; position: relative;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.card-body::before {
  content: ''; position: absolute; left: 18px; top: 18px; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid #a9a9b3; background: #fff; transition: border-color .15s, border-width .15s;
}
.card-opt.compact .card-body { padding-top: 14px; padding-bottom: 14px; }
.card-opt.compact .card-body::before { top: 50%; margin-top: -9px; }
.card-body strong { display: block; font-size: 15px; font-weight: 500; }
.card-body small { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.card-opt:hover .card-body { border-color: #a9a9b3; }
.card-opt input:checked + .card-body { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.card-opt input:checked + .card-body::before { border: 5.5px solid var(--red); }
.card-opt input:focus-visible + .card-body { box-shadow: 0 0 0 4px rgba(22, 22, 29, .14); }
.has-error .card-body { border-color: var(--bad); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; font-weight: 400; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; background: #fff;
  pointer-events: none; transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover span { border-color: #a9a9b3; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:checked + span::before {
  content: ''; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px);
}
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(22, 22, 29, .14); }

.note { font-size: 14px; background: var(--mist); border-radius: 10px; padding: 12px 16px; margin: -6px 0 22px; }
.note.good { background: #ecf8f1; color: var(--good); }

/* Other participants */
.block { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.block h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 4px; }
.block-hint { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.participant { border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 0; margin-bottom: 12px; }
.participant h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.participant .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.participant .span2 { grid-column: 1 / -1; }
.participant .field { margin-bottom: 18px; }
.participant .req { display: none; }

/* Confirm */
.recap { display: flex; align-items: baseline; justify-content: space-between; background: var(--mist); border-radius: 14px; padding: 20px 22px; margin: 8px 0 24px; }
.recap p { display: contents; }
.recap span { color: var(--muted); }
.recap strong { font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 15px; margin-bottom: 16px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ink); cursor: pointer; }
.legal { font-size: 13px; color: var(--muted); }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.actions #next-btn, .actions #submit-btn { margin-left: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 30px;
  border: 0; border-radius: 12px; background: var(--ink); color: #fff; font-size: 16px; font-weight: 500;
  cursor: pointer; transition: background-color .15s, transform .1s;
}
.btn:hover { background: #2d2d36; }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
#submit-btn { background: var(--red); }
#submit-btn:hover { background: var(--red-dark); }
#submit-btn:disabled { opacity: .6; cursor: progress; }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-quiet:hover { background: var(--mist); }

/* ===================== States ===================== */
.state { padding-top: clamp(24px, 10vh, 120px); }
.state h2 { font-size: clamp(30px, 3vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 16px; }
.state .lead { font-size: 19px; }
.state p { color: #3d3d47; max-width: 32em; }
.done-mark { width: 56px; height: 56px; margin-bottom: 28px; fill: none; stroke: var(--good); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.done-mark circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .6s ease-out forwards; }
.done-mark path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .35s .5s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.receipt { margin: 32px 0; border: 1px solid var(--line); border-radius: 14px; padding: 6px 22px; max-width: 420px; }
.receipt div { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.receipt div:first-child { border-top: 0; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-variant-numeric: tabular-nums; }
.receipt .total dd { font-weight: 600; font-size: 18px; }

/* ===================== Responsive ===================== */
@media (min-width: 1001px) and (max-height: 940px) {
  .event { margin-top: 40px; }
  .date-mark { margin-bottom: 20px; }
  .date-mark .day { font-size: 112px; }
  .facts-list { margin-top: 20px; gap: 10px; }
  .summary { padding-top: 28px; }
  .panel-foot { margin-top: 18px; }
}
@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .panel { position: static; height: auto; overflow: visible; }
  .panel-in { padding: 24px 22px 28px; }
  .panel-logo img { height: 28px; }
  .event { margin-top: 36px; }
  .date-mark .day { font-size: 88px; }
  .date-mark .rest span:first-child { font-size: 17px; }
  .event h1 { font-size: 21px; }
  .facts-list { margin-top: 20px; }
  .summary { padding-top: 24px; }
  .sum div:not(.discount) { display: none; }
  .sum { padding-top: 14px; }
  .panel-foot { display: none; }
  .main { padding: 32px 22px 56px; }
  .main-in { max-width: 640px; margin: 0 auto; }
}
@media (max-width: 1000px) {
  /* شريط الفعالية المختصر بعد الخطوة الأولى */
  .compact .panel { position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
  .compact .panel-in { flex-direction: row; align-items: center; gap: 16px; padding: 12px 22px; min-height: 0; }
  .compact .panel-logo, .compact .date-mark, .compact .facts-list, .compact .about, .compact .sum, .compact .sum-hint, .compact .sum-total span { display: none; }
  .compact .event { margin: 0; flex: 1; min-width: 0; }
  .compact .event h1 { font-size: 15px; font-weight: 500; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .compact .summary { margin: 0; padding: 0; flex: none; }
  .compact .sum-total { margin: 0; }
  .compact .sum-total strong { font-size: 18px; }
  .compact .main { padding-top: 24px; }
}
@media (max-width: 560px) {
  .row, .cards.two, .participant .grid { grid-template-columns: 1fr; }
  .stepper { margin-bottom: 36px; gap: 6px; }
  .stepper li:not(.is-current) .l { display: none; }
  .stepper .is-current { flex: 2.5; }
  .actions { position: sticky; bottom: 0; z-index: 20; background: #fff; box-shadow: 0 -1px 0 var(--line); margin-left: -22px; margin-right: -22px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); }
  .actions .btn { flex: 1; }
  .actions .btn-quiet { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .done-mark circle, .done-mark path { stroke-dashoffset: 0; }
}