/* Qiyam — site styles. Same palette and typefaces as the app. */

:root {
  --night: #05080f;
  --bg: #080d18;
  --surface: #101827;
  --surface-alt: #172135;
  --surface-high: #1e2a42;
  --border: #243349;
  --border-soft: #1a2436;
  --emerald: #34d3a0;
  --emerald-dim: #1b8a68;
  --emerald-deep: #0e4a38;
  --gold: #e3c275;
  --gold-dim: #a98b44;
  --gold-deep: #3a2e14;
  --text: #f4f1ea;
  --muted: #95a3bc;
  --faint: #5c6b85;
  --on-accent: #04150f;
  --radius: 20px;
  --max: 1120px;
  --ui: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --arabic: 'Amiri', 'Noto Naskh Arabic', serif;
}

*,
*::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;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

.wrap {
  width: min(var(--max), 100% - 32px);
  margin-inline: auto;
}

.arabic {
  font-family: var(--arabic);
  color: var(--gold);
  direction: rtl;
}

/* ------------------------------------------------------------------ header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
}

.brand-ar {
  font-family: var(--arabic);
  font-weight: 700;
  color: var(--gold);
  font-size: 20px;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.nav a:hover {
  color: var(--text);
}

.nav .btn {
  color: var(--on-accent);
}

@media (max-width: 720px) {
  .nav a:not(.btn) {
    display: none;
  }
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dim));
  color: var(--on-accent);
  box-shadow: 0 10px 30px rgba(52, 211, 160, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 14px 36px rgba(52, 211, 160, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(16, 24, 39, 0.6);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 14px;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 72px 0 96px;
  background: linear-gradient(160deg, #0e2a3a 0%, #0b1a2b 45%, var(--bg) 100%);
}

.hero::before {
  /* Khatim lattice, the app's recurring ornament. */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.09;
  background-image: url('assets/khatim.svg');
  background-size: 88px 88px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}

.stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.stars span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text);
  animation: twinkle 3.2s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: -1;
  width: 100%;
  height: auto;
  opacity: 0.8;
}

.lantern {
  position: absolute;
  top: 0;
  z-index: 1;
  transform-origin: top center;
  animation: sway 5.2s ease-in-out infinite;
  pointer-events: none;
}

/* Hung in the margins either side of the content column. */
.lantern.left {
  left: calc((100% - var(--max)) / 2 - 64px);
}

.lantern.right {
  right: calc((100% - var(--max)) / 2 - 56px);
  animation-delay: -2.4s;
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

/* Only where the margins are wide enough to hold them clear of the text. */
@media (max-width: 1300px) {
  .lantern {
    display: none;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.salam {
  font-family: var(--arabic);
  font-size: 30px;
  color: var(--gold);
  margin: 0 0 8px;
  text-shadow: 0 0 18px rgba(227, 194, 117, 0.45);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--emerald);
}

.lead {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 32px;
}

@media (max-width: 900px) {
  .lead {
    margin-inline: auto;
  }
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

@media (max-width: 900px) {
  .cta {
    justify-content: center;
  }
}

.cta-note {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--faint);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

@media (max-width: 900px) {
  .badges {
    justify-content: center;
  }
}

.badges li {
  font-size: 14px;
  color: var(--gold);
  border: 1px solid rgba(227, 194, 117, 0.35);
  background: rgba(58, 46, 20, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
}

/* ------------------------------------------------------------------ phone mockup */

.phone-stage {
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 20;
  border-radius: 42px;
  padding: 11px;
  background: linear-gradient(145deg, #2a3a58, #121a2a);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(227, 194, 117, 0.18),
    0 0 90px rgba(52, 211, 160, 0.18);
  transform: rotateY(-14deg) rotateX(6deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.phone:hover {
  transform: rotateY(-4deg) rotateX(2deg);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 32px;
}

@media (max-width: 900px) {
  .phone {
    transform: none;
  }
}

/* ------------------------------------------------------------------ sections */

section {
  padding: 96px 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.eyebrow::before,
.eyebrow::after {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--gold-dim);
}

h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

/* ------------------------------------------------------------------ formula */

.formula {
  display: grid;
  grid-template-columns: repeat(7, auto);
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--night);
  border: 1px solid var(--gold-dim);
  box-shadow: 0 0 40px rgba(227, 194, 117, 0.08);
}

.formula .term {
  text-align: center;
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.formula .term b {
  display: block;
  font-size: 20px;
}

.formula .term span {
  font-size: 14px;
  color: var(--muted);
}

.formula .op {
  font-size: 28px;
  color: var(--gold);
}

.formula .result {
  background: var(--emerald-deep);
  border-color: var(--emerald-dim);
}

.formula .result b {
  color: var(--emerald);
}

@media (max-width: 820px) {
  .formula {
    grid-template-columns: 1fr;
  }
  .formula .op {
    text-align: center;
    line-height: 1;
  }
}

.why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

@media (max-width: 820px) {
  .why {
    grid-template-columns: 1fr;
  }
}

.why p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.why strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

/* ------------------------------------------------------------------ features */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 960px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .features {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  border-radius: var(--radius);
  padding: 26px;
  background: linear-gradient(145deg, #141e30, var(--surface));
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  transform-style: preserve-3d;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0 24px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 194, 117, 0.45), transparent);
}

.card:hover {
  border-color: var(--emerald-dim);
}

.card .icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--night);
  border: 1px solid var(--gold-deep);
  box-shadow: 0 0 22px rgba(227, 194, 117, 0.12);
  margin-bottom: 16px;
}

.card .icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 19px;
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* ------------------------------------------------------------------ Quran spotlight */

.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

@media (max-width: 900px) {
  .spotlight {
    grid-template-columns: 1fr;
  }
}

.spotlight.reverse > :first-child {
  order: 2;
}

@media (max-width: 900px) {
  .spotlight.reverse > :first-child {
    order: 0;
  }
}

.spotlight ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}

.spotlight li {
  display: flex;
  gap: 12px;
  color: var(--muted);
}

.spotlight li::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  background: var(--gold);
  clip-path: polygon(
    50% 0%,
    61% 26%,
    85% 15%,
    74% 39%,
    100% 50%,
    74% 61%,
    85% 85%,
    61% 74%,
    50% 100%,
    39% 74%,
    15% 85%,
    26% 61%,
    0% 50%,
    26% 39%,
    15% 15%,
    39% 26%
  );
}

.spotlight li b {
  color: var(--text);
  font-weight: 600;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.langs span {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 16px;
}

.duo {
  display: flex;
  justify-content: center;
  gap: 20px;
  perspective: 1400px;
}

.duo .phone {
  width: min(250px, 42vw);
}

.duo .phone:first-child {
  transform: rotateY(12deg) translateY(24px);
}

.duo .phone:last-child {
  transform: rotateY(-12deg);
}

.duo .phone:hover {
  transform: none;
}

.compass-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 60px rgba(227, 194, 117, 0.08);
  max-width: 460px;
  margin-inline: auto;
}

/* ------------------------------------------------------------------ gallery */

.gallery {
  display: flex;
  justify-content: safe center;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 16px 30px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.gallery figure {
  flex: none;
  width: 230px;
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}

.gallery .phone {
  width: 100%;
  transform: none;
}

.gallery figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

/* ------------------------------------------------------------------ privacy promise */

.promise {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .promise {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .promise {
    grid-template-columns: 1fr;
  }
}

.promise .card {
  text-align: center;
}

.promise .big {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: var(--emerald);
  margin-bottom: 6px;
}

/* ------------------------------------------------------------------ FAQ */

.faq {
  max-width: 820px;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}

.faq details {
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0 22px;
}

.faq details[open] {
  border-color: var(--emerald-dim);
}

.faq summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 600;
  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-size: 22px;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
}

/* ------------------------------------------------------------------ final CTA */

.final {
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(14, 74, 56, 0.45), transparent 70%);
}

.final .arabic {
  font-size: 34px;
  margin: 0 0 10px;
}

/* ------------------------------------------------------------------ footer */

footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0 56px;
  color: var(--faint);
  font-size: 14px;
}

footer .wrap {
  display: grid;
  gap: 18px;
}

footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

footer a {
  color: var(--muted);
}

/* ------------------------------------------------------------------ reveal on scroll */

.reveal {
  opacity: 0;
  transform: perspective(900px) translateY(24px) rotateX(10deg);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* Without JavaScript nothing should stay hidden. */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ legal page */

.legal {
  padding: 56px 0 96px;
}

.legal .wrap {
  max-width: 780px;
}

.legal h1 {
  font-size: clamp(32px, 5vw, 46px);
  margin: 0 0 6px;
}

.legal h2 {
  font-size: 26px;
  margin: 40px 0 12px;
}

.legal p,
.legal li {
  color: var(--muted);
}

.legal strong {
  color: var(--text);
}

.legal code {
  font-size: 0.9em;
  color: var(--gold);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.legal th {
  color: var(--text);
}

.legal td {
  color: var(--muted);
}

.legal .updated {
  color: var(--faint);
  margin: 0 0 32px;
}

.table-scroll {
  overflow-x: auto;
}
