/* Zieshaan Amanat Ali memorial: dark, elegant, mobile-first */

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- self-hosted fonts ---- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-500.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-600.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-500-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Amiri";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/amiri-400.woff2") format("woff2");
}

:root {
  --bg: #0c0d10;
  --card: #14151a;
  --input: #101116;
  --line: #23242a;
  --gold: #c9a86a;
  --gold-25: rgba(201, 168, 106, 0.25);
  --gold-15: rgba(201, 168, 106, 0.15);
  --text: #f2eee4;
  --muted: #9a9890;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --arabic: "Amiri", "Geeza Pro", "Noto Naskh Arabic", "Traditional Arabic", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  padding: 0 1.25rem;
  overflow-x: clip;
}

::selection { background: var(--gold-25); }

a { color: var(--gold); }

main, header.hero, footer.foot { max-width: 42.5rem; margin: 0 auto; }
section.recitations { max-width: 50rem; margin: 0 auto; }

section { margin-top: 4.5rem; }

/* ---- ornament divider ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(15rem, 70%);
  margin: 4.5rem auto 0;
  color: var(--gold);
  font-size: 0.65rem;
  line-height: 1;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-25));
}
.divider::after {
  background: linear-gradient(90deg, var(--gold-25), transparent);
}
.divider.in-hero { margin-top: 2.6rem; }

/* ---- hero ---- */
.hero { text-align: center; padding-top: clamp(4rem, 10vw, 6.5rem); }
.hero-small {
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-left: 0.34em; /* optically recentre letterspaced caps */
}
.portrait {
  width: clamp(190px, 55vw, 214px);
  margin: 1.9rem auto 0;
  padding: 6px;
  border: 1px solid rgba(201, 168, 106, 0.4);
  border-radius: 50% 50% 16px 16px / 31.5% 31.5% 16px 16px;
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50% 50% 12px 12px / 31.5% 31.5% 12px 12px;
}
.hero-name {
  font-family: var(--serif);
  font-size: clamp(2.7rem, 10.5vw, 4.3rem);
  font-weight: 500;
  letter-spacing: 0.015em;
  margin: 1.3rem 0 1.6rem;
  line-height: 1.12;
  text-wrap: balance;
}
.arabic {
  font-family: var(--arabic);
  font-size: clamp(1.8rem, 6vw, 2.3rem);
  line-height: 2;
  color: var(--text);
}
.arabic-small { font-family: var(--arabic); font-size: 1.35rem; line-height: 2; }
.translit {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
  max-width: 30rem;
  margin: 0.6rem auto 2.4rem;
  text-wrap: balance;
}
.intro {
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 34rem;
  margin: 0 auto;
  white-space: pre-line;
}

/* ---- section headings ---- */
h2 {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.count { color: var(--muted); font-weight: 500; font-size: 1.15rem; }

/* ---- youtube ---- */
.recitations h2 { text-align: center; margin-bottom: 1.4rem; }
.yt-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--card);
  border: 1px solid var(--gold-25);
  border-radius: 14px;
  overflow: hidden;
}
.yt-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* ---- share form ---- */
.share {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.6rem 1.35rem 1.75rem;
}
.share h2 { margin-bottom: 0.3rem; }
.share-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.4rem; }

label {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.25rem 0 0.45rem;
}
.req { color: var(--gold); }
.opt { color: var(--muted); text-transform: none; letter-spacing: 0.02em; font-size: 0.78rem; }

input[type="text"], textarea {
  width: 100%;
  min-height: 48px;
  background: var(--input);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
}
input[type="text"]::placeholder, textarea::placeholder { color: #5c5b55; }
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-15);
}

/* file input: visually hidden, replaced by an outlined button label */
.file-input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.4rem;
  margin: 0;
  background: transparent;
  border: 1px solid var(--gold-25);
  border-radius: 10px;
  color: var(--gold);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: none;
  cursor: pointer;
}
.file-btn:hover { border-color: var(--gold); background: var(--gold-15); }
.file-input:focus-visible + .file-btn {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-15);
}
.video-chosen { color: var(--muted); font-size: 0.88rem; margin-top: 0.5rem; }

button[type="submit"] {
  margin-top: 1.6rem;
  width: 100%;
  min-height: 50px;
  background: var(--gold);
  color: #14100a;
  border: 0;
  border-radius: 10px;
  padding: 0.85rem;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease;
}
button[type="submit"]:hover { background: #d6b87e; }
button[type="submit"]:disabled { opacity: 0.55; cursor: default; }

/* honeypot, hidden from humans */
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.progress-wrap { margin-top: 1.1rem; }
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.progress-text { color: var(--muted); font-size: 0.85rem; margin-top: 0.45rem; }

.form-error {
  margin-top: 1.1rem;
  color: #e0a4a4;
  font-size: 0.95rem;
  background: rgba(200, 100, 100, 0.07);
  border: 1px solid rgba(200, 100, 100, 0.25);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}
.form-error.form-ok {
  color: #b9ccae;
  background: rgba(150, 190, 130, 0.07);
  border-color: rgba(150, 190, 130, 0.25);
}

/* ---- memory wall ---- */
.wall h2 { text-align: center; margin-bottom: 1.6rem; }
.entry {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem 1.35rem 1.3rem;
  margin-bottom: 1.25rem;
}
.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}
.entry-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--gold);
}
.entry-rel { color: var(--muted); font-size: 0.9rem; }
.entry-time { color: var(--muted); font-size: 0.8rem; margin-left: auto; }
.entry-msg { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.entry video {
  width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  background: #000;
  margin: 0.4rem 0 0.7rem;
  display: block;
}
.processing { color: var(--muted); font-style: italic; font-size: 0.9rem; margin-bottom: 0.5rem; }
.empty { color: var(--muted); font-style: italic; text-align: center; }

/* ---- footer ---- */
.foot {
  text-align: center;
  margin-top: 3rem;
  padding-bottom: 3.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---- desktop ---- */
@media (min-width: 640px) {
  section { margin-top: 6rem; }
  .divider { margin-top: 6rem; }
  .divider.in-hero { margin-top: 3rem; }
  .portrait { width: 230px; }
  .share { padding: 2.2rem 2.4rem 2.4rem; }
  .entry { padding: 1.5rem 1.7rem; }
  .foot { margin-top: 4rem; }
}
.hero-years { margin-top: .45rem; font-size: .95rem; letter-spacing: .2em; color: #9a9890; }
