/* buildasmuslim.com — landing page */

/* ============ HERO ============ */

.hero {
  position: relative;
  background: var(--green-800);
  color: var(--paper);
  overflow: hidden;
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2rem, 5vw, 3rem);
}

.hero__pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.12;
  pointer-events: none;
}

.hero__inner {
  position: relative;
}

.hero__title {
  font-size: clamp(2.4rem, 1.2rem + 4.6vw, 4.4rem);
  max-width: 16ch;
  margin-bottom: 1.25rem;
}

.hero__lede {
  max-width: 56ch;
  color: var(--mint-200);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

/* --- the colonnade: five arches, three built --- */

.colonnade {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: clamp(0.35rem, 2vw, 2rem);
  border-bottom: 1px solid rgba(194, 154, 69, 0.45);
  padding-bottom: 0.9rem;
}

/* Five arches share one row at every width — they never wrap. */
.pillar {
  flex: 1 1 0;
  min-width: 0;
  max-width: 116px;
  text-align: center;
}

.pillar__arch {
  display: block;
  width: 100%;
  height: auto;
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.4;
  overflow: visible;
}

.pillar--built .pillar__arch path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: raise-arch 1.5s cubic-bezier(0.4, 0, 0.2, 1) var(--draw-delay, 0s) forwards;
}

.pillar__star {
  fill: none;
  stroke: var(--brass-200);
  stroke-width: 2.4;
  opacity: 0;
  animation: lamp-on 0.8s ease calc(var(--draw-delay, 0s) + 1.2s) forwards;
}

.pillar--planned .pillar__arch {
  stroke: rgba(207, 226, 211, 0.42);
  stroke-dasharray: 4 5;
}

.pillar--planned .pillar__label {
  color: rgba(207, 226, 211, 0.6);
}

/* Two lines' worth of room keeps every arch standing on the same ground line,
   whether its label wraps or not. */
.pillar__label {
  margin: 0.55rem 0 0;
  min-height: 2.6em;
  font-size: clamp(0.72rem, 0.65rem + 0.25vw, 0.9rem);
  color: var(--brass-200);
  line-height: 1.3;
}

.colonnade__caption {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: rgba(207, 226, 211, 0.75);
}

@keyframes raise-arch {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes lamp-on {
  to {
    opacity: 0.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pillar--built .pillar__arch path {
    stroke-dashoffset: 0;
  }
  .pillar__star {
    opacity: 0.85;
  }
}

/* ============ PRAYER TIMES ============ */

.times {
  background: var(--green-900);
  color: var(--paper);
  border-top: 1px solid rgba(194, 154, 69, 0.28);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.times__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.times__heading {
  min-width: 15rem;
}

.times__title {
  font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem);
  margin-bottom: 0.35rem;
}

.times__meta {
  color: var(--mint-200);
  margin: 0;
}

.times__hijri {
  color: var(--brass-200);
  font-family: var(--font-display);
  margin: 0.15rem 0 0;
}

.times__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
  min-width: 0;
}

.field label {
  font-size: 0.78rem;
  color: rgba(207, 226, 211, 0.78);
}

.field select {
  font: inherit;
  font-size: 0.9rem;
  color: var(--paper);
  background: var(--green-800);
  border: 1px solid rgba(194, 154, 69, 0.45);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  max-width: 15rem;
}

.field select:hover {
  border-color: var(--brass);
}

.times__locate {
  font: inherit;
  font-size: 0.9rem;
  color: var(--brass-200);
  background: none;
  border: 1px solid rgba(194, 154, 69, 0.55);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.times__locate:hover:not(:disabled) {
  background: var(--brass);
  color: var(--green-900);
}

.times__locate:disabled {
  opacity: 0.6;
  cursor: default;
}

/* --- the day as a row of arches, the next one lit --- */

.hours {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.4rem, 1.2vw, 1rem);
}

.hour {
  position: relative;
  text-align: center;
  padding: clamp(3rem, 30%, 4rem) 0.3rem 1.15rem;
}

.hour__arch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hour__frame {
  fill: rgba(255, 255, 255, 0.035);
  stroke: rgba(194, 154, 69, 0.4);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.hour__lamp {
  fill: none;
  stroke: var(--brass);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  opacity: 0.22;
}

.hour__name {
  position: relative;
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--brass-200);
}

.hour__time {
  position: relative;
  display: block;
  font-size: clamp(1rem, 0.85rem + 0.55vw, 1.35rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #fff;
  white-space: nowrap;
}

/* Sunrise is not a prayer — it marks the end of Fajr, so it sits back. */
.hour--sun .hour__time {
  color: var(--mint-200);
  font-weight: 400;
}

.hour--sun .hour__name {
  color: rgba(207, 226, 211, 0.7);
}

.hour.is-next .hour__frame {
  fill: rgba(194, 154, 69, 0.16);
  stroke: var(--brass);
  stroke-width: 1.8;
}

.hour.is-next .hour__lamp {
  stroke: var(--brass-200);
  opacity: 0.95;
}

.hour.is-next .hour__name,
.hour.is-next .hour__time {
  color: #fff;
}

.times__next {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.55rem);
  color: var(--brass-200);
  margin: clamp(1.5rem, 3vw, 2rem) 0 0.6rem;
}

.times__note {
  max-width: 68ch;
  font-size: 0.86rem;
  line-height: 1.6;
  color: rgba(207, 226, 211, 0.7);
  margin: 0;
}

/* --- hand offsets --- */

.times__tune {
  margin-top: 1.5rem;
  max-width: 68ch;
  font-size: 0.9rem;
}

.times__tune summary {
  cursor: pointer;
  color: var(--brass-200);
  font-family: var(--font-display);
  font-size: 1.05rem;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.times__tune summary::-webkit-details-marker {
  display: none;
}

.times__tune summary::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}

.times__tune[open] summary::before {
  transform: rotate(45deg);
}

.times__tune p {
  color: rgba(207, 226, 211, 0.75);
  margin: 0.75rem 0 0.9rem;
}

.tune__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.1rem;
}

.tune__field {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--mint-200);
}

.tune__field input {
  font: inherit;
  width: 4.2rem;
  color: var(--paper);
  background: var(--green-800);
  border: 1px solid rgba(194, 154, 69, 0.45);
  border-radius: 6px;
  padding: 0.35rem 0.45rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.tune__reset {
  font: inherit;
  font-size: 0.85rem;
  color: rgba(207, 226, 211, 0.8);
  background: none;
  border: 1px solid rgba(207, 226, 211, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}

.tune__reset:hover {
  border-color: var(--brass);
  color: var(--brass-200);
}

@media (max-width: 860px) {
  .hours {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .field select {
    max-width: 100%;
  }
}

@media (max-width: 460px) {
  .hours {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .times__controls {
    width: 100%;
  }

  .field {
    flex: 1 1 100%;
  }
}

/* ============ PAGE LAYOUT ============ */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-top: clamp(3rem, 7vw, 5rem);
}

.section + .section {
  margin-top: clamp(3rem, 7vw, 5rem);
}

.section__title {
  font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem);
  margin-bottom: 0.4rem;
}

.section__intro {
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

/* ============ QUR'AN NICHES ============ */

.colonnade-niches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.niche {
  position: relative;
  margin: 0;
  display: flex;
  min-height: 380px;
}

.niche__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--green-800);
  stroke: var(--brass);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.niche__body {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  color: var(--paper);
  padding: clamp(5rem, 14%, 6.5rem) clamp(1.25rem, 5%, 2rem) 2.25rem;
}

.niche .arabic {
  color: var(--brass-200);
}

.niche blockquote p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.55;
  margin-bottom: 1.1rem;
}

.niche figcaption {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--mint-200);
}

/* ============ HADITH LIST ============ */

.hadith {
  margin: 0;
}

.hadith__row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0 clamp(1rem, 3vw, 2rem);
  padding-block: clamp(1.4rem, 3vw, 1.9rem);
  border-top: var(--rule);
}

.hadith__row:last-child {
  border-bottom: var(--rule);
}

.hadith dt {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--green-600);
  padding-top: 0.15rem;
}

.hadith dd {
  margin: 0;
}

.hadith blockquote p {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  max-width: 52ch;
  margin-bottom: 0.5rem;
}

.source {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ============ RIGHT RAIL ============ */

.rail > section + section {
  margin-top: clamp(2.25rem, 5vw, 3rem);
}

.rail__title {
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.rail__intro {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 1.1rem;
}

/* --- Kids Zone doorway --- */

.doorway {
  display: block;
  text-decoration: none;
  position: relative;
}

.doorway__scene {
  display: block;
  width: 100%;
  height: auto;
}

.doorway__frame {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.2;
  transition: stroke 0.25s ease;
}

.doorway__orbit {
  transform-origin: 50px 70px;
  animation: orbit 14s linear infinite;
}

.doorway__orbit--out {
  animation-duration: 24s;
  animation-direction: reverse;
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.doorway__label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--green-700);
  margin-top: 0.9rem;
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.doorway__hint {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.doorway:hover .doorway__label,
.doorway:focus-visible .doorway__label {
  color: var(--green-400);
}

.doorway:hover .doorway__frame,
.doorway:focus-visible .doorway__frame {
  stroke: var(--green-400);
  stroke-width: 2;
}

/* --- Space Explorer button --- */

.kids__more {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--paper);
  background: var(--green-700);
  border: 1px solid var(--brass);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.kids__more:hover,
.kids__more:focus-visible {
  background: var(--brass);
  color: var(--green-900);
}

.kids__more-hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.6rem 0 0;
}

/* --- roadmap --- */

.roadmap__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.roadmap__list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  border-top: 1px solid var(--mint-200);
}

.roadmap__list li:last-child {
  border-bottom: 1px solid var(--mint-200);
}

.state {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.state--open {
  color: var(--green-600);
  font-weight: 700;
}

.state--building {
  color: #9a7524;
  font-weight: 500;
}

/* --- invite --- */

.invite p {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.invite__mail a {
  color: var(--green-600);
  font-weight: 700;
  word-break: break-word;
}

/* ============ NARROW SCREENS ============ */

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

  .rail {
    border-top: var(--rule);
    padding-top: clamp(2rem, 6vw, 3rem);
  }

  .doorway__scene {
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .hadith__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .niche {
    min-height: 340px;
  }
}
