/* Nidaly landing page. The page is a day: each chapter takes the colour of a prayer's sky, from Fajr to Isha.
   Colours come from docs/brand.md (prayer skies + core palette). No build step: build.py copies this file with a hash. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/newsreader-600-latin.eb536f50.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/newsreader-600-latin-ext.2566c70c.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* core palette */
  --isha: #0E1530;
  --lapis900: #14203F;
  --lapis700: #22356B;
  --turq: #3CC4B5;
  --turq700: #0F6E66;
  --sand50: #FAF6EF;
  --sand200: #EADFCB;
  --brass: #D9B25A;
  --ink: #1A1D24;
  --mist: #E8ECF4;
  --white: #FFFFFF;

  /* type */
  --latin-display: "Newsreader", ui-serif, "New York", Georgia, "Times New Roman", serif;
  --display: var(--latin-display);
  --text: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display-weight: 600;
  --display-track: -0.022em;
  --display-lead: 1.02;
  --text-lead: 1.55;

  /* five sizes */
  --t-hero: clamp(40px, 5.4vw, 84px);
  --t-h2: clamp(34px, 4.1vw, 62px);
  --t-lead: clamp(19px, 1.45vw, 22px);
  --t-body: clamp(17px, 1.2vw, 19px);
  --t-small: 15px;

  --m: clamp(16px, 4vw, 56px);
  --gap: clamp(16px, 2vw, 32px);
  --radius: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --focus: var(--turq);
  color-scheme: dark light;
}

:lang(ar) {
  --display: system-ui, -apple-system, "SF Arabic", "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  --text: var(--display);
  --display-weight: 700;
  --display-track: 0;
  --display-lead: 1.25;
  --text-lead: 1.75;
}
:lang(ur) {
  --display: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  --text: var(--display);
  --display-weight: 700;
  --display-track: 0;
  --display-lead: 1.75;
  --text-lead: 2.1;
  --t-hero: clamp(32px, 4.9vw, 76px);
  --t-h2: clamp(27px, 3.3vw, 48px);
  --t-lead: clamp(17px, 1.3vw, 20px);
  --t-body: clamp(16px, 1.1vw, 18px);
}
:lang(bn) {
  --display: system-ui, -apple-system, "Kohinoor Bangla", "Noto Sans Bengali", "Nirmala UI", Vrinda, sans-serif;
  --text: var(--display);
  --display-weight: 700;
  --display-track: 0;
  --display-lead: 1.3;
  --text-lead: 1.7;
  --t-hero: clamp(32px, 4.6vw, 70px);
  --t-h2: clamp(30px, 3.6vw, 54px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--isha);
  color: var(--mist);
  font: 400 var(--t-body)/var(--text-lead) var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); line-height: var(--display-lead); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: min(100% - 2 * var(--m), 1328px); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; inset-inline-start: 16px; top: -80px; z-index: 50; padding: 12px 18px; background: var(--sand50); color: var(--ink); border-radius: 10px; font-weight: 600; }
.skip:focus { top: 16px; }

/* ---------- language suggestion ---------- */
.suggest { background: var(--lapis700); color: var(--white); font-size: var(--t-small); }
.suggest[hidden] { display: none; }
.suggest .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
.suggest a { font-weight: 600; }
.suggest button {
  flex: none; width: 44px; height: 44px; margin-inline-end: -10px; border: 0; border-radius: 50%; background: transparent; color: inherit;
  cursor: pointer; display: grid; place-items: center; transition: background-color .2s;
}
.suggest button:hover { background: rgba(255, 255, 255, .14); }
.suggest svg { width: 16px; height: 16px; }

/* ---------- navigation ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; position: relative; z-index: 5; }
.brand { font: 600 28px/1 var(--latin-display); letter-spacing: -0.02em; text-decoration: none; color: var(--white); padding-block: 8px; }
.bar__end { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 36px); }
.bar__links { display: flex; gap: clamp(16px, 2.2vw, 32px); margin: 0; padding: 0; list-style: none; font-size: 16px; }
.bar__links a { text-decoration: none; padding-block: 10px; display: inline-block; }
.bar__links a:hover { text-decoration: underline; }

.lang { position: relative; font-size: 16px; }
.lang summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: rgba(232, 236, 244, .1); transition: background-color .2s;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { background: rgba(232, 236, 244, .2); }
.lang summary svg { width: 18px; height: 18px; flex: none; }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none; min-width: 220px;
  background: var(--sand50); color: var(--ink); border-radius: 18px;
}
.lang li a { font-family: var(--text); display: flex; align-items: center; min-height: 46px; padding: 0 14px; border-radius: 12px; text-decoration: none; }
.lang li a:hover { background: var(--sand200); }
.lang li a:lang(ar), .lang li a:lang(ur), .lang li a:lang(bn) { font-size: 18px; }
.lang li a[aria-current] { background: var(--lapis700); color: var(--white); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--isha); color: var(--mist); --band-ratio: .2498; }
.hero__grid { align-items: center; padding-top: clamp(16px, 4vh, 56px); }
.hero__text { grid-column: 1 / span 7; position: relative; z-index: 3; padding-bottom: clamp(40px, 8vh, 96px); }
.hero__icon { width: 96px; height: 96px; border-radius: 22.4%; margin-bottom: clamp(24px, 4vh, 40px); }
.hero h1 { font-size: var(--t-hero); color: var(--white); }
.hero h1 .mask { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.hero h1 .mask > span { display: block; }
.lede { font-size: var(--t-lead); max-width: 36ch; margin-top: clamp(20px, 3vh, 32px); color: var(--mist); }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: clamp(28px, 4.5vh, 44px); }
.badge { display: inline-block; padding: 0; border-radius: 12px; transition: transform .25s var(--ease), opacity .25s; }
.badge img { height: 56px; width: auto; }
.badge:hover { transform: translateY(-2px); }
.badge:active { transform: translateY(0) scale(.98); }
.facts { font-size: 16px; line-height: 1.5; }
.facts strong { display: block; font-weight: 600; color: var(--white); }

.hero__phone { grid-column: 8 / span 5; justify-self: end; position: relative; z-index: 1; align-self: end; margin-bottom: calc(-100vw * var(--band-ratio) * .30); }
.hero__phone img { width: clamp(240px, 22vw, 330px); }
.arcade { position: relative; z-index: 2; pointer-events: none; }
.arcade img { width: 100%; }

/* ---------- chapters (one sky each) ---------- */
.ch { padding-block: clamp(96px, 13vh, 168px); display: grid; align-items: center; }
@media (min-width: 1024px) { .ch { min-height: min(100svh, 940px); } .ch--short { min-height: 0; } }
.ch__text { grid-column: 1 / span 6; align-self: center; }
.ch__plate { grid-column: 8 / span 5; margin: 0; align-self: center; justify-self: end; width: 100%; max-width: 400px; }
.ch__plate img { width: 100%; border-radius: var(--radius); }
.ch--detail .ch__plate { grid-column: 7 / span 6; max-width: 540px; }
.ch h2 { font-size: var(--t-h2); max-width: 14ch; margin-bottom: clamp(24px, 3.4vh, 40px); }
:lang(ar) .ch h2, :lang(ur) .ch h2, :lang(bn) .ch h2 { max-width: 16ch; }
.ch p { max-width: 42ch; }
.ch p + p { margin-top: 1em; }
.ch .first { font-size: var(--t-lead); }

.f-fajr { background: #5B4A86; color: var(--white); }
.f-sunrise { background: #6FB6E3; color: var(--ink); --focus: var(--lapis900); }
.f-dhuhr { background: #CDE7F5; color: var(--ink); --focus: var(--lapis700); }
.f-asr { background: #E9B96E; color: var(--ink); --focus: var(--lapis900); }
.f-asr-late { background: #F6E3BE; color: var(--ink); --focus: var(--lapis700); }
.f-maghrib { background: #8E4A72; color: var(--white); }
.f-ramadan { background: var(--brass); color: var(--ink); --focus: var(--lapis900); }
.f-isha { background: var(--lapis700); color: var(--mist); }
.f-turq { background: var(--turq); color: var(--lapis900); --focus: var(--lapis900); }
.f-sand { background: var(--sand50); color: var(--ink); --focus: var(--lapis700); }
.f-night { background: var(--isha); color: var(--mist); }

/* languages */
.langs-list { grid-column: 7 / span 6; margin: 0; padding: 0; list-style: none; align-self: center; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 4px 32px; }
.langs-list a {
  display: inline-block; white-space: nowrap; text-decoration: none; font-size: clamp(24px, 2.3vw, 36px); line-height: 1.3; padding-block: 6px;
  font-family: var(--display); font-weight: var(--display-weight); color: var(--mist); transition: color .2s, transform .25s var(--ease);
}
.langs-list a:hover { color: var(--turq); transform: translateX(6px); }
[dir="rtl"] .langs-list a:hover { transform: translateX(-6px); }
.langs-list a[aria-current] { color: var(--turq); }
.langs-list a:lang(ur) { line-height: 1.9; font-size: clamp(22px, 2.1vw, 32px); }

/* privacy */
.ch--privacy h2 { font-size: clamp(44px, 6.4vw, 104px); max-width: 11ch; }
:lang(ur) .ch--privacy h2, :lang(bn) .ch--privacy h2 { font-size: clamp(34px, 4.6vw, 72px); max-width: 13ch; }
.ch--privacy .ch__text { grid-column: 1 / span 7; }
.promise { grid-column: 9 / span 4; margin: 0; padding: 0; list-style: none; align-self: center; }
.promise li { font: var(--display-weight) clamp(26px, 2.6vw, 40px)/1.2 var(--display); letter-spacing: var(--display-track); padding-block: 10px; }
:lang(ur) .promise li { line-height: 1.9; font-size: clamp(22px, 2.1vw, 32px); }
.ch--privacy .more { margin-top: clamp(24px, 3.4vh, 36px); font-weight: 600; }

/* questions */
.faq { padding-block: clamp(96px, 13vh, 168px); }
.faq__head { grid-column: 1 / span 4; align-self: start; position: sticky; top: 48px; }
.faq__head h2 { font-size: var(--t-h2); max-width: 9ch; }
.faq__list { grid-column: 5 / span 8; }
.faq details { background: var(--sand200); border-radius: 18px; transition: background-color .25s; }
.faq details + details { margin-top: 8px; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 72px; padding: 18px 24px; font-size: clamp(18px, 1.35vw, 20px); font-weight: 600; line-height: 1.4; border-radius: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: rgba(20, 32, 63, .06); }
.pm { position: relative; flex: none; width: 16px; height: 16px; }
.pm::before, .pm::after { content: ""; position: absolute; inset-inline-start: 0; top: 6.5px; width: 16px; height: 3px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease); }
.pm::after { transform: rotate(90deg); }
.faq details[open] { background: var(--turq700); color: var(--white); --focus: var(--turq); }
.faq details[open] .pm::after { transform: rotate(0deg); }
.faq details p { padding: 0 24px 24px; max-width: 60ch; }
.faq__more { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px 32px; font-weight: 600; }

/* closing + footer */
.close { padding-top: clamp(112px, 16vh, 200px); }
.close h2 { grid-column: 1 / span 8; font-size: clamp(44px, 5.6vw, 96px); color: var(--white); }
:lang(fr) .hero h1, :lang(ms) .hero h1 { font-size: clamp(38px, 4.9vw, 76px); }
:lang(ur) .close h2, :lang(bn) .close h2 { font-size: clamp(34px, 4.6vw, 72px); }
.close__end { grid-column: 9 / span 4; align-self: end; }
.close__end p { font-size: var(--t-lead); margin-bottom: 28px; }
.foot { margin-top: clamp(88px, 12vh, 144px); font-size: var(--t-small); line-height: 1.6; }
.foot__links { grid-column: 1 / span 8; display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; padding: 0; list-style: none; font-size: 17px; font-weight: 600; }
.foot__links a { display: inline-block; padding-block: 8px; }
.foot__meta { grid-column: 9 / span 4; }
.foot__meta p + p { margin-top: 8px; }
.foot__legal { grid-column: 1 / -1; margin-top: 40px; color: #B9C1D3; }
.foot__legal p + p { margin-top: 6px; }
.close .arcade { margin-top: clamp(48px, 8vh, 96px); }

/* ---------- motion ---------- */
@keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rise-behind { from { transform: translateY(16%); } to { transform: none; } }
.hero h1 .mask > span { animation: line-up 900ms var(--ease) both; }
.hero .lede, .hero .get { animation: fade-up 700ms var(--ease) 380ms both; }
.hero .hero__icon { animation: fade-up 700ms var(--ease) both; }
.hero__phone { animation: rise-behind 1400ms var(--ease) 150ms both; }
@supports (animation-timeline: scroll()) {
  .hero__phone img { animation: sink linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
  @keyframes sink { to { transform: translateY(14%); } }
}
html.js .rise { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 85ms); }
html.js .in .rise { opacity: 1; transform: none; }
html.js .ch__plate.rise { transform: translateY(48px) scale(.97); }
html.js .in .ch__plate.rise { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html.js .rise, html.js .ch__plate.rise { transform: none; }
}

/* ---------- dark mode: the one light section follows the system ---------- */
@media (prefers-color-scheme: dark) {
  .f-sand { background: var(--lapis900); color: var(--mist); --focus: var(--turq); }
  .faq details { background: #1C2B55; }
  .faq summary:hover { background: rgba(232, 236, 244, .06); }
}

/* ---------- tablet ---------- */
@media (max-width: 1023px) {
  .ch__text { grid-column: 1 / span 7; }
  .ch__plate { grid-column: 8 / span 5; }
  .ch--detail .ch__plate { grid-column: 8 / span 5; }
  .langs-list, .promise { grid-column: 1 / -1; margin-top: 48px; }
  .ch--privacy .ch__text { grid-column: 1 / -1; }
  .faq__head { grid-column: 1 / -1; position: static; margin-bottom: 32px; }
  .faq__head h2 { max-width: none; }
  .faq__list { grid-column: 1 / -1; }
  .close h2 { grid-column: 1 / -1; }
  .close__end { grid-column: 1 / span 8; margin-top: 32px; }
  .foot__links { grid-column: 1 / -1; }
  .foot__meta { grid-column: 1 / -1; margin-top: 24px; }
}

/* ---------- phone ---------- */
@media (max-width: 699px) {
  :root { --radius: 22px; }
  .hero { --band-ratio: .5458; }
  .bar { min-height: 68px; }
  .brand { font-size: 25px; }
  .bar__links { display: none; }
  .lang summary { padding: 0 14px; }
  .hero__grid { padding-top: 12px; }
  .hero__text, .hero__phone { grid-column: 1 / -1; }
  .hero__phone { justify-self: center; }
  .hero__text { padding-bottom: 40px; }
  .hero__icon { width: 76px; height: 76px; margin-bottom: 24px; }
  .hero h1 { font-size: clamp(32px, 9.4vw, 40px); }
  :lang(ar) .hero h1 { font-size: clamp(32px, 9.6vw, 42px); }
  :lang(ur) .hero h1 { font-size: clamp(26px, 7.4vw, 32px); }
  :lang(bn) .hero h1 { font-size: clamp(28px, 8.4vw, 36px); }
  :lang(ms) .hero h1, :lang(fr) .hero h1 { font-size: clamp(30px, 8.6vw, 37px); }
  .badge img { height: 50px; }
  .hero__phone img { width: min(64vw, 290px); }
  .ch { min-height: 0; padding-block: 88px; }
  .ch__text, .ch__plate, .ch--detail .ch__plate, .langs-list, .promise, .ch--privacy .ch__text { grid-column: 1 / -1; }
  .ch__plate { margin-top: 48px; max-width: 360px; }
  .ch--detail .ch__plate { max-width: 440px; }
  .ch h2 { font-size: clamp(30px, 8.6vw, 38px); }
  :lang(ur) .ch h2 { font-size: clamp(24px, 6.6vw, 30px); }
  :lang(bn) .ch h2 { font-size: clamp(26px, 7.4vw, 32px); }
  .ch--privacy h2 { font-size: clamp(40px, 11.4vw, 52px); }
  :lang(ur) .ch--privacy h2, :lang(bn) .ch--privacy h2 { font-size: clamp(28px, 8vw, 36px); }
  .langs-list, .promise { margin-top: 40px; }
  .langs-list { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .faq { padding-block: 88px; }
  .faq summary { min-height: 64px; padding: 16px 20px; font-size: 18px; }
  .faq details p { padding: 0 20px 20px; font-size: 16px; }
  .close { padding-top: 104px; }
  .close h2 { font-size: clamp(40px, 11.4vw, 52px); }
  :lang(ur) .close h2, :lang(bn) .close h2 { font-size: clamp(28px, 8vw, 36px); }
  .close__end { grid-column: 1 / -1; }
  .foot { margin-top: 72px; }
}

/* 404 */
.nf { margin-top: 28px; }
