/* ─────────────────────────────────────────────────────────────
   Minaret — site styles
   Tokens transcribed from Theme.swift so the site and app agree.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Chrome field (Brand.chrome sky ramp) */
  --mint-0: #e7f5ee;
  --mint-1: #f1f9f2;
  --mint-2: #f9fbf6;
  --mint-3: #fffffc;

  /* Ink */
  --ink: #17241f;
  --ink-2: #5e7870;
  --ink-3: rgba(94, 120, 112, 0.62);

  /* Hues */
  --emerald: #00996b;
  --emerald-deep: #007e58;
  --emerald-bright: #3dcc94;
  --gold: #ed9e1f;
  --gold-on-dark: #f5bd52;

  /* Night sky */
  --sky-0: #171c38;
  --sky-1: #212949;
  --sky-2: #2e385c;
  --sky-3: #3d4a6e;
  --hill-back: #223a40;
  --hill-front: #1a2e33;

  /* Pre-dawn (the closing band) */
  --dawn-0: #1b2140;
  --dawn-1: #2b3055;
  --dawn-2: #45406a;

  --hairline: rgba(23, 36, 31, 0.08);
  --radius-card: 26px;
  --shadow-card: 0 10px 20px rgba(13, 77, 56, 0.14);

  --serif: "Fraunces", "New York", Georgia, serif;
  --arabic: "Amiri", "Geeza Pro", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;

  --topbar-h: 66px;
}

* { 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(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--mint-0) 0%, var(--mint-1) 35%,
                            var(--mint-2) 70%, var(--mint-3) 100%);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 4px;
}

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.3px;
  margin: 10px 0 18px;
}

/* ── Masthead rule: hairlines meeting a gold diamond ── */

.rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  max-width: 1040px;
  padding: 0 24px;
}
.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
}
.rule::before { background: linear-gradient(90deg, rgba(23,36,31,0), rgba(23,36,31,0.20)); }
.rule::after  { background: linear-gradient(90deg, rgba(23,36,31,0.20), rgba(23,36,31,0)); }
.rule .diamond {
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}
.rule--dark::before { background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.26)); }
.rule--dark::after  { background: linear-gradient(90deg, rgba(255,255,255,0.26), rgba(255,255,255,0)); }
.rule--dark .diamond { background: var(--gold-on-dark); }

/* ── Micro-label ── */

.micro {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── Brand: logo + wordmark ── */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { text-decoration: none; }
.logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  color: #fff;
  letter-spacing: 0.2px;
}

/* ── Fixed top bar ── */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.topbar.is-stuck {
  background: rgba(23, 28, 56, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.topbar__inner {
  max-width: 1040px;
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.topbar__nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.topbar__nav a {
  color: rgba(255,255,255,0.76);
  font-size: 14px;
  font-weight: 500;
}
.topbar__nav a:hover { color: #fff; text-decoration: none; }

.btn-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--emerald-bright);
  color: #14231d;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(61, 204, 148, 0.35);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn-top:hover {
  background: #4fd8a2;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(61, 204, 148, 0.45);
  text-decoration: none;
}
.btn-top svg { flex: none; }

@media (max-width: 700px) {
  .topbar__nav { display: none; }
  .btn-top { margin-left: auto; }
}

/* ── Hero: the night sky ── */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, var(--sky-0) 0%, var(--sky-1) 34%,
                                      var(--sky-2) 66%, var(--sky-3) 100%);
}
.hero__inner {
  position: relative;
  z-index: 3;
  max-width: 1040px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 24px) 24px 200px;
}
.hero__copy {
  max-width: 660px;
  margin-top: clamp(48px, 10vh, 110px);
}
.hero__eyebrow { color: var(--gold-on-dark); }
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(44px, 7.4vw, 72px);
  line-height: 1.04;
  margin: 14px 0 18px;
  letter-spacing: -0.5px;
}
.hero__sub {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255,255,255,0.82);
  max-width: 50ch;
  margin: 0 0 34px;
}

.cta-col { display: flex; flex-direction: column; gap: 14px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--emerald-bright);
  color: #14231d;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(61, 204, 148, 0.30);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-store:hover {
  background: #4fd8a2;
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-store svg { flex: none; }

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.78);
  font-weight: 600;
  font-size: 14px;
  cursor: default;
}
.btn-play svg { flex: none; opacity: 0.8; }
.btn-play__soon {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.48);
  border-left: 1px solid rgba(255,255,255,0.2);
  padding-left: 10px;
}
.cta-note { font-size: 13px; color: rgba(255,255,255,0.62); }

/* Sky furniture */
.stars, .crescent, .hills { position: absolute; pointer-events: none; }
.stars { inset: 0; z-index: 1; }
.crescent {
  z-index: 2;
  top: clamp(96px, 14vh, 150px);
  right: clamp(20px, 8vw, 120px);
  width: clamp(56px, 8vw, 84px);
  height: auto;
  filter: drop-shadow(0 0 34px rgba(114, 124, 156, 0.55));
}
.hills {
  z-index: 2;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: clamp(110px, 16vw, 170px);
  display: block;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.stars circle { animation: twinkle 4.5s ease-in-out infinite; }
.stars circle:nth-child(3n)  { animation-delay: 1.4s; }
.stars circle:nth-child(4n)  { animation-delay: 2.6s; }
.stars circle:nth-child(5n)  { animation-duration: 6s; }

/* ── The verse ── */

.verse {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 8px;
  text-align: center;
}
.verse__arabic {
  font-family: var(--arabic);
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.9;
  color: var(--ink);
  margin: 0 0 10px;
}
.verse__translation {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--ink-2);
  margin: 0 0 6px;
}
.verse__cite {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 34px;
}
.verse__rule { max-width: 420px; }

/* ── Features: one panel, six cells, hairline dividers ── */

.features {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 24px 8px;
  text-align: center;
}
.features__eyebrow { color: var(--ink-2); display: block; }
.features__lede {
  color: var(--ink-2);
  font-size: 16px;
  max-width: 56ch;
  margin: 0 auto 40px;
}
.features__panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-align: left;
}
.feature {
  background: #fff;
  padding: 30px 28px 32px;
}
.feature__glyph {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: rgba(0, 153, 107, 0.10);
  color: var(--emerald);
  margin-bottom: 16px;
}
.feature h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 8px;
}
.feature p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

@media (max-width: 920px) {
  .features__panel { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .features__panel { grid-template-columns: 1fr; }
}

/* ── Private by design ── */

.private {
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px 24px 8px;
}
.private__panel {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 30px;
  box-shadow: var(--shadow-card);
  padding: clamp(36px, 6vw, 56px);
  text-align: center;
}
.private__emblem {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(237, 158, 31, 0.45);
  color: var(--gold);
}
.private__eyebrow { color: var(--ink-2); }
.private__panel h2 { margin-bottom: 14px; }
.private__panel p {
  color: var(--ink-2);
  font-size: 16px;
  max-width: 54ch;
  margin: 0 auto 22px;
}
.private__link {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  color: var(--emerald-deep);
  border-bottom: 1px solid rgba(0, 126, 88, 0.35);
  padding-bottom: 1px;
}
.private__link:hover { text-decoration: none; border-bottom-color: var(--emerald-deep); }

/* ── Dawn: closing call and footer ── */

.dawn {
  position: relative;
  overflow: hidden;
  margin-top: 88px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(120% 60% at 50% 100%, rgba(201, 138, 84, 0.50) 0%,
                    rgba(201, 138, 84, 0.14) 40%, rgba(201, 138, 84, 0) 64%),
    linear-gradient(180deg, var(--dawn-0) 0%, var(--dawn-1) 55%, var(--dawn-2) 100%);
}
.dawn__curve {
  position: absolute;
  top: -1px; left: 0; right: 0;
  width: 100%;
  height: clamp(34px, 6vw, 70px);
  display: block;
}
.dawn__inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(120px, 16vw, 160px) 24px 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dawn__eyebrow { color: var(--gold-on-dark); }
.dawn h2 { color: #fff; margin: 10px 0 6px; }
.dawn__sub {
  color: rgba(255,255,255,0.78);
  font-size: 16.5px;
  margin: 0 0 26px;
}
.dawn__note {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.62);
}

/* ── Footer (inside the dawn band) ── */

.footer-rule { position: relative; z-index: 2; }

.footer {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 30px 24px 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer--dark { text-align: left; }
.footer--dark a { color: rgba(255,255,255,0.72); font-size: 14px; }
.footer--dark a:hover { color: #fff; }
.footer--dark .fineprint { font-size: 13px; color: rgba(255,255,255,0.45); }
.brand--footer .wordmark { font-size: 20px; }
.brand--footer .logo { width: 24px; height: 24px; border-radius: 7px; }

@media (max-width: 700px) {
  .footer { flex-direction: column; align-items: center; text-align: center; }
}

/* ── Legal pages ── */

.doc-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 34px 24px 0;
}
.doc-header .wordmark { color: var(--ink); }
.doc-header .brand:hover .wordmark { color: var(--emerald-deep); }
.doc-header .logo { box-shadow: 0 2px 8px rgba(13, 77, 56, 0.18); border-radius: 7px; }
.doc-rule { max-width: 720px; padding: 0 24px; margin-top: 14px; }

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 34px 24px 80px;
}
.doc h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 38px);
  line-height: 1.15;
  margin: 0 0 6px;
}
.doc .updated {
  color: var(--ink-3);
  font-size: 14px;
  margin: 0 0 34px;
}
.doc h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  margin: 42px 0 10px;
}
.doc h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 26px 0 6px;
}
.doc p, .doc li {
  font-size: 15.5px;
  color: #2c3a35;
}
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .quiet { color: var(--ink-2); }

/* Light footer on legal pages */
.doc ~ .footer a,
.footer:not(.footer--dark) a { color: var(--ink-2); font-size: 14px; }
.footer:not(.footer--dark) a:hover { color: var(--emerald); }
.footer:not(.footer--dark) .fineprint { font-size: 13px; color: var(--ink-3); }
