/* Quran Feed web — the app's tokens: night ink, warm paper, one quiet gold. */

@font-face { font-family: "Amiri Quran"; src: url("/assets/fonts/AmiriQuran.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; font-style: italic; src: url("/assets/fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/Newsreader-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Newsreader"; font-style: italic; src: url("/assets/fonts/Newsreader-Italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Newsreader"; font-weight: 500; src: url("/assets/fonts/Newsreader-Medium.woff2") format("woff2"); font-display: swap; }

:root {
  --ink: #0c1311;
  --ink-raised: #131c19;
  --ink-line: rgba(255, 255, 255, 0.08);
  --paper: #f3ecdd;
  --paper-dim: rgba(243, 236, 221, 0.72);
  --paper-faint: rgba(243, 236, 221, 0.5);
  --gold: #cead71;
  --gold-deep: #967848;
  --sage: #6b8f7e;
  --radius: 22px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --arabic: "Amiri Quran", "Geeza Pro", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}

/* Khatam lattice, the same eight-point star the app draws behind each ayah */
.lattice {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23CEAD71' stroke-width='0.7' opacity='0.09'%3E%3Crect x='19.5' y='19.5' width='33' height='33'/%3E%3Crect x='19.5' y='19.5' width='33' height='33' transform='rotate(45 36 36)'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 10%, transparent 70%);
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(12, 19, 17, 0.78); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--ink-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-family: var(--display); font-size: 24px; letter-spacing: 0.01em; }
.nav { display: flex; align-items: center; gap: 26px; font-family: var(--sans); font-size: 15px; }
.nav a { text-decoration: none; color: var(--paper-dim); transition: color 0.2s; }
.nav a:hover { color: var(--paper); }
.nav .nav-cta { color: var(--ink); background: var(--paper); padding: 8px 16px; border-radius: 999px; font-weight: 600; }
.nav .nav-cta:hover { color: var(--ink); background: #fff; }
@media (max-width: 720px) { .nav a:not(.nav-cta) { display: none; } }

/* Buttons */
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 14px 26px 14px 22px;
  text-decoration: none; font-family: var(--sans);
  transition: transform 0.18s ease, background 0.18s;
}
.store-badge:hover { background: #fff; transform: translateY(-1px); }
.store-badge:active { transform: scale(0.97); }
.store-badge svg { width: 22px; height: 22px; flex: none; }
.store-badge .badge-text { display: flex; flex-direction: column; line-height: 1.15; }
.store-badge small { font-size: 11px; letter-spacing: 0.02em; opacity: 0.75; }
.store-badge strong { font-size: 17px; font-weight: 600; }
.store-badge[aria-disabled="true"] { cursor: default; background: var(--ink-raised); color: var(--paper); border: 1px solid rgba(206, 173, 113, 0.4); }
.store-badge[aria-disabled="true"]:hover { transform: none; background: var(--ink-raised); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 9vw, 110px) 0 clamp(64px, 9vw, 120px); }
.hero::before { content: ""; position: absolute; left: 50%; top: 40%; width: 900px; height: 900px; transform: translate(-30%, -50%); background: radial-gradient(circle, rgba(30, 61, 51, 0.65), transparent 62%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 9vw, 104px); line-height: 0.95; letter-spacing: -0.01em; margin: 0 0 24px; }
.hero h1 em { color: var(--gold); }
.hero .lede { font-size: clamp(19px, 2.2vw, 22px); color: var(--paper-dim); max-width: 30ch; margin: 0 0 36px; }
.hero .free-line { font-family: var(--sans); font-size: 14px; color: var(--paper-faint); margin: 18px 0 0; display: flex; align-items: center; gap: 8px; }
.hero .free-line::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero .free-line { justify-content: center; }
}

/* Phone with a live feed */
.phone {
  position: relative; margin: 0 auto;
  width: min(330px, 82vw); aspect-ratio: 9 / 19.5;
  border-radius: 52px; padding: 11px;
  background: linear-gradient(145deg, #2a302d, #0d1210 40%, #1e2421);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 40px 80px -20px rgba(0, 0, 0, 0.7), 0 0 120px -20px rgba(206, 173, 113, 0.18);
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: var(--ink); }
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 31%; height: 26px; border-radius: 20px; background: #000; z-index: 5; }
.feed { position: absolute; inset: 0; transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-reduced-motion: reduce) { .feed { transition: none; } }
.ayah-page { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 56px 22px 92px; text-align: center; overflow: hidden; }
.ayah-page .glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, var(--tone), transparent 68%); opacity: 0.6; }
.ayah-page > *:not(.glow):not(.lattice) { position: relative; }
.ayah-page .ref { font-family: var(--sans); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.ayah-page .ar { font-family: var(--arabic); direction: rtl; font-size: clamp(22px, 6.6vw, 27px); line-height: 2.05; margin: 0 0 16px; }
.ayah-page .en { font-family: var(--serif); font-size: clamp(13px, 3.8vw, 15px); line-height: 1.55; color: var(--paper-dim); margin: 0; }
.player { position: absolute; left: 14px; right: 14px; bottom: 18px; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 999px; background: rgba(243, 236, 221, 0.09); border: 1px solid rgba(243, 236, 221, 0.1); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-family: var(--sans); }
.play-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; transition: transform 0.15s; }
.play-btn:active { transform: scale(0.92); }
.play-btn svg { width: 14px; height: 14px; }
.player .meta { flex: 1; min-width: 0; text-align: left; line-height: 1.2; }
.player .meta b { display: block; font-size: 12px; font-weight: 600; }
.player .meta span { font-size: 11px; color: var(--paper-faint); }
.bars { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.bars i { width: 2px; height: 30%; background: var(--gold); border-radius: 1px; opacity: 0.5; }
.playing .bars i { animation: bar 0.9s ease-in-out infinite; opacity: 1; }
.playing .bars i:nth-child(2) { animation-delay: -0.3s; }
.playing .bars i:nth-child(3) { animation-delay: -0.6s; }
.playing .bars i:nth-child(4) { animation-delay: -0.15s; }
@keyframes bar { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.swipe-hint { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 6; }
.swipe-hint i { width: 4px; height: 4px; border-radius: 50%; background: var(--paper-faint); transition: all 0.3s; }
.swipe-hint i.on { height: 14px; border-radius: 3px; background: var(--gold); }

/* Sections */
section { position: relative; }
.section { padding: clamp(72px, 10vw, 128px) 0; border-top: 1px solid var(--ink-line); }
.section h2 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: 1; margin: 0 0 18px; letter-spacing: -0.005em; }
.section h2 em { color: var(--gold); }
.section .intro { color: var(--paper-dim); max-width: 52ch; margin: 0 0 clamp(40px, 6vw, 64px); font-size: 19px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { position: relative; background: var(--ink-raised); border: 1px solid var(--ink-line); border-radius: var(--radius); padding: 30px 28px; overflow: hidden; }
.card .num { font-family: var(--display); font-style: italic; color: var(--gold); font-size: 40px; line-height: 1; margin-bottom: 22px; display: block; }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0 0 8px; }
.card p { margin: 0; color: var(--paper-dim); font-size: 17px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mode { padding: 40px 36px; }
.mode .mode-ar { font-family: var(--arabic); font-size: 34px; color: var(--gold); direction: rtl; float: right; line-height: 1; opacity: 0.85; }
.mode h3 { font-family: var(--display); font-weight: 400; font-size: 38px; margin: 0 0 10px; }
@media (max-width: 760px) { .modes { grid-template-columns: 1fr; } }

.plus { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.promise { font-family: var(--display); font-size: clamp(30px, 4vw, 42px); line-height: 1.12; margin: 0 0 22px; }
.promise em { color: var(--gold); }
.plus-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plus-list li { display: flex; gap: 16px; align-items: flex-start; background: var(--ink-raised); border: 1px solid var(--ink-line); border-radius: 18px; padding: 20px 22px; }
.plus-list .ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(206, 173, 113, 0.12); color: var(--gold); }
.plus-list .ico svg { width: 18px; height: 18px; }
.plus-list b { display: block; font-weight: 500; font-size: 19px; }
.plus-list span { color: var(--paper-faint); font-size: 16px; }
.honest { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; font-family: var(--sans); font-size: 15px; color: var(--paper-dim); }
.honest li { display: flex; gap: 10px; }
.honest li::before { content: "✓"; color: var(--sage); font-weight: 700; }
@media (max-width: 860px) { .plus { grid-template-columns: 1fr; } }

.sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sources .card h3 { font-size: 20px; }
.sources .card a { color: var(--gold); text-decoration: none; font-family: var(--sans); font-size: 14px; display: inline-block; margin-top: 14px; }
.sources .card a:hover { text-decoration: underline; }
.no-ai { margin-top: 18px; padding: 22px 26px; border-radius: var(--radius); border: 1px dashed rgba(206, 173, 113, 0.35); color: var(--paper-dim); font-size: 17px; }
.no-ai b { color: var(--paper); font-weight: 500; }
@media (max-width: 860px) { .sources { grid-template-columns: 1fr; } }

.closing { text-align: center; overflow: hidden; }
.closing .ar-line { font-family: var(--arabic); direction: rtl; font-size: clamp(30px, 5vw, 46px); line-height: 1.9; margin: 0 0 8px; }
.closing .en-line { color: var(--paper-dim); font-style: italic; margin: 0 auto 6px; max-width: 46ch; }
.closing .cite { font-family: var(--sans); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin: 0 0 40px; }

/* Footer */
.site-footer { border-top: 1px solid var(--ink-line); padding: 48px 0 56px; font-family: var(--sans); font-size: 14px; color: var(--paper-faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { text-decoration: none; color: var(--paper-dim); }
.site-footer a:hover { color: var(--paper); }
.site-footer p { margin: 0; }

/* Legal and support pages */
.doc { padding: clamp(48px, 8vw, 96px) 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 68px); line-height: 1; margin: 0 0 12px; }
.doc .updated { font-family: var(--sans); font-size: 14px; color: var(--paper-faint); margin: 0 0 40px; }
.doc h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 44px 0 12px; }
.doc h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--paper-dim); }
.doc a { color: var(--gold); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .summary { background: var(--ink-raised); border: 1px solid var(--ink-line); border-radius: var(--radius); padding: 24px 28px; margin: 0 0 12px; }
.doc .summary p { margin: 0; color: var(--paper); }
.doc table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 12px 0; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--ink-line); color: var(--paper-dim); }
.doc th { color: var(--paper); font-weight: 500; font-family: var(--sans); font-size: 13px; letter-spacing: 0.04em; }
.faq details { border-bottom: 1px solid var(--ink-line); padding: 18px 0; }
.faq summary { cursor: pointer; font-size: 20px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-family: var(--sans); font-weight: 300; font-size: 26px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; }
.contact-card { margin-top: 48px; background: var(--ink-raised); border: 1px solid var(--ink-line); border-radius: var(--radius); padding: 30px; }
.contact-card h2 { margin-top: 0; }
