/* City Centre Da'wah zakah application: brand red #982b2e on the letterhead cream */
:root {
  --bg: #f7f5f1;
  --ink: #1d1b19;
  --muted: #5f5a52;
  --line: #d8d4cb;
  --brand: #982b2e;
  --brand-dark: #7b2124;
  --tint: rgba(152, 43, 46, 0.06);
  --tint-strong: rgba(152, 43, 46, 0.14);
  --error: #a1181d;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font: 17px/1.5 var(--font);
}
a { color: var(--brand-dark); }

.progress { position: fixed; inset: 0 0 auto; height: 6px; background: var(--line); z-index: 10; }
.progress span { display: block; width: 0; height: 100%; background: var(--brand); transition: width 0.4s ease; }
.top { padding: 18px 20px 0; }
.top a { display: inline-block; }
.top img { display: block; height: 44px; width: auto; }
@media (min-width: 768px) { .top img { height: 52px; } }

/* the CCD monogram's curves across the whole page, as in the ccdawah.org footer: decoration only */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("monogram.svg") no-repeat 50% 50% / cover; opacity: 0.05;
}

main {
  flex: 1; width: 100%; max-width: 42rem; margin: 0 auto; padding: 8vh 20px 40px;
  display: flex; flex-direction: column; justify-content: center;
}
.step { animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.part { margin: 0 0 10px; color: var(--brand); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.part-note { margin: -4px 0 14px; color: var(--muted); font-size: 1rem; font-style: italic; }
h1 { margin: 0 0 12px; font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.1rem); line-height: 1.25; font-weight: 500; outline: none; text-wrap: balance; }
h2 { margin: 24px 0 8px; font-size: 1.1rem; }
.help { margin: 0 0 22px; color: var(--muted); font-size: 1.05rem; }
.small, .help.small { margin: 4px 0 6px; color: var(--muted); font-size: 0.92rem; }
.body { margin: 0 0 14px; font-size: 1.1rem; }

input, textarea { font: inherit; color: var(--brand-dark); }
input[type="text"], input[type="tel"], input[type="email"] {
  width: 100%; padding: 8px 0; border: 0; border-bottom: 2px solid var(--line); border-radius: 0;
  background: transparent; font-size: 1.35rem;
}
input:focus { outline: none; border-bottom-color: var(--brand); box-shadow: 0 2px 0 var(--brand); }
textarea {
  width: 100%; min-height: 7.5rem; padding: 10px 12px; border: 2px solid var(--line); border-radius: 6px;
  background: #fff; font-size: 1.15rem; line-height: 1.45; resize: vertical;
}
textarea.big { min-height: 14rem; }
textarea:focus { outline: none; border-color: var(--brand); }
.money { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 1.35rem; }

.fields { display: grid; gap: 22px; }
.field label, .inline legend { display: block; margin-bottom: 2px; font-size: 1rem; font-weight: 600; }
.field input[type], .field .money { font-size: 1.2rem; }
.other-field { margin-top: 22px; }
fieldset { margin: 0; padding: 0; border: 0; }

.options { display: grid; gap: 10px; max-width: 32rem; }
.options.row { grid-auto-flow: column; justify-content: start; }
.option {
  position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 12px 14px;
  border: 1px solid rgba(152, 43, 46, 0.35); border-radius: 8px; background: var(--tint);
  font-size: 1.08rem; line-height: 1.35; cursor: pointer; transition: background 0.15s;
}
.option:hover { background: var(--tint-strong); }
.option.on { border-color: var(--brand); background: var(--tint-strong); box-shadow: inset 0 0 0 1px var(--brand); }
.option.on::after { content: "✓"; margin-left: auto; padding-left: 8px; color: var(--brand); font-weight: 700; }
.option input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.option:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.option kbd {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px;
  border: 1px solid rgba(152, 43, 46, 0.5); border-radius: 4px; background: #fff;
  color: var(--brand); font: 700 13px var(--font);
}
.option.on kbd { background: var(--brand); color: #fff; }
.options.row .option { padding: 10px 14px; }

.date { display: flex; gap: 14px; }
.datebox span { display: block; font-size: 0.95rem; font-weight: 600; }
.part-d, .part-m { width: 4.5rem; }
.part-y { width: 6.5rem; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.ok {
  min-height: 48px; padding: 10px 20px; border: 0; border-radius: 6px; background: var(--brand); color: #fff;
  font: 600 1.1rem var(--font); cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.ok:hover { background: var(--brand-dark); }
.back {
  order: -1; min-height: 48px; padding: 10px 6px; border: 0; background: none; color: var(--muted);
  font: 600 1rem var(--font); cursor: pointer;
}
.ok:focus-visible, .back:focus-visible, .remove:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 3px;
}
.hint { color: var(--muted); font-size: 0.9rem; }
.later { margin: 14px 0 0; color: var(--muted); font-size: 0.95rem; }
.link {
  min-height: 44px; padding: 0; border: 0; background: none; color: var(--brand-dark);
  font: 600 0.95rem var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link.danger { color: var(--error); }
.link:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.hint kbd { font: 600 0.85rem var(--font); }
@media (pointer: coarse) { .hint { display: none; } }
.error { margin: 14px 0 0; color: var(--error); font-weight: 600; }
.error:empty { display: none; }
.total { margin: 22px 0 0; padding-top: 14px; border-top: 2px solid var(--line); font-size: 1.05rem; font-weight: 700; }

.ready { margin: 18px 0; padding: 4px 16px 6px; border-left: 3px solid var(--brand); border-radius: 0 6px 6px 0; background: #fff; }
.ready h2 { margin-top: 10px; font-size: 1rem; }
details { margin-top: 26px; }
summary { display: flex; align-items: center; min-height: 44px; color: var(--brand-dark); font-weight: 600; cursor: pointer; }
details p { color: var(--muted); }
.other { margin-top: 18px; }
blockquote { margin: 0 0 22px; padding: 12px 16px; border-left: 3px solid var(--brand); border-radius: 0 6px 6px 0; background: #fff; font-size: 1.05rem; }
blockquote p { margin: 0; }

.upload .pick {
  display: flex; align-items: center; justify-content: center; min-height: 96px; padding: 16px;
  border: 2px dashed rgba(152, 43, 46, 0.45); border-radius: 10px; background: var(--tint);
  color: var(--brand-dark); font-size: 1.1rem; font-weight: 600; text-align: center; cursor: pointer;
}
.upload .pick:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.files { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.files li { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.files .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .size { color: var(--muted); font-size: 0.9rem; }
.remove { min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--error); font: 600 0.95rem var(--font); cursor: pointer; }

.turnstile { min-height: 70px; margin-top: 18px; }
.spinner { width: 36px; height: 36px; margin-top: 20px; border: 4px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
ol.steps { padding-left: 1.3em; }
ol.steps li { margin-bottom: 8px; }
.dua { margin-top: 24px; color: var(--muted); font-style: italic; }

.foot { padding: 16px 20px 24px; color: var(--muted); font-size: 12px; letter-spacing: 0.03em; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 480px) {
  /* keeps "Start my application" on the first screen of a 375x812 phone, under the bigger logo */
  main { justify-content: flex-start; padding-top: 3vh; }
  .body { margin-bottom: 10px; }
  .ready { margin: 14px 0; }
  .option { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .step { animation: none; }
  .progress span { transition: none; }
  .spinner { animation-duration: 3s; }
}
