/* Holy Book Quiz - site styles. Palette and type mirror the game (scripts/ui/style.gd). */

@font-face {
  font-family: "Cinzel";
  src: url("fonts/cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --sky-top: #161a35;
  --sky-bottom: #3b3561;
  --bible-top: #0d1830;
  --bible-bottom: #2b3b66;
  --quran-top: #05221d;
  --quran-bottom: #17483e;
  --parchment: #f4e8c8;
  --parchment-dark: #e3d09f;
  --cream: #fbf3dc;
  --ink: #3a2816;
  --ink-soft: #6b5236;
  --gold: #d9a648;
  --gold-light: #f3cf7a;
  --gold-dark: #94681f;
  --text: #f1e9d4;
  --text-soft: rgba(251, 243, 220, 0.72);
  --line: rgba(217, 166, 72, 0.45);
  --radius: 22px;
  --wrap: 1120px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  color: var(--text);
  background: var(--sky-top);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Night sky: gradient plus two layers of tiny stars. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(251,243,220,.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 72% 12%, rgba(251,243,220,.7), transparent 60%),
    radial-gradient(1px 1px at 38% 42%, rgba(251,243,220,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 86% 36%, rgba(251,243,220,.7), transparent 60%),
    radial-gradient(1px 1px at 22% 66%, rgba(251,243,220,.5), transparent 60%),
    radial-gradient(1px 1px at 58% 78%, rgba(251,243,220,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 92% 84%, rgba(251,243,220,.6), transparent 60%),
    radial-gradient(1px 1px at 6% 90%, rgba(251,243,220,.5), transparent 60%),
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(243,207,122,.22), transparent 70%),
    linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
}

a { color: var(--gold-light); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
img { max-width: 100%; display: block; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

h1, h2, h3, .brand, .eyebrow, .btn, .stat b {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  letter-spacing: .02em;
}
h1, h2, h3 { color: var(--gold-light); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); text-shadow: 0 4px 18px rgba(0,0,0,.35); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.9vw, 1.3rem); color: var(--text-soft); max-width: 36em; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(22, 26, 53, .72);
  border-bottom: 1px solid rgba(217,166,72,.18);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--gold-light); text-decoration: none; font-size: 1.05rem; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 1.4rem; font-size: 1.05rem; }
.nav a { color: var(--text-soft); text-decoration: none; }
.nav a:hover { color: var(--gold-light); }
.nav a[aria-current="page"] { color: var(--gold-light); box-shadow: inset 0 -2px 0 var(--gold); }
.page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 0; min-height: 0; padding: .55rem 0 0; }
  .nav { width: 100%; gap: 1.2rem; overflow-x: auto; white-space: nowrap; padding: .35rem 0 .55rem; scrollbar-width: none; font-size: 1rem; }
  .nav::-webkit-scrollbar { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 52px;
  padding: .7rem 1.5rem;
  border-radius: 16px;
  font-size: .95rem;
  text-decoration: none;
  border: 2px solid var(--gold-dark);
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 6px 0 rgba(0,0,0,.25);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--gold-light); color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.btn-ghost { background: rgba(0,0,0,.18); color: var(--gold-light); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: rgba(217,166,72,.15); color: var(--cream); }

/* Hero */
.hero { padding: clamp(1.8rem, 4.5vw, 3.2rem) 0 1.8rem; overflow-x: clip; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 .8rem; }
.soon { font-size: 1rem; color: var(--text-soft); }
.soon strong { color: var(--gold-light); font-weight: 600; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
}

/* Phone mockups */
.phones { position: relative; height: clamp(440px, 52vw, 600px); }
.phone {
  position: absolute;
  width: clamp(200px, 22vw, 270px);
  aspect-ratio: 9 / 16;
  border-radius: 34px;
  padding: 9px;
  background: linear-gradient(160deg, #2b2742, #0b0c18);
  box-shadow: 0 30px 60px rgba(0,0,0,.5), inset 0 0 0 1.5px rgba(243,207,122,.35);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }
.phone-back { left: 4%; top: 8%; transform: rotate(-7deg); }
.phone-front { right: 4%; top: 0; transform: rotate(5deg); }
@media (max-width: 860px) {
  .phones { height: 470px; max-width: 460px; margin: 0 auto; }
  .phone { width: 210px; }
}
@media (max-width: 420px) {
  .phones { height: 400px; }
  .phone { width: 172px; }
  .phone-back { left: 0; }
  .phone-front { right: 0; }
}

/* Play in the browser */
.play { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.phone-stage { display: flex; justify-content: center; }
.phone.phone-live { position: relative; width: min(330px, 100%); }
.play-poster {
  position: relative; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer;
  border-radius: 26px; overflow: hidden; background: none; display: block; font: inherit; color: inherit;
}
.play-poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55); transition: filter .2s ease; }
.play-poster:hover img, .play-poster:focus-visible img { filter: brightness(.7); }
.play-poster .btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap; }
.play-note { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; color: var(--text-soft); font-size: 1rem; }
@media (max-width: 860px) {
  .play { grid-template-columns: 1fr; text-align: center; }
  .play .lede { margin-inline: auto; }
  .play .hero-actions { justify-content: center; }
  .phone.phone-live { width: min(300px, 80%); }
}

/* Stats strip */
.stats { padding: .5rem 0 1rem; }
.stats ul {
  list-style: none; margin: 0; padding: .8rem 1rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(0,0,0,.22);
}
.stat { text-align: center; }
.stat b { display: block; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--gold-light); }
.stat span { color: var(--text-soft); font-size: 1rem; }
@media (max-width: 640px) { .stats ul { grid-template-columns: repeat(2, 1fr); } }

section { padding: clamp(1.8rem, 4vw, 2.8rem) 0; }
.section-head { max-width: 40em; margin-bottom: 1.3rem; }

/* Two journeys */
.journeys { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.journey {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  padding: 1.4rem 1.5rem 0;
  display: grid;
  grid-template-rows: auto 1fr;
}
.journey.bible { background: linear-gradient(180deg, var(--bible-top), var(--bible-bottom)); }
.journey.quran { background: linear-gradient(180deg, var(--quran-top), var(--quran-bottom)); }
.journey .glyph { width: 40px; height: 40px; margin-bottom: .5rem; }
.journey p { color: var(--text-soft); }
.journey ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--text-soft); }
.journey ul li { margin-bottom: .3rem; }
.journey .shot {
  align-self: end;
  width: min(260px, 70%);
  margin: 0 auto;
  border-radius: 24px 24px 0 0;
  border: 1.5px solid rgba(243,207,122,.35);
  border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.35);
  max-height: 260px;
  object-fit: cover;
  object-position: top;
}
@media (max-width: 800px) { .journeys { grid-template-columns: 1fr; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  background: var(--parchment);
  color: var(--ink);
  border: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-bottom: .5rem;
  border-radius: 50%;
  background: var(--gold); color: var(--ink);
  border: 3px solid var(--cream);
  font-family: "Cinzel", serif; font-weight: 700;
}
.steps h3 { color: var(--gold-dark); }
.steps p { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* Question types */
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.type {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: .85rem 1rem;
  background: rgba(0,0,0,.2);
}
.type h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.type p { margin: 0; color: var(--text-soft); font-size: 1.08rem; }
.type .tag { font-family: "Cinzel", serif; font-size: .68rem; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }
@media (max-width: 900px) { .types { grid-template-columns: 1fr 1fr; } }

/* Respect / sources */
.respect { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.sources li { padding: .75rem 1rem; border-radius: 16px; background: var(--parchment); color: var(--ink); border-left: 6px solid var(--gold); }
.sources b { font-family: "Cinzel", serif; color: var(--gold-dark); font-size: .95rem; display: block; margin-bottom: .2rem; }
.sources span { color: var(--ink-soft); font-size: 1.05rem; }
.sources a { color: var(--gold-dark); }
@media (max-width: 800px) { .respect { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { max-width: 52em; }
.faq details { border-bottom: 1px solid rgba(217,166,72,.25); padding: .75rem 0; }
.faq summary { cursor: pointer; font-family: "Cinzel", serif; font-weight: 700; color: var(--gold-light); font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: .8rem 0 0; color: var(--text-soft); }

/* Call to action */
.cta {
  text-align: center;
  border: 2px solid var(--gold);
  border-radius: 28px;
  background: radial-gradient(ellipse at top, rgba(243,207,122,.18), transparent 70%), rgba(0,0,0,.25);
  padding: clamp(1.6rem, 4vw, 2.4rem) var(--gutter);
}
.cta .lede { margin-inline: auto; }

/* Footer */
.site-footer { padding: 1.6rem 0 2rem; border-top: 1px solid rgba(217,166,72,.18); color: var(--text-soft); font-size: 1rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* Legal pages */
.legal { padding: 3rem 0 4rem; }
.legal article {
  max-width: 46em;
  margin: 0 auto;
  background: var(--parchment);
  color: var(--ink);
  border: 3px solid var(--gold);
  border-radius: 26px;
  padding: clamp(1.6rem, 5vw, 3rem);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.legal h1 { color: var(--gold-dark); text-shadow: none; font-size: clamp(2rem, 5vw, 2.8rem); }
.legal h2 { color: var(--gold-dark); font-size: 1.35rem; margin-top: 2rem; }
.legal a { color: var(--gold-dark); }
.legal .updated { color: var(--ink-soft); font-style: italic; }
.legal ul { padding-left: 1.2rem; }

/* Phones: keep the page short. */
@media (max-width: 560px) {
  section { padding: 1.5rem 0; }
  .phone.phone-live { width: min(230px, 64%); }
  .journey { padding: 1.1rem 1.1rem 0; }
  .journey .shot { max-height: 170px; width: 60%; }
  .steps li { padding: .9rem 1rem; }
  .type { padding: .7rem .8rem; }
  .type p { font-size: .98rem; }
  .type h3 { font-size: .92rem; }
  .respect { gap: 1rem; }
}
@media (max-width: 560px) { .play-note { font-size: .85rem; bottom: 12%; padding: 0 .6rem; } }

/* Daily milestones */
.daily { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; color: var(--text-soft); }
.perks li { padding-left: 1.4rem; position: relative; }
.perks li::before { content: ""; position: absolute; left: 0; top: .55em; width: .6rem; height: .6rem; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.perks b { color: var(--gold-light); font-weight: 600; }
.mpanel { background: var(--parchment); color: var(--ink); border: 3px solid var(--gold); border-radius: 20px; padding: .9rem 1.1rem .7rem; box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.mhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.mhead > span:first-child { font: 700 .78rem "Cinzel", serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); }
.mstreak { display: inline-flex; align-items: center; gap: .2rem; font: 700 .82rem "Cinzel", serif; color: #c0561e; background: #fff1dc; border: 1.5px solid #f0b37a; border-radius: 20px; padding: .1rem .6rem .1rem .35rem; }
.mpanel ul { list-style: none; margin: 0; padding: 0; }
.mgoal { display: grid; grid-template-columns: 1.3rem 1fr auto; column-gap: .55rem; row-gap: .2rem; align-items: center; padding: .45rem 0; }
.mbox { width: 1.15rem; height: 1.15rem; border: 2px solid var(--gold); border-radius: 5px; display: grid; place-items: center; }
.mgoal.done .mbox { background: #4f8f3e; border-color: #4f8f3e; }
.mtitle { font-weight: 600; font-size: 1.02rem; }
.mgoal.done .mtitle { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: rgba(58,40,22,.45); }
.mreward { font: 700 .8rem "Cinzel", serif; color: var(--gold-dark); }
.mgoal.done .mreward { color: #4f8f3e; }
.mbar { grid-column: 2; height: .45rem; border-radius: 6px; background: rgba(58,40,22,.12); overflow: hidden; }
.mbar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.mgoal.done .mbar span { background: #4f8f3e; }
.mcount { font-size: .85rem; color: var(--ink-soft); }
.mfoot { border-top: 1px dashed rgba(148,104,31,.45); margin-top: .3rem; padding-top: .5rem; text-align: center; font-size: .92rem; color: var(--ink-soft); }
.mfoot b { color: var(--gold-dark); }
@media (max-width: 800px) { .daily { grid-template-columns: 1fr; gap: 1.2rem; } }
