/* Sanurihim — a night sky over the desert: the verse in the sky, the signs as a reel of vertical films below.
   Single dark look by choice (the films are night and dusk scenes); every colour is a token. */
:root {
  --night: #0b1020;      /* sky */
  --deep: #141b35;       /* raised surfaces */
  --gold: #e2b66a;       /* verse ornaments, accents (from the brand calligraphy) */
  --sand: #f2e9d8;       /* text */
  --dust: #a3a9c2;       /* secondary text, indigo-biased grey */
  --line: rgba(226, 182, 106, .22);
  --f-verse: "Amiri Quran", "Amiri", "Noto Naskh Arabic", serif;
  --f-display: "Amiri", "Noto Naskh Arabic", serif;
  --f-body: "Readex Pro", "Noto Sans Arabic", system-ui, sans-serif;
  --f-latin: "Cormorant Garamond", Georgia, serif;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
@font-face { font-family: "Amiri Quran"; src: url("/AmiriQuran.ttf") format("truetype"); font-display: swap; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%;
  background: radial-gradient(120% 70% at 50% 0%, #1a2350 0%, var(--night) 60%) fixed, var(--night);
  color: var(--sand); font: 300 1.0625rem/1.85 var(--f-body);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  overflow-x: hidden;
}
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
header, main, footer { position: relative; z-index: 1; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:focus-visible, .reel:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
[lang="en"] { font-family: var(--f-latin); font-style: italic; font-weight: 400; letter-spacing: .01em; }
h2 [lang="en"], p [lang="en"] { color: var(--dust); }

/* top bar */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); display: flex; justify-content: space-between; align-items: center;
  max-width: 1180px; margin: 0 auto; padding-block: 14px; gap: 16px; z-index: 5;
  background: linear-gradient(var(--night) 30%, rgba(11, 16, 32, 0)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.mark { display: flex; align-items: center; gap: 10px; color: var(--sand); text-decoration: none;
  font: 700 1.5rem/1 var(--f-display); }
.mark img { border-radius: 7px; }
.bar nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: .95rem; }
.bar nav a { color: var(--dust); text-decoration: none; transition: color .3s; }
.bar nav a:hover { color: var(--sand); }

/* hero: the verse is the thesis */
.hero { max-width: 980px; margin: 0 auto; text-align: center; padding-block: clamp(56px, 12vh, 140px) clamp(48px, 9vh, 110px); }
.eyebrow { margin: 0 0 28px; color: var(--gold); font-size: .85rem; letter-spacing: .08em; }
.eyebrow [lang="en"] { color: var(--dust); letter-spacing: .04em; }
.verse {
  margin: 0; font: 400 clamp(2.1rem, 6.4vw, 4.6rem)/1.75 var(--f-verse); text-wrap: balance;
  text-shadow: 0 0 40px rgba(226, 182, 106, .18);
}
.verse .w { display: inline-block; animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.35s + var(--i) * .16s); }
.verse .orn { color: var(--gold); font-size: .8em; padding-inline: .25em; animation: glow 2.4s ease both .2s; }
.verse-ref { margin: 10px 0 0; color: var(--gold); font-size: .95rem; letter-spacing: .03em; animation: fade 1s ease both 2.2s; }
.verse-en { max-width: 640px; margin: 18px auto 0; font-size: 1.22rem; line-height: 1.6; color: var(--sand); animation: fade 1s ease both 2.5s; }
.verse-en span { display: block; margin-top: 6px; font-size: .92rem; color: var(--dust); }
.thesis { max-width: 620px; margin: 44px auto 0; color: var(--dust); animation: fade 1s ease both 2.9s; }
.thesis [lang="en"] { font-size: 1.12rem; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 36px; animation: fade 1s ease both 3.1s; }
.btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--sand); text-decoration: none; font-weight: 400;
  transition: border-color .3s, background .3s, transform .3s;
}
.btn:hover { border-color: var(--gold); transform: translateY(-2px); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--night); font-weight: 500; }
.btn.primary:hover { background: #ecc47f; }

@keyframes rise { from { opacity: 0; transform: translateY(.45em); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes glow { from { opacity: 0; text-shadow: none; } to { opacity: 1; } }

/* episodes: a reel of vertical films, like the Shorts themselves */
.episodes { max-width: 1180px; margin: 0 auto; padding-block: 40px 90px; }
.head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 28px; }
h2 { margin: 0; font: 700 clamp(1.9rem, 4vw, 2.6rem)/1.3 var(--f-display); text-wrap: balance; }
h2 [lang="en"] { font-size: .55em; font-weight: 400; margin-inline-start: .4em; }
.head p { margin: 0; color: var(--dust); font-size: .92rem; }
.reel {
  list-style: none; margin: 0; padding: 0 0 18px; display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(220px, 26vw, 280px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior-x: contain;
}
.ep { scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ep figure {
  position: relative; margin: 0; aspect-ratio: 9 / 16; max-width: 100%; border-radius: 14px; overflow: hidden;
  background: var(--deep); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .9);
}
.ep figure::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(242, 233, 216, .08);
  background: linear-gradient(to top, rgba(11, 16, 32, .55), transparent 40%); }
.ep img, .ep video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04);
  transition: transform 6s cubic-bezier(.2, .6, .2, 1); }
.ep.in img { transform: scale(1.14); }
.ep:hover img, .ep:hover video { transform: scale(1.12); }
.ref { color: var(--gold); font-size: .8rem; letter-spacing: .03em; }
.hook { margin: 2px 0 0; font: 400 1.18rem/1.65 var(--f-display); }
.hook-en { margin: 4px 0 0; font-size: 1rem; line-height: 1.45; color: var(--dust); }

/* method */
.method { max-width: 1180px; margin: 0 auto; padding-block: 60px 90px; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; margin-top: 30px;
  border-top: 1px solid var(--line); }
.pillars article { padding: 26px 24px 8px; min-width: 0; border-inline-start: 1px solid var(--line); }
.pillars article:first-child { border-inline-start: 0; padding-inline-start: 0; }
.pillars h3 { margin: 0 0 10px; font: 700 1.7rem/1.3 var(--f-display); color: var(--gold); }
.pillars p { margin: 0 0 12px; max-width: 36ch; }
.pillars p[lang="en"] { color: var(--dust); font-size: 1.08rem; line-height: 1.5; }
.note { margin-top: 26px; color: var(--dust); font-family: var(--f-display); font-size: 1.2rem; }

/* follow */
.follow { max-width: 1180px; margin: 0 auto; padding-block: 40px 70px; }
.channels { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 14px; }
.channels a { display: flex; flex-direction: column; gap: 2px; min-width: 210px; padding: 18px 22px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(20, 27, 53, .6); color: var(--sand); text-decoration: none;
  transition: border-color .3s, transform .3s; }
.channels a:hover { border-color: var(--gold); transform: translateY(-3px); }
.channels b { font-weight: 500; }
.channels span { color: var(--dust); font-size: .92rem; }
.contact { margin-top: 26px; color: var(--dust); }
.mail { color: var(--sand); user-select: all; margin-inline-start: .5em; }

/* footer */
.foot { max-width: 1180px; margin: 0 auto; padding-block: 28px 40px; border-top: 1px solid var(--line);
  color: var(--dust); font-size: .85rem; display: grid; gap: 6px; }
.foot p { margin: 0; }
.foot .links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 8px; }

/* text pages (privacy, terms, 404) */
.doc { max-width: 760px; margin: 0 auto; padding-block: 50px 80px; }
.doc h1 { font: 700 clamp(2rem, 5vw, 2.8rem)/1.3 var(--f-display); margin: 0 0 6px; }
.doc h2 { font-size: 1.45rem; margin-top: 34px; }
.doc .en { direction: ltr; text-align: left; margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc .en, .doc .en p, .doc .en li { font-family: var(--f-body); font-style: normal; }
.doc .en h2 { font-family: var(--f-latin); font-style: italic; font-weight: 500; }

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .bar nav a:nth-child(2) { display: none; }
  .pillars article { border-inline-start: 0; padding-inline: 0; border-top: 1px solid var(--line); }
  .pillars { border-top: 0; }
  .channels a { min-width: 0; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
