/* The home is one night: each section is a band of sky, from midnight at the top to full day at the
   bottom, using the app's own night gradient (#252B45 → #46303F) and its cream for the day. */
:root {
  --sky-midnight: #0d1226;
  --sky-late: #141a33;
  --sky-deep: #1b2140;
  --sky-vigil-top: #252b45;
  --sky-vigil-bottom: #46303f;
  --sky-rose: #8c5160;
  --sky-dawn: #e39a74;
  --sky-gold: #f6cf98;
  --sky-morning: #f7e5cc;
  --sky-noon: #fbf6ef;
  --ember: #a8641a;
  --vigil-ink: #f1e9dc;
  --vigil-ink-soft: #bdb3a6;
  --vigil-background: #1b1920;
  --night-text-soft: #c9c3c6;
}

.home {
  background: var(--sky-midnight);
}

.sky {
  position: relative;
  padding-block: clamp(5rem, 11vw, 9rem);
}

[data-theme="night"].sky {
  color: var(--night-ink);
}

.sky--midnight { background: linear-gradient(180deg, var(--sky-midnight), var(--sky-late)); }
.sky--late { background: linear-gradient(180deg, var(--sky-late), var(--sky-deep)); }
.sky--deep { background: linear-gradient(180deg, var(--sky-deep), var(--sky-vigil-top)); }
.sky--vigil { background: linear-gradient(180deg, var(--sky-vigil-top), var(--sky-vigil-bottom)); }
.sky--dawn { background: linear-gradient(180deg, var(--sky-vigil-bottom) 0%, var(--sky-rose) 42%, var(--sky-dawn) 74%, var(--sky-gold) 100%); }
.sky--morning { background: linear-gradient(180deg, var(--sky-gold), var(--sky-morning)); }
.sky--day { background: linear-gradient(180deg, var(--sky-morning), var(--cream)); }
.sky--noon { background: linear-gradient(180deg, var(--cream), var(--sky-noon)); }

.section-title {
  max-width: 18ch;
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.section-intro {
  max-width: 54ch;
  margin-top: 1.25rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}

[data-theme="night"] .section-intro {
  color: var(--night-text-soft);
}

/* ---------- Phone ---------- */
.phone {
  position: relative;
  width: 100%;
  padding: 3.2%;
  border-radius: 15% / 7%;
  background: linear-gradient(160deg, #34343b, #121216 55%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.16),
    0 2.5rem 4rem -2rem rgba(6, 8, 20, 0.75);
}

.phone__screen {
  position: relative;
  aspect-ratio: 660 / 1434;
  overflow: hidden;
  border-radius: 12.5% / 5.8%;
  background: #000;
  container-type: inline-size;
}

.phone__screen > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Blocked-app screen, drawn from the app's ShieldContent words and colors ---------- */
.shield {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: 7cqw;
  text-align: center;
  line-height: 1.25;
}

.shield--night {
  background: var(--vigil-background);
  color: var(--vigil-ink);
  --shield-soft: var(--vigil-ink-soft);
  --shield-primary: var(--ember);
  --shield-secondary: var(--amber);
}

.shield--day {
  background: var(--cream);
  color: var(--ink);
  --shield-soft: #5f6b69;
  --shield-primary: var(--sage-dark);
  --shield-secondary: var(--sage-dark);
}

.shield__status {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 13cqw;
  padding-inline: 10cqw 8cqw;
  font-size: 3.8cqw;
  font-weight: 650;
}

.shield__island {
  position: absolute;
  top: 3cqw;
  left: 50%;
  width: 28cqw;
  height: 8.2cqw;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

.shield__icons {
  width: 6.4cqw;
  height: 3cqw;
  border: 0.35cqw solid currentColor;
  border-radius: 0.9cqw;
  background: linear-gradient(90deg, currentColor 70%, transparent 70%) content-box;
  padding: 0.35cqw;
  opacity: 0.9;
}

.shield__picture {
  width: 15cqw;
  height: 15cqw;
  margin-top: 44cqw;
  border-radius: 50%;
  object-fit: cover;
}

.shield__title {
  margin-top: 3.5cqw;
  font-size: 5cqw;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.shield__body {
  margin-top: 2cqw;
  font-size: 3.8cqw;
  line-height: 1.32;
  color: var(--shield-soft);
}

.shield__body + .shield__body {
  margin-top: 4cqw;
}

.shield__buttons {
  position: absolute;
  inset: auto 5.5cqw 9cqw;
  display: grid;
  gap: 1.5cqw;
}

.shield__primary,
.shield__secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 11.4cqw;
  border-radius: 999px;
  font-size: 3.9cqw;
  font-weight: 650;
}

.shield__primary {
  background: var(--shield-primary);
  color: #fff;
}

.shield__secondary {
  color: var(--shield-secondary);
  font-weight: 550;
}

/* ---------- Hero ---------- */
.hero {
  min-height: min(100svh, 62rem);
  padding-block: calc(var(--header-height) + clamp(2.5rem, 6vw, 5rem)) clamp(4rem, 8vw, 6rem);
  overflow: hidden;
}

.stars {
  position: absolute;
  inset: 0 0 30%;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(1px 1px at 28% 62%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 47% 30%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1px 1px at 66% 12%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 83% 44%, rgba(255, 255, 255, 0.75), transparent 60%),
    radial-gradient(1px 1px at 91% 78%, rgba(255, 255, 255, 0.5), transparent 60%);
  background-size: 23rem 17rem;
  mask-image: linear-gradient(180deg, #000 40%, transparent);
  pointer-events: none;
}

.hero__layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.hero__title {
  max-width: 13ch;
  font-size: clamp(2.7rem, 1.5rem + 4.8vw, 5.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero__lead {
  max-width: 34ch;
  margin-top: 1.6rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--night-text-soft);
}

.hero__get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.25rem;
}

.hero__note {
  color: var(--night-text-soft);
  font-size: var(--step--1);
  font-weight: 600;
}

.hero__phone {
  position: relative;
  justify-self: center;
  width: clamp(15rem, 25vw, 20.5rem);
  margin: 0;
}

/* The light the shield is waiting for: a low ember glow, the only warm thing in the midnight sky. */
.hero__phone::before {
  content: "";
  position: absolute;
  inset: 18% -55% -20%;
  z-index: 0;
  background: radial-gradient(closest-side, rgba(240, 160, 75, 0.55), rgba(168, 100, 26, 0.2) 55%, transparent);
  filter: blur(8px);
}

.hero__phone .phone {
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__phone {
    animation: rise 1.1s var(--ease-out) both 0.15s;
  }

  .hero__phone::before {
    animation: ember 6s ease-in-out infinite alternate;
  }
}

/* Only movement, never opacity: if the animation never runs, the phone is still there. */
@keyframes rise {
  from {
    transform: translateY(2.5rem);
  }
}

@keyframes ember {
  to {
    opacity: 0.65;
    transform: scale(0.94);
  }
}

/* ---------- Screen time ---------- */
.screen-time__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
}

.range-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.75rem;
  max-width: 26rem;
  margin-top: 2.5rem;
}

.range-field label {
  font-weight: 650;
}

.range-field output {
  font-size: var(--step-2);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.range-field .range,
.range-field__scale {
  grid-column: 1 / -1;
}

.range-field__scale {
  display: flex;
  justify-content: space-between;
  color: var(--night-text-soft);
  font-size: var(--step--1);
}

.range {
  --fill: 50%;
  width: 100%;
  height: 2.5rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: pan-y;
}

.range::-webkit-slider-runnable-track {
  height: 0.6rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--amber) var(--fill), rgba(255, 255, 255, 0.16) var(--fill));
}

.range::-moz-range-track {
  height: 0.6rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--amber) var(--fill), rgba(255, 255, 255, 0.16) var(--fill));
}

.range::-webkit-slider-thumb {
  width: 1.9rem;
  height: 1.9rem;
  margin-top: -0.65rem;
  border: 0.42rem solid var(--amber);
  border-radius: 50%;
  background: var(--sky-deep);
  -webkit-appearance: none;
}

.range::-moz-range-thumb {
  width: 1.1rem;
  height: 1.1rem;
  border: 0.42rem solid var(--amber);
  border-radius: 50%;
  background: var(--sky-deep);
}

.range:focus-visible {
  outline: none;
}

.range:focus-visible::-webkit-slider-thumb {
  outline: 3px solid var(--night-ink);
  outline-offset: 3px;
}

.range:focus-visible::-moz-range-thumb {
  outline: 3px solid var(--night-ink);
  outline-offset: 3px;
}

.yearly__number {
  display: flex;
  font-size: clamp(4.25rem, 2.6rem + 8vw, 9.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.odometer-digit {
  display: inline-block;
  height: 1em;
  overflow: hidden;
}

.odometer-digit__strip {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--digit, 0) * -1em));
}

.odometer-digit__strip span {
  display: block;
  height: 1em;
}

@media (prefers-reduced-motion: no-preference) {
  .odometer-digit__strip {
    transition: transform 1s var(--ease-out);
  }

  .compare__bar {
    transition: transform 1s var(--ease-out);
  }
}

.yearly__unit {
  margin-top: 0.5rem;
  color: var(--night-text-soft);
  font-size: var(--step-1);
  font-weight: 700;
}

.yearly__days {
  margin-top: 1rem;
  font-size: var(--step-1);
}

.compare {
  display: grid;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.compare__row {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) 1fr 4.5rem;
  align-items: center;
  gap: 1rem;
}

.compare__label {
  font-weight: 650;
  line-height: 1.25;
}

.compare__row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.compare__track {
  display: block;
  height: 0.85rem;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
}

.compare__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  transform: scaleX(var(--share, 0));
  transform-origin: left;
}

.compare__bar--feed {
  background: linear-gradient(90deg, var(--peach), #e2806e);
}

.compare__bar--prayer {
  background: var(--amber);
}

.yearly__question {
  margin-top: 2.25rem;
  font-size: var(--step-2);
  font-weight: 750;
  letter-spacing: -0.02em;
}

/* ---------- How it works ---------- */
.steps__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
  gap: clamp(2.5rem, 8vw, 8rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.steps__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(72vh, 44rem);
  max-width: 30rem;
  counter-increment: step;
  opacity: 0.4;
  transition: opacity 0.4s ease;
}

.step.is-active {
  opacity: 1;
}

.step__body {
  position: relative;
  padding-left: 4.25rem;
}

.step__body::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid rgba(244, 199, 123, 0.55);
  border-radius: 50%;
  color: var(--amber);
  font-weight: 800;
}

.step__title {
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.step p {
  margin-top: 1rem;
  color: var(--night-text-soft);
  font-size: var(--step-1);
  line-height: 1.5;
}

.step .phone--inline {
  display: none;
}

.steps__stage {
  position: sticky;
  top: max(calc(var(--header-height) + 1rem), calc(50vh - 21rem));
  align-self: start;
  width: 100%;
  max-width: min(20rem, 38vh);
  justify-self: center;
}

.steps__screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.steps__screen.is-active {
  opacity: 1;
}

.phone__screen > img.steps__screen {
  position: absolute;
}

/* ---------- Sleep ---------- */
.sleep__layout {
  display: grid;
  grid-template-columns: minmax(14rem, 19rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 8vw, 7rem);
}

.sleep__art {
  width: 100%;
  border-radius: 1.75rem;
  box-shadow: 0 2.5rem 4rem -2rem rgba(6, 8, 20, 0.75);
}

.sleep__list {
  display: grid;
  gap: 0.25rem;
  max-width: 34rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.sleep__list li {
  display: grid;
  grid-template-columns: 3.75rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sleep__list img {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 0.9rem;
  object-fit: cover;
}

.sleep__text {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.6rem;
  color: var(--night-text-soft);
  font-size: var(--step--1);
  line-height: 1.4;
}

.sleep__text strong {
  flex-basis: 100%;
  color: var(--night-ink);
  font-size: var(--step-0);
}

.sleep__length {
  opacity: 0.75;
}

.tag {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(169, 201, 176, 0.18);
  color: #c4dccb;
  font-size: var(--step--1);
  font-style: normal;
  font-weight: 700;
}

.tag--premium {
  background: rgba(244, 199, 123, 0.16);
  color: var(--amber);
}

/* ---------- Dawn ---------- */
.dawn__levels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.2vw, 1rem);
  width: min(88rem, 100% - 2 * var(--gutter));
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding: 0;
  list-style: none;
}

.dawn__levels img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: 0 1.5rem 2.5rem -1.5rem rgba(20, 12, 24, 0.6);
}

.dawn__levels span {
  display: grid;
  margin-top: 0.75rem;
  font-size: var(--step--1);
  line-height: 1.3;
  color: rgba(255, 246, 234, 0.82);
}

.dawn__levels strong {
  color: #fff6ea;
  font-size: var(--step-0);
}

.dawn__verse {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  color: var(--ink);
  text-align: center;
}

.dawn__verse p {
  font-family: var(--font-scripture);
  font-size: var(--step-3);
  line-height: 1.2;
}

.dawn__verse cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-weight: 700;
  color: #4b3b33;
}

/* ---------- Plans ---------- */
.plans__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 58rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.plan {
  padding-top: 1.5rem;
  border-top: 2px solid rgba(46, 58, 58, 0.18);
}

.plan--premium {
  border-color: var(--flame);
}

.plan h3 {
  font-size: var(--step-2);
  font-weight: 800;
}

.plan ul {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.plan li {
  position: relative;
  padding-left: 1.6rem;
  line-height: 1.45;
}

.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--sage-dark);
}

.plan--premium li::before {
  background: var(--flame);
}

.plan__note {
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* ---------- FAQ ---------- */
.faq__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.faq__list details {
  border-bottom: 1px solid var(--hairline);
}

.faq__list summary {
  position: relative;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

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

.faq__list summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 0.8rem;
  height: 0.8rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s var(--ease-out);
}

.faq__list details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq__list details p {
  max-width: 60ch;
  padding-bottom: 1.4rem;
  color: var(--ink-soft);
}

/* ---------- Closing ---------- */
.closing {
  overflow: hidden;
  text-align: center;
}

.closing__sun {
  position: absolute;
  left: 50%;
  bottom: -14rem;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 190, 0.95), rgba(246, 207, 152, 0.55) 45%, rgba(246, 207, 152, 0) 100%);
  transform: translateX(-50%);
}

@media (prefers-reduced-motion: no-preference) {
  .closing__sun {
    transform: translate(-50%, 6rem);
    transition: transform 2.2s var(--ease-out);
  }

  .closing.is-visible .closing__sun {
    transform: translateX(-50%);
  }
}

.closing__layout {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding-bottom: 4rem;
}

.closing__title {
  max-width: 16ch;
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.closing__text {
  max-width: 40ch;
  color: var(--ink-soft);
  font-size: var(--step-1);
}

.closing .store-badge {
  margin-top: 0.75rem;
}

.site-footer--day {
  background: var(--sky-noon);
}

/* ---------- Narrow screens ---------- */
@media (max-width: 56rem) {
  .hero {
    min-height: auto;
  }

  .hero__layout,
  .screen-time__layout,
  .sleep__layout,
  .faq__layout,
  .steps__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__phone {
    width: min(15rem, 64vw);
  }

  .steps__stage {
    display: none;
  }

  .step {
    min-height: 0;
    max-width: none;
    padding-bottom: 3.5rem;
    opacity: 1;
  }

  .step__body {
    padding-left: 0;
  }

  .step__body::before {
    position: static;
    margin-bottom: 1rem;
  }

  .step .phone--inline {
    display: block;
    width: min(15rem, 68vw);
    margin: 2rem auto 0;
  }

  .sleep__phone,
  .sleep__art {
    order: 2;
    width: min(16rem, 70vw);
    justify-self: center;
  }

  .dawn__levels {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
  }

  .dawn__levels li {
    flex: 0 0 min(11rem, 42vw);
    scroll-snap-align: start;
  }

  .plans__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 30rem) {
  .compare__row {
    grid-template-columns: minmax(0, 1fr) 4rem;
  }

  .compare__track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
