/* The frame every page in the "option D" look shares (approved 2026-11-21; Laravel #328): sky stage, light
   sheet, blocks, buttons, menu, foot, bottom bar. Layout: resources/views/website/frame/layout.blade.php.
   Built from the two prayer-times screens Aziz sent on 2026-11-21 (night: indigo to green, day: teal to
   purple). Every colour is a pixel sample from those screens; the gradients are rebuilt from a 5 x 8 grid of
   samples. The sky art is the original Figma vectors already in the site. Nothing here is drawn or invented.
   A page adds only its own parts on top (the city prayer page: city-page.css). */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk/HankenGrotesk-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --gold: #fccb00;
  --blue: #80c0d7;
  --white: #ffffff;
  --date: #c4dce1;
  --track: rgb(255 255 255 / 22%);
  --ink: #08004d;
  --purple: #4b0e6c;
  --sheet: #efefef;
  --muted: #6b6b76;
  --line: #dcdce3;
  --gutter: clamp(16px, 5vw, 30px);
  --art: clamp(387px, 46vw, 560px);
  --radius: 28px;
  --tap: 44px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* One page, two skies, both from the design. --day runs from 0 (night) to 1 (day): the server writes
   data-sky, and the script moves --day through dawn (Fajr to sunrise) and dusk (Maghrib to Isha).
   The in-between is only a blend of the two designed skies; no new colour is introduced. */
[data-sky="night"] { --day: 0; }
[data-sky="day"] { --day: 1; }
:root {
  --stage-night:
    radial-gradient(ellipse 70% 45% at 100% 45%, rgb(43 103 69 / 75%), transparent 100%),
    linear-gradient(180deg, transparent 10%, rgb(27 30 85 / 55%) 100%),
    linear-gradient(90deg, #23205a 0%, #21325e 25%, #255562 50%, #317068 75%, #377b6f 100%);
  --stage-day:
    radial-gradient(ellipse 60% 30% at 85% 0%, rgb(94 65 145 / 70%), transparent 100%),
    linear-gradient(90deg, #3f8a98 0%, #3f7d9c 25%, #436296 50%, #4b488a 75%, #4b337d 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--sheet);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.sheet :focus-visible, .tabbar :focus-visible { outline-color: var(--purple); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 0 14px; min-height: var(--tap); display: inline-flex; align-items: center; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Stage: the sky and what matters most on the page ---------- */
.stage {
  /* clip, not hidden: hidden would stop the stage's content from staying in view on wide screens. */
  position: relative; isolation: isolate; overflow: clip;
  color: var(--white);
  background: var(--stage-night);
  padding: 0 var(--gutter) calc(var(--radius) + 28px);
}
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background: var(--stage-day); opacity: var(--day); pointer-events: none;
}
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--grain); opacity: 0.3; mix-blend-mode: overlay; pointer-events: none;
}
.sky-art {
  position: absolute; top: 0; left: 50%; z-index: -2;
  width: var(--art); height: auto; transform: translateX(-50%); pointer-events: none;
}
/* One after the other, never both: the crescent sinks away in the first half of dawn, the sun rises
   into place in the second half (and the reverse at dusk). */
.sky-art--day { opacity: clamp(0, calc(var(--day) * 2 - 1), 1); transform: translateX(-50%) translateY(calc((1 - var(--day)) * 14%)); }
.sky-art--night { opacity: clamp(0, calc(1 - var(--day) * 2), 1); transform: translateX(-50%) translateY(calc(var(--day) * 14%)); }

.stage-in { position: relative; max-width: 460px; margin-inline: auto; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; }
.logo { display: inline-flex; align-items: center; min-height: var(--tap); }
.logo img { height: 22px; width: auto; display: block; }
.topbar-link { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); font-size: 0.9rem; font-weight: 600; text-underline-offset: 3px; }
.nav { display: none; gap: 4px; }
/* The account link sits at the top right on phones; on wide screens it joins the menu instead. */
.nav .nav-account { display: none; }
.nav a, .tabbar a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 12px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
}
/* On wide screens the menu sits at the top of the light sheet, clear of the sky art. */
.nav { justify-content: flex-end; margin: 0 -12px 4px 0; color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); }


/* The top bar is 54px tall; the art's rays end at about half its width. */
.now { margin-top: calc(var(--art) * 0.45 - 54px); }
.now-head { display: flex; align-items: flex-end; gap: 16px; color: var(--gold); }
.now-name { margin: 0; font-size: clamp(2rem, 1.6rem + 2vw, 2.5rem); font-weight: 400; line-height: 1; }
.bar { position: relative; margin-top: 16px; height: 5px; border-radius: 5px; background: var(--track); }
.bar-fill { display: block; height: 100%; min-width: 5px; border-radius: 5px; background: var(--gold); }
.now-foot { margin: 14px 0 0; display: flex; justify-content: space-between; gap: 12px; }
.now-foot .next b { font-weight: 400; color: var(--gold); }


/* ---------- Sheet: the light page under the sky. Any page is a list of blocks. ---------- */
.sheet {
  position: relative; z-index: 1;
  margin-top: calc(-1 * var(--radius));
  background: var(--sheet);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px var(--gutter) 32px;
}
.sheet-in { max-width: 760px; margin-inline: auto; }
.block { padding: 26px 0; border-top: 1px solid var(--line); min-width: 0; }
/* No line above the first block, with or without the menu before it. */
.block:first-child, .nav + .block, .nav + * > .block:first-child { border-top: 0; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 8px; }
.block h2 { margin: 0 0 8px; font-size: 1.3rem; font-weight: 700; line-height: 1.2; color: var(--purple); }
.block-head h2 { margin: 0; }
.block p { margin: 0 0 12px; max-width: 62ch; }
.muted, .label { color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 18px 48px; margin: 16px 0 0; }
.fact b { display: block; font-size: 1.9rem; font-weight: 400; line-height: 1.2; color: var(--purple); }
.fact .label { display: block; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 22px; border-radius: 999px;
  border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 600;
}
.btn--primary { background: var(--ink); color: var(--white); }
/* A button on the sky. */
.btn--on-sky { border-color: var(--white); background: none; color: var(--white); cursor: pointer; font: inherit; font-weight: 600; }

/* The foot of every page: the social links, then the small print. */
.foot { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.site-social { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -9px; }
.site-social-link { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); }
/* The site's icons are drawn white, for its dark footer; on the light sheet they are shown dark. */
.site-social-link img { width: 24px; height: 24px; filter: brightness(0); }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; margin: 0; }
.foot-links a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); text-underline-offset: 3px; }

/* ---------- Rows on the stage that open in the pop-up ---------- */
.fold { border-top: 1px solid var(--track); }
.fold:first-of-type { margin-top: 22px; }
.fold summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "›"; font-size: 1.5rem; line-height: 1; }
.fold h2 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.stage :focus-visible { outline-color: var(--gold); }
/* Without scripts a row unfolds in place, on the sky. */
.stage .fold > :last-child:not(summary) { margin-bottom: 18px; }

/* ---------- The pop-up a row opens ---------- */
.popup {
  width: min(520px, calc(100% - 32px)); max-height: min(720px, calc(100dvh - 48px)); padding: 0; border: 0;
  border-radius: var(--radius); background: var(--sheet); color: var(--ink); overflow: hidden;
}
.popup[open] { display: flex; flex-direction: column; }
.popup::backdrop { background: rgb(8 0 77 / 55%); }
.popup-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 6px 24px; }
.popup-head h2 { margin: 0; font-size: 1.3rem; font-weight: 700; color: var(--purple); }
.popup-close { width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: none; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.popup-body { padding: 6px 24px 24px; overflow-y: auto; }
/* Phones: the pop-up rises from the bottom, like a sheet. */
@media (max-width: 599px) {
  .popup { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--radius) var(--radius) 0 0; max-height: 85dvh; }
}

/* ---------- Bottom bar: the app's white tab bar, as the phone menu ---------- */
.tabbar {
  position: sticky; bottom: 0; z-index: 3;
  /* One equal column per link, however many the menu has. */
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  background: var(--white); color: var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { min-height: 56px; padding: 0 4px; font-size: 0.68rem; letter-spacing: 0.1em; text-align: center; overflow-wrap: normal; word-break: normal; hyphens: none; }
.tabbar a[aria-current="page"] { box-shadow: inset 0 3px 0 var(--gold); }

/* ---------- Stage parts any page can use ---------- */
[hidden] { display: none !important; }
/* A small line above the big gold name, and a sentence under it. */
.stage-kicker { margin: 0 0 6px; font-size: 1rem; font-weight: 600; }
.stage-kicker a { display: inline-flex; align-items: center; min-height: var(--tap); text-underline-offset: 3px; }
.stage .now-name { color: var(--gold); overflow-wrap: anywhere; }
.stage-lede { margin: 14px 0 0; max-width: 46ch; color: var(--white); }
/* A search box on the sky: a white pill. A page may put a button at its end. */
.search { position: relative; margin-top: 22px; }
.search input {
  width: 100%; min-height: 54px; border: 0; border-radius: 999px; background: var(--white);
  font: inherit; color: var(--ink); padding: 12px 54px 12px 24px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 999px; }
.search svg { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--muted); pointer-events: none; }
.search:has(button) input { padding-right: 112px; }
.search button {
  position: absolute; right: 5px; top: 5px; bottom: 5px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--gold); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
}
/* A list of links on the sky, the way the prayer times are listed on the city page. */
.stage-list { list-style: none; margin: 22px 0 0; padding: 0; }
.stage-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: var(--tap); padding: 12px 0; font-size: 1.1rem; text-decoration: none;
}
.stage-list a[aria-current="true"] { color: var(--gold); }
.stage-list a span:last-child { color: var(--date); font-size: 0.9rem; }
/* The narrowest cover screens: six menu links still fit in one row. */
@media (max-width: 359px) { .tabbar a { font-size: 0.6rem; letter-spacing: 0.02em; } }

/* Wide screens: the sky stays on the left, the sheet reads on the right. */
@media (min-width: 900px) {
  .nav { display: flex; }
  .nav .nav-account { display: inline-flex; }
  .topbar-link { display: none; }
  .tabbar { display: none; }
  .split { display: grid; grid-template-columns: minmax(400px, 44fr) minmax(0, 56fr); min-height: 100vh; }
  /* One page, not two: the sheet's rounded edge overlaps the sky (Aziz chose this on 2026-11-21). */
  .stage { padding-bottom: 40px; padding-right: calc(var(--gutter) + var(--radius)); }
  .sheet {
    margin-top: 0; margin-left: calc(-1 * var(--radius)); border-radius: var(--radius) 0 0 var(--radius);
    box-shadow: -18px 0 40px rgb(8 0 77 / 18%);
    padding: 24px clamp(24px, 4vw, 56px) 40px;
  }
}
/* The sun and the crescent are centred on the whole sky side, as in the approved city page. They are placed
   against .stage-in, whose box is shifted left by half the extra padding on the sheet's side (the sheet's
   rounded edge overlaps the sky there), so they move back right by that much. */
@media (min-width: 900px) {
  .sky-art { left: calc(50% + var(--radius) / 2); }
}
/* Only pin the sky when the whole of it fits on the screen. */
@media (min-width: 900px) and (min-height: 880px) {
  .stage-in { position: sticky; top: 0; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Cookie settings: one slot under the foot's small print (#344, design 2026-11-22, placement A). The card while
   a choice is open, the "Cookie settings" link once it is made; "confirmed" is the 5 seconds after Decline. */
.foot-cookie { margin: 0; }
.cookie-card {
  max-width: 24rem; margin: 6px 0 14px; padding: 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--white); color: var(--ink);
  font-size: 0.9rem; line-height: 1.5;
}
.cookie-card:focus { outline: none; }
.cookie-card p { margin: 0; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 0; }
/* Accept and Decline look the same: equal width, the site's outlined button. */
.cookie-actions .btn { flex: 1 1 6rem; cursor: pointer; font: inherit; font-weight: 600; background: none; }
.cookie-policy { margin: 2px 0 -8px; }
.cookie-policy a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--purple); font-weight: 600; text-underline-offset: 3px; }
.cookie-done { font-weight: 600; }
.foot-cookie[data-state="open"] .cookie-done,
.foot-cookie[data-state="open"] .cookie-reopen,
.foot-cookie[data-state="confirmed"] .cookie-ask,
.foot-cookie[data-state="closed"] .cookie-card { display: none; }

/* Phones and upright tablets: keep a focused control clear of the bottom bar (56px bar, 5px focus ring, air; #345). */
@media (max-width: 899px) {
  html { scroll-padding-bottom: 72px; }
}

/* Seven links (six and the account link) must fit one row on the light sheet: no wrapping, tighter on narrower sheets. */
@media (min-width: 900px) {
  .nav a { white-space: nowrap; }
  .nav { flex-wrap: wrap; }
}
@media (min-width: 900px) and (max-width: 1699px) {
  .nav a { padding: 0 8px; letter-spacing: 0.08em; font-size: 0.72rem; }
}

/* A tablet held upright keeps the bottom bar; there the account link joins it, as it joins the menu on wide screens. */
.tabbar .nav-account { display: none; }
@media (min-width: 600px) and (max-width: 899px) {
  .tabbar .nav-account { display: inline-flex; }
  .topbar-link { display: none; }
}
/* Seven links in the bar there: tighter letters so "My contributions" fits its column without sideways scroll and
   without splitting a word (#345, design chat 2026-11-22). A label may wrap between words. */
@media (min-width: 600px) and (max-width: 699px) {
  .tabbar a { letter-spacing: 0; padding: 0 1px; }
}
@media (min-width: 700px) and (max-width: 899px) {
  .tabbar a { letter-spacing: 0.04em; padding: 0 2px; }
}

/* Smooth movement between pages and when a page first appears (none for visitors who ask for less motion). */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  body { animation: frame-in 0.35s ease-out both; }
}
@keyframes frame-in { from { opacity: 0; } to { opacity: 1; } }

/* "km | mi" switch: two radio buttons drawn as one pill; each half is a 44 px target. */
.units { display: inline-flex; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--white); }
.units label { position: relative; display: inline-flex; cursor: pointer; }
.units input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.units span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: var(--tap); padding: 0 12px; font-size: 14px; font-weight: 700; color: var(--purple); }
.units input:checked + span { background: var(--purple); color: var(--white); }
/* The ring goes round the whole switch, outside it (the pill clips anything drawn on a segment). The focused
   segment is the chosen one: arrow keys move both. Purple, as every ring on the light sheet. */
.units:has(input:focus-visible) { outline: 2px solid var(--purple); outline-offset: 2px; }

@media (max-width: 599px) {
  .tabbar:has(.nav-community) { grid-auto-columns: minmax(max-content, 1fr); overflow-x: auto; }
  .tabbar:has(.nav-community) a { padding-inline: 6px; }
}

.tabbar:has(.nav-more) { grid-auto-columns: minmax(44px, auto); padding-inline: 4px; overflow: visible; }
.tabbar:has(.nav-more) a { padding-inline: 3px; }
.stage[data-more] .now { margin-top: calc(var(--art) * 0.41 - 54px); }
.stage[data-more] .now-name { font-size: 2.125rem; line-height: 1.1; }
.stage[data-more] .stage-lede { margin-top: 6px; color: var(--date); }
.more-list { background: var(--white); border-radius: 16px; padding-inline: 16px; }
.more-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; text-decoration: none; }
.more-list a + a { border-top: 1px solid var(--line); }
.more-list strong { display: block; color: var(--purple); }
.more-list small { display: block; font-size: 0.875rem; color: var(--muted); }
.more-list svg { flex: none; }
@media (max-width: 320px) {
  .more-list { padding-inline: 8px; }
  .more-list a { gap: 4px; }
}

@media (min-width: 600px) and (max-width: 899px) {
  .tabbar:has(.nav-more) { grid-auto-columns: minmax(0, 1fr); }
  body:has(.tabbar .nav-more) .topbar-link { display: inline-flex; }
}
/* Let spare height fall above the footer on short pages. */
body:not(.frame-map) .sheet { display: flex; flex-direction: column; }
body:not(.frame-map) .sheet-in {
  display: flex; flex-direction: column; flex: 1; width: 100%;
}
body:not(.frame-map) .foot { margin-top: auto; }

@media (max-width: 899px) {
  body:not(.frame-map) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  body:not(.frame-map) .split { display: flex; flex-direction: column; flex: 1; }
  body:not(.frame-map) .sheet { flex: 1; }
}
