﻿/* === Hoca AI — global styles === */

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/plus_jakarta_sans/PlusJakartaSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/plus_jakarta_sans/PlusJakartaSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/plus_jakarta_sans/PlusJakartaSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/plus_jakarta_sans/PlusJakartaSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/plus_jakarta_sans/PlusJakartaSans-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ADDITION:reduced-motion START */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .phone-flip, .phone-stage { transform: none !important; }
  .fade-up { opacity: 1 !important; transform: none !important; }
}
*:focus-visible { outline: 2px solid #34d399; outline-offset: 3px; border-radius: 6px; }
/* ADDITION:reduced-motion END */

:root {
  --bg-0: #050807;
  --bg-1: #0a110e;
  --bg-2: #0f1a16;
  --bg-3: #15241f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --ink: #ecefec;
  --ink-soft: #c6ccc8;
  --ink-mute: #818a85;
  --ink-faint: #4a534e;

  --emerald: #10b981;
  --emerald-deep: #047857;
  --emerald-glow: #34d399;
  --emerald-ink: #064e3b;

  --gold: #d4a35c;
  --gold-soft: #b8884a;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 36px;

  --story-card-w: clamp(280px, 26vw, 360px);
  --shadow-emerald: 0 30px 80px -20px rgba(16, 185, 129, 0.35);
  --shadow-deep: 0 40px 120px -30px rgba(0, 0, 0, 0.9);

  --container: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--ink);
  font-family: "Manrope", "Inter", -apple-system, system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(16, 185, 129, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 30%, rgba(52, 211, 153, 0.06), transparent 60%),
    var(--bg-0);
}

::selection { background: var(--emerald); color: var(--bg-0); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

img, svg { display: block; max-width: 100%; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* === Typography === */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald-glow);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.18);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-glow);
  box-shadow: 0 0 12px var(--emerald-glow);
}

h1, h2, h3 {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(44px, 6.5vw, 84px); }
h2 { font-size: clamp(34px, 4.4vw, 60px); letter-spacing: -0.025em; }
h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.015em; }

p { line-height: 1.55; color: var(--ink-soft); }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-soft); max-width: 60ch; }

.muted { color: var(--ink-mute); }
.tiny { font-size: 12px; letter-spacing: 0.04em; color: var(--ink-mute); }

/* === Nav === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 28px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 14px 10px 18px;
  border-radius: 999px;
  background: rgba(10, 17, 14, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.nav-brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  object-fit: cover;
  flex: 0 0 auto;
}
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.nav-links a {
  transition: color .2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.btn-primary {
  background: var(--emerald);
  color: #021712;
  border-color: var(--emerald);
}
.btn-primary:hover { background: var(--emerald-glow); }
.btn-lg { padding: 14px 22px; font-size: 15px; }

@media (max-width: 820px) {
  .nav-links { display: none; }
}

@media (max-width: 700px) {
  .nav {
    padding: 12px 14px;
  }
  .nav-inner {
    width: min(100%, 420px);
    max-width: calc(100vw - 28px);
    justify-content: space-between;
    gap: 14px;
  }
  .nav-inner > .btn {
    display: none;
  }
  .hero {
    min-height: auto;
    padding: 118px 20px 44px;
  }
  .hero h1 {
    width: min(300px, calc(100vw - 34px));
    max-width: min(300px, calc(100vw - 34px));
    font-size: clamp(32px, 9.2vw, 36px);
    line-height: 1.08;
    text-wrap: balance;
  }
  .hero-lead {
    width: min(318px, calc(100vw - 34px));
    max-width: min(318px, calc(100vw - 34px));
    font-size: 14.5px;
  }
  .hero-cta .btn {
    flex: 1 1 150px;
    justify-content: center;
  }
  .hero-meta {
    flex-wrap: wrap;
    justify-content: center;
  }
  .phone {
    --pw: min(78vw, 312px);
    --ph: calc(var(--pw) * 2.115);
  }
  .story-track {
    padding: 0 18px;
  }
  .section {
    padding: 84px 0;
  }
}

/* === Hero === */
.hero {
  min-height: 100vh;
  padding: 140px 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
}
.hero h1 {
  margin-top: 22px;
  max-width: 16ch;
}
.hero h1 .accent {
  background: linear-gradient(180deg, var(--emerald-glow) 0%, var(--emerald) 60%, var(--emerald-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  margin: 26px auto 0;
  max-width: 56ch;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-meta {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-mute);
}
.hero-meta-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-faint);
}

/* === Phone mockup === */
.phone {
  --pw: 312px;
  --ph: 660px;
}
.phone, .phone-flip, .phone-back {
  width: var(--pw);
  height: var(--ph);
  background:
    linear-gradient(180deg, #1c1f1d 0%, #0a0c0b 35%, #060807 65%, #0d100e 100%);
  border-radius: 52px;
  padding: 4px;
  position: relative;
  box-shadow:
    /* titanium outer rim */
    0 0 0 0.5px rgba(255, 255, 255, 0.18),
    0 0 0 2px #0a0c0b,
    0 0 0 2.5px rgba(255, 255, 255, 0.10),
    /* deep cinematic shadow */
    0 80px 160px -40px rgba(0, 0, 0, 0.95),
    0 40px 80px -20px rgba(0, 0, 0, 0.7),
    /* emerald ambient */
    0 30px 80px -30px rgba(16, 185, 129, 0.22),
    /* glass top sheen */
    inset 0 1.5px 0 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.phone::before {
  /* brushed metal vertical highlight on left rail */
  content: "";
  position: absolute;
  top: 88px;
  bottom: 88px;
  left: -1px;
  width: 2px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 8%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.12) 92%,
    transparent 100%);
  border-radius: 2px;
  pointer-events: none;
  z-index: 2;
}
.phone::after {
  /* mirror on right rail */
  content: "";
  position: absolute;
  top: 88px;
  bottom: 88px;
  right: -1px;
  width: 2px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 8%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0.08) 92%,
    transparent 100%);
  border-radius: 2px;
  pointer-events: none;
  z-index: 2;
}

/* Side buttons */
.phone > .phone-screen::before {
  /* power button */
  content: "";
  position: absolute;
  top: 130px;
  right: -7px;
  width: 4px;
  height: 70px;
  background: linear-gradient(90deg, #050706 0%, #1a1d1b 60%, #2a2e2c 100%);
  border-radius: 2px 0 0 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6);
  z-index: 1;
}
.phone > .phone-screen::after {
  /* volume buttons (two stacked dashes via gradient) */
  content: "";
  position: absolute;
  top: 110px;
  left: -7px;
  width: 4px;
  height: 130px;
  background:
    linear-gradient(180deg,
      #0a0c0b 0%, #0a0c0b 5%,
      #2a2e2c 5%, #2a2e2c 8%,
      #1a1d1b 8%, #1a1d1b 35%,
      #2a2e2c 35%, #2a2e2c 38%,
      #0a0c0b 38%, #0a0c0b 42%,
      #1a1d1b 42%, #1a1d1b 80%,
      #0a0c0b 80%);
  border-radius: 0 2px 2px 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 48px;
  background: var(--bg-1);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  /* black bezel ring between glass and frame */
  box-shadow:
    inset 0 0 0 4px #050706,
    inset 0 0 0 5px rgba(255, 255, 255, 0.04),
    inset 0 0 30px rgba(0, 0, 0, 0.6);
}
/* glass reflection highlight over the screen */
.phone-screen > .screen-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.06) 0%,
      rgba(255, 255, 255, 0) 25%,
      rgba(255, 255, 255, 0) 75%,
      rgba(255, 255, 255, 0.03) 100%);
  border-radius: inherit;
}
.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 32px;
  background: #000;
  border-radius: 999px;
  z-index: 30;
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.06),
    inset 0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(0, 0, 0, 0.4);
}
.phone-notch::after {
  /* camera dot */
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #0a2e25 0%, #021510 60%, #000 100%);
  box-shadow:
    inset 0 0 0 1px rgba(52, 211, 153, 0.15),
    inset 0 0 3px rgba(52, 211, 153, 0.25);
}
.phone-status {
  position: absolute;
  top: 14px; left: 0; right: 0;
  height: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  z-index: 25;
}
.phone-status-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.real-app-screen {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  object-fit: cover;
  object-position: top center;
  border-radius: 42px;
  z-index: 12;
  opacity: 0;
  transform: scale(1.006);
  transition: opacity 0.55s ease, transform 0.55s ease;
  background: #f7faf9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.real-app-screen[data-real-screen="prayer"] { background-image: url("assets/screens/home.png"); }
.real-app-screen[data-real-screen="quran"] { background-image: url("assets/screens/explore.png"); }
.real-app-screen[data-real-screen="coach"] { background-image: url("assets/screens/coach.png"); }
.real-app-screen[data-real-screen="qibla"] { background-image: url("assets/screens/qibla.png"); }
.real-app-screen[data-real-screen="tasbih"] { background-image: url("assets/screens/tasbih.png"); }
.real-app-screen[data-real-screen] {
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}
.story-phone-col[data-active="prayer"] #story-phone .real-app-screen[data-real-screen="prayer"],
.story-phone-col[data-active="quran"] #story-phone .real-app-screen[data-real-screen="quran"],
.story-phone-col[data-active="coach"] #story-phone .real-app-screen[data-real-screen="coach"],
.story-phone-col[data-active="qibla"] #story-phone .real-app-screen[data-real-screen="qibla"],
.story-phone-col[data-active="tasbih"] #story-phone .real-app-screen[data-real-screen="tasbih"] {
  opacity: 1;
  transform: none;
}
#story-phone .phone-notch,
#story-phone .phone-status {
  display: none;
}
#story-phone .screen {
  visibility: hidden;
  pointer-events: none;
}

/* phone screen variants */
.screen {
  position: absolute;
  inset: 0;
  padding: 56px 18px 22px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: translateY(8px);
}
.screen.is-active {
  opacity: 1;
  transform: none;
}

/* === Story section (sticky phone) === */
.story {
  position: relative;
}
.story-track {
  display: grid;
  position: relative;
  grid-template-columns: 1fr minmax(320px, 360px) 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Big floating words around the phone (Phantom-style) */
.floating-words {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(100vw, 1180px);
  height: 100%;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}
.fw {
  position: absolute;
  font-size: clamp(36px, 5.4vw, 72px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: rgba(236, 239, 236, 0.08);
  opacity: 0;
  transform: translateY(40px) scale(0.92);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1), color .9s;
  white-space: nowrap;
  text-wrap: nowrap;
  filter: blur(0.4px);
}
.fw.is-active { opacity: 1; transform: none; }
.fw.is-accent { color: rgba(52, 211, 153, 0.22); }
.fw.is-gold { color: rgba(212, 163, 92, 0.22); }
.fw[data-pos="lt"] { top: 22%; left: 6%; }
.fw[data-pos="lb"] { top: 58%; left: 9%; }
.fw[data-pos="rt"] { top: 26%; right: 6%; text-align: right; }
.fw[data-pos="rb"] { top: 62%; right: 9%; text-align: right; }
.fw[data-pos="t"]  { top: 8%; left: 50%; transform: translate(-50%, 40px) scale(0.92); font-size: clamp(36px, 5vw, 72px); }
.fw[data-pos="t"].is-active { transform: translate(-50%, 0) scale(1); }
@media (max-width: 900px) { .floating-words { display: none; } }

/* per-panel phone transform — wraps the phone in a 3D stage */
.story-phone-col { position: relative; }
.story-bgword { z-index: 0; }
.phone-stage { position: relative; z-index: 2; }
.floating-words { z-index: 3; }
.phone-stage {
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  will-change: transform;
  /* JS drives this every frame via CSS vars; no transition for snappy scroll-sync */
  transform:
    translateY(var(--phone-ty, 0px))
    rotateX(var(--phone-rx, 8deg))
    rotateY(var(--phone-ry, 0deg))
    rotateZ(var(--phone-rz, 0deg))
    scale(var(--phone-sc, 1));
}

/* The phone needs front/back faces for the flip to feel real */
.phone-flip {
  position: relative;
  transform-origin: 50% 50%;
  --pw: 312px;
  --ph: 660px;
  width: var(--pw); height: var(--ph);
  transform-style: preserve-3d;
}
.phone-shell {
  position: absolute;
  inset: 0;
  width: var(--pw); height: var(--ph);
  border-radius: 52px;
  background: linear-gradient(180deg, #14181a 0%, #07090a 50%, #0a0e0d 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.phone-shell[data-z="-2"]  { transform: translateZ(-2px);  filter: brightness(0.94); }
.phone-shell[data-z="-4"]  { transform: translateZ(-4px);  filter: brightness(0.86); }
.phone-shell[data-z="-6"]  { transform: translateZ(-6px);  filter: brightness(0.78); }
.phone-shell[data-z="-8"]  { transform: translateZ(-8px);  filter: brightness(0.70); }
.phone-shell[data-z="-10"] { transform: translateZ(-10px); filter: brightness(0.62); }
.phone-shell[data-z="-12"] { transform: translateZ(-12px); filter: brightness(0.55); }

.phone-flip > .phone {
  transform: translateZ(0px);
}
.phone-flip > .phone {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.phone-back {
  position: absolute;
  inset: 0;
  width: var(--pw); height: var(--ph);
  background: linear-gradient(160deg, #0a110e 0%, #050807 100%);
  border-radius: 52px;
  padding: 4px;
  transform: rotateY(180deg) translateZ(14px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.phone-back-inner {
  width: 100%; height: 100%;
  border-radius: 36px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 30%, rgba(16, 185, 129, 0.18), transparent 70%),
    linear-gradient(180deg, #0a110e, #050807);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.phone-back-mark {
  width: 112px; height: 112px;
  border-radius: 27px;
  object-fit: cover;
  opacity: 0.42;
  filter: drop-shadow(0 22px 45px rgba(0, 0, 0, 0.45));
}
.phone-back-word {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(236, 239, 236, 0.42);
  font-weight: 600;
  font-style: normal;
}
.phone-back-camera {
  position: absolute;
  top: 26px; left: 26px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1a2420, #050807);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 6px #050807, inset 0 0 0 8px rgba(52, 211, 153, 0.12);
}

.story-phone-col[data-active="prayer"] .phone-stage,
.story-phone-col[data-active="quran"]  .phone-stage,
.story-phone-col[data-active="coach"]  .phone-stage,
.story-phone-col[data-active="qibla"]  .phone-stage,
.story-phone-col[data-active="tasbih"] .phone-stage { transform:
    translateY(var(--phone-ty, 0px))
    rotateX(var(--phone-rx, 8deg))
    rotateY(var(--phone-ry, 0deg))
    rotateZ(var(--phone-rz, 0deg))
    scale(var(--phone-sc, 1)); }

/* Huge background headline that crossfades per panel (Phantom-style "HOCA." text) */
.story-bgword {
  position: absolute;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw, 1180px);
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.story-bgword span {
  position: absolute;
  font-size: clamp(120px, 16vw, 220px);
  font-weight: 800;
  letter-spacing: -0.06em;
  font-style: italic;
  line-height: 0.85;
  color: rgba(52, 211, 153, 0.06);
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 1.1s ease;
  user-select: none;
}
.story-phone-col[data-active="prayer"] .story-bgword [data-bg="prayer"],
.story-phone-col[data-active="quran"]  .story-bgword [data-bg="quran"],
.story-phone-col[data-active="coach"]  .story-bgword [data-bg="coach"],
.story-phone-col[data-active="qibla"]  .story-bgword [data-bg="qibla"],
.story-phone-col[data-active="tasbih"] .story-bgword [data-bg="tasbih"] { opacity: 1; }

.story-phone-col .phone {
  transition: box-shadow 1s ease;
}
.story-phone-col[data-active="coach"] .phone,
.story-phone-col[data-active="tasbih"] .phone {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 60px 160px -40px rgba(0, 0, 0, 0.9),
    0 40px 90px -10px rgba(16, 185, 129, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.story-phone-col {
  position: sticky;
  pointer-events: none;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 2;
  grid-row: 1;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  transition: opacity 0.45s ease;
}
.story-copy-col {
  display: flex;
  position: relative;
  z-index: 5;
  flex-direction: column;
  gap: 0;
  padding: 20vh 0;
  grid-column: 3;
  grid-row: 1;
}
.story-panel {
  min-height: 100vh;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  opacity: 0.18;
  transition: opacity 0.5s ease;
}
.story-panel.is-active { opacity: 1; }
.story-panel h2 { font-size: clamp(34px, 4vw, 52px); }
.story-panel .lead { font-size: clamp(16px, 1.3vw, 19px); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.chip {
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  letter-spacing: 0.005em;
}
.chip-warn {
  background: rgba(212, 163, 92, 0.08);
  border-color: rgba(212, 163, 92, 0.25);
  color: var(--gold);
}
.chip-emerald {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--emerald-glow);
}

/* Mobile: stack */
@media (max-width: 900px) {
  .story-track {
    grid-template-columns: 1fr;
  }
  .story-phone-col {
    position: relative;
    height: auto;
    padding: 40px 0;
    grid-column: 1;
    grid-row: auto;
  }
  .story-copy-col { padding: 20px 0; grid-column: 1; grid-row: auto; }
  .story-panel { min-height: auto; padding: 60px 0; opacity: 1; }
}

/* === Sections shared === */
.section {
  padding: 140px 0;
  position: relative;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 760px;
  margin-bottom: 70px;
}
.section-head h2 { max-width: 18ch; }
.section-head .lead { margin-top: 0; }

/* features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr; }
}
.feature {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--emerald-glow);
}
.feature h3 { font-size: 19px; }
.feature p { font-size: 14.5px; line-height: 1.5; margin: 0; }
.feature-tag {
  position: absolute;
  top: 18px; right: 18px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 4px 8px;
  background: rgba(212, 163, 92, 0.1);
  border: 1px solid rgba(212, 163, 92, 0.25);
  border-radius: 6px;
}

/* === Pricing compare === */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 30px;
}
@media (max-width: 800px) { .compare { grid-template-columns: 1fr; } }
.plan {
  padding: 36px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.plan-pro {
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.07), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 30px 80px -40px rgba(16, 185, 129, 0.4);
}
.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.plan-head h3 { font-size: 24px; }
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink-mute);
  font-size: 13px;
}
.plan ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plan li {
  position: relative;
  padding-left: 30px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.plan li > svg {
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
}
.plan li > strong { font-weight: 600; color: var(--ink); }
.plan li > .muted { color: var(--ink-mute); }
.plan-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-mute);
}

/* === FAQ === */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 26px 4px;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 24px;
  color: var(--ink-mute);
  font-weight: 300;
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--emerald-glow); }
.faq details p {
  margin: 14px 0 0;
  font-size: 15px;
  max-width: 70ch;
  color: var(--ink-soft);
}

/* === Download CTA === */
.download {
  padding: 140px 0 120px;
  text-align: center;
}
.download h2 { max-width: 18ch; margin: 0 auto; }
.download .lead { margin: 22px auto 0; }
.store-row {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: all .2s;
  min-width: 200px;
  font: inherit;
  cursor: pointer;
}
.store-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-2px);
}
.store-badge.is-disabled,
.store-badge:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}
.store-badge.is-disabled:hover,
.store-badge:disabled:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  transform: none;
}
.store-badge-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-badge-text small { font-size: 11px; color: var(--ink-mute); letter-spacing: 0.05em; text-transform: uppercase; }
.store-badge-text strong { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

/* === Footer === */
footer {
  border-top: 1px solid var(--line);
  padding: 70px 0 50px;
  background: rgba(0, 0, 0, 0.3);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.foot-col { min-width: 0; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-col h4 {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 16px;
  font-weight: 600;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col li a { color: var(--ink-soft); font-size: 14px; transition: color .2s; }
.foot-col li a:hover { color: var(--ink); }

.foot-brand-line {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-mute);
  max-width: 36ch;
  line-height: 1.55;
}
.foot-bottom {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-mute);
}
/* === Misc === */
.kbd {
  display: inline-block;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.fade-up {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js-on .fade-up:not(.is-in) {
  opacity: 1;
  transform: none;
}
.fade-up.is-in {
  opacity: 1;
  transform: none;
}

/* tiny grid background for hero */
.bg-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
  pointer-events: none;
}

@media (max-width: 640px) {
  .container {
    padding: 0 18px;
  }

  .eyebrow {
    max-width: 100%;
    white-space: normal;
    justify-content: center;
    text-align: center;
    line-height: 1.45;
  }

  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-cta {
    width: 100%;
    max-width: 330px;
    margin-left: auto;
    margin-right: auto;
    gap: 10px;
  }

  .hero-cta .btn {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 14px;
  }

  .hero-meta {
    width: 100%;
    gap: 10px 12px;
  }

  .story-bgword {
    display: none;
  }

  .section-head {
    margin-bottom: 44px;
  }

  .feature,
  .plan {
    border-radius: 18px;
  }

  .foot-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .foot-col,
  .foot-col ul,
  .foot-col li,
  .foot-col a {
    min-width: 0;
  }

  .foot-col a {
    overflow-wrap: anywhere;
  }

  .foot-bottom {
    align-items: flex-start;
  }
}

/* single-phone landing corrections */
.hero {
  min-height: 100svh;
  padding: 132px 20px 98px;
  z-index: 2;
  overflow: visible;
}

.hero-cta {
  width: min(100%, 440px);
  margin-left: auto;
  margin-right: auto;
}

.hero-cta .btn {
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
}

.story {
  margin-top: clamp(-320px, -30svh, -220px);
  padding-top: 0;
  position: relative;
  z-index: 1;
}

.story-track {
  min-height: 560vh;
}

.story-phone-col {
  top: 0;
}

.story-copy-col {
  padding-top: calc(72vh + 32px);
}

.plan-pro {
  box-shadow: 0 30px 80px -42px rgba(16, 185, 129, 0.55);
}

@media (max-width: 900px) {
  .story {
    margin-top: clamp(-260px, -28svh, -170px);
  }

  .story-track {
    display: block;
    min-height: auto;
    gap: 0;
  }

  .story-phone-col {
    position: relative;
    top: auto;
    min-height: 0;
    height: auto;
    padding: 0 0 36px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .story-phone-col[data-active] .phone-stage {
    position: relative;
    top: auto;
    margin: 0 auto;
    transform: rotateX(4deg) rotateY(0deg) rotateZ(0deg) scale(0.98);
  }

  .phone-flip {
    --pw: min(72vw, 286px);
    --ph: calc(var(--pw) * 2.115);
  }

  .story-copy-col {
    padding: 0;
    z-index: 5;
  }

  .story-panel {
    min-height: auto;
    justify-content: center;
    padding: 56px 0;
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .hero {
    padding: 108px 16px 46px;
  }

  .hero h1 {
    width: min(300px, 100%);
    max-width: 300px;
    font-size: clamp(31px, 8.3vw, 34px);
    line-height: 1.1;
  }

  .hero-lead {
    width: min(314px, 100%);
    max-width: 314px;
    font-size: 14px;
  }

  .hero-cta {
    flex-direction: column;
    width: min(100%, 300px);
  }

  .hero-cta .btn {
    width: 100%;
  }

  .phone {
    --pw: min(72vw, 286px);
    --ph: calc(var(--pw) * 2.115);
  }

  .story-panel {
    padding-bottom: 9vh;
  }

  .story-panel h2 {
    font-size: clamp(29px, 8vw, 36px);
  }
}

@media (max-width: 430px) {
  .nav-inner {
    max-width: calc(100vw - 24px);
  }

  .live-widget {
    max-width: min(342px, calc(100vw - 28px));
  }

  .lw-times {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compare {
    gap: 18px;
  }
}

/* === Landing sync pass: single phone story, responsive-safe === */
.hero {
  min-height: 100svh;
  padding: clamp(118px, 14svh, 150px) 20px clamp(96px, 16svh, 150px);
  overflow: visible;
}

.hero h1 {
  max-width: 17ch;
}

.hero-lead {
  max-width: 68ch;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(640px, calc(100vw - 40px));
  margin: 22px auto 0;
}

.hero-proof span {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
}

.hero-proof strong {
  color: var(--emerald-glow);
  font-weight: 700;
}

.story {
  margin-top: clamp(-300px, -33svh, -210px);
  padding-top: 0;
  position: relative;
  z-index: 1;
}

.story-track {
  width: min(100%, 1280px);
  min-height: 570svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) minmax(300px, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.story-phone-col {
  position: sticky;
  top: 0;
  height: 100svh;
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  z-index: 3;
}

.phone-stage {
  margin: 0 auto;
}

.story-copy-col {
  grid-column: 3;
  grid-row: 1;
  padding: 86svh 0 32svh;
}

.story-panel {
  min-height: 100svh;
  opacity: 0.18;
  justify-content: center;
  padding: 0;
}

.story-panel.is-active {
  opacity: 1;
}

.story-panel .eyebrow {
  align-self: flex-start;
}

.story-panel h2 {
  font-size: clamp(36px, 4.1vw, 56px);
  max-width: 10.5ch;
}

.story-panel .lead {
  max-width: 36ch;
}

@media (max-width: 1120px) and (min-width: 901px) {
  .story-track {
    grid-template-columns: minmax(286px, 330px) minmax(0, 1fr);
    gap: 44px;
    padding-inline: 32px;
  }

  .story-phone-col {
    grid-column: 1;
  }

  .story-copy-col {
    grid-column: 2;
  }

  .phone,
  .phone-flip,
  .phone-back {
    --pw: min(31vw, 300px);
    --ph: calc(var(--pw) * 2.115);
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: 108px 16px 44px;
  }

  .hero h1 {
    width: min(318px, 100%);
    max-width: 318px;
    font-size: clamp(32px, 8.4vw, 40px);
  }

  .hero-lead {
    width: min(350px, 100%);
    max-width: 350px;
  }

  .hero-proof {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(330px, calc(100vw - 48px));
    gap: 7px;
  }

  .hero-proof span {
    min-height: 46px;
    padding: 8px 7px;
    flex-direction: column;
    gap: 2px;
    font-size: 11.5px;
  }

  .hero > .eyebrow {
    width: min(330px, calc(100vw - 48px));
    max-width: min(330px, calc(100vw - 48px));
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    line-height: 1.35;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .story {
    margin-top: 0;
  }

  .story-track {
    min-height: 540svh;
    display: grid;
    grid-template-columns: 1fr;
    width: min(100%, 430px);
    padding: 0 18px;
    gap: 0;
  }

  .story-phone-col {
    position: sticky;
    top: 76px;
    height: min(62svh, 570px);
    width: 100%;
    padding: 10px 0 18px;
    grid-column: 1;
    grid-row: 1;
    align-items: flex-start;
    z-index: 8;
  }

  .story-phone-col[data-active] .phone-stage,
  .story-phone-col[data-active="prayer"] .phone-stage,
  .story-phone-col[data-active="quran"] .phone-stage,
  .story-phone-col[data-active="coach"] .phone-stage,
  .story-phone-col[data-active="qibla"] .phone-stage,
  .story-phone-col[data-active="tasbih"] .phone-stage {
    transform: rotateX(3deg) rotateY(0deg) rotateZ(0deg) scale(0.86);
  }

  .phone,
  .phone-flip,
  .phone-back {
    --pw: min(70vw, 274px);
    --ph: calc(var(--pw) * 2.115);
  }

  .story-copy-col {
    grid-column: 1;
    grid-row: 1;
    padding: calc(min(62svh, 570px) + 44px) 0 80px;
    z-index: 9;
    pointer-events: auto;
  }

  .story-panel {
    min-height: 72svh;
    padding: 34px 0 70px;
    opacity: 0.24;
  }

  .story-panel.is-active,
  .story-panel:first-child {
    opacity: 1;
  }

  .story-panel h2 {
    max-width: 11ch;
    font-size: clamp(34px, 9vw, 44px);
  }

  .story-panel .lead {
    max-width: 32ch;
    font-size: 16px;
  }
}

@media (max-width: 430px) {
  .story-phone-col {
    top: 70px;
    height: min(59svh, 530px);
  }

  .story-phone-col[data-active] .phone-stage,
  .story-phone-col[data-active="prayer"] .phone-stage,
  .story-phone-col[data-active="quran"] .phone-stage,
  .story-phone-col[data-active="coach"] .phone-stage,
  .story-phone-col[data-active="qibla"] .phone-stage,
  .story-phone-col[data-active="tasbih"] .phone-stage {
    transform: rotateX(3deg) rotateY(0deg) rotateZ(0deg) scale(0.82);
  }

  .phone,
  .phone-flip,
  .phone-back {
    --pw: min(76vw, 282px);
    --ph: calc(var(--pw) * 2.115);
  }

  .story-panel {
    min-height: 76svh;
  }
}

/* === Landing reference recovery: pin the single phone reliably === */
.story-copy-col {
  padding: 48svh 0 28svh;
}

.story-phone-col.is-pinned {
  position: fixed !important;
  top: 0 !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(380px, 34vw) !important;
  height: 100svh !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none;
  z-index: 4;
}

.story-phone-col.is-pinned .phone-stage {
  position: relative;
  margin: 0 auto;
  transform:
    translateY(var(--phone-ty, 0px))
    rotateX(var(--phone-rx, 8deg))
    rotateY(var(--phone-ry, 0deg))
    rotateZ(var(--phone-rz, 0deg))
    scale(var(--phone-sc, 1)) !important;
}

.story-phone-col.is-pinned .story-bgword,
.story-phone-col.is-pinned .floating-words {
  position: fixed;
  inset: 0;
  left: 0;
  width: 100vw;
  height: 100svh;
  transform: none;
}

.story-phone-col.is-after {
  opacity: 0;
}

@media (min-width: 901px) and (max-width: 1120px) {
  .story-copy-col {
    padding: 44svh 0 28svh;
  }

  .story-phone-col.is-pinned {
    left: 34% !important;
    width: min(330px, 36vw) !important;
  }
}

@media (max-width: 900px) {
  .story-copy-col {
    padding: calc(min(34svh, 330px) + 34px) 0 84px;
  }

  .story-phone-col.is-pinned {
    top: 72px !important;
    left: 0 !important;
    width: 100% !important;
    height: min(34svh, 330px) !important;
    transform: none !important;
    align-items: flex-start !important;
    padding: 10px 0 18px;
    background:
      linear-gradient(180deg, rgba(5, 8, 7, 0.98) 0%, rgba(5, 8, 7, 0.88) 64%, rgba(5, 8, 7, 0) 100%);
    z-index: 30;
  }

  .story-phone-col.is-pinned .phone-stage {
    transform: rotateX(3deg) rotateY(0deg) rotateZ(0deg) scale(0.48) !important;
  }

  .story-phone-col.is-pinned .story-bgword,
  .story-phone-col.is-pinned .floating-words {
    display: none;
  }

  .story-copy-col {
    z-index: 5;
  }

  .story-panel {
    opacity: 0.12;
  }

  .story-panel.is-active {
    opacity: 1;
  }

  .story-panel:first-child:not(.is-active) {
    opacity: 0.08;
  }
}

@media (max-width: 430px) {
  .story-phone-col.is-pinned {
    top: 70px !important;
    height: min(32svh, 310px) !important;
  }

  .story-phone-col.is-pinned .phone-stage {
    transform: rotateX(3deg) rotateY(0deg) rotateZ(0deg) scale(0.44) !important;
  }

  .story-copy-col {
    padding-top: calc(min(32svh, 310px) + 30px);
  }

  .story-panel h2 {
    font-size: clamp(30px, 8.2vw, 38px);
    max-width: 12ch;
  }

  .story-panel .lead {
    font-size: 15.5px;
  }
}

/* === Product-first hero pass: visible app preview from the first viewport === */
.hero {
  isolation: isolate;
}

.hero > :not(.bg-grid) {
  position: relative;
  z-index: 2;
}

.hero-product {
  position: relative;
  width: min(820px, calc(100vw - 40px));
  min-height: clamp(214px, 25vw, 308px);
  margin: clamp(24px, 3.4vw, 34px) auto 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.hero-product::before {
  content: "";
  position: absolute;
  inset: 16% 8% 6%;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(16, 185, 129, 0.34), transparent 58%),
    radial-gradient(ellipse at 22% 70%, rgba(212, 163, 92, 0.16), transparent 50%);
  filter: blur(36px);
  opacity: 0.86;
}

.hero-product::after {
  content: "";
  position: absolute;
  inset: auto 18% 10% 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.46), transparent);
  box-shadow: 0 0 34px rgba(52, 211, 153, 0.32);
}

.hero-product-phone {
  width: clamp(164px, 18vw, 238px);
  height: clamp(214px, 24vw, 318px);
  position: relative;
  overflow: hidden;
  border-radius: clamp(30px, 3vw, 48px) clamp(30px, 3vw, 48px) 26px 26px;
  padding: 4px;
  background: linear-gradient(180deg, #1b201e 0%, #050807 100%);
  background-image:
    linear-gradient(180deg, rgba(27, 32, 30, 0.12), rgba(5, 8, 7, 0.10)),
    url("assets/screens/home.png");
  background-size: cover;
  background-position: top center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 34px 90px -28px rgba(0, 0, 0, 0.95),
    0 28px 70px -34px rgba(16, 185, 129, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: perspective(900px) rotateX(6deg) rotateY(-10deg) rotateZ(0deg);
  animation: heroPhoneFloat 7s ease-in-out infinite;
}

.hero-product-phone::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 50%;
  width: 31%;
  height: 18px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: #050807;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-product-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: clamp(25px, 2.5vw, 40px) clamp(25px, 2.5vw, 40px) 22px 22px;
}

.hero-product-card {
  position: absolute;
  min-width: clamp(148px, 17vw, 210px);
  padding: 13px 15px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 13, 11, 0.74);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 22px 70px -34px rgba(0, 0, 0, 0.9);
  text-align: left;
}

.hero-product-card span,
.hero-product-card em {
  display: block;
  color: var(--ink-mute);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-product-card strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.05;
}

.hero-product-card em {
  margin-top: 5px;
  color: var(--emerald-glow);
  letter-spacing: 0.02em;
  text-transform: none;
}

.hero-product-card-time {
  left: 7%;
  top: 24%;
}

.hero-product-card-ai {
  right: 6%;
  bottom: 18%;
  border-color: rgba(212, 163, 92, 0.26);
}

.hero-product-card-ai em {
  color: var(--gold);
}

@keyframes heroPhoneFloat {
  0%, 100% {
    transform: perspective(900px) rotateX(6deg) rotateY(-10deg) translateY(0);
  }
  50% {
    transform: perspective(900px) rotateX(5deg) rotateY(-6deg) translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-product-phone {
    animation: none;
  }
}

@media (max-width: 900px) {
  .hero-product {
    width: min(100%, 430px);
    min-height: 236px;
    margin-top: 22px;
  }

  .hero-product-phone {
    width: min(45vw, 178px);
    height: 230px;
    transform: perspective(800px) rotateX(5deg) rotateY(-7deg);
  }

  .hero-product-card {
    min-width: 136px;
    padding: 10px 12px;
    border-radius: 17px;
  }

  .hero-product-card span,
  .hero-product-card em {
    font-size: 9.5px;
  }

  .hero-product-card strong {
    font-size: 15px;
  }

  .hero-product-card-time {
    left: 0;
    top: 30px;
  }

  .hero-product-card-ai {
    right: 0;
    bottom: 24px;
  }

  .hero-cta {
    margin-top: 24px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 96px;
  }

  .hero h1 {
    font-size: clamp(30px, 8vw, 36px);
  }

  .hero-lead {
    width: min(330px, calc(100vw - 42px)) !important;
    max-width: min(330px, calc(100vw - 42px)) !important;
  }

  .hero-meta,
  .hero-proof {
    display: none;
  }

  .hero-product {
    min-height: 220px;
  }

  .hero-product-card {
    display: none;
  }

  .hero-product-phone {
    width: min(52vw, 188px);
    height: 244px;
  }
}

@media (max-width: 430px) {
  .hero-product {
    min-height: 224px;
  }

  .hero-product-phone {
    width: min(54vw, 184px);
    height: 238px;
  }
}

/* === Desktop hero/story polish: cleaner opening, no cropped phone, smoother scroll === */
@media (min-width: 901px) {
  .hero {
    min-height: 100svh;
    padding: clamp(112px, 12svh, 132px) 20px clamp(72px, 10svh, 104px);
  }

  .hero h1 {
    max-width: 12ch;
    margin-top: 18px;
    font-size: clamp(56px, 5.8vw, 78px);
    line-height: 0.98;
  }

  .hero-lead {
    max-width: 38ch;
    margin-top: 20px;
    font-size: clamp(16px, 1.08vw, 18px);
  }

  .hero-meta,
  .hero-proof,
  .hero .live-widget {
    display: none;
  }

  .hero-product {
    width: min(520px, calc(100vw - 40px));
    min-height: clamp(390px, 43svh, 500px);
    margin-top: clamp(24px, 3svh, 34px);
  }

  .hero-product-card {
    display: none;
  }

  .hero-product::before {
    inset: 12% -8% 5%;
  }

  .hero-product::after {
    display: none;
  }

  .hero-product-phone {
    width: clamp(178px, 13vw, 224px);
    height: calc(clamp(178px, 13vw, 224px) * 2.12);
    border-radius: 40px;
    opacity: 0;
  }

  .hero-product-phone img {
    object-fit: cover;
    border-radius: 34px;
  }

  .hero-cta {
    width: min(100%, 360px);
    margin-top: clamp(18px, 2.5svh, 26px);
    gap: 10px;
  }

  .hero-cta .btn {
    min-height: 42px;
    padding: 11px 18px;
    font-size: 14px;
  }

  .story {
    margin-top: 0;
  }

  .story-track {
    min-height: 620svh;
  }

  .story-copy-col {
    padding: 42svh 0 34svh;
  }

  .story-panel {
    min-height: 96svh;
  }

  .story-phone-col.is-before {
    position: fixed !important;
    top: 0 !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: min(380px, 34vw) !important;
    height: 100svh !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 3;
  }

  .story-phone-col.is-before .story-bgword,
  .story-phone-col.is-before .floating-words {
    opacity: 0;
  }

  .story-phone-col.is-pinned {
    position: fixed !important;
    top: 0 !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: min(380px, 34vw) !important;
    height: 100svh !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .story-phone-col.is-pinned .story-bgword,
  .story-phone-col.is-pinned .floating-words {
    position: absolute;
    inset: 0;
    left: 50%;
    width: min(100vw, 1180px);
    height: 100%;
    transform: translateX(-50%);
  }

  .story-phone-col.is-after {
    position: fixed !important;
    top: 0 !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: min(380px, 34vw) !important;
    height: 100svh !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0s linear 0.24s;
  }

  .story-phone-col.is-after .story-bgword,
  .story-phone-col.is-after .floating-words {
    position: absolute;
    inset: 0;
    left: 50%;
    width: min(100vw, 1180px);
    height: 100%;
    transform: translateX(-50%);
  }
}

/* === Desktop story text lock: prevents headings from sliding under nav === */
@media (min-width: 901px) {
  .story-copy-col {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .story-copy-col.is-pinned {
    position: fixed !important;
    top: 0 !important;
    left: calc(50% + min(250px, 18vw)) !important;
    width: min(460px, calc(50vw - 96px)) !important;
    height: 100svh !important;
    padding: 0 !important;
    display: grid !important;
    align-items: center !important;
    z-index: 5;
    opacity: 1;
    visibility: visible;
  }

  .story-copy-col.is-before,
  .story-copy-col.is-after {
    opacity: 0;
    visibility: hidden;
  }

  .story-panel {
    grid-column: 1;
    grid-row: 1;
    min-height: auto;
    width: min(460px, 100%);
    padding: clamp(32px, 5svh, 74px) 0 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition:
      opacity 0.34s ease,
      transform 0.34s ease,
      visibility 0s linear 0.34s;
  }

  .story-panel.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
      opacity 0.34s ease,
      transform 0.34s ease,
      visibility 0s;
  }

  .story-panel h2 {
    max-width: 13.5ch;
    font-size: clamp(34px, 3.6vw, 52px);
    line-height: 1.02;
  }

  .story-panel .lead {
    max-width: 39ch;
  }
}

/* === Hero CTA clearance: keeps store buttons below the pinned phone === */
@media (min-width: 901px) {
  .hero {
    padding-bottom: clamp(132px, 14svh, 180px);
  }

  .hero-cta {
    margin-top: clamp(56px, 6.4svh, 82px);
  }
}

/* === Story panel guard: prevents ghost text during fast scroll jumps === */
@media (min-width: 901px) {
  .story-copy-col.is-pinned .story-panel {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: none !important;
    transition: none !important;
  }

  .story-copy-col.is-pinned .story-panel.is-active {
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* === Hero CTA scroll guard: store buttons never pass over the phone === */
@media (min-width: 901px) {
  .hero > .hero-cta {
    position: fixed !important;
    top: var(--hero-cta-top, calc(100svh + 32px));
    left: 50%;
    z-index: 6;
    width: min(100%, 360px);
    margin-top: 0 !important;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) !important;
    transition: none !important;
  }

  .hero > .hero-cta.is-ready {
    opacity: 1;
    pointer-events: auto;
  }

  .hero > .hero-cta.is-scroll-hidden {
    opacity: 0 !important;
    pointer-events: none;
  }
}

/* === Mobile story fallback: readable vertical flow instead of overlapping pinned phone === */
@media (max-width: 900px) {
  .nav {
    position: absolute;
  }

  .story {
    margin-top: 0 !important;
    padding: 68px 0 24px;
  }

  .story-track {
    display: block !important;
    width: min(100%, 440px) !important;
    min-height: auto !important;
    padding: 0 22px !important;
  }

  .story-phone-col,
  .story-phone-col.is-before,
  .story-phone-col.is-pinned,
  .story-phone-col.is-after {
    display: none !important;
  }

  .story-copy-col,
  .story-copy-col.is-before,
  .story-copy-col.is-pinned,
  .story-copy-col.is-after {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column;
    gap: 0;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 2;
  }

  .story-panel,
  .story-copy-col.is-pinned .story-panel,
  .story-copy-col.is-pinned .story-panel.is-active,
  .story-panel:first-child:not(.is-active) {
    position: relative !important;
    min-height: auto !important;
    width: 100% !important;
    padding: 30px 0 40px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .story-panel::before {
    content: "";
    display: block;
    width: min(54vw, 190px);
    aspect-ratio: 9 / 19.35;
    margin: 0 auto 22px;
    border: 7px solid #081121;
    border-bottom-width: 10px;
    border-radius: 30px;
    background-image: var(--mobile-story-screen);
    background-size: cover;
    background-position: top center;
    background-color: #eefcf8;
    box-shadow:
      0 34px 92px -46px rgba(0, 255, 194, 0.82),
      0 18px 60px -40px rgba(0, 0, 0, 0.95),
      inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  }

  .story-panel[data-panel="prayer"] { --mobile-story-screen: url("assets/screens/home.png"); }
  .story-panel[data-panel="quran"] { --mobile-story-screen: url("assets/screens/explore.png"); }
  .story-panel[data-panel="coach"] { --mobile-story-screen: url("assets/screens/coach.png"); }
  .story-panel[data-panel="qibla"] { --mobile-story-screen: url("assets/screens/qibla.png"); }
  .story-panel[data-panel="tasbih"] { --mobile-story-screen: url("assets/screens/tasbih.png"); }

  .story-panel:last-child {
    border-bottom: 0;
  }

  .story-panel .eyebrow {
    align-self: flex-start;
    max-width: 100%;
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  .story-panel h2 {
    max-width: 100% !important;
    font-size: clamp(28px, 8vw, 36px) !important;
    line-height: 1.04;
    overflow-wrap: normal;
    text-wrap: balance;
  }

  .story-panel .lead {
    max-width: 100% !important;
    font-size: 15px;
    line-height: 1.58;
  }

  .story-panel .chip-row {
    gap: 9px;
    max-width: 100%;
    overflow: hidden;
  }

  .story-panel .chip {
    max-width: 100%;
    white-space: normal;
    font-size: 11.5px;
  }
}

/* === Responsive hero QA pass: full phone mockup on mobile/tablet === */
@media (min-width: 901px) {
  .story-phone-col.is-before .phone-stage {
    transform:
      translateY(var(--phone-ty, 0px))
      rotateX(var(--phone-rx, 8deg))
      rotateY(var(--phone-ry, 0deg))
      rotateZ(var(--phone-rz, 0deg))
      scale(var(--phone-sc, 1)) !important;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-bottom: 54px;
  }

  .hero-product {
    width: min(100%, 460px);
    min-height: clamp(386px, 62vw, 476px);
    margin-top: 24px;
  }

  .hero-product::before {
    inset: 10% 5% 2%;
  }

  .hero-product-phone {
    --hero-phone-w: min(38vw, 214px);
    width: var(--hero-phone-w);
    height: calc(var(--hero-phone-w) * 2.22);
    overflow: hidden;
    border-radius: clamp(32px, 4vw, 46px);
    transform: perspective(850px) rotateX(5deg) rotateY(-7deg);
  }

  .hero-product-phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: clamp(27px, 3.4vw, 40px);
  }

  .hero-product-card {
    display: none;
  }

  .hero-product-card-time {
    left: max(8px, 5%);
    top: 22%;
  }

  .hero-product-card-ai {
    right: max(8px, 5%);
    bottom: 19%;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 92px;
  }

  .hero-product {
    min-height: clamp(360px, 96vw, 410px);
  }

  .hero-product-phone {
    --hero-phone-w: min(46vw, 176px);
  }

  .hero-lead {
    width: min(300px, calc(100vw - 56px)) !important;
    max-width: min(300px, calc(100vw - 56px)) !important;
    font-size: 13.5px;
  }

  .hero-cta {
    flex-direction: row;
    width: min(270px, calc(100vw - 64px)) !important;
    max-width: min(270px, calc(100vw - 64px)) !important;
    margin-top: 18px;
    gap: 10px;
  }

  .hero-cta .btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0 !important;
    min-height: 48px;
    justify-content: center;
    padding-inline: 10px;
    font-size: 12.5px;
  }
}

@media (max-width: 430px) {
  .hero-product {
    min-height: min(392px, 96vw);
  }

  .hero-product-phone {
    --hero-phone-w: min(46vw, 172px);
  }

  .hero-cta {
    width: min(100%, 300px);
  }

  .story-panel::before {
    width: min(58vw, 176px);
    border-width: 6px;
    border-bottom-width: 9px;
    border-radius: 28px;
  }
}

/* === Real-phone hero clearance: keep store buttons inside the first mobile viewport === */
@media (max-width: 640px) {
  .hero {
    padding-top: 78px;
    padding-bottom: 34px;
  }

  .hero h1 {
    font-size: clamp(29px, 7.6vw, 34px);
  }

  .hero-lead {
    margin-top: 14px;
  }

  .hero-product {
    min-height: clamp(318px, 83vw, 356px);
    margin-top: 14px;
  }

  .hero-product-phone {
    --hero-phone-w: min(42vw, 158px);
  }

  .hero-cta {
    margin-top: 10px;
  }
}

@media (max-width: 430px) {
  .hero-product {
    min-height: min(348px, 86vw);
  }

  .hero-product-phone {
    --hero-phone-w: min(42vw, 158px);
  }
}

/* === Final web QA polish: prevent desktop hero/story collisions === */
@media (min-width: 901px) {
  .hero h1 {
    font-size: clamp(52px, 5.2vw, 72px);
    line-height: 1;
  }

  .hero-lead {
    margin-top: 16px;
  }

  .story-phone-col.is-before .phone-stage {
    transform:
      translateY(calc(var(--phone-ty, 0px) + 56px))
      rotateX(var(--phone-rx, 8deg))
      rotateY(var(--phone-ry, 0deg))
      rotateZ(var(--phone-rz, 0deg))
      scale(calc(var(--phone-sc, 1) * 0.84)) !important;
  }
}

@media (min-width: 901px) and (max-width: 1120px) {
  .story-bgword,
  .floating-words {
    display: none !important;
  }

  .story-phone-col.is-pinned,
  .story-phone-col.is-before {
    left: 32% !important;
    width: min(318px, 34vw) !important;
  }

  .story-copy-col.is-pinned {
    left: calc(50% + 116px) !important;
    width: min(356px, calc(100vw - 646px)) !important;
  }

  .story-panel h2 {
    max-width: 12.5ch;
    font-size: clamp(32px, 3.2vw, 42px);
  }

  .story-panel .lead {
    max-width: 34ch;
    font-size: 16px;
  }
}
