/* With Him — shared design system
   Direction: reverent, calm, dark-first. The app is used at 6am in a dark room
   and mid-scroll at night, so the site is lit like the app: deep ink ground,
   parchment text, one warm accent the colour of first light. */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,300;1,6..72,400&family=Inter:wght@400;500;600&display=swap');

:root {
  /* ground */
  --ink:            #0A0C11;
  --ink-2:          #11141C;
  --ink-3:          #171B25;

  /* text */
  --parchment:      #F2EDE4;
  --parchment-70:   rgba(242, 237, 228, 0.70);
  --parchment-50:   rgba(242, 237, 228, 0.50);
  --parchment-32:   rgba(242, 237, 228, 0.32);

  /* accent — dawn */
  --dawn:           #E8A94B;
  --dawn-soft:      #F2C782;
  --dawn-deep:      #B87A24;
  --dawn-glow:      rgba(232, 169, 75, 0.16);

  /* states */
  --sage:           #7FA98A;   /* verified / success */
  --sage-glow:      rgba(127, 169, 138, 0.14);
  --ember:          #C96A4F;   /* alarm / friction */

  --line:           rgba(242, 237, 228, 0.09);
  --line-strong:    rgba(242, 237, 228, 0.16);

  /* type */
  --serif:  'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* metrics */
  --container: 1120px;
  --reading:   660px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- type ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }

p { margin: 0 0 1.15em; text-wrap: pretty; }

.lede {
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  line-height: 1.6;
  color: var(--parchment-70);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dawn);
  margin: 0 0 1.1rem;
}

.dim   { color: var(--parchment-70); }
.dimmer{ color: var(--parchment-50); }

/* Scripture is always set in the serif, always at rest. */
.scripture {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.5;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.ref {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dawn);
}

a { color: var(--dawn); text-decoration: none; }
a:hover { color: var(--dawn-soft); }

/* ---------- layout ---------- */

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.reading   { max-width: var(--reading); margin-left: auto; margin-right: auto; }

section { position: relative; padding: clamp(72px, 11vw, 132px) 0; }
.section-tight { padding: clamp(48px, 7vw, 80px) 0; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 17px 34px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease);
  text-align: center;
  line-height: 1.2;
}

.btn-primary {
  background: linear-gradient(180deg, var(--dawn-soft), var(--dawn));
  color: #2A1B06;
  box-shadow: 0 1px 0 rgba(255,255,255,0.30) inset,
              0 10px 34px -10px rgba(232,169,75,0.55);
}
.btn-primary:hover {
  color: #2A1B06;
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.30) inset,
              0 16px 44px -12px rgba(232,169,75,0.70);
}

.btn-ghost {
  background: transparent;
  color: var(--parchment);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  color: var(--parchment);
  border-color: var(--parchment-32);
  background: rgba(242,237,228,0.035);
  transform: translateY(-2px);
}

.btn-lg { padding: 20px 42px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-note {
  font-size: 0.84rem;
  color: var(--parchment-50);
  margin-top: 14px;
}

/* ---------- surfaces ---------- */

.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3.4vw, 38px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 17px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: rgba(242,237,228,0.035);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--parchment-70);
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dawn);
  box-shadow: 0 0 0 4px var(--dawn-glow);
}

/* ---------- phone frame ---------- */

.phone {
  position: relative;
  width: 300px;
  aspect-ratio: 300 / 620;
  border-radius: 46px;
  padding: 11px;
  background: linear-gradient(160deg, #2A2F3B, #0E1117 42%, #262B36);
  box-shadow: 0 50px 100px -30px rgba(0,0,0,0.85),
              0 0 0 1px rgba(242,237,228,0.07);
  flex: none;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 36px;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone-notch {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 25px; border-radius: var(--r-pill);
  background: #05070A; z-index: 5;
}

/* ---------- atmosphere ---------- */

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.glow-dawn { background: rgba(232,169,75,0.13); }
.glow-sage { background: rgba(127,169,138,0.10); }

.grain::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 260 260' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- forms ---------- */

.field {
  width: 100%;
  padding: 17px 20px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--parchment);
  background: var(--ink-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field::placeholder { color: var(--parchment-32); }
.field:focus {
  border-color: var(--dawn);
  box-shadow: 0 0 0 4px var(--dawn-glow);
}
.field-error { border-color: var(--ember); }

/* ---------- nav / footer ---------- */

.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,12,17,0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--parchment);
  display: inline-flex; align-items: center; gap: 10px;
}
.wordmark:hover { color: var(--parchment); }
.wordmark .mark {
  width: 24px; height: 14px;
  filter: drop-shadow(0 0 7px rgba(232, 169, 75, 0.45));
}
/* The mark is masked rather than inlined so all eight wordmarks stay one file,
   and painted on a child so the glow sits outside the mask instead of being
   clipped away by it. */
.wordmark .mark::before {
  content: ""; display: block; width: 100%; height: 100%;
  background: var(--dawn);
  -webkit-mask: url(mark.svg) center / contain no-repeat;
          mask: url(mark.svg) center / contain no-repeat;
}

footer {
  border-top: 1px solid var(--line);
  padding: 54px 0 40px;
  color: var(--parchment-50);
  font-size: 0.88rem;
}
footer a { color: var(--parchment-70); }
footer a:hover { color: var(--parchment); }

/* ---------- motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- a11y ---------- */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--dawn); outline-offset: 3px; border-radius: 4px; }

/* ---------- responsive ---------- */

@media (max-width: 780px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .btn { padding: 16px 28px; }
  .btn-lg { padding: 18px 32px; font-size: 1rem; }
  .phone { width: 268px; }
}

/* The live-app funnel is a light editorial surface. Legal/support pages retain
   their original dark treatment until they are redesigned separately. */
body.funnel-v2 {
  --ink: #F5EFE4;
  --ink-2: #FBF7F0;
  --ink-3: #EDE3D1;
  --parchment: #17181D;
  --parchment-70: #45443F;
  --parchment-50: #625D53;
  --parchment-32: #6B655B;
  --dawn: #8A5A12;
  --dawn-soft: #B87A24;
  --dawn-deep: #6B450B;
  --dawn-glow: rgba(232, 169, 75, 0.2);
  --line: #E2D6C1;
  --line-strong: #CDBB9C;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --container: 1160px;
  --reading: 700px;
  background: var(--ink);
}
.funnel-v2 [id] { scroll-margin-top: 86px; }
.funnel-v2 h1, .funnel-v2 h2, .funnel-v2 h3 { letter-spacing: -0.025em; }
.funnel-v2 h1 { font-size: clamp(3.4rem, 6.7vw, 6rem); line-height: 1.02; }
.funnel-v2 h2 { font-size: clamp(2.4rem, 4.4vw, 4.4rem); line-height: 1.08; }
.funnel-v2 h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.funnel-v2 .eyebrow { color: var(--dawn); letter-spacing: 0.13em; }
.funnel-v2 .btn { min-height: 48px; white-space: nowrap; }
.funnel-v2 .btn-primary {
  background: #17181D;
  border-color: #17181D;
  color: #F5EFE4;
  box-shadow: 0 14px 30px -14px rgba(23, 24, 29, 0.55);
}
.funnel-v2 .btn-primary:hover {
  background: #303138;
  color: #F5EFE4;
  box-shadow: 0 18px 36px -16px rgba(23, 24, 29, 0.6);
}
.funnel-v2 .btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--parchment);
}
.funnel-v2 .btn-ghost:hover { color: var(--parchment); background: #f2eee5; }
.funnel-v2 .card { background: var(--ink-2); border-color: var(--line); border-radius: 16px; }
.funnel-v2 .nav {
  background: rgba(245, 239, 228, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.funnel-v2 .nav-inner { height: 80px; }
.funnel-v2 .wordmark, .funnel-v2 .wordmark:hover { color: var(--parchment); }
.funnel-v2 .wordmark .mark { width: 32px; height: 19px; filter: none; }
.funnel-v2 .wordmark .mark::before { background: #B87A24; }
.funnel-v2 footer { color: var(--parchment-50); }
.funnel-v2 footer a { color: var(--parchment-70); }
.funnel-v2 footer a:hover { color: var(--parchment); }
.funnel-v2 .field { color: var(--parchment); background: var(--ink-2); }
.funnel-v2 .field::placeholder { color: var(--parchment-50); }
.funnel-v2 .grain::after, .funnel-v2.grain::after { display: none; }
.funnel-v2 .glow { display: none; }
.funnel-v2 :focus-visible { outline-color: var(--dawn-deep); }
@media (max-width: 780px) {
  .funnel-v2 .btn { white-space: normal; }
  .funnel-v2 h1 { font-size: clamp(3rem, 12vw, 4.2rem); }
}
