/* Spiritual Workout: white chalk on a dark board. No JavaScript. */

:root {
  --bg: #0b0c0d;
  --bg-raise: #111314;
  --chalk: #ece9e2;
  --chalk-2: #bdb9b0;
  --chalk-3: #8a867f;
  --rule: rgba(236, 233, 226, 0.14);
  --rule-strong: rgba(236, 233, 226, 0.32);
  --dust: 0 0 1px rgba(236, 233, 226, 0.35), 0 0 14px rgba(236, 233, 226, 0.08);

  --serif: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --caps: "Cinzel", "Trajan Pro", Georgia, serif;

  --measure: 38rem;
  --gutter: clamp(1rem, 4vw, 2rem);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 50% 18%, rgba(236, 233, 226, 0.035), transparent 70%),
    var(--bg);
  color: var(--chalk);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fine chalkboard grain over everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' 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 1.4 -.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: var(--caps);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.15;
  margin: 0;
  text-shadow: var(--dust);
}

p { margin: 0; }

a {
  color: var(--chalk);
  text-decoration-line: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

a:hover { text-decoration-color: var(--chalk); }

:focus-visible {
  outline: 1.5px dashed var(--chalk);
  outline-offset: 4px;
  border-radius: 2px;
}

.kicker {
  font-family: var(--caps);
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--chalk-3);
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1.5rem, 5vh, 3.5rem) var(--gutter) clamp(3rem, 8vh, 5rem);
}

.hero-art {
  display: block;
  width: min(100%, 52vh, 460px);
  height: auto;
  margin-bottom: clamp(1rem, 3vh, 2rem);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-art { animation: appear 1.6s ease-out both; }
  .hero > :not(.hero-art) { animation: appear 1.2s 0.5s ease-out both; }
}

@keyframes appear {
  from { opacity: 0; filter: blur(3px); }
  to { opacity: 1; filter: blur(0); }
}

.hero h1 {
  font-size: clamp(2.1rem, 1.4rem + 3.6vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0.6rem 0 0.5rem;
}

.lede {
  font-style: italic;
  font-size: 1.15em;
  color: var(--chalk-2);
}

.jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  margin-top: 2rem;
  font-family: var(--caps);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.jump a {
  text-decoration: none;
  color: var(--chalk-2);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule-strong);
}

.jump a:hover {
  color: var(--chalk);
  border-bottom-color: var(--chalk);
}

/* ---------- Sections ---------- */

.section {
  max-width: 54rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter);
  border-top: 1px solid var(--rule);
}

.section-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section-head h2 {
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem);
  margin-top: 0.6rem;
}

/* ---------- Daily workout ---------- */

.regimen {
  list-style: none;
  margin: 0;
  padding: 0;
}

.set {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.5rem 2.5rem;
  padding: clamp(2rem, 5vw, 3rem) 0;
}

.set + .set { border-top: 1px dashed var(--rule); }

.set-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.35rem;
}

.set-num {
  font-family: var(--caps);
  font-size: 3rem;
  line-height: 1;
  color: var(--chalk);
  text-shadow: var(--dust);
}

.set-when {
  font-family: var(--caps);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--chalk-3);
}

.set-body { max-width: var(--measure); }

.set-body h3 {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem);
  margin-bottom: 1.25rem;
}

.prayers p { color: var(--chalk); }

/* A small chalk cross between prayers. */
.prayers p + p::before {
  content: "";
  display: block;
  width: 11px;
  height: 16px;
  margin: 1.3rem 0 1.1rem;
  opacity: 0.45;
  background:
    linear-gradient(var(--chalk), var(--chalk)) center 4px / 11px 1.5px no-repeat,
    linear-gradient(var(--chalk), var(--chalk)) center / 1.5px 16px no-repeat;
}

.set-note {
  color: var(--chalk-2);
  margin-bottom: 1.5rem;
}

.set-note em { color: var(--chalk); }

.button {
  display: inline-block;
  font-family: var(--caps);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--chalk);
  padding: 0.85rem 1.4rem;
  border: 1.5px solid var(--rule-strong);
  border-radius: 2px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.button::after { content: " \2197"; }

.button:hover {
  border-color: var(--chalk);
  background-color: rgba(236, 233, 226, 0.05);
}

/* ---------- Resources ---------- */

.shelves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 3.5rem) clamp(2rem, 6vw, 4.5rem);
}

.shelf h3 {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--chalk-2);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.shelf ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shelf li {
  display: flex;
  flex-direction: column;
  padding: 0.8rem 0;
}

.shelf li + li { border-top: 1px dashed var(--rule); }

.shelf li > a,
.shelf li > .title {
  font-size: 1.12em;
  line-height: 1.35;
  width: fit-content;
}

.shelf li > a::after {
  content: " \2197";
  font-size: 0.8em;
  color: var(--chalk-3);
}

.shelf li > span:not(.title) {
  font-size: 0.86em;
  color: var(--chalk-3);
  margin-top: 0.15rem;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--rule);
  padding: 3rem var(--gutter) 4rem;
  text-align: center;
  font-style: italic;
  color: var(--chalk-3);
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .set {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .set-meta {
    flex-direction: row;
    align-items: baseline;
    text-align: left;
    gap: 0.9rem;
  }

  .set-num { font-size: 2.2rem; }

  .shelves { grid-template-columns: 1fr; }
}
