/* Dastan Sara: the house style. One stylesheet for every page of dastansara.com (brand/DESIGN.md is the rulebook).
   Night (lapis + lamp-gold) for the house and the epic, cotton + thread for Taana Baana, paper folios for reading.
   Every Urdu line carries lang="ur" dir="rtl" and sits right-aligned (Abdul, 2026-10-06). */

@font-face { font-family: "Gulzar"; src: url("/fonts/gulzar-sub.d545d76373.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Gloock"; src: url("/fonts/gloock-sub.82bbb2dd36.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-sub.bc4ed662e6.woff2") format("woff2");
  font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }

:root {
  --night: #0b1630;  --night-2: #0e1c3b;  --night-deep: #08101f;
  --gold: #e2b356;   --gold-light: #f3d48e;
  --cream: #f1ead9;  --cream-muted: #d9d2c2;  --cream-faint: #a9a291;
  --cotton: #f4efe3; --paper: #ece3cf; --ink: #241f17; --ink-soft: #5a4d36; --rule: #8a6a2f;
  --indigo: #2b2f6b; --brick: #9b3b26; --thread-ink: #1d1b2e; --thread-soft: #3b3a4d;
  --f-ur: "Gulzar", "Noto Nastaliq Urdu", serif;
  --f-display: "Gloock", Georgia, serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 6vw, 88px);
  color-scheme: dark light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--night); color: var(--cream); font: 17px/1.65 var(--f-body); }
img, video { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--night); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* Type */
.ur { font-family: var(--f-ur); font-weight: 400; line-height: 1.6; text-align: right; }
.display { font-family: var(--f-display); font-weight: 400; line-height: 1.15; }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: 0.3em; font-weight: 600; text-transform: uppercase; color: var(--gold); }
.lede { font-size: 19px; line-height: 1.6; color: var(--cream-muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 2px;
  font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.btn svg { flex: none; }
.btn--gold { background: var(--gold); color: var(--night); }
.btn--gold:hover { background: var(--gold-light); color: var(--night); }
.btn--ghost { border-color: rgba(241, 234, 217, 0.5); color: var(--cream); }
.btn--ghost:hover { border-color: var(--cream); color: var(--cream); }
.btn--indigo { background: var(--indigo); color: var(--cotton); }
.btn--indigo:hover { background: #1f2252; color: var(--cotton); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* The wordmark and the site navigation */
.mark { display: inline-flex; align-items: baseline; gap: 12px; color: var(--cream); text-decoration: none; }
.mark .ur { font-size: 30px; line-height: 1.4; color: var(--gold); }
.mark .latin { font-size: 13px; letter-spacing: 0.32em; font-weight: 600; }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.nav ul { display: flex; flex-wrap: wrap; gap: 4px 26px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.nav ul a { color: var(--cream); text-decoration: none; display: inline-block; padding: 10px 0; }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--gold); }

/* The night hero: a painted loop behind, the poster still underneath it */
.hero { position: relative; isolation: isolate; min-height: min(92vh, 860px); display: flex; flex-direction: column;
  justify-content: space-between; padding: 24px var(--gutter) clamp(48px, 9vh, 84px); overflow: hidden; }
.hero__media, .hero__media img, .hero__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__media { z-index: -2; }
.hero__media img, .hero__media video { object-position: center 38%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(9, 18, 38, 0.55) 0%, rgba(9, 18, 38, 0.05) 30%, rgba(9, 18, 38, 0.2) 55%, rgba(9, 18, 38, 0.94) 100%); }
.hero__text { max-width: 640px; }
.hero__text h1 { margin: 0 0 0.12em; text-align: left; line-height: 1.75; font-size: clamp(64px, 11vw, 104px); color: var(--gold-light); text-shadow: 0 2px 24px rgba(8, 16, 31, 0.6); }
.hero__text .display { margin: 4px 0 18px; font-size: clamp(34px, 5vw, 48px); }
.hero__text .lede { margin: 0 0 30px; max-width: 540px; }

.listen { gap: 8px; cursor: pointer; font: inherit; font-weight: 600; background: transparent; }
.listen .ur { font-size: 20px; line-height: 1; color: var(--gold); text-align: left; }
.listen[data-state="muted"] { border-color: var(--gold); color: var(--gold); }
.listen[data-state="sound"] { border-color: var(--gold); color: var(--gold); }
.hero__caption { display: none; }
.hero.is-story .hero__caption { display: block; }
.hero__caption { position: absolute; right: var(--gutter); bottom: clamp(48px, 9vh, 84px); max-width: min(560px, 42vw);
  margin: 0; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.75; color: var(--cream);
  text-shadow: 0 2px 18px rgba(8, 16, 31, 0.95), 0 0 2px rgba(8, 16, 31, 0.9); }
@media (max-width: 899px) {
  .hero__caption { position: static; margin: 18px 0 0; max-width: none; font-size: 24px; min-height: 3.5em; }
}

/* Two channels, one house: the leaves */
.channels { padding: clamp(64px, 10vw, 104px) var(--gutter); border-top: 1px solid rgba(226, 179, 86, 0.35); }
.channels > .eyebrow { text-align: center; margin-bottom: 36px; }
.leaves { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(24px, 4vw, 44px); max-width: 1320px; margin: 0 auto; }
.leaf { padding: 10px; min-width: 0; display: flex; flex-direction: column; }
.leaf__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.leaf__media img, .leaf__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.leaf__body { padding: 26px clamp(12px, 2vw, 22px) 18px; display: flex; flex-direction: column; flex: 1; }
.leaf__titles { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 20px; margin: 8px 0 14px; }
.leaf__titles .display { margin: 0; font-size: 30px; }
.leaf__titles .ur { margin: 0; flex: 1 1 auto; font-size: clamp(40px, 5vw, 50px); }
.leaf__body p { margin: 0 0 14px; }
.leaf__fine { font-size: 14px; }
.leaf__body .btn { margin-top: auto; align-self: flex-start; }
.leaf--epic { border: 3px double rgba(226, 179, 86, 0.75); background: var(--night-2); }
.leaf--epic .ur { color: var(--gold-light); }
.leaf--epic p { color: var(--cream-muted); }
.leaf--epic .leaf__fine { color: var(--cream-faint); }
.leaf--tb { border: 3px double var(--indigo); color: var(--thread-ink); background-color: var(--cotton); }
.weave { background-image: repeating-linear-gradient(90deg, rgba(43, 47, 107, 0.14) 0 2px, transparent 2px 14px),
  repeating-linear-gradient(0deg, rgba(155, 59, 38, 0.1) 0 2px, transparent 2px 14px); }
.leaf--tb .eyebrow { color: var(--brick); }
.leaf--tb .ur { color: var(--indigo); }
.leaf--tb p { color: var(--thread-soft); }
.leaf--tb .leaf__fine { color: #5b5a6d; }

/* Paper folios: the house section and every reading page */
.folio-band { background-color: var(--paper); color: var(--ink); padding: clamp(56px, 9vw, 88px) var(--gutter);
  background-image: radial-gradient(rgba(120, 90, 40, 0.07) 1px, transparent 1px); background-size: 5px 5px; }
.folio { max-width: 820px; margin: 0 auto; border: 3px double var(--rule); padding: 6px; }
.folio__inner { border: 1px solid var(--rule); padding: clamp(28px, 6vw, 52px) clamp(20px, 7%, 64px); }
.folio a { color: var(--indigo); }
.folio a:hover { color: var(--brick); }
.folio .eyebrow { color: var(--brick); text-align: center; }
.folio__title { margin: 8px 0 22px; font-size: clamp(26px, 4vw, 32px); text-align: center; }
.folio p { margin: 0 0 16px; line-height: 1.75; }
.folio .small { font-size: 15px; color: var(--ink-soft); }

/* Reading pages (privacy, terms): the legal text inside a folio */
.prose h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 5vw, 44px); line-height: 1.15; margin: 0 0 6px; }
.prose h2 { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.25; margin: 34px 0 8px; }
.prose p, .prose li { max-width: 68ch; overflow-wrap: anywhere; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }
.prose .meta { color: var(--ink-soft); font-size: 15px; margin-bottom: 8px; }
.prose .note { border-inline-start: 3px solid var(--rule); padding: 4px 16px; }

/* The compact night bar on inner pages */
.bar { background: var(--night); padding: 22px var(--gutter); border-bottom: 1px solid rgba(226, 179, 86, 0.35); }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding: 30px var(--gutter);
  background: var(--night-deep); color: var(--cream-faint); font-size: 14px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.foot a { color: var(--cream-muted); }

/* Motion: loops only when the visitor hasn't asked for less (the script also skips them on Save-Data) */
@media (prefers-reduced-motion: reduce) { video[data-loop] { display: none; } }
