/* ---------------------------------------------------------------
   Naseem Islam — "The Ethereal Sanctuary" Stylesheet
   Pixel-Perfect Minimalist Web Design
----------------------------------------------------------------*/

:root {
  /* Natural Travertine & Cypress Palette */
  --bg-base: #F9F8F5;
  --bg-travertine: #F5F2EB;
  --surface: #FFFFFF;
  --surface-subtle: #F6F4EF;
  --surface-elevated: #FFFDF9;
  
  --line: #E7E3D8;
  --line-light: #F0EDE5;
  --line-strong: #D5CFBF;

  --text-hi: #232B29;
  --text-mid: #55635F;
  --text-low: #8B968F;
  --text-gold: #9C7F48;

  --accent: #1F5E54;
  --accent-strong: #174740;
  --accent-light: #E8F1EF;
  --accent-gold: #C49746;
  --on-accent: #FCFAF6;

  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-arabic: 'Scheherazade New', 'Traditional Arabic', serif;

  --shell-w: 1140px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(45, 40, 30, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(45, 40, 30, 0.08);
  --shadow-lg: 0 24px 60px -15px rgba(45, 40, 30, 0.14);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.7) 0%, transparent 60%),
    url('assets/travertine_bg.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center top;
  color: var(--text-hi);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
}

.shell {
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .shell {
    padding: 0 20px;
  }
}

/* ---------------- Atmospheric Geometric Star Watermarks ---------------- */
.star-watermark {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  color: var(--text-gold);
}

.star-watermark.left {
  top: 180px;
  left: 4%;
  width: 160px;
  height: 160px;
}

.star-watermark.right {
  top: 240px;
  right: 5%;
  width: 190px;
  height: 190px;
}

@media (max-width: 900px) {
  .star-watermark {
    display: none;
  }
}

/* ---------------- Navigation Bar ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 248, 245, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(231, 227, 216, 0.65);
  transition: all 0.25s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(45, 40, 30, 0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--shell-w);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-hi);
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--text-gold);
}

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

.nav-links a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color 0.15s ease;
}

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

.btn-pill-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--text-gold);
  color: var(--text-hi);
  font-size: 0.88rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
}

.btn-pill-outline:hover {
  background: var(--text-hi);
  border-color: var(--text-hi);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(35, 43, 41, 0.15);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.mobile-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-hi);
  border-radius: 2px;
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .nav-cta-desktop {
    display: none;
  }
}

/* ---------------- Hero Section ---------------- */
.hero {
  position: relative;
  padding: 56px 0 96px;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.7rem, 6.2vw, 4.6rem);
  font-weight: 600;
  color: #7D6335; /* Rich Warm Gold */
  line-height: 1.06;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: clamp(1.05rem, 2.1vw, 1.25rem);
  color: var(--text-mid);
  font-weight: 400;
  margin-bottom: 32px;
  max-width: 580px;
  margin-inline: auto;
}

.hero-cta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 30px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--text-gold);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  color: var(--text-hi);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(156, 127, 72, 0.08);
  transition: all 0.2s ease;
}

.btn-hero-primary:hover {
  background: var(--text-hi);
  border-color: var(--text-hi);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(35, 43, 41, 0.18);
}

.btn-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  color: var(--text-hi);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-store-badge:hover {
  border-color: var(--accent);
  background: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.store-badge-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.store-badge-text span:first-child {
  font-size: 0.65rem;
  color: var(--text-low);
  text-transform: uppercase;
}

.store-badge-text span:last-child {
  font-size: 0.88rem;
  font-weight: 700;
}

/* ---------------- Phone Mockup Stage ---------------- */
.mockup-stage {
  position: relative;
  max-width: 380px;
  margin: 0 auto;
  padding: 30px 15px;
}

/* Breathing Halo */
.halo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(196, 151, 70, 0.28) 0%, rgba(31, 94, 84, 0.15) 45%, transparent 72%);
  filter: blur(45px);
  pointer-events: none;
  z-index: 1;
  animation: haloBreathe 8s ease-in-out infinite alternate;
}

@keyframes haloBreathe {
  0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.75; }
  100% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

/* iPhone 16 Pro Frame */
.iphone-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: 46px;
  border: 3.5px solid #D5CEBF;
  box-shadow: 
    0 0 0 1px #FFFFFF,
    0 24px 64px -14px rgba(60, 50, 35, 0.22),
    inset 0 0 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  padding: 14px 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Dynamic Island */
.dynamic-island {
  width: 82px;
  height: 22px;
  background: #1C2422;
  border-radius: 16px;
  margin: 0 auto 4px;
}

/* Inside Phone: Mushaf Ayah Card */
.phone-mushaf-view {
  background: #FAF8F2;
  border: 1px solid #ECE7D8;
  border-radius: 20px;
  padding: 20px 16px;
  text-align: center;
}

.mushaf-arabic {
  direction: rtl;
  font-family: var(--font-arabic);
  font-size: 1.55rem;
  line-height: 2.1;
  color: #1A211F;
  margin-bottom: 10px;
}

.ayah-rosette {
  display: inline-block;
  color: var(--accent-gold);
  font-size: 1.1rem;
  margin: 0 4px;
}

.mushaf-translation {
  font-size: 0.78rem;
  color: #55635F;
  line-height: 1.55;
  font-style: normal;
  max-width: 240px;
  margin: 0 auto;
}

/* Inside Phone: Prayer Ring Card */
.phone-prayer-view {
  background: #FAF8F2;
  border: 1px solid #ECE7D8;
  border-radius: 20px;
  padding: 18px 14px;
  text-align: center;
}

.prayer-ring-outer {
  position: relative;
  width: 146px;
  height: 146px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--progress, 42) * 1%), #E7E2D5 0);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(31, 94, 84, 0.12);
}

.prayer-ring-inner {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #FAF8F2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.prayer-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-low);
  font-weight: 700;
}

.prayer-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-hi);
  line-height: 1;
}

.prayer-countdown {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent);
}

.prayer-sub {
  font-size: 0.68rem;
  color: var(--text-low);
}

/* Floating Frosted Chips */
.floating-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-radius: 18px;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-hi);
  box-shadow: 0 14px 34px -8px rgba(60, 50, 35, 0.14);
  white-space: nowrap;
}

.chip-qibla {
  top: 14%;
  left: -8%;
}

.chip-streak {
  bottom: 12%;
  right: -8%;
}

@media (max-width: 540px) {
  .floating-chip {
    display: none;
  }
}

/* ---------------- Features Grid ---------------- */
.section-features {
  padding: 88px 0;
  position: relative;
  z-index: 2;
}

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

.kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(2rem, 3.6vw, 2.7rem);
  color: var(--text-hi);
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-mid);
  font-size: 1.02rem;
  line-height: 1.6;
}

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

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

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

.feature-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(231, 227, 216, 0.85);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 18px rgba(45, 40, 30, 0.03);
}

.feature-card:hover {
  background: #FFFFFF;
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.feature-card h3 {
  font-family: var(--font-body);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-hi);
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ---------------- Ayat of the Moment ---------------- */
.section-moment {
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

.moment-shell {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .moment-shell {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
}

.moment-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(231, 227, 216, 0.95);
  border-radius: 28px;
  padding: 44px 38px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.moment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.moment-tag {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-low);
}

.btn-reroll {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.btn-reroll:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.ayah-ar {
  direction: rtl;
  font-family: var(--font-arabic);
  font-size: 2.15rem;
  line-height: 2;
  color: var(--text-hi);
  min-height: 2.2em;
  transition: opacity 0.25s ease;
}

.ayah-en {
  margin-top: 18px;
  font-size: 1.05rem;
  color: var(--text-hi);
  line-height: 1.65;
  transition: opacity 0.25s ease;
}

.ayah-en::before { content: "“"; color: var(--accent-gold); font-size: 1.3rem; margin-right: 2px; }
.ayah-en::after { content: "”"; color: var(--accent-gold); font-size: 1.3rem; margin-left: 2px; }

.ayah-ref {
  margin-top: 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  transition: opacity 0.25s ease;
}

/* ---------------- Download Banner ---------------- */
.section-get {
  padding: 40px 0 80px;
  position: relative;
  z-index: 2;
}

.get-banner {
  background: linear-gradient(145deg, #1F5E54 0%, #15463E 100%);
  border-radius: 32px;
  padding: 68px 48px;
  color: var(--on-accent);
  text-align: center;
  box-shadow: 0 20px 50px -15px rgba(31, 94, 84, 0.35);
  position: relative;
  overflow: hidden;
}

.get-banner h2 {
  font-size: clamp(2rem, 3.8vw, 2.8rem);
  color: #FFFFFF;
  margin-bottom: 16px;
}

.get-banner p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.get-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-store-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-store-banner:hover {
  background: #FFFFFF;
  color: var(--accent-strong);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-store-banner:hover .store-badge-text span:first-child {
  color: var(--text-mid);
}

/* ---------------- Support / Waqf Section ---------------- */
.section-support {
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

.support-shell {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 860px) {
  .support-shell {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.support-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 500px) {
  .support-stats {
    grid-template-columns: 1fr;
  }
}

.stat-box {
  background: #FFFFFF;
  padding: 32px 20px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-mid);
  font-weight: 600;
}

/* ---------------- Footer ---------------- */
footer {
  padding: 64px 0 44px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  position: relative;
  z-index: 2;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

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

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-mid);
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.footer-social[hidden] {
  display: none;
}

.footer-social-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-hi);
  transition: color 0.15s ease;
}

.footer-social-title:hover {
  color: var(--accent);
}

.footer-social-icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-hi);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.footer-social-icon:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
}

.footer-social-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--text-low);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------- QR Code Modal ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 36, 34, 0.55);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.qr-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 38px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: translateY(15px);
  transition: transform 0.25s ease;
}

.modal-backdrop.open .qr-card {
  transform: translateY(0);
}

.qr-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-subtle);
  display: grid;
  place-items: center;
  color: var(--text-mid);
  font-size: 1.1rem;
}

.qr-close:hover {
  background: var(--line);
  color: var(--text-hi);
}

.qr-image-wrapper {
  background: #F6F4EF;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: inline-block;
  margin: 20px 0;
}
