/* ============================================================
   Bible — landing page
   Palette and radii sourced from BibleApp/lib/designSystem.ts
   ============================================================ */

:root {
  --bg: #050507;
  --bg-card: #16161a;
  --bg-card-2: #1c1c1e;
  --ink: #f4f3f0;
  --ink-dim: rgba(235, 235, 245, 0.6);
  --ink-faint: rgba(235, 235, 245, 0.3);
  --scripture: #8e8cff;
  --scripture-deep: #5856d6;
  --border: rgba(235, 235, 245, 0.1);
  --sweep-1: #32ade6;
  --sweep-2: #007aff;
  --sweep-3: #af52de;
  --sweep-4: #ff2d55;
  --sweep-5: #ff9500;
  --streak-1: #9ed1a3;
  --streak-2: #52ad63;
  --streak-3: #1f8547;
  --r-card: 14px;
  --r-panel: 16px;
  --r-prompt: 22px;
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Inter", -apple-system, "SF Pro Text", sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(142, 140, 255, 0.35); }

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
sup {
  font-family: var(--sans);
  font-size: 0.55em;
  font-weight: 600;
  color: var(--scripture);
  margin-right: 0.35em;
  vertical-align: 0.7em;
}

/* film grain */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 60;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-3%, -3%); }
  80% { transform: translate(2%, 2%); }
}

/* ====== buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 0.85em 1.6em;
  border: 1px solid var(--border);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s, color 0.35s, background 0.35s, border-color 0.35s;
  will-change: transform;
}
.btn--primary {
  --btn-fill: var(--ink);
  --btn-border: 2px;
  color: #0a0a0c;
}
.btn--primary,
.nav .btn--small {
  border: var(--btn-border) solid transparent;
  background:
    linear-gradient(var(--btn-fill), var(--btn-fill)) padding-box,
    conic-gradient(from var(--angle, 0deg), var(--sweep-1), var(--sweep-2), var(--sweep-3), var(--sweep-4), var(--sweep-5), var(--sweep-1)) border-box;
  animation: rotate-angle 5s linear infinite;
}
.btn--primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}
.btn--ghost { color: var(--ink-dim); }
.btn--ghost:hover { color: var(--ink); filter: brightness(1.08); }
.btn--small { padding: 0.55em 1.2em; font-size: 0.85rem; background: rgba(22, 22, 26, 0.6); backdrop-filter: blur(12px); }
.nav .btn--small {
  --btn-fill: rgba(22, 22, 26, 0.78);
  --btn-border: 1.5px;
  color: var(--ink);
}
.btn--small:hover { filter: brightness(1.08); }
.btn--large { font-size: 1.05rem; padding: 1em 2em; }

/* ====== nav ====== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.4s, backdrop-filter 0.4s;
}
.nav.is-scrolled {
  background: rgba(5, 5, 7, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav__brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 0.4em;
}
.nav__mark {
  font-size: 0.7em;
  background: linear-gradient(120deg, var(--sweep-1), var(--sweep-3), var(--sweep-5));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav__links { display: flex; gap: 2em; font-size: 0.88rem; color: var(--ink-dim); }
.nav__links a { transition: color 0.3s; }
.nav__links a:hover { color: var(--ink); }

/* ====== hero ====== */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  padding: clamp(96px, 14vh, 160px) var(--gutter) 64px;
  gap: clamp(24px, 4vw, 64px);
  overflow: hidden;
}
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__halo {
  position: absolute;
  width: 70vmax; height: 70vmax;
  left: 50%; top: 110%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(88, 86, 214, 0.22), rgba(175, 82, 222, 0.08) 45%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; max-width: 640px; }

.hero__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.6em;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 8.5vw, 7rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.06em; }
.hero__title .word { display: inline-block; }
.hero__title em {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(100deg, var(--sweep-1) 0%, var(--sweep-2) 25%, var(--sweep-3) 52%, var(--sweep-4) 78%, var(--sweep-5) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sweep 7s ease-in-out infinite alternate;
}
@keyframes sweep {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}
.hero__sub {
  margin-top: 1.8em;
  max-width: 44ch;
  color: var(--ink-dim);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}
.hero__actions { margin-top: 2.4em; }
.hero__actions.reveal-line > span {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 16px;
}

/* word / line reveal primitives */
.reveal-line { overflow: hidden; }
.reveal-line > span { display: inline-block; }

.hero__scrollcue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 2;
}
.hero__scrollcue-line {
  display: block;
  width: 1px; height: 56px;
  background: linear-gradient(var(--ink-faint), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scrollcue-line::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 100%; height: 40%;
  background: var(--scripture);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue { to { top: 110%; } }

/* ====== phone frame (real app screenshots) ====== */
.hero__phone {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  perspective: 1400px;
}
.phone {
  width: clamp(240px, 24vw, 320px);
  border-radius: clamp(32px, 3.4vw, 44px);
  background: #0c0c0f;
  border: 1px solid rgba(235, 235, 245, 0.16);
  box-shadow:
    0 0 0 9px #0a0a0d,
    0 0 0 10px rgba(235, 235, 245, 0.1),
    0 40px 90px -20px rgba(88, 86, 214, 0.35),
    0 80px 160px -40px rgba(175, 82, 222, 0.25);
  padding: 10px;
  overflow: hidden;
}
.hero__phone .phone {
  transform: rotateY(-14deg) rotateX(6deg) rotateZ(2deg);
  transform-style: preserve-3d;
}
.phone__img {
  width: 100%;
  height: auto;
  border-radius: clamp(24px, 2.6vw, 35px);
}
/* `rotate` (not `transform`) so GSAP's transform animations never capture the tilt */
.phone--tilt-left { rotate: -2deg; }
.phone--tilt-right { rotate: 2deg; }

/* ====== marquee ====== */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.4em 0;
  overflow: hidden;
  white-space: nowrap;
  background: rgba(22, 22, 26, 0.4);
}
.marquee__track { display: inline-flex; will-change: transform; }
.marquee__track span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  color: var(--ink-faint);
  padding-right: 0.5em;
}

/* ====== feature sections ====== */
.feature {
  padding: clamp(96px, 16vh, 200px) var(--gutter);
  max-width: 1200px;
  margin: 0 auto;
}
.feature__head, .feature__copy { max-width: 720px; }
.feature__index {
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--scripture);
  margin-bottom: 1.4em;
}
.feature__index--sweep {
  background: linear-gradient(100deg, var(--sweep-1), var(--sweep-3), var(--sweep-5));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.feature__title, .details__title, .cta__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.feature__sub {
  margin-top: 1.4em;
  color: var(--ink-dim);
  max-width: 54ch;
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
}
.feature__points {
  list-style: none;
  margin-top: 2em;
}
.feature__points li {
  position: relative;
  padding: 0.65em 0 0.65em 1.8em;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.feature__points li:last-child { border-bottom: none; }
.feature__points li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--scripture);
  font-size: 0.7em;
  top: 1.1em;
}

/* two-column feature with a phone screenshot */
.feature--split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}
.feature--flip .feature__copy { order: 2; }
.feature--flip .feature__shot { order: 1; }
.feature__shot { display: flex; justify-content: center; }
.feature__shot .phone { width: clamp(240px, 26vw, 330px); }

/* split-text reveal targets; padding keeps descenders out of the clip,
   negative margin cancels the extra line height */
.split .split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.split .split-word > span { display: inline-block; }

/* read page */
.readpage {
  margin-top: clamp(48px, 8vh, 96px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  padding: clamp(32px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}
.readpage::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(ellipse at top, rgba(88, 86, 214, 0.12), transparent 65%);
  pointer-events: none;
}
.readpage__ref {
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2.2em;
}
.readpage__text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.45rem, 3.2vw, 2.4rem);
  line-height: 1.65;
  color: #eaeaf1;
  max-width: 26em;
}
.readpage__text .w { opacity: 0.12; transition: opacity 0.4s; }

/* the signature glow prompt bar */
.glowbar {
  position: relative;
  margin-top: 2.6em;
  width: 100%;
  max-width: 480px;
  height: 76px;
  border-radius: var(--r-prompt);
  isolation: isolate;
}
.glowbar__sweep {
  display: none;
}
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes rotate-angle { to { --angle: 360deg; } }
.glowbar__sweep::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: inherit;
  filter: blur(22px) saturate(1.3);
  opacity: 0.55;
  animation: breathe 3.2s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}
.glowbar__field {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: block;
  border: 1.5px solid transparent;
  background:
    linear-gradient(#101014, #101014) padding-box,
    conic-gradient(from var(--angle, 0deg), var(--sweep-1), var(--sweep-2), var(--sweep-3), var(--sweep-4), var(--sweep-5), var(--sweep-1)) border-box;
  border-radius: inherit;
  padding: 1.05em 4em 1.05em 1.4em;
  font-size: 0.98rem;
  line-height: 1.35;
  color: var(--ink-dim);
  min-height: 58px;
  max-height: 76px;
  overflow: hidden;
  animation: rotate-angle 5s linear infinite;
}
.glowbar__placeholder {
  white-space: normal;
  overflow-wrap: anywhere;
}
.glowbar__caret {
  display: inline-block;
  vertical-align: -0.18em;
  width: 1.5px; height: 1.2em;
  background: var(--scripture);
  margin-left: 2px;
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.glowbar__send {
  position: absolute;
  right: 9px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #0a0a0c;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 600;
}

/* ====== plan ====== */
.plan {
  margin-top: clamp(48px, 8vh, 96px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.plancard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px 24px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.45s;
}
.plancard:hover { transform: translateY(-6px); border-color: rgba(142, 140, 255, 0.35); }
.plancard__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--scripture);
  margin-bottom: 1em;
}
.plancard__big {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  margin-bottom: 0.5em;
}
.plancard__big span { font-size: 0.55em; color: var(--ink-faint); }
.plancard__bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(235, 235, 245, 0.08);
  overflow: hidden;
  margin-bottom: 1.2em;
}
.plancard__bar span {
  display: block;
  height: 100%;
  width: 54%; /* day 162 of 302 */
  border-radius: inherit;
  background: linear-gradient(90deg, var(--scripture-deep), var(--scripture));
}
.plancard__list { list-style: none; }
.plancard__list li {
  position: relative;
  padding: 0.45em 0 0.45em 1.9em;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.plancard__list li:last-child { border-bottom: none; }
.plancard__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1.05em; height: 1.05em;
  border-radius: 50%;
  border: 1.5px solid var(--ink-faint);
}
.plancard__list li.done { color: var(--ink-faint); }
.plancard__list li.done::before {
  background: var(--streak-2);
  border-color: var(--streak-2);
  content: "✓";
  color: #06270f;
  font-size: 0.7em;
  width: 1.5em; height: 1.5em;
  display: grid; place-items: center;
}
.plancard__quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.25rem;
  line-height: 1.45;
  color: #eaeaf1;
  margin-bottom: 0.9em;
}
.plancard__meta { font-size: 0.85rem; color: var(--ink-faint); }
.streak {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin: 0.4em 0 1em;
}
.streak span {
  aspect-ratio: 1;
  border-radius: 4px;
  background: rgba(235, 235, 245, 0.07);
}
.streak span.lit-1 { background: var(--streak-1); }
.streak span.lit-2 { background: var(--streak-2); }
.streak span.lit-3 { background: var(--streak-3); }

/* ====== details ====== */
.details {
  padding: clamp(96px, 16vh, 200px) var(--gutter);
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.details__grid {
  list-style: none;
  margin-top: clamp(40px, 7vh, 80px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-left: 1px solid var(--border);
}
.details__grid li {
  padding: 8px 28px 8px;
  border-right: 1px solid var(--border);
}
.details__grid h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
  margin-bottom: 0.6em;
}
.details__grid p { color: var(--ink-dim); font-size: 0.92rem; }

/* ====== cta ====== */
.cta {
  position: relative;
  padding: clamp(120px, 20vh, 240px) var(--gutter);
  text-align: center;
  overflow: hidden;
}
.cta__halo {
  position: absolute;
  width: 90vmax; height: 90vmax;
  left: 50%; top: 130%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(88, 86, 214, 0.3), rgba(255, 45, 85, 0.06) 50%, transparent 72%);
  pointer-events: none;
}
.cta__verse {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--ink-dim);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  margin-bottom: 2em;
}
.cta__title { position: relative; margin-bottom: 1.2em; }
.cta .btn { position: relative; }
.cta__fine {
  position: relative;
  margin-top: 1.8em;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ====== footer ====== */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.footer span:first-child { font-family: var(--serif); font-size: 1rem; color: var(--ink-dim); }

/* ====== responsive ====== */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 120px;
    gap: 56px;
  }
  .hero__inner { margin: 0 auto; }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__phone .phone { transform: none; }
  .phone { width: min(290px, 72vw); }
  .hero__scrollcue { display: none; }
  .feature--split { grid-template-columns: 1fr; }
  .feature--flip .feature__copy { order: 1; }
  .feature--flip .feature__shot { order: 2; }
  .feature__shot .phone { width: min(290px, 72vw); rotate: none; }
  .plan { grid-template-columns: 1fr; }
  .details__grid {
    grid-template-columns: 1fr;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .details__grid li {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px 4px;
  }
  .footer { flex-direction: column; text-align: center; }
}

/* ====== reduced motion ====== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain,
  .hero__scrollcue-line::after,
  .nav .btn--small,
  .btn--primary,
  .glowbar__field,
  .glowbar__sweep,
  .glowbar__sweep::after,
  .hero__title em,
  .glowbar__caret { animation: none !important; }
  .readpage__text .w { opacity: 1; }
}
