/* ============================================================
   Deen Trail — static pages (landing + legal) styles.
   Two palettes from the 2026-09 landing redesign (Claude Design
   "Deen Trail Landing Redesign"): Sand (default, :root) and Night
   ([data-theme='night'] on <html>, set by the inline script in
   layouts/Page.astro). The action pages never load this file —
   they stay on styles.css.
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #f7ecd6;
  --alt: #f1e2c3;
  --card: #fcf5e6;
  --border: #dfc9a0;
  --divider: #e6d5b3;
  --premium-bg: linear-gradient(160deg, #fffaf0 0%, #fbe9c0 100%);
  --premium-glow: rgba(152, 96, 15, 0.22);
  --qari: #355842;
  --cta-border: #dcc596;
  --footer: #efdfbd;
  --ink: #3b2a12;
  --muted: #5a4526; /* body copy (was #6b5433; darkened for reading) */
  --nav: #5a4526;
  --faint: #6b5433; /* captions + secondary details */
  --strong: #4a371b;
  --check: #2f8a57;
  --accent: #855209; /* darkened from the design (#98600f) to reach 4.5:1 */
  --header: rgba(247, 236, 214, 0.92);
  --hero-bg: radial-gradient(ellipse at 75% 30%, #fdf6e7 0%, #f7ecd6 60%);
  --cta-bg: linear-gradient(135deg, #fbf1dc, #f1dfb8);
  --safar-bg: #eed9ae;
  --shadow: rgba(59, 42, 18, 0.28);
  --gold: #f3bb45;
  --gold-hover: #ffcb5e;
  --gold-ink: #2a1c05;
}
[data-theme='night'] {
  color-scheme: dark;
  --bg: #10162f;
  --alt: #151c3a;
  --card: #1b2347;
  --border: #2a3563;
  --divider: #232c55;
  --premium-bg: linear-gradient(160deg, #2a3570 0%, #1c2550 100%);
  --premium-glow: rgba(243, 187, 69, 0.18);
  --qari: var(--accent);
  --cta-border: #2f3a6c;
  --footer: #0b1029;
  --ink: #f7eedb;
  --muted: #c3cae4;
  --nav: #c9d0ea;
  --faint: #98a2c6;
  --strong: #dfe4f5;
  --check: #5fd39a;
  --accent: #f3bb45;
  --header: rgba(16, 22, 47, 0.92);
  --hero-bg: radial-gradient(ellipse at 75% 30%, #27305e 0%, #10162f 60%);
  --cta-bg: linear-gradient(135deg, #1f2a55, #18204a);
  --safar-bg: #151c3a;
  --shadow: rgba(0, 0, 0, 0.45);
}

/* Screenshots flip with the theme: a Sand page shows the app's Night theme and
   vice versa. Both <img>s are in the markup; the hidden one is display:none (and
   loading=lazy, so it is never fetched until the theme flips). */
:root:not([data-theme='night']) .dt-shot-sand,
[data-theme='night'] .dt-shot-night,
:root:not([data-theme='night']) .dt-when-night,
[data-theme='night'] .dt-when-sand {
  display: none;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px; /* the sticky header */
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-decoration: none;
}
img {
  max-width: 100%;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: 'Baloo 2', system-ui, sans-serif;
  text-wrap: balance;
}
p {
  margin: 0;
}

/* ---- a11y: skip link, visible focus, screen-reader-only text ---- */
.dt-skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-300%);
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 12px;
}
.dt-skip:focus-visible {
  transform: none;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}
.dt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---- shared building blocks ---- */
.dt-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) 20px;
}
.dt-stack {
  display: flex;
  flex-direction: column;
}
.dt-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
}
.dt-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dt-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}
.dt-safar .dt-eyebrow::before {
  background: var(--accent);
}
.dt-h2 {
  font-weight: 800;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.08;
}
.dt-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.dt-muted {
  color: var(--muted);
}
.dt-faint {
  font-size: 14px;
  color: var(--faint);
}
.dt-card {
  background: var(--card);
  border: 1px solid var(--border);
}
.dt-check {
  color: var(--check);
  font-weight: 800;
}
.dt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}
.dt-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.dt-shot {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 60px var(--shadow));
}

/* ---- header ---- */
.dt-hd {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}
.dt-hd-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.dt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-right: auto;
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
}
.dt-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.dt-hd-nav {
  display: flex;
  gap: 26px;
  font-weight: 600;
  font-size: 15px;
}
.dt-hd-nav a {
  color: var(--nav);
  padding: 12px 0;
}
.dt-hd-nav a:hover {
  color: var(--accent);
}
.dt-theme,
.dt-menu summary {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.dt-theme {
  min-width: 44px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.dt-theme > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dt-theme [aria-hidden] {
  font-size: 16px;
}
.dt-btn-gold {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 12px;
  white-space: nowrap;
}
.dt-btn-gold:hover {
  background: var(--gold-hover);
  color: var(--gold-ink);
}
/* Mobile menu: a native <details> disclosure, shown below 980px. */
.dt-menu {
  display: none;
}
.dt-menu summary {
  width: 44px;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.dt-menu summary::-webkit-details-marker {
  display: none;
}
.dt-menu summary span {
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.dt-menu nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 4px 20px 16px;
  background: var(--bg);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.dt-menu nav a {
  color: var(--ink);
  padding: 14px 0;
  font-weight: 600;
  border-bottom: 1px solid var(--divider);
}
.dt-menu nav a:last-child {
  border-bottom: 0;
}
@media (max-width: 979px) {
  .dt-hd-nav {
    display: none;
  }
  .dt-menu {
    display: block;
  }
  .dt-hd-in {
    gap: 12px;
  }
}
@media (max-width: 480px) {
  /* Keep icon + toggle + CTA + menu on one row at phone widths: the wordmark
     yields (the icon still links home). 480 leaves room for fallback fonts. */
  .dt-hd-in {
    gap: 8px;
  }
  .dt-brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
@media (max-width: 379px) {
  /* 320-class phones: the theme toggle shows only its icon (the accessible
     name still reads "Switch to Night theme"). */
  .dt-theme {
    padding: 0 13px;
  }
  .dt-theme-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* ---- hero ---- */
.dt-hero {
  background: var(--hero-bg);
}
.dt-hero .dt-split {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) 20px clamp(40px, 6vw, 72px);
  gap: 48px;
  align-items: center;
}
.dt-hero-copy {
  gap: 22px;
}
.dt-hero h1 {
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.dt-hero-lede {
  font-size: clamp(17px, 1.5vw, 19px);
  max-width: 540px;
}
.dt-get {
  gap: 12px;
  max-width: 540px;
}
.dt-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.dt-badges a {
  display: block;
  line-height: 0;
}
.dt-badges img {
  height: 54px;
  width: auto;
}
.dt-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 22px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.dt-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--strong);
}
.dt-hero-art {
  display: flex;
  justify-content: center;
}
.dt-hero-art img {
  max-width: 340px;
}

/* ---- what it is ---- */
.dt-features {
  border-top: 1px solid var(--divider);
}
.dt-features .dt-in {
  gap: 40px;
}
.dt-feature {
  padding: 28px;
  border-radius: 22px;
  gap: 12px;
}
.dt-feature h3 {
  font-weight: 700;
  font-size: 21px;
}
.dt-feature p {
  font-size: 16px;
  line-height: 1.6;
}
.dt-facts {
  gap: 0 36px;
  border-top: 1px solid var(--divider);
}
.dt-facts > div {
  padding: 20px 0;
  border-bottom: 1px solid var(--divider);
  gap: 4px;
}
.dt-facts h3 {
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
}
.dt-facts p {
  font-size: 15px;
  line-height: 1.55;
}

/* ---- meet Safar ---- */
.dt-safar {
  background: var(--safar-bg);
}
.dt-safar .dt-in {
  gap: 44px;
}
.dt-safar .dt-head {
  max-width: 660px;
}
/* One cream panel, three equal columns at every width (no swiping): the art
   grows 1 → 2 → 3, feet on a shared baseline, names underneath. */
.dt-stages {
  --scale: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 24px 16px;
  border-radius: 24px;
  background: var(--card);
}
@media (min-width: 720px) {
  .dt-stages {
    --scale: 1.5;
    gap: 24px;
    padding: 32px 28px;
  }
}
.dt-stage {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.dt-stage-art {
  height: calc(100px * var(--scale));
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dt-stage-art img {
  height: calc(var(--h) * var(--scale));
  width: auto;
  /* Every stage image has 30/512 of transparent space below the feet, which
     scales with the image; pull each down by its own share so feet line up. */
  margin-bottom: calc(var(--h) * var(--scale) * -30 / 512);
}
.dt-stage figcaption {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink);
}
@media (min-width: 720px) {
  .dt-stage figcaption {
    font-size: 21px;
  }
}

/* ---- for parents ---- */
.dt-parents .dt-split {
  gap: 56px;
  align-items: start;
}
.dt-parents .dt-head {
  max-width: none;
}
.dt-points {
  gap: 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.dt-points li {
  display: flex;
  gap: 16px;
}
.dt-points li > span {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--gold-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.dt-points h3 {
  font-weight: 700;
  font-size: 19px;
}
.dt-points p {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.6;
}
.dt-parents figure {
  margin: 0;
  align-items: center;
  gap: 12px;
}
.dt-parents figure img {
  max-width: 300px;
  filter: drop-shadow(0 24px 50px var(--shadow));
}
.dt-parents figcaption {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

/* ---- qari credit + wudu & salah ---- */
.dt-qari {
  padding: 24px 28px;
  border-radius: 22px;
  border-left: 6px solid var(--gold);
  background: var(--card);
}
.dt-qari h3 {
  font-weight: 800;
  font-size: 24px;
  color: var(--qari);
}
.dt-qari p {
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 720px;
}
.dt-salah {
  background: var(--alt);
  border-top: 1px solid var(--divider);
}
.dt-salah .dt-split {
  align-items: center;
  gap: 56px;
}
.dt-salah figure {
  margin: 0;
  align-items: center;
}
.dt-salah .dt-shot {
  max-width: 300px;
}

/* ---- pricing ---- */
.dt-pricing {
  background: var(--alt);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.dt-pricing .dt-in {
  max-width: 980px;
  gap: 36px;
}
.dt-pricing .dt-head {
  align-items: center;
  text-align: center;
  max-width: none;
}
.dt-plan {
  padding: 30px;
  border-radius: 24px;
  gap: 18px;
}
/* Premium stands apart: gold-washed card, glow, star badge, gold check chips. */
.dt-plan-premium {
  position: relative;
  background: var(--premium-bg);
  border: 2px solid var(--gold);
  box-shadow: 0 24px 50px var(--premium-glow);
}
.dt-plan-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 17px;
  vertical-align: 3px;
}
.dt-plan-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.dt-plan h3 {
  font-weight: 800;
  font-size: 26px;
}
.dt-plan-top p {
  margin-top: 4px;
  font-size: 15px;
}
.dt-plan ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.45;
}
.dt-plan li {
  display: flex;
  gap: 10px;
}
.dt-plan-premium .dt-check {
  flex: 0 0 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

/* ---- a look inside ---- */
.dt-screens .dt-in {
  gap: 36px;
}
.dt-rail {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 0 8px;
  margin: 0;
  list-style: none;
  scrollbar-width: none;
}
.dt-rail li {
  flex: 0 0 min(78%, 320px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dt-rail .dt-shot {
  filter: none;
}
.dt-rail p {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-weight: 600;
  color: var(--strong);
}

/* ---- FAQ ---- */
.dt-faq p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dt-faq {
  border-top: 1px solid var(--divider);
}
.dt-faq .dt-in {
  max-width: 820px;
  gap: 32px;
}
.dt-faq h2 {
  text-align: center;
}
.dt-faq-list {
  border-top: 1px solid var(--border);
}
.dt-faq details {
  border-bottom: 1px solid var(--border);
}
.dt-faq summary {
  min-height: 64px;
  padding: 18px 0;
  list-style: none;
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}
.dt-faq summary::-webkit-details-marker {
  display: none;
}
.dt-faq summary::after {
  content: '+';
  content: '+' / ''; /* decorative: keep it out of the accessible name */
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  flex: 0 0 auto;
}
.dt-faq details[open] summary::after {
  content: '–';
  content: '–' / '';
}
.dt-faq details p {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 680px;
}

/* ---- final CTA ---- */
.dt-cta {
  padding: 0 20px clamp(56px, 7vw, 96px);
}
.dt-cta-box {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px);
  border-radius: 28px;
  background: var(--cta-bg);
  border: 1px solid var(--cta-border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 32px;
  align-items: center;
}
.dt-cta-intro {
  display: flex;
  gap: 20px;
  align-items: center;
}
.dt-cta-intro img {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  flex: 0 0 auto;
}
.dt-cta-intro > div {
  gap: 8px;
}
.dt-cta h2 {
  font-weight: 800;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.08;
}
.dt-cta-intro p {
  font-size: 16px;
  line-height: 1.55;
}
.dt-cta-get {
  gap: 10px;
}

/* ---- footer ---- */
.dt-ft {
  background: var(--footer);
  border-top: 1px solid var(--divider);
}
.dt-ft-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  justify-content: space-between;
  align-items: flex-start;
}
.dt-ft-brand {
  gap: 10px;
  max-width: 320px;
}
.dt-ft-brand div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
}
.dt-ft-brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.dt-ft-brand p {
  line-height: 1.55;
}
.dt-ft-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  font-size: 14px;
  font-weight: 600;
}
.dt-ft-links a {
  color: var(--nav);
  padding: 12px 0;
}
.dt-ft-links a:hover {
  color: var(--accent);
}
.dt-ft-base {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 32px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--faint);
}

/* ---- legal pages (body copy unchanged; restyled for the new palette) ---- */
.dt-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}
.dt-legal {
  max-width: 760px;
  padding: 56px 0 90px;
}
.dt-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  font-size: 14.5px;
}
.dt-legal .dt-h1 {
  font-weight: 800;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.08;
  margin: 8px 0 18px;
}
.dt-legal-meta {
  font-size: 14px;
  font-weight: 700;
  color: var(--faint);
  margin: 0 0 8px;
}
.dt-legal h2 {
  font-weight: 700;
  font-size: 24px;
  margin: 44px 0 12px;
}
.dt-legal h3 {
  font-weight: 700;
  font-size: 18px;
  margin: 26px 0 8px;
}
.dt-legal p,
.dt-legal li {
  font-size: 16px;
  line-height: 1.68;
  color: var(--muted);
}
.dt-legal p {
  margin: 0 0 16px;
}
.dt-legal ul,
.dt-legal ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.dt-legal li {
  margin: 0 0 9px;
}
.dt-legal strong {
  color: var(--ink);
}
.dt-legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dt-legal .dt-back {
  text-decoration: none;
}
.dt-legal .dt-callout {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 0 0 20px;
}
.dt-legal .dt-callout p:last-child {
  margin: 0;
}

/* Phones: every section head reads left-aligned (the centred Free & Premium
   and FAQ heads stay centred from 600px up). */
@media (max-width: 599px) {
  .dt-pricing .dt-head {
    align-items: flex-start;
    text-align: left;
  }
  .dt-faq h2 {
    text-align: left;
  }
}

/* Sand text hierarchy (owner ruling): captions #6b5433 (--faint), body copy
   #5a4526 (--muted). Night keeps its own palette. */
:root:not([data-theme='night']) .dt-rail p,
:root:not([data-theme='night']) .dt-parents figcaption {
  color: var(--faint);
}
:root:not([data-theme='night']) .dt-qari p,
:root:not([data-theme='night']) .dt-plan ul {
  color: var(--muted);
}
