body { margin: 0; background: #04100D; color: #F4F7F5; font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
a { color: #F2DFA8; text-decoration: none; }
a:hover { color: #FFFFFF; }
h1, h2, h3 { text-wrap: pretty; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
:focus-visible { outline: 2px solid #D9B45B; outline-offset: 3px; border-radius: 6px; }
details[open] [data-plus] { transform: rotate(45deg); }
[data-scroll]::-webkit-scrollbar { height: 6px; }
[data-scroll]::-webkit-scrollbar-thumb { background: rgba(217,180,91,.35); border-radius: 9px; }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: 26px; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 9px; background: rgba(10,42,33,.18); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: linear-gradient(140deg, #E8C777, #C79A33); box-shadow: 0 6px 14px -6px rgba(10,42,33,.6); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 9px; background: rgba(10,42,33,.18); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border: none; border-radius: 50%; background: linear-gradient(140deg, #E8C777, #C79A33); }
@keyframes sheen { 0% { transform: translateX(-60px) } 55%, 100% { transform: translateX(320px) } }
@keyframes ripple { 0% { transform: scale(.85); opacity: .8 } 100% { transform: scale(1.35); opacity: 0 } }
@keyframes halo { 0%, 100% { opacity: .45 } 50% { opacity: 1 } }
@keyframes drift { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
@keyframes travel { 0% { left: 4% } 100% { left: 96% } }
@media (max-width: 900px) {
  [data-desk] { display: none !important; }
  [data-mob] { display: flex !important; }
  [data-secondary] { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Hover states lifted from the design's style-hover attributes. */
.h1, .h2, .h3, .h4, .h5, .h6, .h7, .h8 {
  transition: color .2s ease, background .2s ease,
              border-color .2s ease, transform .2s ease;
}
.h1:hover { color: #FFFFFF !important; }
.h2:hover { transform: translateY(-1px) !important; color: #04100D !important; }
.h3:hover { background: rgba(217,180,91,.12) !important; }
.h4:hover { transform: translateY(-2px) !important; color: #04100D !important; }
.h5:hover { border-color: rgba(217,180,91,.6) !important; color: #FFFFFF !important; }
.h6:hover { border-color: rgba(217,180,91,.5) !important; }
.h7:hover { background: rgba(217,180,91,.14) !important; }
.h8:hover { border-color: rgba(217,180,91,.7) !important; color: #FFFFFF !important; }

/* ---------------------------------------------------------------------------
   Additions on top of the design's own stylesheet: CSS stand-ins for the two
   image slots and the phone screenshot, the year-dot grid, and the handful of
   behaviours a real page needs that a design canvas doesn't.
   --------------------------------------------------------------------------- */

/* The sticky header would otherwise sit on top of whatever an anchor lands on. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

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

/* --- Image-slot stand-ins -------------------------------------------------
   Both slots sit under a near-opaque dark gradient in the design, so these
   read as the intended night-sky photo. Swap for a real <img> when you have
   one: keep the positioning, drop the gradients.
   ------------------------------------------------------------------------- */
.img-ph {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 55% at 50% 88%, rgba(217, 180, 91, .40), transparent 62%),
    radial-gradient(60% 40% at 22% 16%, rgba(159, 217, 196, .12), transparent 70%),
    linear-gradient(180deg, #061A2B 0%, #0A2A21 40%, #0D2118 72%, #04100D 100%);
}

/* The lattice motif the rest of the page uses for texture. */
.img-ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(217, 180, 91, .05) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(-45deg, rgba(217, 180, 91, .05) 0 1px, transparent 1px 38px);
}

/* A dark massing at the base, so the glow reads as light behind a structure. */
.img-ph::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 34%;
  height: 26%;
  transform: translateX(-50%);
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #08201A, #04100D);
  box-shadow: 0 0 46px 14px rgba(4, 16, 13, .75);
}

/* --- Salah screen ---------------------------------------------------------
   Stands in for assets/screen-salah.png. Lives in a rotated card at 78%
   opacity behind the hero phone.
   ------------------------------------------------------------------------- */
.salah-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 30px 20px 22px;
  background:
    radial-gradient(120% 60% at 20% 0%, rgba(14, 122, 95, .40), transparent 62%),
    linear-gradient(180deg, #0B2A21 0%, #071C16 45%, #04100D 100%);
}

.salah-screen__eyebrow {
  font-size: 9.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(244, 247, 245, .6);
}

.salah-screen__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  line-height: 1.1;
  color: #FFFFFF;
  margin-top: 5px;
}

.salah-screen__meta {
  font-size: 11px;
  color: #D9B45B;
  margin-top: 5px;
}

.salah-screen__list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 22px;
}

.salah-screen__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 12px;
  color: rgba(244, 247, 245, .72);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  font-variant-numeric: tabular-nums lining-nums;
}

.salah-screen__row.is-done {
  color: rgba(244, 247, 245, .82);
  border-color: rgba(217, 180, 91, .22);
}

/* A tick for the prayers already kept. */
.salah-screen__row.is-done::after {
  content: "";
  width: 5px;
  height: 9px;
  flex: none;
  border: solid #D9B45B;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) translateY(-1px);
}

.salah-screen__row.is-next {
  color: #F2DFA8;
  font-weight: 600;
  background: rgba(217, 180, 91, .13);
  border-color: rgba(217, 180, 91, .45);
}

.salah-screen__foot {
  margin-top: auto;
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(244, 247, 245, .5);
}

/* --- Hero phone -----------------------------------------------------------
   The frame holds the app's real 390x844 layout, scaled down to fit, so frame
   width and scale have to move together. The design capped the frame at 82vw
   but left the scale at a fixed .7692, so on anything narrower than 366px the
   frame shrank while the screen inside it did not — cutting the avatar, the
   status icons and the right edge of every card off at 320px. One unitless
   custom property now drives both. Everything is !important because inline
   styles otherwise win.
   ------------------------------------------------------------------------- */
[data-phone] {
  --frame: 300; /* unitless: it has to divide into the 390px design width */
  width: calc(var(--frame) * 1px) !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 300 / 649;
}

[data-phone-screen] {
  transform: scale(calc(var(--frame) / 390)) !important;
}

/* Below this the 300px frame leaves no gutter beside the 20px page padding. */
@media (max-width: 359px) {
  [data-phone] { --frame: 264; }
}

/* --- The five-prayer day arc ----------------------------------------------
   Five equal columns need roughly 110px each to hold a prayer name, a time
   and a line of copy. Below that two things break: the captions wrap to six
   lines, and the columns stop being equal — a `1fr` track is floored at its
   own min-content, and "Maghrib" is wider than the rest, so the dots drift
   off the gradient bar they are meant to sit on. Under 700px the arc becomes
   a list and the bar above it stays as the decorative header it already is.
   ------------------------------------------------------------------------- */
@media (max-width: 699px) {
  [data-dayarc] {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    margin-top: 26px !important;
  }

  [data-dayarc] > div {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center !important;
    text-align: left !important;
    gap: 0 10px !important;
    padding: 13px 0;
  }

  [data-dayarc] > div + div {
    border-top: 1px solid rgba(217, 180, 91, .13);
  }

  /* The dot marks its row instead of hanging from the bar. */
  [data-dayarc] > div > span:first-child {
    margin-top: 0 !important;
  }

  /* The drop line only means anything directly under the bar. */
  [data-dayarc] > div > span:nth-child(2) {
    display: none !important;
  }

  /* Name left, time right; the caption takes the next line, indented past
     the dot so the column of names stays readable. */
  [data-dayarc] > div > span:nth-child(3) {
    flex: 1;
  }

  [data-dayarc] > div > span:last-child {
    flex-basis: 100%;
    max-width: none !important;
    margin-top: 3px;
    padding-left: 25px;
  }
}

/* --- Footer links ---------------------------------------------------------
   14.5px links in a column, 18px tall with an 11px gap. Fine with a mouse,
   under half the 44px a finger needs. Only the vertical rhythm changes.
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  footer nav {
    gap: 0 !important;
  }

  footer nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}

/* --- Year-dot grid --------------------------------------------------------
   365 decorative squares, built by main.js and toggled as the slider moves.
   ------------------------------------------------------------------------- */
#year-dots .dot {
  width: 11px;
  height: 11px;
  border-radius: 2.5px;
  background: rgba(10, 42, 33, .13);
  display: block;
}

#year-dots .dot.is-on {
  background: #C79A33;
}

