/* Colours of the alam: green velvet, gold thread, martyr's red as a sparing accent; mihrab-arched panels over a faint girih lattice, right-to-left */
:root {
  --bg: #0a1f18;
  --bg-2: #0d261e;
  --bg-3: #071510;
  --panel: #113127;
  --panel-2: #163a2e;
  --gold: #dcb662;
  --gold-hi: #f4dea0;
  --gold-lo: #a7843c;
  --jade: #7fd1a8;
  --red: #c8323c;
  --red-text: #f0959a;
  --red-deep: #4a1018;
  --red-deeper: #22070b;
  --red-ink: #e6cbc8;
  --ink: #f0eadb;
  --ink-2: #a9c2b6;
  --on-gold: #1d1607;
  --moon: #f4e6bf;

  --line: rgba(220, 182, 98, .18);
  --line-strong: rgba(220, 182, 98, .42);
  --line-2: rgba(169, 194, 182, .14);
  --jade-soft: rgba(127, 209, 168, .12);
  --jade-line: rgba(127, 209, 168, .45);
  --red-soft: rgba(200, 50, 60, .16);
  --red-line: rgba(200, 50, 60, .55);
  --gold-soft: rgba(220, 182, 98, .1);
  --glass: rgba(10, 31, 24, .72);
  --header-bg: rgba(8, 26, 20, .88);
  --glow-1: rgba(30, 112, 80, .55);
  --glow-2: rgba(6, 36, 26, .9);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .75);

  --f-display: "Noto Nastaliq Urdu", "Vazirmatn", serif;
  --f-head: "Noto Kufi Arabic", "Vazirmatn", Tahoma, sans-serif;
  --f-body: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80' fill='none' stroke='%23dcb662' stroke-width='1'%3E%3Cpath d='M68 40 40 68 12 40 40 12Z'/%3E%3Cpath d='M59.8 59.8H20.2V20.2H59.8Z'/%3E%3Cpath d='M68 40H80M12 40H0M40 12V0M40 68V80M59.8 59.8 80 80M20.2 59.8 0 80M20.2 20.2 0 0M59.8 20.2 80 0'/%3E%3Ccircle cx='40' cy='40' r='7'/%3E%3C/svg%3E");

  color-scheme: dark;
}

/* Registered so they can be animated: the light running round a frame, and the candle-glow under the cursor */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --spot { syntax: "<color>"; inherits: false; initial-value: rgba(0, 0, 0, 0); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--header-bg);
  z-index: 60;
}

::selection { background: var(--gold); color: var(--on-gold); }

a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { text-wrap: balance; }

:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

[id] { scroll-margin-top: 92px; }

/* Cursor candle-glow, shared by every card that carries .glow */
.glow {
  --mx: 50%;
  --my: 0%;
  --glow-layer: radial-gradient(360px circle at var(--mx) var(--my), var(--spot), transparent 70%);
}
@media (hover: hover) {
  .glow:hover { --spot: rgba(244, 222, 160, .09); }
}

/* Scroll reveal: content stays visible without JS; with JS it waits until scrolled into view */
html.js .reveal:not(.is-in),
html.js .stagger:not(.is-in) > * { opacity: 0; }
.reveal.is-in { animation: rise 1s var(--ease) backwards; }
.stagger.is-in > * { animation: rise .9s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: .95rem;
  color: var(--jade);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--red);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(200, 50, 60, .8);
}

.h2 {
  margin: 0 0 14px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  line-height: 1.35;
  color: var(--ink);
}

/* Buttons */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: 500 1rem/1 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, color .2s, box-shadow .25s;
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s var(--ease);
}
.btn:hover svg { transform: translateX(-4px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: var(--on-gold);
  box-shadow: 0 10px 30px -12px rgba(220, 182, 98, .6);
}
.btn-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(120%);
  transition: transform .7s var(--ease);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(220, 182, 98, .75); }
.btn-gold:hover::after { transform: translateX(-120%); }
.btn-line {
  background: rgba(10, 31, 24, .35);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-line:hover { background: var(--gold-soft); border-color: var(--gold); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: .93rem; }

/* Reading progress, a gold thread across the top */
.progress {
  position: fixed;
  inset: env(safe-area-inset-top, 0px) 0 auto;
  height: 3px;
  z-index: 70;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(to left, var(--gold-hi), var(--gold) 70%, var(--red));
  box-shadow: 0 0 12px rgba(244, 222, 160, .6);
  transform-origin: right;
  transform: scaleX(0);
}

/* Header: a full bar at the top of the page, a floating glass pill once you scroll */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background-color .4s, border-color .4s, -webkit-backdrop-filter .4s, backdrop-filter .4s;
}
.site-header.is-scrolled {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.header-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  border: 1px solid transparent;
  border-radius: 0;
  transition: min-height .4s var(--ease), margin .4s var(--ease), padding .4s var(--ease), background-color .4s, border-color .4s, border-radius .4s, box-shadow .4s;
}
.is-scrolled .header-row {
  min-height: 57px;
  margin-top: 10px;
  padding-inline: 12px 8px;
  background: rgba(8, 26, 20, .8);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-color: var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, .8);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}
.brand-logo {
  flex: none;
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(200, 50, 60, .35));
  transition: transform .6s var(--ease), width .4s var(--ease), height .4s var(--ease);
}
.brand:hover .brand-logo { transform: scale(1.08); }
.is-scrolled .brand-logo { width: 46px; height: 46px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.brand-name {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 1.05rem;
  white-space: nowrap;
}
.brand-sub { font-size: .78rem; color: var(--ink-2); }

.site-nav { position: relative; display: flex; gap: 2px; }
.site-nav a {
  position: relative;
  z-index: 1;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: .95rem;
  transition: color .25s;
}
.site-nav a:hover,
.site-nav a[aria-current] { color: var(--ink); }
.nav-ink {
  position: absolute;
  top: 50%;
  left: var(--ink-x, 0);
  width: var(--ink-w, 0);
  height: 38px;
  margin-top: -19px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--gold-soft);
  opacity: 0;
  transition: left .5s var(--ease), width .5s var(--ease), opacity .3s;
  pointer-events: none;
}
.site-nav.has-ink .nav-ink { opacity: 1; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.burger { display: grid; gap: 5px; width: 20px; }
.burger span {
  display: block;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .35s var(--ease), opacity .25s, width .35s var(--ease);
}
.burger span:nth-child(3) { width: 70%; }
.open .burger span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.open .burger span:nth-child(2) { opacity: 0; }
.open .burger span:nth-child(3) { width: 100%; transform: translateY(-6.6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-ink { display: none; }
  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 0;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: rgba(13, 38, 30, .97);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.98);
    transform-origin: top center;
    transition: opacity .3s, transform .35s var(--ease), visibility 0s .35s;
  }
  .site-header.open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s, transform .35s var(--ease), visibility 0s;
  }
  .site-nav a {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 1.05rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity .3s, transform .4s var(--ease), background-color .2s, color .2s;
  }
  .site-nav a[aria-current] { color: var(--gold); background: var(--gold-soft); }
  .open .site-nav a { opacity: 1; transform: none; }
  .open .site-nav a:nth-of-type(2) { transition-delay: .04s; }
  .open .site-nav a:nth-of-type(3) { transition-delay: .08s; }
  .open .site-nav a:nth-of-type(4) { transition-delay: .12s; }
  .open .site-nav a:nth-of-type(5) { transition-delay: .16s; }
}

/* Hero */
.hero {
  --px: 0;
  --py: 0;
  --sy: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: min(940px, calc(100svh - 69px));
  background:
    radial-gradient(110% 80% at 88% 0%, var(--glow-1), transparent 58%),
    radial-gradient(80% 70% at 0% 100%, var(--glow-2), transparent 62%),
    var(--bg);
}
.hero-aura { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-aura span {
  position: absolute;
  border-radius: 50%;
  animation: aura 22s ease-in-out infinite alternate;
}
.hero-aura span:nth-child(1) {
  width: 60vw; height: 60vw; top: -20vw; right: -10vw;
  background: radial-gradient(circle, rgba(40, 140, 100, .32), transparent 65%);
}
.hero-aura span:nth-child(2) {
  width: 46vw; height: 46vw; bottom: -14vw; left: 10vw;
  background: radial-gradient(circle, rgba(220, 182, 98, .12), transparent 65%);
  animation-duration: 28s;
  animation-delay: -8s;
}
.hero-aura span:nth-child(3) {
  width: 30vw; height: 30vw; top: 20%; left: -8vw;
  background: radial-gradient(circle, rgba(200, 50, 60, .1), transparent 65%);
  animation-duration: 34s;
  animation-delay: -14s;
}
@keyframes aura {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-4vw, 3vw) scale(1.12); }
  100% { transform: translate(3vw, -2vw) scale(.94); }
}
.hero-sparkle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero-girih {
  position: absolute;
  inset: -24px;
  z-index: -1;
  background-image: var(--girih);
  background-size: 88px 88px;
  opacity: .09;
  -webkit-mask-image: linear-gradient(to left, transparent 20%, #000 90%);
  mask-image: linear-gradient(to left, transparent 20%, #000 90%);
  translate: calc(var(--px) * -14px) calc(var(--py) * -14px + var(--sy) * 60px);
}

.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(40px, 7vw, 88px) clamp(8px, 2vw, 24px);
  translate: 0 calc(var(--sy) * -50px);
  opacity: calc(1 - var(--sy) * .7);
}
.hero-copy { min-width: 0; }

.bismillah {
  margin: 0 0 6px;
  font-family: var(--f-display);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 2.4;
  color: var(--gold);
  opacity: .85;
}

.hero-title { margin: 0; display: flex; flex-direction: column; }
.ht-kicker {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.4;
  color: var(--ink);
}
.ht-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.6vw, 2.7rem);
  line-height: 2.3;
  padding-block: .05em .3em;
  color: var(--gold);
  filter: drop-shadow(0 6px 28px rgba(220, 182, 98, .22));
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ht-name {
    background:
      linear-gradient(105deg, transparent 44%, rgba(255, 250, 232, .95) 50%, transparent 56%) 0 0 / 250% 100% no-repeat,
      linear-gradient(180deg, var(--gold-hi) 15%, var(--gold) 55%, var(--gold-lo) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.ht-honor { font-size: .72em; }

.hero-lead {
  max-width: 34em;
  margin: 0 0 28px;
  font-size: 1.125rem;
  color: var(--ink-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-side {
  position: relative;
  display: grid;
  justify-items: center;
  min-width: 0;
}
.shamseh {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(640px, 165%);
  aspect-ratio: 1;
  translate: calc(-50% + var(--px) * 22px) calc(-50% + var(--py) * 22px);
  pointer-events: none;
  fill: none;
  stroke: var(--gold);
  stroke-width: .35;
  opacity: .32;
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 70%);
  mask-image: radial-gradient(circle, #000 35%, transparent 70%);
}
.shamseh .rosette {
  transform-box: view-box;
  transform-origin: center;
  animation: turn 160s linear infinite;
}
.shamseh .rosette-inner {
  transform-box: view-box;
  transform-origin: center;
  animation: turn 90s linear infinite reverse;
}
.shamseh [pathLength] {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 3.4s var(--ease) forwards;
  animation-delay: calc(.3s + var(--i, 0) * .12s);
}
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.today {
  --glass-fill: rgba(10, 31, 24, .74);
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 28px 28px 24px;
  background: var(--glow-layer), var(--glass-fill);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  outline: 1px solid var(--line);
  outline-offset: -9px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  translate: calc(var(--px) * -8px) calc(var(--py) * -8px);
  transition: --spot .4s;
}
.today::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(244, 222, 160, .7);
}
/* A point of light that travels round the frame */
.today::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--ang), transparent 0 64%, var(--gold-hi) 76%, transparent 88%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: orbit 7s linear infinite;
  pointer-events: none;
}
@keyframes orbit { to { --ang: 360deg; } }
.today p { margin: 0; }
.today-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.today-label { font-family: var(--f-head); font-size: .88rem; color: var(--jade); }
.today-solar { margin-top: 2px !important; font-family: var(--f-head); font-weight: 700; font-size: 1.45rem; line-height: 1.6; }
.today-hijri { color: var(--gold); font-size: 1.05rem; }
.today hr { margin: 18px 0; border: 0; border-top: 1px dashed var(--line-strong); }
.today-next { margin-top: 4px !important; font-weight: 500; font-size: 1.15rem; line-height: 1.6; }
.today-when { color: var(--ink-2); font-size: .95rem; }
.today-when strong { color: var(--gold); font-weight: 500; }

.moon {
  flex: none;
  display: grid;
  justify-items: center;
  gap: 2px;
  margin: 0;
}
.moon svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 12px rgba(244, 230, 191, .45));
  animation: moon-glow 6s ease-in-out infinite;
}
.moon-dark { fill: rgba(240, 234, 219, .06); stroke: rgba(240, 234, 219, .14); stroke-width: .6; }
.moon-lit { fill: var(--moon); }
.moon figcaption { font-size: .72rem; color: var(--ink-2); line-height: 1.4; }
@keyframes moon-glow {
  50% { filter: drop-shadow(0 0 20px rgba(244, 230, 191, .7)); }
}

.today-azan {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(127, 209, 168, .25);
  border-radius: 12px;
  background: rgba(127, 209, 168, .07);
  color: var(--ink);
  font-size: .95rem;
  text-decoration: none;
  transition: background-color .25s, border-color .25s;
}
.today-azan:hover { background: rgba(127, 209, 168, .14); border-color: var(--jade-line); }
.today-azan strong { margin-inline-start: auto; font-family: var(--f-head); font-weight: 600; color: var(--jade); }
.pulse-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jade);
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--jade);
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping {
  to { transform: scale(3.2); opacity: 0; }
}

.shrine {
  display: block;
  width: 100%;
  height: clamp(84px, 17vw, 210px);
  margin-top: auto;
  animation: shrine-in 1.6s var(--ease) .2s backwards;
}
.shrine .fill { fill: var(--bg-2); }
.shrine .stroke { fill: none; stroke: var(--gold); stroke-opacity: .6; stroke-width: 1.2; }
.shrine .stroke > * { vector-effect: non-scaling-stroke; }
.shrine .pennant { fill: var(--red); }
.shrine .dome-glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 7s ease-in-out infinite;
}
/* Lamplight in the arches, each window flickering on its own */
.shrine .lights path {
  fill: var(--gold-hi);
  opacity: .18;
  animation: flicker 3.6s ease-in-out infinite;
}
.shrine .lights path:nth-child(1) { opacity: .3; animation-duration: 4.4s; }
.shrine .lights path:nth-child(2) { animation-delay: -.6s; }
.shrine .lights path:nth-child(3) { animation-delay: -1.9s; animation-duration: 3.1s; }
.shrine .lights path:nth-child(4) { animation-delay: -1.2s; }
.shrine .lights path:nth-child(5) { animation-delay: -2.7s; animation-duration: 4s; }
.shrine .lights path:nth-child(6) { animation-delay: -.3s; animation-duration: 3.3s; }
.shrine .lights path:nth-child(7) { animation-delay: -2.2s; }
.shrine .lights path:nth-child(8) { animation-delay: -1.5s; animation-duration: 4.2s; }
.shrine .lights path:nth-child(9) { animation-delay: -3s; }
@keyframes flicker {
  0%, 100% { opacity: .14; }
  40% { opacity: .3; }
  52% { opacity: .2; }
  68% { opacity: .34; }
}
@keyframes breathe {
  50% { opacity: .65; transform: scale(.94); }
}
@keyframes shrine-in {
  from { opacity: 0; transform: translateY(30px); }
}

@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-side { justify-items: start; }
  .today { max-width: 460px; }
  .shamseh { left: 30%; width: 520px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .today { animation: rise 1s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .1s; }
  .hero-copy > :nth-child(3) { animation-delay: .2s; }
  .hero-copy > :nth-child(4) { animation-delay: .3s; }
  .hero-copy > :nth-child(5) { animation-delay: .4s; }
  .today { animation-delay: .5s; }
  .ht-name {
    animation: unveil 1.6s var(--ease) .35s both, shimmer 8s ease-in-out 2.4s infinite;
  }
  .today::after { animation: orbit 7s linear infinite; }
}
@keyframes unveil {
  from { opacity: 0; filter: blur(14px); letter-spacing: .04em; }
}
@keyframes shimmer {
  0% { background-position: 0 0, 0 0; }
  38%, 100% { background-position: 100% 0, 0 0; }
}

/* Titles ribbon */
.titles {
  overflow: hidden;
  padding-block: 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.titles-track {
  display: flex;
  width: max-content;
  animation: drift 70s linear infinite;
}
.titles:hover .titles-track { animation-play-state: paused; }
.titles ul {
  display: flex;
  align-items: center;
  gap: 36px;
  margin: 0;
  padding: 0;
  padding-inline-end: 36px;
  list-style: none;
}
.titles li {
  display: flex;
  align-items: center;
  gap: 36px;
  font-family: var(--f-head);
  font-size: 1.15rem;
  color: var(--gold);
  white-space: nowrap;
}
.titles li::after {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--red);
  transform: rotate(45deg);
}
@keyframes drift {
  to { transform: translateX(50%); }
}
@media (prefers-reduced-motion: reduce) {
  .titles { -webkit-mask-image: none; mask-image: none; }
  .titles-track { width: auto; animation: none; justify-content: center; }
  .titles ul { flex-wrap: wrap; justify-content: center; row-gap: 8px; padding-inline: 16px; }
  .titles ul[aria-hidden] { display: none; }
}

/* Sections */
.section { position: relative; padding-block: clamp(64px, 9vw, 120px); }
.band { background: var(--bg-2); border-block: 1px solid var(--line-2); }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head::after {
  content: "";
  display: block;
  width: 132px;
  height: 12px;
  margin-top: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 12' fill='none' stroke='%23dcb662'%3E%3Cpath d='M0 6h52M80 6h52' stroke-opacity='.5'/%3E%3Cpath d='M66 1l5 5-5 5-5-5Z' fill='%23c8323c' stroke='none'/%3E%3Cpath d='M56 6l3-3 3 3-3 3ZM70 6l3-3 3 3-3 3Z'/%3E%3C/svg%3E") right center / contain no-repeat;
  transform-origin: right;
}
.section-head.is-in::after { animation: grow 1.2s var(--ease) .3s backwards; }
@keyframes grow {
  from { transform: scaleX(0); opacity: 0; }
}
.section-note { margin: 0; color: var(--ink-2); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
}
.about-text p {
  max-width: 60ch;
  margin: 0 0 16px;
  font-size: 1.08rem;
  color: var(--ink-2);
}
.about-text .eyebrow { margin-bottom: 10px; color: var(--jade); font-size: .95rem; }
.about-text .lede { font-size: 1.22rem; color: var(--ink); }

.quote {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: clamp(32px, 4vw, 52px);
  background: linear-gradient(160deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  outline: 1px solid var(--line);
  outline-offset: -10px;
  box-shadow: var(--shadow);
}
.quote::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--girih) center / 72px 72px;
  opacity: .1;
  -webkit-mask-image: radial-gradient(120% 90% at 0% 100%, #000, transparent 70%);
  mask-image: radial-gradient(120% 90% at 0% 100%, #000, transparent 70%);
}
.quote-mark {
  position: absolute;
  top: -.2em;
  left: .25em;
  z-index: -1;
  font-family: var(--f-head);
  font-size: 9rem;
  line-height: 1;
  color: var(--gold);
  opacity: .12;
}
.quote blockquote { margin: 0; }
.quote-ar {
  margin: 0 0 14px;
  font-family: var(--f-head);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1.8;
  color: var(--gold);
}
.quote-ar .w { display: inline-block; }
html.js .quote:not(.is-in) .w { opacity: 0; }
.quote.is-in .w { animation: word-in .9s var(--ease) backwards; animation-delay: calc(.35s + var(--i, 0) * .14s); }
@keyframes word-in {
  from { opacity: 0; filter: blur(8px); transform: translateY(12px); }
}
.quote-fa { margin: 0; font-size: 1.1rem; color: var(--ink); }
.quote figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-family: var(--f-head);
  font-size: .95rem;
  color: var(--jade);
}
.quote figcaption::before { content: ""; width: 28px; height: 1px; background: currentColor; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Weekly programs: mihrab-arched niches, each with a hanging lamp */
.programs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 860px;
}
.program {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 100px 26px 30px;
  text-align: center;
  background: var(--glow-layer), linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-strong);
  border-radius: 50% 50% var(--radius-lg) var(--radius-lg) / 76px 76px var(--radius-lg) var(--radius-lg);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s, --spot .4s;
}
.program::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line);
  border-radius: 50% 50% 16px 16px / 68px 68px 16px 16px;
  pointer-events: none;
}
.program::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 22px;
  height: 50px;
  margin-left: -11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 50'%3E%3Cpath d='M11 0v16' stroke='%23dcb662'/%3E%3Cpath d='M6.5 16h9l-1.6 3.4H8.1Z' fill='%23dcb662'/%3E%3Cpath d='M5 19.4h12c0 7.6-2.7 13-6 16.4-3.3-3.4-6-8.8-6-16.4Z' fill='%23dcb662' fill-opacity='.22' stroke='%23dcb662'/%3E%3Cellipse cx='11' cy='26' rx='2.4' ry='3.9' fill='%23f4dea0'/%3E%3Cpath d='M11 36v6' stroke='%23dcb662'/%3E%3Ccircle cx='11' cy='44.5' r='1.9' fill='%23c8323c'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 7px rgba(244, 222, 160, .55));
  transform-origin: 50% 0;
  animation: swing 4.6s ease-in-out infinite alternate;
}
.program:nth-child(2)::after { animation-delay: -1.6s; }
@keyframes swing {
  from { transform: rotate(-5deg); }
  to { transform: rotate(5deg); }
}
@media (hover: hover) {
  .program:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 30px 60px -30px rgba(220, 182, 98, .35); }
}
.program p { margin: 0; }
.program-when { font-family: var(--f-head); color: var(--jade); }
.program h3 {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.5;
  color: var(--gold);
}
.program p:not(.program-when) { max-width: 28ch; color: var(--ink-2); }
.program.is-next {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-soft), 0 30px 70px -30px rgba(220, 182, 98, .5);
}
.program-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 3px 14px 3px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-hi);
  font-family: var(--f-head);
  font-size: .82rem;
}
.program-badge .pulse-dot,
.program-badge .pulse-dot::after { background: var(--gold); }

.sub-head {
  margin: clamp(56px, 7vw, 88px) 0 24px;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 1.4rem;
}
.activities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.activity {
  padding: 22px;
  background: rgba(17, 49, 39, .45);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  transition: border-color .3s, transform .35s var(--ease), background-color .3s;
}
@media (hover: hover) {
  .activity:hover { transform: translateY(-4px); border-color: var(--line-strong); background: rgba(17, 49, 39, .8); }
  .activity:hover .activity-icon { transform: translateY(-2px) rotate(-6deg); background: var(--gold); }
  .activity:hover svg { stroke: var(--on-gold); }
}
.activity-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--gold-soft);
  transition: transform .45s var(--ease), background-color .3s;
}
.activity svg {
  display: block;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .3s;
}
.activity h4 { margin: 16px 0 4px; font-family: var(--f-head); font-weight: 600; font-size: 1.2rem; }
.activity p { margin: 0; font-size: .97rem; color: var(--ink-2); }

@media (max-width: 960px) {
  .activities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .programs { grid-template-columns: minmax(0, 1fr); max-width: 460px; margin-inline: auto; }
}
@media (max-width: 520px) {
  .activities { grid-template-columns: minmax(0, 1fr); }
}

/* Devotion: prayer times, tasbih, qibla */
.devotion {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas: "prayer tasbih" "qibla tasbih";
  gap: 20px;
}
.prayer { grid-area: prayer; }
.tasbih { grid-area: tasbih; }
.qibla { grid-area: qibla; }
@media (max-width: 960px) {
  .devotion { grid-template-columns: minmax(0, 1fr); grid-template-areas: "prayer" "tasbih" "qibla"; }
}

.card {
  position: relative;
  min-width: 0;
  padding: clamp(22px, 3vw, 32px);
  background: var(--glow-layer), linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: border-color .3s, --spot .4s;
}
.card:hover { border-color: var(--line-strong); }
.card h3 { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 1.3rem; color: var(--gold); }
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.card .fine { margin-top: 18px; }

.prayer-next { margin: 0; font-size: .92rem; color: var(--ink-2); }
.prayer-next strong {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--line-strong);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
}

.sky { display: block; width: 100%; max-width: 440px; height: auto; margin: 18px auto 8px; overflow: visible; }
.sky-arc { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 5; }
.sky-trail {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 0 1;
  filter: drop-shadow(0 0 4px rgba(244, 222, 160, .6));
  transition: stroke-dasharray 2s var(--ease);
}
.sky-horizon { stroke: var(--line-2); stroke-width: 1; }
.sky-body { transition: transform 2s var(--ease); }
.sky-sun { fill: var(--gold-hi); }
.sky-halo {
  fill: var(--gold);
  opacity: .2;
  transform-box: fill-box;
  transform-origin: center;
  animation: halo 3s ease-in-out infinite;
}
.sky-moon { display: none; fill: var(--moon); }
.sky.is-night .sky-sun { display: none; }
.sky.is-night .sky-moon { display: block; }
.sky.is-night .sky-halo { fill: var(--moon); opacity: .12; }
.sky.is-night .sky-trail { stroke: var(--ink-2); filter: none; }
.sky-label { fill: var(--ink-2); font: 11px var(--f-body); }
@keyframes halo {
  50% { transform: scale(1.35); opacity: .1; }
}

.times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.times li {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(7, 21, 16, .35);
  transition: opacity .4s, border-color .4s, background-color .4s;
}
.times span { font-size: .85rem; color: var(--ink-2); }
.times strong { font-family: var(--f-head); font-weight: 600; font-size: 1.25rem; line-height: 1.6; }
.times li.is-past { opacity: .5; }
.times li.is-next { border-color: var(--gold); background: var(--gold-soft); }
.times li.is-next strong { color: var(--gold-hi); }
.times li.is-next::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(220, 182, 98, .6);
  animation: beacon 2s infinite;
}
@keyframes beacon {
  70% { box-shadow: 0 0 0 9px rgba(220, 182, 98, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 182, 98, 0); }
}
@media (max-width: 520px) {
  .times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tasbih */
.tasbih { display: flex; flex-direction: column; }
.seg {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 21, 16, .4);
}
.seg button {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 500 .85rem/1.6 var(--f-body);
  cursor: pointer;
  transition: background-color .3s, color .3s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: var(--on-gold);
}
.tasbih-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 290px);
  aspect-ratio: 1;
  margin: 22px auto 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(220, 182, 98, .14), transparent 62%);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.tasbih-btn:focus-visible { outline-offset: -4px; border-radius: 50%; }
.beads { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bead {
  fill: rgba(169, 194, 182, .14);
  stroke: var(--line-strong);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill .3s, stroke .3s;
}
.bead.on { fill: var(--gold); stroke: var(--gold-hi); }
.bead.cur { fill: var(--gold-hi); filter: drop-shadow(0 0 6px var(--gold-hi)); animation: bead-pop .4s var(--ease); }
.bead-imam { fill: var(--red); stroke: rgba(240, 149, 154, .6); }
.beads.flash .bead { animation: bead-flash .8s var(--ease); }
@keyframes bead-pop {
  40% { transform: scale(1.6); }
}
@keyframes bead-flash {
  30% { fill: var(--gold-hi); }
}
.tasbih-core {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  width: 66%;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, #1c4a3a, var(--bg-2) 72%);
  box-shadow: inset 0 0 0 7px rgba(7, 21, 16, .55), inset 0 0 0 8px var(--line), 0 20px 44px -18px #000;
  overflow: hidden;
  transition: transform .15s var(--ease), box-shadow .3s;
}
.tasbih-btn:hover .tasbih-core { box-shadow: inset 0 0 0 7px rgba(7, 21, 16, .55), inset 0 0 0 8px var(--line-strong), 0 20px 50px -14px rgba(220, 182, 98, .3); }
.tasbih-btn:active .tasbih-core { transform: scale(.95); }
.tasbih-text {
  padding-inline: 10px;
  font-family: var(--f-head);
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
  color: var(--gold);
}
.tasbih[data-mode="salawat"] .tasbih-text { font-size: .82rem; max-width: 15ch; }
.tasbih-text.swap { animation: swap .6s var(--ease); }
@keyframes swap {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
}
.tasbih-count {
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 2.7rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.tasbih-count.bump { animation: bump .25s var(--ease); }
@keyframes bump {
  50% { transform: scale(1.14); color: var(--gold-hi); }
}
.tasbih-of { font-size: .8rem; color: var(--ink-2); }
.ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: rgba(244, 222, 160, .35);
  pointer-events: none;
  animation: ripple .7s var(--ease) forwards;
}
@keyframes ripple {
  to { transform: scale(12); opacity: 0; }
}
.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.steps li {
  padding: 3px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: .82rem;
  color: var(--ink-2);
  transition: all .35s;
}
.steps b { font-family: var(--f-head); font-weight: 600; }
.steps li.is-on { border-color: var(--gold); color: var(--gold-hi); background: var(--gold-soft); }
.steps li.is-done { border-color: var(--jade-line); color: var(--jade); background: var(--jade-soft); }
.steps li.is-done::before { content: "✓ "; }
.tasbih-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.tasbih-foot p { margin: 0; font-size: .92rem; color: var(--ink-2); }

/* Qibla */
.qibla { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 26px; }
.qibla-text { flex: 1 1 180px; min-width: 0; }
.qibla-text p { margin: 4px 0 0; color: var(--ink-2); font-size: .95rem; }
.qibla-text .btn { margin-top: 14px; }
.qibla-deg strong { font-family: var(--f-head); font-weight: 700; font-size: 1.9rem; color: var(--gold); }
.compass {
  position: relative;
  flex: none;
  width: 140px;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle, var(--panel-2), var(--bg-3) 75%);
  box-shadow: inset 0 0 0 8px rgba(0, 0, 0, .2), inset 0 0 0 9px var(--line), 0 16px 40px -20px #000;
  transition: box-shadow .4s;
}
.compass-dial {
  position: absolute;
  inset: 0;
  font-family: var(--f-head);
  font-size: .72rem;
  color: var(--ink-2);
  transform: rotate(calc(var(--heading, 0) * -1deg));
  transition: transform .3s ease-out;
}
.compass-dial::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: repeating-conic-gradient(from -1deg, var(--line-strong) 0 2deg, transparent 2deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 84%, #000 85%);
  mask: radial-gradient(circle, transparent 84%, #000 85%);
}
.compass-dial > span:not(.compass-needle) { position: absolute; line-height: 1; }
.cd-n { top: 20px; left: 50%; translate: -50% 0; color: var(--red-text); font-weight: 700; }
.cd-s { bottom: 20px; left: 50%; translate: -50% 0; }
.cd-e { right: 20px; top: 50%; translate: 0 -50%; }
.cd-w { left: 20px; top: 50%; translate: 0 -50%; }
.compass-needle {
  position: absolute;
  inset: 16px;
  transform: rotate(calc(var(--qibla, 220) * 1deg));
}
.compass-needle::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 50%;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--gold-hi), rgba(220, 182, 98, .2));
}
.compass-needle svg {
  display: block;
  width: 22px;
  height: 22px;
  margin: -2px auto 0;
  fill: var(--gold);
  filter: drop-shadow(0 0 6px rgba(244, 222, 160, .6));
}
.compass-needle .kaaba { fill: #0b0b0b; stroke: var(--gold); stroke-width: 1; }
.compass-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 4px var(--line-strong);
}
.qibla.is-live .compass::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-bottom-color: var(--jade);
  border-top: 0;
}
.qibla.is-aligned .compass { box-shadow: inset 0 0 0 8px rgba(0, 0, 0, .2), inset 0 0 0 9px var(--jade-line), 0 0 40px -4px rgba(127, 209, 168, .55); }
.qibla.is-aligned #qiblaHint { color: var(--jade); }

/* Occasions */
.occ-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(36px, 5vw, 64px);
}
.occ-main { min-width: 0; }
.occ-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.occ {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line-2);
}
.occ-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  outline: 1px solid var(--line);
  outline-offset: -5px;
  line-height: 1.3;
  background: rgba(7, 21, 16, .3);
  transition: transform .45s var(--ease), border-color .3s, background-color .3s;
}
@media (hover: hover) {
  .occ:hover .occ-date { transform: rotate(-4deg) scale(1.04); border-color: var(--gold); background: var(--gold-soft); }
}
.occ-day { font-family: var(--f-head); font-weight: 700; font-size: 1.6rem; color: var(--gold); }
.occ-month { font-size: .72rem; color: var(--ink-2); }
.occ.is-abbas .occ-date { background: var(--gold-soft); border-color: var(--gold); box-shadow: 0 0 24px -6px rgba(220, 182, 98, .5); }
.occ-body { min-width: 0; }
.occ-title { margin: 0; font-weight: 500; font-size: 1.08rem; line-height: 1.6; }
.occ-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  font-size: .9rem;
  color: var(--ink-2);
}
.tag {
  padding: 1px 10px;
  border: 1px solid;
  border-radius: 999px;
  font-size: .75rem;
}
.tag-mourn { background: var(--red-soft); border-color: var(--red-line); color: var(--red-text); }
.tag-joy { background: var(--jade-soft); border-color: var(--jade-line); color: var(--jade); }
.occ-count {
  margin: 0;
  font-family: var(--f-head);
  color: var(--gold);
  white-space: nowrap;
}
.occ:first-child .occ-count {
  padding: 2px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--gold-soft);
}
.fine { margin: 16px 0 0; font-size: .85rem; color: var(--ink-2); }

.tasua {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --pad: clamp(24px, 3vw, 36px);
  padding: 0 var(--pad) 32px;
  text-align: center;
  background: linear-gradient(175deg, var(--red-deep), var(--red-deeper));
  border: 1px solid var(--line-strong);
  border-radius: 50% 50% var(--radius-lg) var(--radius-lg) / 110px 110px var(--radius-lg) var(--radius-lg);
  box-shadow: 0 30px 80px -30px rgba(200, 50, 60, .45);
}
.tasua::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--girih) center / 64px 64px;
  opacity: .08;
}
.tasua p { margin: 0; color: var(--red-ink); }
.tasua .tasua-num {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(4rem, 9vw, 6rem);
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(220, 182, 98, .45);
}
/* The pierced waterskin of the saqqa of Karbala, hanging in the arch; its water is simulated live in the canvas */
.mashk {
  position: relative;
  aspect-ratio: 360 / 260;
  margin: 0 calc(var(--pad) * -1) 6px;
  background: radial-gradient(38% 44% at 50% 40%, rgba(244, 222, 160, .16), transparent 70%);
  -webkit-tap-highlight-color: transparent;
}
.mashk svg,
.mashk canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.mashk-skin {
  transform-origin: 50% 0;
  will-change: transform;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .5));
}
.tasua .tasua-month { margin-bottom: 8px; font-family: var(--f-head); font-size: 1.3rem; color: var(--ink); }
.tasua-title {
  margin: 0 0 8px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  line-height: 2.3;
  color: var(--gold-hi);
}
.tasua .tasua-count {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink);
}
.tasua-count strong { font-family: var(--f-head); font-size: 1.6rem; color: var(--gold); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .occ-grid { grid-template-columns: minmax(0, 1fr); }
  .tasua { max-width: 460px; width: 100%; margin-inline: auto; }
}
@media (max-width: 520px) {
  .occ { grid-template-columns: 62px minmax(0, 1fr); gap: 4px 16px; }
  .occ-date { width: 62px; height: 62px; grid-row: span 2; }
  .occ-day { font-size: 1.35rem; }
  .occ-count { grid-column: 2; justify-self: start; font-size: .92rem; }
}

/* Visit */
.visit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.visit-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  background: var(--glow-layer), linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  transition: transform .35s var(--ease), border-color .3s, --spot .4s;
}
@media (hover: hover) {
  .visit-item:hover { transform: translateY(-4px); border-color: var(--line-strong); }
}
.visit-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--gold-soft);
}
.visit-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.visit-item h3 { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 1.3rem; color: var(--gold); }
.visit-item p { margin: 0; color: var(--ink-2); }
.visit-item .addr { font-size: 1.05rem; color: var(--ink); }
.visit-item .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.visit-item .pending {
  margin-top: auto;
  padding: 10px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: .9rem;
}
@media (max-width: 900px) {
  .visit-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Footer */
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: 56px 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
  background: var(--bg-3);
  border-top: 1px solid var(--line);
}
.footer-girih {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--girih) center / 88px 88px;
  opacity: .06;
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-logo {
  flex: none;
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(200, 50, 60, .3));
}
.footer-brand p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.footer-brand .footer-name { font-family: var(--f-head); font-size: 1.15rem; color: var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-nav a { color: var(--ink-2); text-decoration: none; transition: color .2s; }
.footer-nav a:hover { color: var(--gold); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
}
.salam { margin: 0; font-family: var(--f-display); font-size: 1.3rem; line-height: 2.3; color: var(--gold); }
.copy { margin: 0; font-size: .85rem; color: var(--ink-2); }

/* Back to top, its ring filling as you read */
.to-top {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  left: max(20px, env(safe-area-inset-left, 0px));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(8, 26, 20, .85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  color: var(--gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.9);
  transition: opacity .35s, transform .4s var(--ease), visibility 0s .4s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .35s, transform .4s var(--ease), visibility 0s; }
.to-top:hover .to-top-arrow { transform: translateY(-3px); }
.to-top-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.to-top-ring circle { fill: none; stroke: var(--line); stroke-width: 2; }
.to-top-ring .ring-fill { stroke: var(--gold); stroke-dasharray: 1; stroke-dashoffset: 1; stroke-linecap: round; }
.to-top-arrow {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s var(--ease);
}

.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(13, 38, 30, .95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: .95rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity .3s, transform .4s var(--ease), visibility 0s .4s;
}
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .3s, transform .4s var(--ease), visibility 0s; }

.spark {
  position: fixed;
  z-index: 85;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 8px var(--gold);
  pointer-events: none;
}
.spark.diamond { border-radius: 1px; background: var(--gold); }

/* Phones: tighter rhythm, full-width actions, compact rows */
@media (max-width: 520px) {
  .section { padding-block: 56px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .today { padding: 24px 20px 20px; }
  .today-solar { font-size: 1.22rem; }
  .program { padding: 90px 20px 26px; }
  .program h3 { font-size: 1.55rem; }
  .activity {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 2px 16px;
    padding: 16px 18px;
  }
  .activity-icon { grid-row: span 2; align-self: start; }
  .activity h4 { margin: 0; font-size: 1.1rem; }
  .card-head h3 { width: 100%; }
  .seg { width: 100%; }
  .seg button { flex: 1 1 auto; padding-inline: 10px; white-space: nowrap; }
  .occ-month { font-size: .62rem; letter-spacing: -.01em; }
  .qibla { justify-content: center; }
  .visit-item { padding: 22px; }
  .footer-base { justify-content: center; text-align: center; }
  .to-top { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition: none !important;
  }
  .hero-grid, .hero-girih, .shamseh, .today { translate: none; }
  .shamseh { translate: -50% -50%; }
  .hero-grid { opacity: 1; }
}
