@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("assets/fonts/noto-naskh-arabic.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #f7f2e3;
  --muted: #bdcfc7;
  --deep: #031e18;
  --deep-2: #062b22;
  --panel: rgba(11, 57, 45, 0.72);
  --panel-solid: #0a3a2d;
  --gold: #e9be61;
  --gold-soft: #f4d99c;
  --teal: #65d5bb;
  --line: rgba(233, 190, 97, 0.22);
  --danger: #d88f83;
  --radius-lg: 30px;
  --radius-md: 20px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 10%, rgba(101, 213, 187, 0.11), transparent 25rem),
    radial-gradient(circle at 10% 35%, rgba(233, 190, 97, 0.09), transparent 24rem),
    linear-gradient(145deg, #021611 0%, var(--deep) 42%, #041b16 100%);
  font-family: "Noto Naskh Arabic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.75;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  transform: translateY(-160%);
  padding: 9px 16px;
  border-radius: 12px;
  color: #06251d;
  background: var(--gold);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(233, 190, 97, 0.14);
  background: rgba(2, 24, 19, 0.86);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(233, 190, 97, 0.16);
}

.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { color: var(--gold); font-size: 1.27rem; }
.brand-copy small { color: var(--muted); font-size: .73rem; }

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  transition: color .18s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--gold-soft); }

.menu-button {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--gold);
  background: rgba(255,255,255,.03);
  cursor: pointer;
}

.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 62px;
}

.hero::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  top: -140px;
  right: -160px;
  opacity: .12;
  background: url("assets/noor-rosette.webp") center/contain no-repeat;
  animation: slow-spin 90s linear infinite;
  pointer-events: none;
}

@keyframes slow-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 68px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--teal);
  font-size: .92rem;
  letter-spacing: .02em;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--teal);
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; color: var(--gold); font-size: clamp(3.2rem, 8vw, 6.7rem); line-height: .95; font-weight: 700; }
h2 { margin-bottom: 14px; color: var(--gold-soft); font-size: clamp(2rem, 4.4vw, 3.45rem); line-height: 1.18; }
h3 { margin-bottom: 8px; color: var(--ink); font-size: 1.32rem; line-height: 1.35; }
.hero .tagline { margin-bottom: 14px; font-size: clamp(1.45rem, 3vw, 2.25rem); color: var(--ink); }
.lead { max-width: 690px; color: var(--muted); font-size: 1.1rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--gold-soft);
  background: rgba(255,255,255,.035);
  text-decoration: none;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.button.primary { color: #07271f; border-color: var(--gold); background: linear-gradient(135deg, #f4d58e, #dcae49); }
.button:hover { transform: translateY(-2px); border-color: rgba(233,190,97,.58); background-color: rgba(255,255,255,.07); }

.phone-stage { position: relative; min-height: 610px; display: grid; place-items: center; }
.phone-stage::before {
  content: "";
  position: absolute;
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(101,213,187,.22), rgba(233,190,97,.04) 54%, transparent 68%);
  filter: blur(12px);
}
.phone {
  position: relative;
  z-index: 2;
  width: min(326px, 78vw);
  aspect-ratio: 9 / 20;
  padding: 10px;
  border: 1px solid rgba(244,217,156,.5);
  border-radius: 48px;
  background: linear-gradient(145deg, #183b32, #010b08 18%, #08251d 78%, #1c5140);
  box-shadow: var(--shadow), 0 0 0 2px rgba(255,255,255,.025), inset 0 0 0 1px rgba(255,255,255,.13);
  transform: perspective(1100px) rotateY(-5deg) rotateX(1deg) rotateZ(1.2deg);
  isolation: isolate;
}
.phone-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: #021812;
}
.phone-screen img {
  width: 100%;
  height: 100%;
  border-radius: 38px;
  object-fit: cover;
  object-position: center top;
}
.phone-speaker {
  position: absolute;
  z-index: 5;
  top: 17px;
  left: 50%;
  width: 54px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: rgba(0,0,0,.78);
  box-shadow: 0 1px 0 rgba(255,255,255,.12);
}
.phone-camera {
  position: absolute;
  z-index: 5;
  top: 15px;
  left: calc(50% + 38px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1e5b76, #010604 68%);
}
.phone-button {
  position: absolute;
  z-index: -1;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(#806b43, #172d26 22%, #06130f 80%, #806b43);
}
.phone-button.volume { top: 142px; left: -4px; height: 92px; }
.phone-button.power { top: 176px; right: -4px; height: 78px; }
.phone-gesture {
  position: absolute;
  z-index: 5;
  bottom: 16px;
  left: 50%;
  width: 88px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 1px 8px rgba(0,0,0,.32);
}
.floating-note {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: 76px;
  max-width: 225px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8,47,37,.92);
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}
.floating-note strong { display: block; color: var(--gold); font-size: 1.1rem; }
.floating-note span { color: var(--muted); font-size: .86rem; }

.trust-strip {
  border-block: 1px solid var(--line);
  background: rgba(255,255,255,.018);
}

.correction-strip {
  border-bottom: 1px solid rgba(216,143,131,.28);
  background: linear-gradient(90deg, rgba(91,30,24,.62), rgba(55,35,25,.46));
}
.correction-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.correction-inner strong { display: block; color: #ffd6ce; font-size: 1.12rem; }
.correction-inner span { display: block; color: #e6c7c0; font-size: .9rem; }
.correction-inner a {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid rgba(255,214,206,.32);
  border-radius: 13px;
  color: #fff2ef;
  direction: ltr;
  text-decoration: none;
}
.correction-inner a:hover { background: rgba(255,255,255,.07); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { padding: 23px; text-align: center; border-left: 1px solid var(--line); }
.trust-item:last-child { border-left: 0; }
.trust-item strong { display: block; color: var(--gold-soft); font-size: 1.12rem; }
.trust-item span { color: var(--muted); font-size: .82rem; }

.section { padding: 90px 0; }
.section.compact { padding: 58px 0; }
.section-tint { border-block: 1px solid rgba(233,190,97,.1); background: rgba(255,255,255,.016); }
.section-heading { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-heading p { color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card,
.legal-card,
.contact-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(13,65,51,.76), rgba(5,38,30,.9));
  box-shadow: 0 20px 50px rgba(0,0,0,.12);
}
.feature-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  left: -65px;
  bottom: -70px;
  opacity: .055;
  background: url("assets/noor-rosette.webp") center/contain no-repeat;
}
.icon-disc {
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(233,190,97,.3);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(233,190,97,.07);
  font-size: 1.25rem;
}
.feature-card p, .legal-card p, .contact-card p { color: var(--muted); margin-bottom: 0; }
.tool-link { display: block; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.tool-link:hover { transform: translateY(-4px); border-color: rgba(233,190,97,.55); }
.tool-link > span { display: inline-block; margin-top: 20px; color: var(--gold); font-weight: 700; }
.web-tool-grid { grid-template-columns: repeat(3, 1fr); }

.tool-shell { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 24px; align-items: start; }
.tool-panel {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(13,65,51,.82), rgba(4,32,25,.94));
  box-shadow: var(--shadow);
}
.tool-panel label { display: block; margin-bottom: 7px; color: var(--gold-soft); font-weight: 700; }
.tool-panel select,
.tool-panel input,
.tool-panel textarea {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid rgba(233,190,97,.28);
  border-radius: 14px;
  color: var(--ink);
  background: #06271f;
  outline: none;
}
.tool-panel select:focus,
.tool-panel input:focus,
.tool-panel textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233,190,97,.1); }
.tool-panel textarea { min-height: 150px; resize: vertical; }
.tool-status { min-height: 32px; margin: 14px 0; color: var(--teal); }
.tool-status.error { color: #ffc4ba; }
.player-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.player-controls button { min-width: 54px; min-height: 50px; border: 1px solid var(--line); border-radius: 14px; color: var(--gold-soft); background: rgba(255,255,255,.04); cursor: pointer; }
.player-controls button.primary { color: #05231b; background: var(--gold); }
.player-controls button:disabled { opacity: .45; cursor: not-allowed; }
.ayah-list { display: grid; gap: 12px; max-height: 720px; overflow: auto; padding-left: 4px; }
.ayah-row { padding: 18px; border: 1px solid rgba(233,190,97,.14); border-radius: 16px; background: rgba(255,255,255,.025); }
.ayah-row.active { border-color: var(--gold); background: rgba(233,190,97,.07); }
.ayah-arabic { margin: 0; color: var(--ink); font-size: clamp(1.35rem, 3vw, 1.85rem); line-height: 2.15; text-align: right; }
.ayah-urdu { margin: 10px 0 0; color: var(--muted); text-align: right; }
.ayah-number { display: inline-grid; place-items: center; min-width: 34px; height: 34px; margin-left: 8px; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); font-size: .82rem; }
.qibla-stage { min-height: 470px; display: grid; place-items: center; text-align: center; }
.compass {
  position: relative;
  width: min(340px, 82vw);
  aspect-ratio: 1;
  border: 2px solid rgba(233,190,97,.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(101,213,187,.09), transparent 57%), repeating-conic-gradient(from 0deg, rgba(233,190,97,.28) 0 1deg, transparent 1deg 15deg);
  box-shadow: inset 0 0 50px rgba(0,0,0,.25), 0 20px 50px rgba(0,0,0,.25);
}
.compass::after { content: ""; position: absolute; inset: 12%; border: 1px solid rgba(233,190,97,.2); border-radius: 50%; }
.cardinal { position: absolute; z-index: 2; color: var(--muted); font: 700 .9rem system-ui, sans-serif; }
.cardinal.n { top: 12px; left: 50%; transform: translateX(-50%); color: var(--gold); }
.cardinal.e { right: 15px; top: 50%; transform: translateY(-50%); }
.cardinal.s { bottom: 12px; left: 50%; transform: translateX(-50%); }
.cardinal.w { left: 15px; top: 50%; transform: translateY(-50%); }
.qibla-arrow { position: absolute; z-index: 3; inset: 15%; transform: rotate(0deg); transition: transform .28s ease-out; }
.qibla-arrow::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); border-left: 19px solid transparent; border-right: 19px solid transparent; border-bottom: 118px solid var(--gold); filter: drop-shadow(0 8px 10px rgba(0,0,0,.28)); }
.qibla-arrow::after { content: ""; position: absolute; width: 22px; height: 22px; left: 50%; top: 50%; transform: translate(-50%,-50%); border: 5px solid var(--gold-soft); border-radius: 50%; background: #0b3d30; }
.qibla-reading { margin-top: 22px; }
.qibla-reading strong { display: block; color: var(--gold); font-size: 2rem; }
.coordinate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.showcase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.shot {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #071f19;
  cursor: zoom-in;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
}
.shot img { width: 100%; transition: transform .25s ease; }
.shot:hover img { transform: scale(1.025); }
.shot span {
  position: absolute;
  inset: auto 10px 10px;
  padding: 10px 13px;
  border-radius: 13px;
  color: var(--ink);
  background: rgba(2,26,20,.83);
  backdrop-filter: blur(10px);
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split-copy p { color: var(--muted); }
.check-list { margin: 22px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding: 9px 34px 9px 0; color: var(--muted); }
.check-list li::before { content: "✓"; position: absolute; right: 0; color: var(--teal); font-weight: 700; }
.visual-panel {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at center, rgba(101,213,187,.16), transparent 48%), var(--panel);
}
.visual-panel img { width: min(380px, 78%); opacity: .82; animation: slow-spin 80s linear infinite; }
.visual-panel .quote { position: absolute; width: 74%; text-align: center; }
.visual-panel .quote strong { display: block; color: var(--gold); font-size: clamp(1.7rem,4vw,3rem); }
.visual-panel .quote span { color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card a { color: var(--gold-soft); text-decoration: none; overflow-wrap: anywhere; }
.contact-card a:hover { text-decoration: underline; }

.cta {
  position: relative;
  overflow: hidden;
  padding: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 1px solid rgba(233,190,97,.35);
  border-radius: var(--radius-lg);
  background: linear-gradient(125deg, #0d4a39, #082b22);
  box-shadow: var(--shadow);
}
.cta::after { content: ""; position: absolute; width: 300px; height: 300px; left: -90px; opacity: .07; background: url("assets/noor-rosette.webp") center/contain; }
.cta > * { position: relative; z-index: 2; }
.cta h2 { margin-bottom: 5px; }
.cta p { margin-bottom: 0; color: var(--muted); }

.site-footer { padding: 50px 0 28px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 36px; }
.footer-brand p { max-width: 420px; color: var(--muted); }
.footer-links { display: grid; align-content: start; gap: 8px; }
.footer-links strong { color: var(--gold-soft); margin-bottom: 5px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--gold-soft); }
.copyright { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .88rem; }

.page-hero { padding: 66px 0 42px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.page-hero h1 { font-size: clamp(2.7rem, 7vw, 5.2rem); }
.page-hero p { max-width: 760px; color: var(--muted); }
.legal-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 36px; align-items: start; }
.legal-nav { position: sticky; top: 105px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.legal-nav strong { color: var(--gold-soft); }
.legal-nav a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; }
.legal-nav a:hover { color: var(--gold); }
.legal-content { min-width: 0; }
.legal-content section { padding: 26px 0; border-bottom: 1px solid var(--line); }
.legal-content section:first-child { padding-top: 0; }
.legal-content h2 { font-size: 1.8rem; }
.legal-content h3 { margin-top: 24px; color: var(--gold-soft); }
.legal-content p, .legal-content li { color: var(--muted); }
.legal-content a { color: var(--gold-soft); }
.legal-content code { padding: 2px 7px; border-radius: 6px; color: var(--teal); background: rgba(0,0,0,.25); direction: ltr; unicode-bidi: embed; }
.notice { padding: 18px 20px; border-right: 4px solid var(--gold); border-radius: 14px; background: rgba(233,190,97,.07); color: var(--muted); }
.ltr { direction: ltr; text-align: left; }
.meta { color: var(--teal) !important; font-size: .9rem; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 12, 9, .94);
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; max-width: min(92vw, 520px); border-radius: 28px; box-shadow: var(--shadow); }
.lightbox-close { position: fixed; top: 22px; right: 22px; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: #0b3b2e; cursor: pointer; }

@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero .actions, .hero .eyebrow { justify-content: center; }
  .phone-stage { min-height: 570px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; }
  .tool-shell { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .nav { min-height: 68px; }
  .brand img { width: 45px; height: 45px; }
  .menu-button { display: grid; place-items: center; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #072c22;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .hero { padding-top: 50px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(2) { border-left: 0; }
  .trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .feature-grid, .footer-grid { grid-template-columns: 1fr; }
  .web-tool-grid { grid-template-columns: 1fr; }
  .section { padding: 68px 0; }
  .cta { padding: 30px 24px; flex-direction: column; align-items: stretch; text-align: center; }
  .cta .button { width: 100%; }
  .correction-inner { padding-block: 18px; flex-direction: column; align-items: stretch; }
  .correction-inner a { text-align: center; }
}

@media (max-width: 520px) {
  .container, .nav { width: min(100% - 24px, 1180px); }
  .hero::after { width: 420px; height: 420px; right: -180px; }
  h1 { font-size: 3.35rem; }
  .actions { flex-direction: column; }
  .button { width: 100%; }
  .phone-stage { min-height: 500px; }
  .floating-note { left: 2px; bottom: 34px; }
  .showcase-grid { gap: 12px; }
  .shot { border-radius: 19px; }
  .shot span { font-size: .78rem; }
  .legal-card, .feature-card, .contact-card { padding: 21px; }
}
