:root {
  color-scheme: dark;
  --bg: #050607;
  --ink: #f8faf7;
  --field: rgba(255, 255, 255, 0.08);
  --muted: #b9c0bb;
  --soft: rgba(248, 250, 247, 0.68);
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(16, 18, 18, 0.62);
  --gold: #f0c36b;
  --green: #8dd9b6;
  --blue: #8eb8ff;
  --coral: #ff947d;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 15%, rgba(141, 217, 182, 0.12), transparent 28rem),
    radial-gradient(circle at 90% 30%, rgba(255, 148, 125, 0.11), transparent 26rem),
    var(--bg);
  color: var(--ink);
}

body.light {
  color-scheme: light;
  --bg: #f8faf5;
  --ink: #151713;
  --field: rgba(8, 12, 10, 0.06);
  --muted: #53605a;
  --soft: rgba(21, 23, 19, 0.72);
  --line: rgba(8, 12, 10, 0.15);
  --glass: rgba(255, 255, 255, 0.68);
  background:
    radial-gradient(circle at 15% 15%, rgba(141, 217, 182, 0.22), transparent 28rem),
    radial-gradient(circle at 90% 30%, rgba(240, 195, 107, 0.18), transparent 26rem),
    var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background: linear-gradient(180deg, rgba(5, 6, 7, 0.1), rgba(5, 6, 7, 0.96) 88%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

#motion-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, black, transparent 92%);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 6, 7, 0.5);
  backdrop-filter: blur(22px);
}

.brand,
nav,
.hero-actions,
.signal-row,
.footer-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  font-size: 0.78rem;
}

nav {
  gap: clamp(0.7rem, 2vw, 1.7rem);
  color: var(--muted);
  font-size: 0.9rem;
}

nav a {
  transition: color 180ms ease;
}

nav a:hover {
  color: var(--ink);
}

.theme-toggle {
  display: grid;
  min-width: 4.2rem;
  height: 2.2rem;
  place-items: center;
  padding: 0 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

main,
.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.68fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  padding: 8rem 0 3.5rem;
}

.hero-copy,
.daily-panel,
.section-heading,
.study-copy,
.showcase,
.site-footer {
  transform: translateY(18px);
  opacity: 0;
  animation: rise 900ms ease forwards;
}

.daily-panel {
  animation-delay: 180ms;
}

.kicker {
  margin: 0 0 1rem;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1.2rem;
  font-size: clamp(3.5rem, 9vw, 8.9rem);
  line-height: 0.88;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.15rem;
  line-height: 1.2;
}

.hero-lede {
  max-width: 42rem;
  color: var(--soft);
  font-size: clamp(1.03rem, 1.7vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-weight: 700;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
}

.button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button.primary {
  border-color: rgba(240, 195, 107, 0.55);
  background: linear-gradient(135deg, rgba(240, 195, 107, 0.94), rgba(255, 148, 125, 0.9));
  color: #10100e;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  outline: none;
}

select option {
  background: #f8faf7;
  color: #151713;
}

body.light select option {
  background: #ffffff;
  color: #151713;
}

input,
select {
  min-height: 2.75rem;
  padding: 0 0.8rem;
}

textarea {
  resize: vertical;
  padding: 0.9rem;
  line-height: 1.5;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.daily-panel {
  min-height: 28rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.16), transparent 48%),
    var(--glass);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(24px);
}

.portrait-shell {
  position: relative;
  height: clamp(9rem, 18vw, 13rem);
  margin-bottom: 1.4rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.portrait-shell::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 30% 20%, rgba(240, 195, 107, 0.24), transparent 42%),
    linear-gradient(180deg, transparent 40%, rgba(5, 6, 7, 0.72));
}

.portrait-shell img,
.photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.08);
}

.portrait-shell span {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 1;
  padding: 0.38rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.48);
  color: rgba(248, 250, 247, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.panel-label,
.citation,
.number,
.timeline span {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.daily-panel h2 {
  max-width: 11ch;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.verse {
  color: var(--soft);
  font-size: 1rem;
  line-height: 1.75;
}

.signal-row {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.signal-row span {
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
}

.section-block,
.split-section,
.showcase,
.photo-strip,
.app-shell,
.mood-section,
.tool-board,
.search-news {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card,
.timeline article,
.devotion-card {
  min-height: 15rem;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  backdrop-filter: blur(18px);
  transition:
    transform 240ms ease,
    background 240ms ease,
    border-color 240ms ease;
}

.feature-card:hover,
.timeline article:hover,
.devotion-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.11);
}

.feature-card p,
.study-copy p,
.timeline p,
.showcase p,
.section-heading p,
.devotion-card p,
.clean-list {
  color: var(--muted);
  line-height: 1.7;
}

.devotion-grid,
.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 1rem;
}

.main-devotion {
  min-height: 28rem;
}

.card-topline,
.control-row,
.metric-row,
.timer-row,
.quiz-options {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.card-topline {
  justify-content: space-between;
  margin-bottom: 1.3rem;
}

.card-topline span,
.mini-label {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.translation-control {
  display: flex;
  width: auto;
  align-items: center;
  grid-auto-flow: column;
  gap: 0.55rem;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.translation-control select {
  width: auto;
  min-height: 2.1rem;
  border-color: rgba(240, 195, 107, 0.42);
  border-radius: 999px;
  background: rgba(240, 195, 107, 0.13);
  color: var(--ink);
  font-weight: 900;
}

.verse-text {
  max-width: 48rem;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
}

.control-row {
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.control-row.stacked {
  align-items: stretch;
  flex-direction: column;
}

#verse-card {
  display: none;
}

.metric-row {
  justify-content: space-between;
  margin: 1.2rem 0;
}

.metric-row div {
  display: grid;
  min-width: 8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.metric-row strong {
  font-size: 2.2rem;
}

.metric-row span,
.helper-text {
  color: var(--muted);
  font-size: 0.84rem;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.mood-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(18px);
}

.mood-grid button,
.timer-row button,
.quiz-options button {
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font-weight: 800;
}

.mood-grid button.active,
.timer-row button.active,
.quiz-options button:hover {
  border-color: rgba(240, 195, 107, 0.6);
  background: rgba(240, 195, 107, 0.16);
}

.mood-result {
  min-height: auto;
  position: relative;
  overflow: hidden;
  margin-top: 0.35rem;
}

.mood-result::before {
  position: absolute;
  inset: -45%;
  content: "";
  opacity: 0;
  background: conic-gradient(from 0deg, transparent, rgba(141, 217, 182, 0.28), rgba(240, 195, 107, 0.28), transparent);
  transition: opacity 260ms ease;
  animation: result-spin 1400ms linear infinite;
}

.mood-result > * {
  position: relative;
}

.mood-result.revealing::before {
  opacity: 1;
}

.mood-result.revealing {
  animation: result-pop 760ms ease;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.clean-list {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prayer-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.7rem;
}

.prayer-item input[type="checkbox"] {
  width: 1.15rem;
  min-height: 1.15rem;
  margin-top: 0.18rem;
  accent-color: var(--green);
}

.prayer-item p {
  margin-bottom: 0.25rem;
  color: var(--soft);
}

.prayer-item small {
  color: var(--muted);
}

.prayer-item.prayed p {
  color: var(--ink);
}

.answered-button {
  min-height: 2rem;
  padding: 0 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.answered-button:hover {
  color: var(--ink);
  border-color: rgba(141, 217, 182, 0.48);
}

.prayer-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  margin-top: 1rem;
}

.timer-row {
  flex-wrap: wrap;
  margin-top: 1rem;
}

.timer-row button {
  width: 3.2rem;
}

.timer-display {
  margin-top: 1rem;
  font-size: clamp(2.7rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1;
}

.flashcard {
  display: grid;
  width: 100%;
  min-height: 12rem;
  place-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 20%, rgba(141, 217, 182, 0.16), transparent 45%),
    var(--field);
  color: var(--ink);
  text-align: center;
}

.flashcard strong {
  display: none;
  font-size: 1.15rem;
  line-height: 1.45;
}

.flashcard.flipped span {
  display: none;
}

.flashcard.flipped strong {
  display: block;
}

.quiz-options {
  flex-wrap: wrap;
}

.quiz-options button {
  padding: 0 0.9rem;
}

progress {
  width: 100%;
  height: 0.75rem;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--field);
}

progress::-webkit-progress-bar {
  background: var(--field);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.number {
  display: inline-block;
  margin-bottom: 4rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 1fr);
  gap: clamp(2rem, 7vw, 6rem);
}

.study-copy {
  position: sticky;
  top: 8rem;
  align-self: start;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline article {
  min-height: 10rem;
}

.timeline span {
  display: inline-block;
  margin-bottom: 1.3rem;
  color: var(--blue);
}

.showcase {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 2rem;
  align-items: end;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-strip {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.95fr;
  gap: 1rem;
  padding-top: 2rem;
}

.photo-strip figure {
  position: relative;
  height: clamp(17rem, 30vw, 26rem);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  transform: perspective(900px) rotateY(var(--tilt, 0deg)) translateY(var(--lift, 0));
  transition:
    transform 260ms ease,
    border-color 260ms ease;
}

.photo-strip figure:nth-child(1) {
  --tilt: -5deg;
  --lift: 1.4rem;
}

.photo-strip figure:nth-child(2) {
  --tilt: 3deg;
  --lift: -1rem;
}

.photo-strip figure:nth-child(3) {
  --tilt: -2deg;
  --lift: 0.6rem;
}

.photo-strip figure::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 48%, rgba(5, 6, 7, 0.82));
}

.photo-strip figure:hover {
  --tilt: 0deg;
  --lift: -0.4rem;
  border-color: rgba(255, 255, 255, 0.34);
}

.photo-strip figcaption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 1;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 4rem 0 5rem;
}

.site-footer h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
}

.footer-links {
  flex-wrap: wrap;
  gap: 0.8rem;
  align-self: end;
}

.footer-links a {
  color: var(--muted);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--ink);
}

@keyframes rise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes result-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes result-pop {
  0% {
    transform: scale(0.98) translateY(8px);
  }
  45% {
    transform: scale(1.02) translateY(-4px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 900px) {
  .site-header {
    position: sticky;
    align-items: flex-start;
    flex-direction: column;
    padding: 0.85rem 1rem;
  }

  nav {
    width: 100%;
    gap: 0.55rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav a,
  .theme-toggle {
    flex: 0 0 auto;
  }

  .hero,
  .split-section,
  .showcase,
  .photo-strip,
  .devotion-grid,
  .search-layout,
  .tool-grid {
    grid-template-columns: 1fr;
  }

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

  .mood-form {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 3.2rem;
  }

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

  .study-copy {
    position: static;
  }

  .daily-panel {
    min-height: 22rem;
  }

  .photo-strip figure {
    height: 18rem;
    transform: none;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0.85rem 1rem;
  }

  main,
  .site-footer {
    width: min(100% - 1rem, 1180px);
  }

  nav {
    justify-content: flex-start;
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(2.9rem, 16vw, 4.6rem);
    line-height: 0.92;
  }

  h2 {
    font-size: clamp(1.9rem, 10vw, 3.1rem);
  }

  .hero-lede {
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-actions .button {
    width: 100%;
  }

  .control-row .button,
  .mood-form .button {
    width: 100%;
  }

  .daily-panel,
  .feature-card,
  .timeline article,
  .devotion-card {
    padding: 1rem;
  }

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

  .metric-row,
  .card-topline,
  .prayer-add {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .metric-row div {
    min-width: 0;
  }

  .timer-display {
    font-size: clamp(2.8rem, 18vw, 4rem);
  }

  .photo-strip,
  .app-shell,
  .mood-section,
  .tool-board,
  .search-news,
  .section-block,
  .split-section,
  .showcase {
    padding: 3.4rem 0;
  }

  .portrait-shell {
    height: 12rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
