/* ==========================================================================
   The Islam App — Landing Page
   ========================================================================== */

:root {
  /* Color tokens (from Figma) */
  --color-bg-page: #f0fdf4;
  --color-bg-surface: #ffffff;
  --color-text-primary: #0f172a;
  --color-text-secondary: #737373;
  --color-text-tertiary: #a3a3a3;
  --color-text-inverse: #ffffff;
  --color-accent-qibla: #047857;
  --color-border-default: #e5e5e5;
  --color-border-footer: #f1f1ef;

  /* Shadow */
  --shadow-nav: 0 1px 2px rgba(12, 12, 13, 0.05), 0 1px 2px rgba(12, 12, 13, 0.1);

  /* Type */
  --font-primary: 'Afacad', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-eyebrow: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-brand-flux: 'Afacad Flux', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container-width: 1200px;
  --content-width: 800px;
  --section-padding-x: 227px;
  --section-gap: 180px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p {
  margin: 0;
}

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

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border-radius: 14px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -0.41px;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--color-accent-qibla);
  color: var(--color-text-inverse);
}

/* --------------------------------------------------------------------------
   Header / nav pill
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 24px;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-inline: 24px;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: 100px;
  box-shadow: var(--shadow-nav);
  padding: 12px 12px 12px 24px;
  max-width: 100%;
  transition: box-shadow 0.2s ease;
}

.nav-pill--scrolled {
  box-shadow: 0 2px 8px rgba(12, 12, 13, 0.1), 0 1px 2px rgba(12, 12, 13, 0.1);
}

.nav-pill__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-pill__icon {
  width: 28px;
  height: 28px;
  border-radius: 24px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-pill__name {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Section heading (shared by hero / feature / cta)
   -------------------------------------------------------------------------- */

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  word-break: break-word;
}

.eyebrow {
  font-family: var(--font-eyebrow);
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.24px;
  text-transform: uppercase;
  color: var(--color-accent-qibla);
}

h1 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 52px;
  line-height: 1.15;
  letter-spacing: -0.4px;
  color: var(--color-text-primary);
}

h2 {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 52px;
  line-height: 1.1;
  color: var(--color-text-primary);
}

.section-heading__lede {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.41px;
  color: var(--color-text-tertiary);
}

.section-heading__body {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   App Store badge
   -------------------------------------------------------------------------- */

.app-store-badge {
  display: inline-block;
  width: 132px;
  height: 44px;
  flex-shrink: 0;
}

.app-store-badge img {
  width: 100%;
  height: 100%;
}

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

.hero {
  display: flex;
  justify-content: center;
  padding-top: 96px; /* clearance below the sticky nav pill */
  padding-bottom: 0;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: var(--content-width);
}

/* --------------------------------------------------------------------------
   Feature sections (shared pattern)
   -------------------------------------------------------------------------- */

.feature {
  display: flex;
  justify-content: center;
  margin-top: var(--section-gap);
}

.feature__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  width: 100%;
  max-width: var(--content-width);
}

/* --------------------------------------------------------------------------
   Device frames
   Each frame crops a larger source photo to the visible phone via
   percentage-based absolute positioning, matching the Figma source so the
   crop scales proportionally at any container width.
   -------------------------------------------------------------------------- */

.device-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.device-frame img {
  position: absolute;
  max-width: none;
  pointer-events: none;
}

.device-frame--hero {
  max-width: 272px;
  aspect-ratio: 272 / 552;
}
.device-frame--hero img {
  width: 578.53%;
  height: 160.67%;
  left: -238.7%;
  top: -27.2%;
}

.device-frame--qibla {
  max-width: 275px;
  aspect-ratio: 275 / 552;
}
.device-frame--qibla img {
  width: 574.47%;
  height: 160.56%;
  left: -236.89%;
  top: -27.25%;
}

.device-frame--prayer-times {
  max-width: 256px;
  aspect-ratio: 256 / 512;
}
.device-frame--prayer-times img {
  width: 565.75%;
  height: 158.9%;
  left: -233.15%;
  top: -26.34%;
}

.device-frame--precision {
  max-width: 249px;
  aspect-ratio: 249 / 512;
}
.device-frame--precision img {
  width: 585.98%;
  height: 160%;
  left: -242.63%;
  top: -27.01%;
}

.device-frame--widget {
  max-width: 274px;
  aspect-ratio: 274 / 512;
}
.device-frame--widget img {
  width: 536.83%;
  height: 161.46%;
  left: -220.97%;
  top: -27.33%;
}

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

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin-top: var(--section-gap);
}

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

.site-footer {
  border-top: 1px solid var(--color-border-footer);
  margin-top: var(--section-gap);
  padding-block: 40px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-brand__icon {
  width: 28px;
  height: 28px;
  border-radius: 24px;
  object-fit: cover;
}

.footer-brand__name {
  font-family: var(--font-brand-flux);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  padding: 12px 16px;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: -0.41px;
  color: var(--color-text-primary);
}

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

.footer-bottom {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.footer-bottom p {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  :root {
    --section-gap: 144px;
  }

  .hero {
    padding-top: 72px;
  }

  h1,
  h2 {
    font-size: 40px;
  }
}

@media (max-width: 640px) {
  :root {
    --section-gap: 96px;
  }

  .container {
    padding-inline: 20px;
  }

  .site-header {
    top: 16px;
    padding-inline: 16px;
  }

  .nav-pill {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 8px 16px;
  }

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

  .btn {
    padding: 12px 18px;
    font-size: 15px;
  }

  h1,
  h2 {
    font-size: 30px;
  }

  .section-heading__lede,
  .section-heading__body {
    font-size: 16px;
  }

  .hero {
    padding-top: 64px;
  }

  .hero__content {
    gap: 32px;
  }

  .feature__content {
    gap: 40px;
  }

  .cta {
    gap: 32px;
  }

  .site-footer {
    padding-block: 32px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-links {
    gap: 16px;
  }

  .footer-links a {
    padding: 8px 0;
  }

  .footer-bottom {
    margin-top: 24px;
  }
}
