/* SmartMasjid.ai landing page
   Mobile-first layout, teal palette, system UI + Source Serif 4 for headings. */

:root {
  --bg: #f6f3ea;
  --bg-elevated: #fffcf6;
  --ink: #142824;
  --ink-soft: #3d524c;
  --line: #d5ddd6;
  --teal-950: #082924;
  --teal-900: #0c3b36;
  --teal-700: #16574e;
  --teal-600: #1b6b60;
  --teal-100: #e4f1ed;
  --teal-50: #eef6f3;
  --mint: #7bc4b4;
  --header-h: 4.25rem;
  --radius: 1rem;
  --shadow: 0 16px 40px rgba(12, 59, 54, 0.1);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --space: clamp(1.25rem, 4vw, 2rem);
  --measure: 70rem;
}

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

html {
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal-700);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--teal-900);
}

:focus-visible {
  outline: 3px solid var(--teal-600);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 200;
  padding: 0.6rem 0.9rem;
  background: var(--teal-900);
  color: #fff;
  border-radius: 0.4rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: min(100% - (var(--space) * 2), var(--measure));
  margin-inline: auto;
}

/* Header
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, white);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--teal-900);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.wordmark:hover {
  color: var(--teal-700);
}

.logo {
  color: var(--teal-900);
  flex: none;
}

.wordmark-text {
  font-size: 1.05rem;
}

.tld {
  font-weight: 550;
  opacity: 0.7;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--bg-elevated);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -5px;
}

.nav-toggle-bars::after {
  top: 5px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before,
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

/* Dim the page under the open mobile menu */
body.nav-open::after {
  content: "";
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(8, 41, 36, 0.35);
  z-index: 90;
}

.site-nav {
  display: none;
  position: absolute;
  inset: var(--header-h) 0 auto 0;
  z-index: 110;
  padding: 0.85rem var(--space) 1.15rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 28px rgba(12, 59, 54, 0.12);
  flex-direction: column;
  gap: 0.35rem;
}

.site-nav.is-open,
body.nav-open .site-nav {
  display: flex;
}

.site-nav a {
  display: block;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 0.55rem;
  font-weight: 550;
}

.site-nav a:hover {
  background: var(--teal-50);
  color: var(--teal-900);
}

.nav-cta {
  background: var(--teal-900);
  color: #fff !important;
  text-align: center;
}

.nav-cta:hover {
  background: var(--teal-700) !important;
  color: #fff !important;
}

/* Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  padding: 3rem 0 4rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(123, 196, 180, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 50% at 0% 20%, rgba(12, 59, 54, 0.08), transparent 50%),
    var(--bg);
}

.hero::before {
  /* Soft decorative arch in the background */
  content: "";
  position: absolute;
  width: min(36rem, 90vw);
  height: min(36rem, 90vw);
  right: -8%;
  top: 10%;
  border: 1.5px solid color-mix(in srgb, var(--teal-700) 18%, transparent);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  position: relative;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--teal-700);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--teal-950);
  text-wrap: balance;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.15rem, 6vw, 3.6rem);
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 3.5vw, 2.25rem);
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.lede,
.section-head p,
.cta p,
.steps p,
.feature-card p {
  color: var(--ink-soft);
}

.lede {
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--teal-900);
  color: #fff;
}

.btn-primary:hover {
  background: var(--teal-700);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--teal-900);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--teal-900);
}

.btn-on-dark {
  background: #fff;
  color: var(--teal-900);
}

.btn-on-dark:hover {
  background: var(--teal-100);
  color: var(--teal-950);
}

/* Example prayer-time panel (illustrative only; no real timetable) */
.hero-panel {
  display: flex;
  justify-content: center;
}

.display-card {
  width: min(100%, 22.5rem);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.35rem 1.4rem 1.15rem;
  box-shadow: var(--shadow);
}

.display-caption {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.display-title {
  margin: 0;
  font-size: 1.55rem;
}

.display-sub {
  margin: 0.25rem 0 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.prayer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.prayer-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.2rem;
  border-top: 1px solid var(--line);
  font-weight: 550;
}

.prayer-list li span:last-child {
  color: var(--ink-soft);
  font-weight: 450;
  font-size: 0.92rem;
}

.prayer-list .is-next {
  background: var(--teal-50);
  margin: 0 -0.5rem;
  padding-inline: 0.7rem;
  border-radius: 0.5rem;
  border-top-color: transparent;
}

.prayer-list .is-next span:last-child {
  color: var(--teal-700);
  font-weight: 650;
}

/* Sections
   ------------------------------------------------------------ */
.section {
  padding: 4rem 0;
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.25rem;
}

.section-head p,
.cta p {
  margin: 0;
  font-size: 1.05rem;
}

.features {
  background: var(--bg-elevated);
  border-block: 1px solid var(--line);
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.4rem;
}

.feature-card p {
  margin: 0;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.85rem;
  color: var(--teal-700);
  background: var(--teal-100);
  border-radius: 0.7rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  counter-reset: none;
}

.steps li {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.5rem;
}

.steps p {
  margin: 0;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.8rem;
  border-radius: 999px;
  background: var(--teal-900);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Closing CTA
   ------------------------------------------------------------ */
.cta {
  padding: 4rem 0;
  background:
    radial-gradient(ellipse 70% 80% at 100% 100%, rgba(123, 196, 180, 0.18), transparent 50%),
    var(--teal-900);
  color: #fff;
}

.cta-inner {
  text-align: center;
  max-width: 38rem;
}

.cta h2,
.cta p {
  color: #fff;
}

.cta p {
  margin: 0 0 1.5rem;
}

/* Footer
   ------------------------------------------------------------ */
.site-footer {
  padding: 1.75rem 0;
  background: var(--teal-950);
  color: #d5e6e1;
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-brand .wordmark-text {
  color: #fff;
  font-weight: 650;
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  color: var(--mint);
}

.copyright {
  margin: 0.4rem 0 0;
  opacity: 0.8;
}

.site-footer p {
  margin: 0;
}

/* 404
   ------------------------------------------------------------ */
.page-404 {
  min-height: calc(100vh - var(--header-h) - 8rem);
  display: grid;
  align-items: center;
  padding: 3rem 0;
}

.page-404 .lede {
  margin-bottom: 1.5rem;
}

/* Compact header nav used on the 404 page */
.site-nav-inline {
  display: flex;
  position: static;
  flex-direction: row;
  align-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Desktop
   ------------------------------------------------------------ */
@media (min-width: 800px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .site-nav a {
    padding: 0.45rem 0.8rem;
  }

  .nav-cta {
    margin-left: 0.4rem;
    padding-inline: 1rem !important;
  }

  .hero {
    padding: 4.5rem 0 5.5rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
    align-items: center;
    gap: 3.5rem;
  }

  .feature-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  /* 3 cards on the first row, 2 centered on the second */
  .feature-card:nth-child(1),
  .feature-card:nth-child(2),
  .feature-card:nth-child(3) {
    grid-column: span 2;
  }

  .feature-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .feature-card:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .footer-inner {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
  }

  .copyright {
    margin: 0;
  }
}
