/* Halo essay — editorial layout */

:root {
  --bg: #354439;
  --text: #ffffff;
  --callout: "Times New Roman", Times, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --callout-kerning: -0.06em;
  --measure: 46rem;
  --hero-measure: min(100%, 56rem);
  --gutter: clamp(1.25rem, 4.5vw, 3.5rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
  --top-fade-h: clamp(6.5rem, 18vh, 10rem);
  --line-duration: 1.05s;
  --space-section: 3.75rem;
  --space-paragraph: 2rem;
  --space-before-closing: 8rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.1875rem;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.grain {
  display: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 90;
}

.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--text);
  opacity: 0.12;
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

.top-fade {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--top-fade-h);
  z-index: 45;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--bg) 0%,
    var(--bg) 28%,
    rgb(53 68 57 / 0.92) 48%,
    rgb(53 68 57 / 0.55) 68%,
    transparent 100%
  );
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1.35rem var(--gutter);
  pointer-events: none;
}

.logo {
  display: inline-block;
  pointer-events: auto;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

body.is-scrolled .logo {
  opacity: 1;
}

.logo__img {
  display: block;
  height: 2rem;
  width: auto;
}

/* Line reveal */
.line {
  display: block;
  overflow: visible;
}

.line__inner {
  display: block;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.line-word {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 1.05em, 0);
  will-change: transform, opacity;
}


.callout,
.callout .line__inner {
  font-family: var(--callout);
  letter-spacing: var(--callout-kerning);
  font-weight: 400;
}

/* Hero — full first screen so lead starts below the fold */
.hero {
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 2rem) var(--gutter) clamp(2rem, 6vh, 4rem);
  text-align: center;
  box-sizing: border-box;
}

.hero__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vh, 3.5rem);
  width: 100%;
}

.hero__mark {
  display: block;
  height: clamp(7rem, 18vh, 13rem);
  width: auto;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}

body.is-scrolled .hero__mark {
  opacity: 0;
  transform: translate3d(0, -0.75rem, 0) scale(0.96);
}

.hero__title {
  margin: 0 auto;
  max-width: var(--hero-measure);
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
  line-height: 0.98;
  text-align: center;
}

.hero__title .line,
.hero__title .line__inner {
  text-align: center;
}

.hero__title .line {
  overflow: visible;
  padding-bottom: 0;
  margin-bottom: 0;
}

.hero__title .line__inner {
  white-space: nowrap;
  opacity: 1;
  transform: none;
  padding-bottom: 0.06em;
}

.hero__title .line + .line {
  margin-top: 0;
}

.scroll-hint {
  display: none;
}

@media (max-width: 47.99rem) {
  .scroll-hint {
    display: flex;
    position: fixed;
    left: 50%;
    bottom: max(1.25rem, env(safe-area-inset-bottom, 0px) + 0.75rem);
    z-index: 40;
    transform: translateX(-50%);
    pointer-events: none;
    color: var(--text);
    opacity: 0.55;
    animation: scroll-hint-pulse 2.8s ease-in-out infinite;
    transition: opacity 0.5s var(--ease-out), visibility 0.5s;
  }

  body.is-scrolled .scroll-hint {
    opacity: 0;
    visibility: hidden;
    animation: none;
  }
}

@keyframes scroll-hint-pulse {
  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.85;
  }
}

/* Essay */
.essay {
  width: 100%;
  padding: 0 var(--gutter) 5.5rem;
}

.essay__inner {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
}

.essay__lead,
.essay__body {
  font-family: var(--sans);
  margin: 0;
}

.essay__lead,
.essay__body {
  color: var(--text);
}

/* Tight within-paragraph rhythm */
.essay__lead .line + .line,
.essay__body .line + .line {
  margin-top: 0.12em;
}

.essay__body strong {
  font-weight: 600;
}

/* Hand-drawn marks around emphasized words */
.mark {
  position: relative;
  display: inline-block;
  font-weight: 600;
}

.mark-annotation {
  position: absolute;
  pointer-events: none;
  color: inherit;
  overflow: visible;
  opacity: 0.9;
}

.mark-annotation--circle {
  left: -14%;
  top: -36%;
  width: 128%;
  height: 172%;
  transform: rotate(-1.6deg);
}

.mark-annotation--underline {
  left: -3%;
  bottom: -0.38em;
  width: 106%;
  height: 0.48em;
  transform: rotate(0.6deg);
}

.mark-annotation--check {
  left: -10%;
  bottom: -0.55em;
  width: 120%;
  height: 0.7em;
  transform: rotate(-2deg);
}

.mark-annotation--bracket {
  left: -3%;
  bottom: -0.45em;
  width: 106%;
  height: 0.7em;
  transform: rotate(-0.4deg);
}

.mark-annotation--brackets {
  left: -22%;
  top: -22%;
  width: 144%;
  height: 144%;
  transform: rotate(-0.6deg);
}

.halo-word {
  font-style: italic;
  font-family: var(--callout);
  letter-spacing: var(--callout-kerning);
  color: var(--text);
}

/* Section breaks */
.essay__lead + .essay__body,
.essay__body + .essay__body {
  margin-top: var(--space-paragraph);
}

/* Prayers — editorial interlude */
.prayers {
  margin: calc(var(--space-section) * 1.15) 0;
  padding: 0;
  text-align: center;
}

.prayers__intro {
  margin: 0 auto 2.125rem;
  font-size: clamp(1.75rem, 5.5vw, 3rem);
  line-height: 0.95;
  max-width: 34rem;
}

.prayers__intro .line + .line {
  margin-top: 0;
}

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

.prayers__item {
  margin: 0;
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
  line-height: 1;
}

.prayers__item + .prayers__item {
  margin-top: 0.625rem;
}

.prayers + .essay__closing {
  margin-top: var(--space-before-closing);
}

.give-cta {
  display: flex;
  justify-content: center;
  margin-top: 6.5rem;
}

.give-button {
  appearance: none;
  border: none;
  border-radius: 0;
  background: var(--text);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.011em;
  padding: 0.9rem 2.25rem;
  cursor: pointer;
  transition: opacity 0.25s var(--ease-out);
}

.give-button:hover {
  opacity: 0.88;
}

/* Give panel — expands below the button */
.give-panel {
  margin-top: 4.5rem;
  background: var(--text);
  color: var(--bg);
  padding: clamp(2rem, 5vw, 3rem);
}

.give-panel[hidden] {
  display: none;
}

.give__options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  width: 100%;
}

@media (min-width: 48rem) {
  .give__options {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.give__option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.give__option-title {
  margin: 0 0 1.25rem;
  font-family: var(--callout);
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: var(--callout-kerning);
}

.give__widget {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1.25rem;
}

.give__widget givebutter-widget {
  display: block;
}

.give__note {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.85;
}

.give__note + .give__note {
  margin-top: 1rem;
}

.site-footer {
  height: 10vh;
  min-height: 4rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2rem;
}

.site-footer__mark {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.12;
}

@media (min-width: 48rem) {
  :root {
    --measure: 54rem;
    --hero-measure: min(100%, 64rem);
    --space-section: 4.25rem;
    --space-paragraph: 2.25rem;
    --space-before-closing: 9.5rem;
    --top-fade-h: clamp(7.5rem, 20vh, 11rem);
  }

  body {
    font-size: 1.3125rem;
    line-height: 1.5;
  }

  .logo__img {
    height: 3rem;
  }

  .hero__title {
    font-size: clamp(3.75rem, 5.7vw, 5rem);
  }

  .prayers__intro {
    font-size: clamp(3rem, 4.5vw, 4rem);
    max-width: 44rem;
  }

  .prayers__item {
    font-size: clamp(2.25rem, 3.25vw, 3rem);
  }
}

@media (min-width: 64rem) {
  :root {
    --measure: 58rem;
    --hero-measure: min(100%, 68rem);
  }

  .hero__title {
    font-size: clamp(5rem, 5.35vw, 5.5rem);
  }

  .prayers__intro {
    font-size: 4.25rem;
  }

  .prayers__item {
    font-size: 3.125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .line__inner {
    transform: none;
    opacity: 1;
    transition: none;
  }

  .line-word {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-hint {
    animation: none;
    opacity: 0.5;
  }

  .grain {
    display: none;
  }
}
