/* Ported from blog.malachidaily.com/subscribe — same type, palette and
   proportions, so Phase 1's measurement isn't contaminated by a redesign. */

:root {
  /* Light only. The page is white in every context — matching the original,
     and stopping the browser from re-tinting form controls in dark mode. */
  color-scheme: light;

  --ink: #222222;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #5d5df0;
  --brand-hover: #4f4fd9;
  --grad-from: #945df0;
  --grad-to: #65c8ef;
  --bg: #ffffff;
  --danger: #b42318;
  --radius: 6px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
  text-align: center;
}

main { width: 100%; max-width: 680px; }

.logo { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 28px; }

h1 {
  font-size: clamp(30px, 5.6vw, 46px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  /* Even line lengths instead of a long line and a one-word orphan. */
  text-wrap: balance;
}

/* Each sentence owns its own block at every width, so "Memorize Scripture."
   always holds the top line. Balance then splits the longer second sentence
   evenly instead of stranding a single word. */
.hl { display: block; text-wrap: balance; }

.grad {
  background: linear-gradient(90deg, var(--grad-from) 0%, var(--grad-to) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Wide enough that "Memorize 1 Bible verse & learn its context every week via
   email." holds one line on desktop. The only intended break is the <br>. */
.lede {
  font-size: clamp(16px, 4.2vw, 18px);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
  margin: 0 auto 26px;
  max-width: 620px;
}

/* Desktop: the offer on one line, the social proof on its own beneath it.
   Mobile: they run together, since a short line on its own reads as stranded
   at that width. Same block/inline trick as the headline. */
.ls { display: block; }

/* Narrower than the text column — a field sized to the content it holds reads
   as a signup form; one stretched to the full measure reads as a search bar. */
form {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 460px;
  margin: 0 auto;
}

input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 11px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

input[type="email"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(93, 93, 240, 0.15);
}

button[type="submit"] {
  padding: 11px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

button[type="submit"]:hover { background: var(--brand-hover); }
button[type="submit"]:disabled { opacity: 0.65; cursor: default; }

.fineprint { font-size: 12px; color: var(--muted); margin-top: 14px; }

/* Mobile: most traffic lands here, and everything has to clear the fold.
   Tighten the vertical rhythm and give the button its own full-width row
   rather than letting it wrap into an awkward half-line. */
@media (max-width: 560px) {
  body { padding: 24px 18px; }
  .logo { width: 48px; height: 48px; margin-bottom: 20px; }
  h1 { margin-bottom: 12px; }
  .lede { margin-bottom: 20px; }
  .ls { display: inline; }
  form { flex-direction: column; gap: 10px; }
  input[type="email"], button[type="submit"] { width: 100%; flex: 0 0 auto; }
  button[type="submit"] { padding: 13px 22px; }
}

/* Typo suggestion. Deliberately quiet — advice, not an error. */
.typo-hint {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink);
}

.typo-accept {
  font: inherit;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.typo-fixed { color: var(--muted); font-size: 13px; }

.form-error { margin-top: 12px; font-size: 14px; color: var(--danger); }

/* Thank-you pages */
.panel { max-width: 520px; margin: 0 auto; }
.panel h1 { font-size: clamp(24px, 4.4vw, 32px); }
.panel p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* The instruction that introduces the steps reads as part of them, not as
   supporting text — so it takes the body colour, not the muted one. */
/* Extra air between the last step and the sender note, so step 3 does not read
   as running into the fine print. */
.fineprint-spaced { margin-top: 34px; }
.fineprint a { color: var(--brand); }

.panel p.lead-dark {
  color: var(--ink);
  font-size: clamp(15px, 4vw, 17px);
}
.steps { text-align: left; margin: 24px auto 0; padding-left: 20px; max-width: 420px; }
.steps li { font-size: 15px; line-height: 1.7; color: var(--ink); margin-bottom: 10px; }
.cta {
  display: inline-block;
  margin-top: 26px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border-radius: var(--radius);
  text-decoration: none;
}
.cta:hover { background: var(--brand-hover); }

/* Gift page headline: one line at every width. Tighter tracking buys back the
   space the larger size costs, so it still fits a 375px phone unwrapped. */
.gift-title {
  white-space: nowrap;
  letter-spacing: -0.04em;
  /* Measured: this string renders ~9.3x the font size in width, against a line
     of viewport-minus-36px. Sized in px per breakpoint rather than vw so the
     result is deterministic. 34px needs 317px and a 375px phone offers 339px. */
  font-size: 34px;
}

@media (max-width: 361px) {
  /* 320px phones offer 284px; 29px needs 270px. */
  .gift-title { font-size: 29px; }
}

@media (min-width: 561px) {
  .gift-title { font-size: 54px; }
}

/* Document preview. Cropped to the top of the page and faded out at the bottom,
   so it suggests depth without costing the vertical space a full-page thumbnail
   would take on a phone. */
.doc-preview {
  position: relative;
  margin: 26px auto 0;
  max-width: 330px;
  max-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(17, 20, 45, 0.13), 0 2px 6px rgba(17, 20, 45, 0.06);
  background: #fff;
}

.doc-preview img { display: block; width: 100%; height: auto; }

/* Fades the crop edge instead of ending in a hard cut. */
.doc-preview::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
  pointer-events: none;
}

@media (max-width: 560px) {
  .doc-preview { max-width: 270px; max-height: 190px; margin-top: 22px; }
}

/* Download button: a full-width tap target on phones, where most of this
   traffic lands, and comfortably above 44px tall either way. */
.cta-download {
  margin-top: 30px;
  padding: 16px 32px;
  font-size: 17px;
  border-radius: 10px;
}

@media (max-width: 560px) {
  .cta-download { display: block; width: 100%; padding: 17px 20px; }
}

