/* Piety of Hearts website. The app's own look: warm ivory pages, emerald panels with the
   khatam (eight-point star) lattice, and gold. The Mansy Studio bar (navy) sits on ivory only,
   so navy and emerald never touch. */
:root {
  --ivory: #FBF6EA;
  --ivory-2: #F4EBD5;
  --paper: #FFFDF8;
  --ink: #12302A;
  --muted: #4B5F59;
  --line: rgba(18, 48, 42, 0.12);
  --emerald: #0F6B5C;
  --emerald-2: #0C5A4E;
  --emerald-deep: #07302A;
  --gold: #C8A24A;
  --gold-text: #8A6A1E;
  --gold-light: #F6E7BF;
  --gold-ink: #3A2C00;
  --on-emerald: #FFFFFF;
  --on-emerald-muted: rgba(255, 255, 255, 0.78);
  --radius: 28px;
  --max: 1160px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --lattice-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='none' stroke='%23C8A24A' stroke-opacity='.22' stroke-width='1.2'%3E%3Crect x='22' y='22' width='20' height='20'/%3E%3Crect x='22' y='22' width='20' height='20' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='3'/%3E%3C/g%3E%3C/svg%3E");
  --lattice-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-opacity='.07' stroke-width='1.2'%3E%3Crect x='22' y='22' width='20' height='20'/%3E%3Crect x='22' y='22' width='20' height='20' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); font-size: 18px; line-height: 1.6; color: var(--ink);
  background: var(--ivory); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--paper); padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 8px; }

/* The studio bar sits on ivory: a thin gold rule marks where the studio ends and the app begins. */
.ms-bar { border-bottom: 0 !important; box-shadow: inset 0 -2px 0 rgba(200, 162, 74, 0.55); }

/* ---------- App header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 246, 234, 0.88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.stuck { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 1.08rem; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 12px rgba(7, 48, 42, 0.18); }
.pnav { display: flex; align-items: center; gap: 2px; }
.pnav a { text-decoration: none; color: var(--muted); font-weight: 500; padding: 12px 12px; border-radius: 10px; }
.pnav a:hover { color: var(--ink); background: rgba(15, 107, 92, 0.07); }
.btn-get {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700;
  background: var(--emerald); color: #fff; padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(15, 107, 92, 0.25); transition: background .2s, transform .2s;
}
.btn-get:hover { background: var(--emerald-2); transform: translateY(-1px); }
@media (max-width: 860px) { .pnav { display: none; } }
@media (max-width: 380px) { .brand span { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; background: var(--lattice-gold);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: end; }
.hero-copy { padding-bottom: 72px; align-self: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); font-weight: 700; font-size: .95rem; color: var(--ink);
}
.eyebrow .ar { font-family: "Amiri Quran", "Amiri", serif; font-weight: 400; font-size: 1.05rem; color: var(--gold-text); line-height: 1; padding-top: 4px; }
.eyebrow img { width: 30px; height: 30px; border-radius: 8px; }
h1, h2, .display { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; font-variation-settings: "SOFT" 50, "WONK" 0; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); line-height: 1.04; margin: 22px 0 0; }
h1 em { font-style: italic; color: var(--emerald); }
.lead { font-size: clamp(1.08rem, 1.7vw, 1.22rem); color: var(--muted); max-width: 34em; margin-top: 20px; }
.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 30px; }
.badge { display: inline-block; line-height: 0; border-radius: 12px; transition: transform .2s; }
.badge:hover { transform: translateY(-2px); }
.badge img { height: 64px; width: auto; }
.watch-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; color: var(--emerald); padding: 10px 4px; }
.watch-link .pl { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-light); border: 1px solid rgba(200, 162, 74, .5); }
.watch-link .pl::after { content: ""; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--gold-ink); margin-left: 3px; }
.watch-link:hover .pl { background: #F2DDA6; }
.soon { margin-top: 14px; font-size: .95rem; color: var(--muted); }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.facts li { padding: 7px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: .93rem; color: var(--muted); }
.facts b { color: var(--ink); font-weight: 800; }

/* Arch (mihrab) window with the app rising from its base */
.hero-art { position: relative; display: flex; justify-content: center; }
.arch-wrap { position: relative; width: min(470px, 100%); }
.arch {
  position: relative; width: 100%; aspect-ratio: 470 / 560; overflow: hidden;
  border-radius: 235px 235px 0 0 / 235px 235px 0 0;
  background: var(--lattice-white), radial-gradient(ellipse 70% 50% at 50% 30%, rgba(200, 162, 74, 0.32), transparent 70%), linear-gradient(180deg, var(--emerald) 0%, var(--emerald-deep) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.arch::before { /* gold inner outline, like the app's medallion */
  content: ""; position: absolute; inset: 12px 12px 0; border: 1.5px solid rgba(246, 231, 191, 0.45); border-bottom: 0;
  border-radius: 223px 223px 0 0 / 223px 223px 0 0; pointer-events: none;
}
.arch .ph { position: absolute; bottom: 0; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45)); }
.arch .ph-front { width: 56%; left: 30%; }
.arch .ph-back { width: 46%; left: 10%; bottom: -6%; transform: rotate(-7deg); opacity: .96; }
.medal {
  position: absolute; z-index: 2; top: 13%; right: -28px; width: 96px; height: 96px; border-radius: 26px;
  box-shadow: 0 16px 34px rgba(7, 48, 42, 0.35), 0 0 0 6px var(--ivory); background: var(--ivory);
}
.medal img { width: 100%; height: 100%; border-radius: 26px; }
@media (max-width: 900px) {
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-copy { padding-bottom: 28px; text-align: center; }
  .lead { margin-inline: auto; }
  .cta, .facts { justify-content: center; }
  .arch-wrap { width: min(400px, 86%); }
  .medal { width: 76px; height: 76px; right: -14px; border-radius: 20px; }
  .medal img { border-radius: 20px; }
}
@media (max-width: 480px) { .badge img { height: 56px; } }

/* ---------- Verse ---------- */
.verse { background: var(--paper); border-block: 1px solid var(--line); padding: 54px 0; text-align: center; }
.verse .ar { font-family: "Amiri Quran", "Amiri", serif; font-size: clamp(1.3rem, 5.4vw, 2.6rem); line-height: 2.1; color: var(--emerald-deep); }
.verse .en { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--ink); margin-top: 6px; }
.verse .ref { display: block; margin-top: 10px; font-size: .92rem; color: var(--gold-text); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ornament { width: 120px; height: 18px; margin: 0 auto 18px; color: var(--gold); }

/* ---------- Sections ---------- */
section { padding: 96px 0; scroll-margin-top: 72px; }
.kicker { display: inline-block; font-size: .84rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 12px; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.1; }
.sub { color: var(--muted); font-size: 1.1rem; max-width: 36em; margin-top: 14px; }
.head-c { text-align: center; }
.head-c .sub { margin-inline: auto; }
@media (max-width: 720px) { section { padding: 72px 0; } }

/* Video band: emerald, framed by ivory on both sides */
.video-band { padding: 0 16px; }
.video-panel {
  max-width: var(--max); margin: 0 auto; border-radius: 36px; padding: 72px 28px; color: var(--on-emerald);
  background: var(--lattice-white), radial-gradient(ellipse 60% 55% at 50% 0%, rgba(200, 162, 74, 0.28), transparent 70%), linear-gradient(180deg, var(--emerald) 0%, var(--emerald-deep) 100%);
  text-align: center;
}
.video-panel .kicker { color: var(--gold-light); }
.video-panel .sub { color: var(--on-emerald-muted); margin-inline: auto; }
.video {
  position: relative; display: block; max-width: 900px; margin: 36px auto 0; aspect-ratio: 16 / 9;
  border-radius: 22px; overflow: hidden; background: var(--emerald-deep);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(246, 231, 191, 0.25);
}
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video .play {
  position: absolute; top: 50%; left: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%;
  background: var(--gold-light); box-shadow: 0 0 0 10px rgba(246, 231, 191, 0.25), 0 14px 30px rgba(0, 0, 0, 0.35);
  transition: transform .2s;
}
.video .play::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%); border-style: solid; border-width: 17px 0 17px 28px; border-color: transparent transparent transparent var(--gold-ink); }
.video:hover .play, .video:focus-visible .play { transform: scale(1.08); }
.video-note { color: var(--on-emerald-muted); font-size: .9rem; margin-top: 16px; }
@media (max-width: 600px) {
  .video-panel { padding: 52px 16px; border-radius: 28px; }
  .video { border-radius: 14px; }
  .video .play { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
  .video .play::after { border-width: 13px 0 13px 21px; }
}

/* Feature rows: text beside an emerald tile with the app rising out of it */
.rows { display: grid; gap: 96px; margin-top: 64px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.row:nth-child(even) .tile { order: 2; }
.tile { border-radius: var(--radius); overflow: hidden; background: var(--emerald-deep); box-shadow: 0 30px 60px rgba(7, 48, 42, 0.18); max-width: 460px; width: 100%; justify-self: center; }
.tile img { width: 100%; aspect-ratio: 1080 / 1450; object-fit: cover; }
.row h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; letter-spacing: -0.015em; }
.row p { color: var(--muted); margin-top: 14px; font-size: 1.08rem; }
.ticks { list-style: none; margin-top: 22px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 36px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A4612' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (max-width: 860px) {
  .rows { gap: 72px; margin-top: 44px; }
  .row { grid-template-columns: 1fr; gap: 28px; }
  .row:nth-child(even) .tile { order: 0; }
  .tile { max-width: 420px; }
  .row > div:not(.tile) { max-width: 560px; justify-self: center; }
}

/* Three smaller tiles */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 96px; }
.mini { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.mini .tile { border-radius: 0; box-shadow: none; max-width: none; }
.mini .tile img { aspect-ratio: 1080 / 1080; object-position: top; }
.mini .txt { padding: 24px 24px 28px; }
.mini h3 { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; line-height: 1.2; }
.mini p { color: var(--muted); margin-top: 8px; font-size: 1rem; }
@media (max-width: 860px) {
  .trio { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78%, 320px); overflow-x: auto; scroll-snap-type: x mandatory; margin: 72px -16px 0; padding: 0 16px 12px; scrollbar-width: none; }
  .trio::-webkit-scrollbar { display: none; }
  .mini { scroll-snap-align: center; }
}

/* More features grid */
.more { background: var(--ivory-2); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.card h3 { font-weight: 800; font-size: 1.12rem; margin-top: 16px; }
.card p { color: var(--muted); font-size: 1rem; margin-top: 6px; }
.ico { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--emerald); }
.ico svg { width: 24px; height: 24px; stroke: var(--gold-light); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.themes { margin-top: 18px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; align-items: center; color: #fff; background: var(--lattice-white), linear-gradient(160deg, var(--emerald-2) 0%, var(--emerald-deep) 100%); border-radius: var(--radius); overflow: hidden; }
.themes .txt { padding: 40px; }
.themes h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.15; }
.themes p { color: var(--on-emerald-muted); margin-top: 10px; }
.themes img { width: 100%; aspect-ratio: 1080 / 1000; object-fit: cover; object-position: top; }
.swatches { display: flex; gap: 10px; margin-top: 20px; }
.swatches span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); }
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .themes { grid-template-columns: 1fr; }
  .themes .txt { padding: 32px 24px 8px; }
}
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* Free and Premium */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 48px; align-items: stretch; }
.plan { border-radius: var(--radius); padding: 36px; background: var(--paper); border: 1px solid var(--line); }
.plan h3 { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; }
.plan .tag { font-size: 1rem; color: var(--muted); margin-top: 4px; }
.plan.premium { color: #fff; border: 0; background: var(--lattice-white), radial-gradient(ellipse 70% 60% at 100% 0%, rgba(200, 162, 74, 0.35), transparent 70%), linear-gradient(160deg, var(--emerald) 0%, var(--emerald-deep) 100%); }
.plan.premium .tag { color: var(--on-emerald-muted); }
.plan.premium .ticks li::before { background-color: var(--gold); }
.crown { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--gold-light); color: var(--gold-ink); font-weight: 800; font-size: .85rem; margin-bottom: 14px; }
.ways { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.ways span { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(246, 231, 191, .45); color: var(--gold-light); font-size: .93rem; font-weight: 700; }
.plan-note { color: var(--on-emerald-muted); font-size: .92rem; margin-top: 16px; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } .plan { padding: 30px 24px; } }

/* FAQ */
.faq { max-width: 820px; margin: 44px auto 0; display: grid; gap: 12px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 800; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid var(--emerald); border-bottom: 2.5px solid var(--emerald); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 24px 22px; color: var(--muted); }
.faq a { color: var(--emerald); font-weight: 700; }

/* Closing call to action */
.closing { padding: 0 16px 96px; }
.closing-panel {
  max-width: var(--max); margin: 0 auto; text-align: center; color: #fff; border-radius: 36px; padding: 80px 24px;
  background: var(--lattice-white), radial-gradient(ellipse 50% 60% at 50% 0%, rgba(200, 162, 74, 0.35), transparent 70%), linear-gradient(180deg, var(--emerald) 0%, var(--emerald-deep) 100%);
}
.closing-panel img.icon { width: 104px; height: 104px; border-radius: 28px; margin: 0 auto 24px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.closing-panel .sub { color: var(--on-emerald-muted); margin: 14px auto 0; }
.closing-panel .badge { margin-top: 30px; }
.closing-panel .soon { color: var(--on-emerald-muted); }

/* Footer (ivory, so the navy credit strip below sits on ivory too) */
.foot { padding: 0 0 36px; color: var(--muted); font-size: .95rem; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--line); padding-top: 28px; }
.foot .who { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.foot .who img { width: 32px; height: 32px; border-radius: 9px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Download bar on phones, shown after the hero */
.getbar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: none; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px; border-radius: 20px; background: rgba(255, 253, 248, 0.96); border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(7, 48, 42, 0.22); transform: translateY(140%); transition: transform .3s ease;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.getbar img { width: 44px; height: 44px; border-radius: 12px; }
.getbar .t { flex: 1; line-height: 1.25; min-width: 0; }
.getbar .t b { display: block; font-weight: 800; }
.getbar .t span { font-size: .88rem; color: var(--muted); }
.getbar.show { transform: none; }
@media (max-width: 720px) { .getbar { display: flex; } }

/* Gentle reveal on scroll (only when scripts run, and never with reduced motion) */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .getbar, .badge, .btn-get, .video .play { transition: none; }
}
@media print { .ms-bar, .ms-credit, .top, .getbar, .video-band { display: none !important; } }
