/* Daily Hadith marketing site — "Mint" scheme */

:root {
  --bg: #eef6f1;
  --bg-top: #d9eee3;
  --bg-bottom: #f3f8f5;
  --ink: #143d2b;
  --body: #2e3f36;
  --muted: #5f7a6b;
  --green: #0e7046;
  --gold: #c9a14a;
  --pill: #ffffff;
  --hairline: rgba(20, 61, 43, 0.1);
  --button: #1d1d1f;
  --button-text: #ffffff;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, sans-serif;
  --font-serif: "Fraunces", "New York", ui-serif, Georgia, serif;
  --font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;

  --container: 1168px;
  --gutter: 24px;
  --radius-phone: 56px;
  --radius-screen: 46px;

  --ease-out: cubic-bezier(0.2, 0, 0, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--bg-top) 0, var(--bg) 720px, var(--bg-bottom) 100%);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 96px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.segmented {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 980px;
  background: rgba(14, 112, 70, 0.08);
  gap: 2px;
}

.segmented-pill {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: 0;
  border-radius: 980px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transform: translateX(0);
  transition: transform 200ms var(--ease-out), width 200ms var(--ease-out);
  pointer-events: none;
}

.segmented a {
  position: relative;
  z-index: 1;
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: background-color 150ms var(--ease-out);
}

.segmented a:hover {
  background: rgba(255, 255, 255, 0.5);
}

.segmented a[aria-current="page"] {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* With the sliding pill in place, the static highlight steps aside. */
.segmented.has-pill a[aria-current="page"] {
  background: transparent;
  box-shadow: none;
}

.nav-right {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
}

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

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 16px 0 13px;
  border-radius: 12px;
  background: var(--button);
  color: var(--button-text);
  transition: transform 150ms var(--ease-out), opacity 150ms var(--ease-out);
}

.btn-appstore:hover {
  opacity: 0.92;
}

.btn-appstore:active {
  transform: scale(0.96);
}

.btn-appstore svg {
  flex-shrink: 0;
}

.btn-appstore span {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.btn-appstore small {
  font-size: 9px;
  line-height: 10px;
}

.btn-appstore strong {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 500;
  line-height: 22px;
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 96px 0 120px;
}

.salaam {
  font-family: var(--font-urdu);
  font-size: 24px;
  line-height: 2;
  color: var(--green);
  margin: 0;
}

.hero h1 {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 0;
  font-weight: 500;
  font-size: 76px;
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 900px;
  margin: 8px 0 0;
  text-wrap: balance;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 26px;
  color: var(--gold);
  font-size: 14px;
  line-height: 1;
}

.divider::before,
.divider::after {
  content: "";
  width: 72px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.hero p {
  font-size: 21px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 560px;
  margin: 0 0 32px;
}

/* Hero entrance: five chunks, 80ms apart, content readable from frame one. */
.hero > * {
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}

.hero > :nth-child(2) { transition-delay: 80ms; }
.hero > :nth-child(3) { transition-delay: 160ms; }
.hero > :nth-child(4) { transition-delay: 240ms; }
.hero > :nth-child(5) { transition-delay: 320ms; }

.hero .divider::before,
.hero .divider::after {
  transition: transform 500ms var(--ease-out) 160ms;
}

.hero .divider::before { transform-origin: right center; }
.hero .divider::after { transform-origin: left center; }

@starting-style {
  .hero > * {
    opacity: 0;
    transform: translateY(12px);
  }

  .hero .divider::before,
  .hero .divider::after {
    transform: scaleX(0);
  }
}

/* Scroll reveal: phones and theme pills arrive once, copy never moves. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .themes li {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}

.js .themes.is-visible li {
  opacity: 1;
  transform: none;
}

.themes li:nth-child(2) { transition-delay: 40ms; }
.themes li:nth-child(3) { transition-delay: 80ms; }
.themes li:nth-child(4) { transition-delay: 120ms; }
.themes li:nth-child(5) { transition-delay: 160ms; }
.themes li:nth-child(6) { transition-delay: 200ms; }
.themes li:nth-child(7) { transition-delay: 240ms; }
.themes li:nth-child(8) { transition-delay: 280ms; }

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

.feature {
  display: grid;
  grid-template-columns: minmax(0, 400px) 340px;
  justify-content: space-between;
  align-items: center;
  padding: 72px 120px;
  scroll-margin-top: 24px;
}

.feature--flip {
  grid-template-columns: 340px minmax(0, 400px);
}

.feature--flip .feature-copy {
  order: 2;
}

.feature--flip .phone {
  order: 1;
}

.feature h2 {
  font-size: 46px;
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  text-wrap: balance;
}

.feature p {
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

.themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.themes li {
  padding: 7px 13px;
  border-radius: 980px;
  background: var(--pill);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}

/* ---------- Phone ---------- */

.phone {
  position: relative;
  width: 340px;
  padding: 10px;
  border-radius: var(--radius-phone);
  background: linear-gradient(180deg, #2a2a2c 0%, #0f0f11 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 70px rgba(20, 61, 43, 0.22);
}

.phone img {
  width: 100%;
  border-radius: var(--radius-screen);
  background: #0f0f11;
}

.phone::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  width: 88px;
  height: 26px;
  margin-left: -44px;
  border-radius: 13px;
  background: #000;
}

/* ---------- Closing ---------- */

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 120px 0 96px;
}

.closing img {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 20px 40px rgba(20, 61, 43, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.06);
  margin-bottom: 28px;
}

.closing h2 {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 0;
  font-weight: 500;
  font-size: 60px;
  line-height: 1.13;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

.closing p {
  font-size: 21px;
  color: var(--muted);
  margin: 0 0 32px;
}

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

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px var(--gutter) 48px;
  font-size: 14px;
}

.footer .copyright {
  color: var(--muted);
}

.footer nav {
  display: flex;
  gap: 28px;
}

.footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Policy pages ---------- */

.prose {
  max-width: 680px;
  margin: 0 auto;
  padding: 72px 0 96px;
}

.prose h1 {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 0;
  font-weight: 500;
  font-size: 56px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

.prose .updated {
  color: var(--muted);
  margin: 0;
}

.prose .divider {
  margin: 40px 0;
}

.prose h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 40px 0 10px;
}

.prose p,
.prose li {
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
  margin: 0;
}

.prose ul {
  padding-left: 22px;
  margin: 0;
}

.prose li + li {
  margin-top: 6px;
}

.prose a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  body {
    background-image: linear-gradient(180deg, var(--bg-top) 0, var(--bg) 520px, var(--bg-bottom) 100%);
  }

  .container {
    padding: 0 20px;
  }

  .nav {
    grid-template-columns: 1fr auto;
    height: 64px;
  }

  .segmented {
    display: none;
  }

  .nav-right {
    font-size: 15px;
  }

  .hero {
    padding: 56px 20px 64px;
  }

  .salaam {
    font-size: 18px;
  }

  .hero h1 {
    font-size: 42px;
    line-height: 1.14;
  }

  .divider::before,
  .divider::after {
    width: 56px;
  }

  .divider {
    margin: 18px 0 20px;
    font-size: 12px;
  }

  .hero p {
    font-size: 17px;
    max-width: 320px;
  }

  .feature,
  .feature--flip {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 28px;
    padding: 24px 20px 56px;
  }

  .feature--flip .feature-copy {
    order: 1;
  }

  .feature--flip .phone {
    order: 2;
  }

  .feature-copy {
    width: 100%;
    max-width: 420px;
  }

  .feature h2 {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .feature p {
    font-size: 17px;
  }

  .phone {
    width: 280px;
    padding: 9px;
    --radius-phone: 48px;
    --radius-screen: 40px;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.12),
      0 0 0 1px rgba(0, 0, 0, 0.6),
      0 30px 50px rgba(20, 61, 43, 0.22);
  }

  .phone::after {
    top: 20px;
    width: 78px;
    height: 23px;
    margin-left: -39px;
  }

  .closing {
    padding: 48px 20px 56px;
  }

  .closing img {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    margin-bottom: 22px;
  }

  .closing h2 {
    font-size: 38px;
  }

  .closing p {
    font-size: 17px;
  }

  .footer {
    flex-direction: column-reverse;
    gap: 14px;
    padding: 24px 20px 40px;
  }

  .footer nav {
    gap: 24px;
  }

  .prose {
    padding: 40px 0 64px;
  }

  .prose h1 {
    font-size: 40px;
  }

  .prose .divider {
    margin: 28px 0;
  }

  .prose h2 {
    font-size: 21px;
    margin-top: 32px;
  }

  .prose p,
  .prose li {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Entrances and reveals become short fades; nothing travels. */
  .hero > *,
  .js .reveal,
  .js .themes li {
    transform: none !important;
    transition: opacity 200ms var(--ease-out);
    transition-delay: 0ms;
  }

  .hero .divider::before,
  .hero .divider::after {
    transform: none !important;
    transition: none;
  }

  .segmented-pill {
    transition: none;
  }

  /* Press feedback stays: it is confirmation, not vestibular motion. */
}
