/* ==========================================================================
   Knots: marketing site styles
   Tokens ported 1:1 from src/theme/tokens.ts so the site matches the app.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter_500Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/HankenGrotesk_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/HankenGrotesk_800ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("assets/fonts/NotoNaskhArabic_500Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/JetBrainsMono_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Brand palette, from src/theme/tokens.ts `palette` */
  --paper: #ffffff;
  --ink: #041a34;
  --navy: #061b2e;       /* Midnight Navy, dominant background */
  --navy-deep: #03111f;  /* locked-state / deepest background */
  --accent: #ff835c;     /* Coral Flame, primary CTA */
  --locked: #e76450;
  --gold: #ffc85a;       /* Fajr Gold, reward / secondary accent */
  --ivory: #fff2d8;      /* Warm Ivory */
  --success: #2fa36b;

  /* Dark-surface text tones (site is dark by default, like the app) */
  --text-hi: #ffffff;
  --text-body: rgba(255, 255, 255, 0.82);
  --text-muted: #9aa7bd;
  --hairline: rgba(255, 255, 255, 0.10);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.08);

  --font-sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-display: "Hanken Grotesk", "Inter", sans-serif;
  --font-arabic: "Noto Naskh Arabic", serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius-card: 20px;
  --radius-pill: 999px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Living prayer-time sky, fixed behind the whole page, echoes the app's
   full-bleed gradient Home background (src/prayer/sky.ts). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 45% at 82% 6%, rgba(255, 131, 92, 0.16), transparent 60%),
    radial-gradient(50% 40% at 12% 0%, rgba(255, 200, 90, 0.10), transparent 60%),
    linear-gradient(180deg, #03111f 0%, #061b2e 32%, #0b2440 62%, #1c2247 86%, #241d3a 100%);
  background-attachment: fixed;
}

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

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 18px 0;
  background: rgba(6, 27, 46, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--hairline);
  background: rgba(6, 27, 46, 0.82);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-hi);
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 22%;
}
.brand span {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-body);
}
.nav-links a:hover {
  color: var(--text-hi);
}
.nav-cta {
  display: inline-flex;
}
@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
}

/* ---------- Buttons / pills ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 13px 24px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #2a0e04;
}
.btn-primary:hover {
  background: #ff9670;
}
.btn-ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--text-hi);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid var(--hairline);
  color: var(--text-muted);
}
.pill.pill-accent {
  color: var(--accent);
  border-color: rgba(255, 131, 92, 0.35);
  background: rgba(255, 131, 92, 0.08);
}
.pill.pill-soon {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
}
.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-hi);
  margin: 0;
  letter-spacing: -0.015em;
}
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}
.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  line-height: 1.15;
}
.section-head p {
  margin: 14px 0 0;
  font-size: 17px;
  color: var(--text-body);
}
.text-accent { color: var(--accent); }
.text-gold { color: var(--gold); }

section {
  padding: 96px 0;
}
@media (max-width: 760px) {
  section { padding: 64px 0; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 60px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 60px);
  font-weight: 800;
  line-height: 1.06;
  margin: 18px 0 20px;
}
.hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 480px;
  margin: 0 0 32px;
}
.hero-cta {
  margin-bottom: 16px;
}
.hero-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin-bottom: 16px;
}
.hero-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-hi);
  font-family: var(--font-sans);
  font-size: 15px;
}
.hero-form input[type="email"]::placeholder {
  color: var(--text-muted);
}
.hero-form input[type="email"]:focus {
  outline: none;
  border-color: rgba(255, 131, 92, 0.6);
}
.form-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.form-success {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--success);
  font-weight: 600;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.hero-trust .trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.hero-trust svg {
  flex-shrink: 0;
  color: var(--gold);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-visual::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 131, 92, 0.35), transparent 72%);
  filter: blur(10px);
  z-index: 0;
}
.hero-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 300px;
  border-radius: 34px;
  box-shadow: 0 40px 90px rgba(2, 8, 15, 0.55);
}

@media (max-width: 860px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    order: -1;
  }
  .hero-visual img {
    max-width: 220px;
  }
  .hero-sub { max-width: none; }
}

@media (max-width: 480px) {
  .hero-form,
  .cta-band .hero-form {
    flex-direction: column;
  }
  .hero-form button {
    width: 100%;
  }
  .hero-trust {
    flex-direction: column;
    gap: 10px;
  }
}

/* ---------- Hadith ---------- */

.hadith {
  background: var(--glass);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.hadith-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: center;
}
.hadith-card {
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 40px;
}
.hadith-arabic {
  font-family: var(--font-arabic);
  font-size: 26px;
  color: var(--ivory);
  margin: 0 0 18px;
  direction: rtl;
}
.hadith-quote {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  color: var(--text-hi);
  line-height: 1.4;
  margin: 0 0 20px;
}
.hadith-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-body);
  margin: 0 0 18px;
}
.hadith-cite {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.hadith-visual img {
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(2, 8, 15, 0.5);
}
@media (max-width: 860px) {
  .hadith-grid { grid-template-columns: 1fr; }
  .hadith-visual { display: none; }
  .hadith-card { padding: 28px; }
}

/* ---------- Steps (the three knots) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: knot;
}
.step {
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 30px 26px;
  position: relative;
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 131, 92, 0.12);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 131, 92, 0.3);
}
.step h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
}
.step p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-body);
  margin: 0;
}
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Features ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-card {
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 26px;
}
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 200, 90, 0.12);
  color: var(--gold);
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
}
@media (max-width: 860px) {
  .features-grid { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Gallery strip ---------- */

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 620px;
  margin: 0 auto;
}
.gallery-item img {
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(2, 8, 15, 0.5);
  margin-bottom: 14px;
}
.gallery-item p {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}
@media (max-width: 620px) {
  .gallery-strip { grid-template-columns: 1fr; max-width: 260px; }
}

/* ---------- Privacy callout (home page) ---------- */

.privacy-band {
  background: linear-gradient(135deg, rgba(255, 131, 92, 0.10), rgba(255, 200, 90, 0.06));
  border: 1px solid var(--hairline);
  border-radius: 28px;
  padding: 56px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.privacy-band ul {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.privacy-band li {
  display: flex;
  gap: 10px;
  font-size: 15px;
  color: var(--text-body);
}
.privacy-band li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--success);
}
.privacy-band img {
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(2, 8, 15, 0.5);
}
@media (max-width: 860px) {
  .privacy-band { grid-template-columns: 1fr; padding: 32px; border-radius: 20px; }
  .privacy-band img { max-width: 220px; margin: 0 auto; }
}

/* ---------- Pricing ---------- */

.pricing-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  padding: 44px;
  text-align: center;
}
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 6px;
}
.price-amount {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  color: var(--text-hi);
}
.price-period {
  font-size: 16px;
  color: var(--text-muted);
}
.price-terms {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 28px;
}
.price-list {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 14px;
}
.price-list li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-body);
}
.price-list svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}
.pricing-free-note {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 18px;
}

/* ---------- Final CTA ---------- */

.cta-band {
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 16px;
}
.cta-band p {
  font-size: 17px;
  color: var(--text-body);
  max-width: 480px;
  margin: 0 auto 32px;
}
.cta-band .hero-form {
  margin: 0 auto 14px;
}
.cta-band .form-note {
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 48px 0 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 22%;
}
.footer-brand span {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  color: var(--text-hi);
}
.footer-tagline {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 8px 0 0;
  max-width: 260px;
}
.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-col .footer-heading {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.footer-col a {
  font-size: 14px;
  text-decoration: none;
  color: var(--text-body);
}
.footer-col a:hover {
  color: var(--text-hi);
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------- FAQ / support page ---------- */

.faq-category {
  max-width: 720px;
  margin: 0 auto 40px;
}
.faq-category:last-of-type {
  margin-bottom: 0;
}
.faq-category h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 16px;
}
.faq-list {
  display: grid;
  gap: 10px;
}
.faq-item {
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 50px 18px 22px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text-hi);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
  color: var(--accent);
}
.faq-item[open] summary {
  border-bottom: 1px solid var(--hairline);
}
.faq-answer {
  padding: 4px 22px 20px;
}
.faq-answer p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-body);
  margin: 0 0 10px;
}
.faq-answer p:last-child {
  margin-bottom: 0;
}
.faq-answer a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(255, 200, 90, 0.4);
}

.support-cta {
  max-width: 720px;
  margin: 56px auto 0;
  background: linear-gradient(135deg, rgba(255, 131, 92, 0.10), rgba(255, 200, 90, 0.06));
  border: 1px solid var(--hairline);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
}
.support-cta h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}
.support-cta p {
  font-size: 15px;
  color: var(--text-body);
  margin: 0 0 24px;
}
.support-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 620px) {
  .support-cta { padding: 28px; }
}

/* ---------- Privacy policy page ---------- */

.legal-header {
  padding: 64px 0 32px;
  text-align: center;
}
.legal-header .eyebrow { text-align: center; }
.legal-header h1 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
}
.legal-meta {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}
.legal-body {
  max-width: 720px;
  margin: 0 auto;
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  padding: 48px;
}
.legal-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 14px;
}
.legal-body h2:first-child {
  margin-top: 0;
}
.legal-body p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-body);
  margin: 0 0 16px;
}
.legal-body ul {
  margin: 0 0 16px;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}
.legal-body li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-body);
}
.legal-body a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(255, 200, 90, 0.4);
}
.legal-body strong {
  color: var(--text-hi);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.back-link:hover {
  color: var(--text-hi);
}
@media (max-width: 620px) {
  .legal-body { padding: 28px; border-radius: 18px; }
}
