:root {
  --green-deep: #0f3d2e;
  --green-deep-light: #16523d;
  --gold: #c9a24b;
  --gold-soft: #d9bd77;
  --cream: #f8f5ee;
  --ink: #26291f;
  --ink-soft: #4b4f42;

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-arabic: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;

  --measure: 40rem;
}

* {
  box-sizing: border-box;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  margin: 0 0 0.6em;
  color: inherit;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--gold);
}

/* Background pattern */

.pattern-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%230f3d2e' stroke-width='1'%3E%3Cpath d='M60 4 L102 30 L102 90 L60 116 L18 90 L18 30 Z'/%3E%3Cpath d='M60 4 L60 116 M18 30 L102 90 M102 30 L18 90'/%3E%3Ccircle cx='60' cy='60' r='20'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
}

main, .footer {
  position: relative;
  z-index: 1;
}

/* Fade-in on scroll */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: none;
}

/* Shared type treatments */

.arabic {
  font-family: var(--font-arabic);
  font-size: 1.55rem;
  line-height: 2.1;
  color: var(--green-deep);
  text-align: center;
  margin: 0 0 0.9em;
}

.arabic--large {
  font-size: 2.15rem;
  line-height: 1.9;
}

.arabic--gold {
  color: var(--gold-soft);
}

.arabic-inline {
  font-family: var(--font-arabic);
}

.transliteration {
  font-style: italic;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 0 0.8em;
}

.transliteration--light {
  color: rgba(248, 245, 238, 0.75);
}

.translation {
  text-align: center;
  max-width: var(--measure);
  margin: 0 auto 0.4em;
  font-size: 1.08rem;
  color: var(--ink);
}

.translation--light {
  color: var(--cream);
}

.eyebrow {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.88rem;
  color: var(--gold);
  margin: 0 0 0.5em;
}

.eyebrow--light {
  color: var(--gold-soft);
}

.commentary {
  max-width: var(--measure);
  margin: 1.6em auto 0;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.commentary--light {
  color: rgba(248, 245, 238, 0.8);
}

.divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 1.6em auto;
}

/* Hero */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: linear-gradient(180deg, var(--green-deep) 0%, var(--green-deep-light) 100%);
  color: var(--cream);
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 34rem;
}

.hero .arabic {
  color: var(--gold-soft);
}

.hero .transliteration {
  color: rgba(248, 245, 238, 0.75);
}

.hero .translation {
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-style: italic;
}

.hero h1 {
  font-size: 2.3rem;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 0.8em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(248, 245, 238, 0.9);
  max-width: 28rem;
  margin: 0 auto;
}

.scroll-cue {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, rgba(201, 162, 75, 0.9), rgba(201, 162, 75, 0));
}

/* Sections */

.section {
  padding: 4.5rem 1.25rem;
}

.section--cream {
  background: var(--cream);
}

.section--dark {
  background: var(--green-deep);
  color: var(--cream);
}

.section h2 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 1em;
}

.section h2.light {
  color: var(--cream);
}

.container {
  max-width: 42rem;
  margin: 0 auto;
}

.verse-ref {
  text-align: center;
  font-size: 0.98rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin-bottom: 1.6em;
}

.quran-block,
.dua-block {
  background: rgba(15, 61, 46, 0.04);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: 4px;
  padding: 1.8rem 1.2rem;
  margin-bottom: 1.6em;
}

.section--dark .dua-block {
  background: rgba(248, 245, 238, 0.04);
  border-color: rgba(201, 162, 75, 0.4);
}

/* Personal message */

.message-frame {
  border: 1px solid rgba(201, 162, 75, 0.4);
  border-radius: 4px;
  padding: 2.2rem 1.6rem;
}

.message-frame__text {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.85;
  color: var(--ink);
  text-align: left;
  margin: 0 0 1.1em;
}

.message-frame__text:last-child {
  margin-bottom: 0;
}

.message-frame__text--closing {
  font-style: italic;
  color: var(--green-deep);
}

/* Footer */

.footer {
  background: var(--green-deep);
  color: rgba(248, 245, 238, 0.85);
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
}

.footer__divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 1.6em;
}

.footer__phrase {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  max-width: 30rem;
  margin: 0 auto 1.8em;
  color: var(--cream);
}

.footer__site {
  font-size: 1.02rem;
  letter-spacing: 0.05em;
  color: rgba(248, 245, 238, 0.55);
  margin: 0;
}

/* Responsive — small phones */

@media (max-width: 380px) {
  .quran-block,
  .dua-block {
    padding: 1.5rem 1rem;
  }

  .arabic--large {
    font-size: 1.7rem;
  }

  .section {
    padding: 3.5rem 1rem;
  }
}

/* Responsive — tablet and up */

@media (min-width: 640px) {
  html {
    font-size: 18px;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .arabic--large {
    font-size: 2.5rem;
  }

  .arabic {
    font-size: 1.75rem;
  }

  .section h2 {
    font-size: 2.1rem;
  }

  .section {
    padding: 6rem 2rem;
  }

  .quran-block,
  .dua-block {
    padding: 2.4rem 2.6rem;
  }
}

@media (min-width: 960px) {
  .container {
    max-width: 46rem;
  }
}
