/* Hidaya — site styles. Palette and type follow the app (design/tokens.json). */
@font-face { font-family: "EB Garamond"; src: url("fonts/ebgaramond.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/ebgaramond-italic.woff2") format("woff2"); font-weight: 400 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Amiri"; src: url("fonts/amiri.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Amiri"; src: url("fonts/amiri-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Nastaliq Urdu"; src: url("fonts/nastaliq.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --mihrab: #143326;      /* page */
  --tile: #1E4634;        /* raised green */
  --tile-line: #2B5B44;   /* geometric pattern lines */
  --parchment: #F3E8D0;
  --parchment-edge: #E6D3AC;
  --gold: #C9A85C;
  --gold-light: #EBD9A8;
  --gold-ink: #7A5B22;    /* gold text on parchment */
  --ink: #2A2118;
  --on-green: #F5EEDC;
  --on-green-muted: #C5D2C2;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "Amiri", "Geeza Pro", serif;
  --urdu: "Noto Nastaliq Urdu", "Amiri", serif;
  --measure: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--mihrab);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23224C3A' stroke-width='1'%3E%3Cpath d='M26 26H54V54H26Z'/%3E%3Cpath d='M40 20.2L59.8 40L40 59.8L20.2 40Z'/%3E%3Cpath d='M40 0V20.2M40 59.8V80M0 40H20.2M59.8 40H80'/%3E%3Cpath d='M0 0L26 26M80 0L54 26M0 80L26 54M80 80L54 54'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--on-green);
  font: 400 1.1875rem/1.6 var(--serif);
  font-feature-settings: "kern", "liga", "onum";
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-light); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; inset-inline-start: -999px; top: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { inset-inline-start: 1rem; top: 1rem; background: var(--parchment); color: var(--ink); padding: .5rem .8rem; z-index: 10; }

/* Header */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 72rem; margin: 0 auto; padding: 1.25rem 1.5rem;
  font: 500 .9375rem/1 var(--sans);
}
.brand { display: flex; align-items: center; gap: .65rem; color: var(--on-green); text-decoration: none; font: 600 1.375rem/1 var(--serif); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-head nav { display: flex; gap: 1.5rem; }
.site-head nav a { color: var(--on-green-muted); text-decoration: none; padding: .35rem 0; border-bottom: 1px solid transparent; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--gold-light); border-bottom-color: var(--gold); }

main { display: block; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }

/* Hero: the Arabic name is the one bold element on the page */
.hero { text-align: center; padding: 3.5rem 1.5rem 2.5rem; }
.hero-logo { margin: 0 auto; width: clamp(13rem, 34vw, 20rem); }
.hero-logo img { width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,.45)) drop-shadow(0 0 40px rgba(201,168,92,.16)); }
.hero .lede { max-width: 30rem; margin: 2rem auto 0; font-size: 1.3125rem; line-height: 1.5; }
.store {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.8rem;
  padding: .8rem 1.4rem; border: 1px solid var(--gold); border-radius: 999px;
  font: 500 1rem/1 var(--sans); color: var(--gold-light); text-decoration: none;
}
a.store:hover { background: var(--gold); color: var(--mihrab); }
.store svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: no-preference) {
  .hero-logo img { animation: rise 1.4s cubic-bezier(.2,.7,.2,1) both; }
  .hero .lede, .hero .store { animation: settle 1s .6s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes settle { from { opacity: 0; } to { opacity: 1; } }
}

/* Screens with a language switch */
.screens { padding: 2rem 0 4rem; }
.lang-switch {
  display: flex; justify-content: center; gap: .25rem; margin: 0 auto 2rem; padding: .3rem;
  width: max-content; background: rgba(0,0,0,.22); border: 1px solid var(--tile-line); border-radius: 999px;
}
.lang-switch button {
  appearance: none; border: 0; background: none; color: var(--on-green-muted); cursor: pointer;
  padding: .55rem 1.15rem; border-radius: 999px; font: 500 .95rem/1.2 var(--sans);
}
.lang-switch button[lang="ar"] { font: 700 1.15rem/1 var(--arabic); }
.lang-switch button[lang="ur"] { font: 400 1rem/1 var(--urdu); }
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: var(--mihrab); }
.strip {
  display: flex; justify-content: center; align-items: flex-end; gap: clamp(.75rem, 2vw, 1.5rem);
  padding: 0 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip figure { margin: 0; flex: 0 0 auto; width: clamp(9.5rem, 17vw, 13.5rem); scroll-snap-align: center; text-align: center; }
.strip figure:nth-child(3) { width: clamp(11rem, 20vw, 16rem); }
.strip img {
  width: 100%; aspect-ratio: 600 / 1304; object-fit: cover;
  border-radius: 1.4rem; border: 3px solid var(--gold); background: var(--tile);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.6);
  transition: opacity .35s ease;
}
.strip.is-swapping img { opacity: 0; }
.strip figcaption { margin-top: .8rem; font: 500 .9rem/1.3 var(--sans); color: var(--on-green-muted); }
@media (prefers-reduced-motion: reduce) { .strip img { transition: none; } }
@media (max-width: 52rem) { .strip { justify-content: flex-start; } }

/* Parchment panel, after the app's ayah card */
.panel {
  position: relative; max-width: 58rem; margin: 0 auto 4rem; padding: clamp(2rem, 5vw, 3.5rem);
  background: radial-gradient(ellipse at 50% 30%, #FBF3E2 0%, var(--parchment) 60%, var(--parchment-edge) 100%);
  color: var(--ink); border-radius: 4px;
  outline: 2px solid var(--gold); outline-offset: 10px;
  box-shadow: 0 0 0 1px var(--gold-ink) inset;
}
.panel::before { /* the dotted diamond border of the app's cards */
  content: ""; position: absolute; inset: -22px; pointer-events: none; border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 22px) top / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 22px) bottom / 100% 2px no-repeat,
    repeating-linear-gradient(0deg, var(--gold) 0 6px, transparent 6px 22px) left / 2px 100% no-repeat,
    repeating-linear-gradient(0deg, var(--gold) 0 6px, transparent 6px 22px) right / 2px 100% no-repeat;
  opacity: .8;
}
.panel h2 { margin: 0 0 .4rem; font: 500 2.4rem/1.15 var(--serif); color: #1E4634; text-align: center; }
.panel .sub { margin: 0 auto 2.4rem; max-width: var(--measure); text-align: center; color: #5B4E3C; font-style: italic; }
.panel h3 { margin: 0 0 .35rem; font: 600 1.3rem/1.25 var(--serif); color: #1E4634; }
.panel p, .panel li { max-width: var(--measure); }
.panel a { color: #1E4634; }
.panel a:hover { color: var(--gold-ink); }
.rule { display: flex; align-items: center; justify-content: center; gap: .7rem; margin: 2.4rem 0; }
.rule::before, .rule::after { content: ""; width: 4.5rem; height: 1px; background: var(--gold); }
.rule span { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; margin: 0; }
.features div { margin: 0; }
.features dt { font: 600 1.3rem/1.25 var(--serif); color: #1E4634; }
.features dd { margin: .3rem 0 0; }
@media (max-width: 44rem) { .features { grid-template-columns: 1fr; } }

.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.6rem 0 0; text-align: center; }
.prices div { padding: 1rem .5rem; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
.prices strong { display: block; font: 500 2rem/1.1 var(--serif); color: #1E4634; font-feature-settings: "lnum"; }
.prices span { font: 500 .9rem/1.3 var(--sans); color: #5B4E3C; }
.free { margin-top: 1.4rem; }
@media (max-width: 30rem) { .prices { grid-template-columns: 1fr; } }

/* Support */
.faq details { border-bottom: 1px solid rgba(122,91,34,.35); }
.faq summary {
  cursor: pointer; list-style: none; padding-block: 1.05rem; padding-inline: 0 2rem; position: relative;
  font: 600 1.25rem/1.35 var(--serif); color: #1E4634;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; inset-inline-end: .35rem; top: 1.45rem; width: 9px; height: 9px;
  border-right: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.7rem; }
.faq details > div { padding: 0 0 1.2rem; }
.faq details > div p { margin: 0 0 .7rem; }
.path { font: 500 .95em/1.4 var(--sans); white-space: nowrap; color: #1E4634; }
.contact { text-align: center; }
.contact p { margin: 0 auto; }
.contact .mail {
  display: inline-block; margin-top: .8rem; padding: .85rem 1.6rem; border-radius: 999px;
  background: #1E4634; color: var(--parchment); text-decoration: none; font: 500 1rem/1 var(--sans);
}
.contact .mail:hover { background: var(--mihrab); color: #fff; }

/* Privacy */
.policy h2 { text-align: start; font-size: 1.6rem; margin-top: 2rem; }
.policy h2:first-of-type { margin-top: 0; }
.policy .updated { font-style: italic; color: #5B4E3C; margin-top: 0; }
.policy ul { padding-inline-start: 1.2rem; }
.policy li { margin-bottom: .6rem; }

/* Footer */
.site-foot {
  max-width: 72rem; margin: 0 auto; padding: 2rem 1.5rem 3rem; display: flex; flex-wrap: wrap; gap: .75rem 2rem;
  justify-content: space-between; color: var(--on-green-muted); font: 400 .9rem/1.5 var(--sans);
  border-top: 1px solid var(--tile-line);
}
.site-foot nav { display: flex; gap: 1.5rem; }
.site-foot a { color: var(--on-green-muted); }
.panel .page-title { margin: 0 0 .2rem; font: 500 2.4rem/1.15 var(--serif); color: #1E4634; }
@media (max-width: 40rem) {
  .panel { outline-offset: 6px; padding: 1.75rem 1.25rem; }
  .panel::before { inset: -14px; }
  .site-head nav { gap: 1rem; }
}

/* Pages, headings */
.page { padding-top: 2.5rem; }
.panel .page-title.center { text-align: center; }
.panel .contact-h { font-size: 1.35rem; margin-bottom: .4rem; }
.policy .note { font-style: italic; color: #5B4E3C; }

/* Language links in the header */
.site-head { flex-wrap: wrap; }
.langs { display: flex; gap: .35rem; margin-inline-start: auto; }
.site-head .langs a { padding: .3rem .6rem; border: 1px solid var(--tile-line); border-radius: 999px; color: var(--on-green-muted); text-decoration: none; }
.site-head .langs a[aria-current="true"] { border-color: var(--gold); color: var(--gold-light); }
.site-head .langs a[lang="ar"] { font: 700 1rem/1 var(--arabic-only); }
.site-head .langs a[lang="ur"] { font: 400 .95rem/1.2 var(--urdu-only); }
.site-head .langs a[lang="en"] { font: 500 .875rem/1 "Inter", system-ui, sans-serif; }
.lang-switch button[lang="en"] { font: 500 .95rem/1.2 "Inter", system-ui, sans-serif; }
figcaption[lang="ar"] { font-family: var(--arabic-only); font-size: 1.05rem; }
figcaption[lang="ur"] { font-family: var(--urdu-only); font-size: 1rem; line-height: 2; }
figcaption[lang="en"] { font-family: "Inter", system-ui, sans-serif; }
:root { --arabic-only: "Amiri", "Geeza Pro", serif; --urdu-only: "Noto Nastaliq Urdu", "Amiri", serif; }
@media (max-width: 40rem) { .langs { margin-inline-start: 0; width: 100%; justify-content: center; } }

/* Arabic and Urdu pages */
html[lang="ar"] { --serif: "Amiri", "Geeza Pro", serif; --sans: "Amiri", "Geeza Pro", serif; }
html[lang="ar"] body { font-size: 1.25rem; line-height: 1.85; font-feature-settings: normal; }
html[lang="ar"] .hero .lede { font-size: 1.45rem; line-height: 1.7; }
html[lang="ar"] .faq summary, html[lang="ar"] .features dt { font-weight: 700; }
html[lang="ur"] { --serif: "Noto Nastaliq Urdu", "Amiri", serif; --sans: "Noto Nastaliq Urdu", "Amiri", serif; }
html[lang="ur"] body { font-size: 1.1rem; line-height: 2.25; font-feature-settings: normal; }
html[lang="ur"] .hero .lede { font-size: 1.25rem; line-height: 2.3; }
html[lang="ur"] .panel h2, html[lang="ur"] .panel .page-title { font-size: 1.9rem; line-height: 2.1; }
html[lang="ur"] .features dt, html[lang="ur"] .panel h3, html[lang="ur"] .faq summary { font-size: 1.15rem; line-height: 2.1; font-weight: 600; }
html[lang="ur"] .faq summary::after { top: 1.9rem; }
html[lang="ur"] .faq details[open] summary::after { top: 2.15rem; }
html[lang="ur"] .store, html[lang="ur"] .contact .mail, html[lang="ur"] .site-head, html[lang="ur"] .site-foot, html[lang="ur"] .prices span, html[lang="ur"] .path { line-height: 2; }
html[lang="ur"] .brand { font-size: 1.2rem; line-height: 1.9; }
html[lang="ar"] .path, html[lang="ur"] .path { white-space: normal; }
html[dir="rtl"] .panel .sub, html[dir="rtl"] .policy .updated, html[dir="rtl"] .policy .note { font-style: normal; }
html[dir="rtl"] .prices strong { font-family: "EB Garamond", serif; }
html[lang] .panel .contact-h { font-size: 1.35rem; }
html[lang="ur"] .panel .page-title { font-size: 2.3rem; }
html[lang="ur"] .panel .contact-h { font-size: 1.3rem; }
html[dir="rtl"] em { font-style: normal; }
html[lang="ar"] .site-head, html[lang="ar"] .site-foot { font-size: 1.1rem; }
html[lang="ur"] .site-head nav:not(.langs) a { font-size: 1.05rem; }
