/* PlanJolly — early-access page (P4-12)
   Editorial / Digital Concierge design system. No hard borders: ambient
   shadows + tonal fills only. AAA contrast. Two type families. */

/* ---- Fonts (self-hosted, subset woff2 — no Google Fonts CDN, GDPR-clean) ---- */
@font-face {
  font-family: 'Noto Serif';
  src: url('../fonts/NotoSerif-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---- Tokens ---- */
:root {
  --bg: #faf9f8;
  --bg-warm: #fff4eb;
  --s0: #ffffff;
  --sl: #f4f3f2;
  --sh: #e9e8e7;
  --sec-cont: #f2e8e0;
  --pri: #1b3b5a;
  --pri-c: #3c5a7b;
  --sec: #d4b499;
  --warm-display: #735a43;
  --os: #1a1c1c;
  --osv: #363838;
  --err: #b3261e;
  --ok: #2e6b47;

  --ghost: rgba(27, 59, 90, 0.22);   /* navy @ 22% — inputs only */
  --radius-card: 22px;
  --radius-input: 14px;
  --radius-pill: 999px;

  --shadow-ambient: 0 4px 24px rgba(26, 28, 28, 0.06);
  --shadow-card: 0 10px 40px rgba(26, 28, 28, 0.08);
  --shadow-btn: 0 8px 22px rgba(27, 59, 90, 0.28);

  --serif: 'Noto Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--sans);
  color: var(--os);
  background: var(--bg);
  /* soft warm halo behind the hero — editorial warmth without a border */
  background-image: radial-gradient(125% 78% at 50% -8%, var(--bg-warm) 0%, var(--bg) 58%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Layout ---- */
.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(28px, 6vw, 56px) 22px clamp(24px, 5vw, 40px);
}
.shell {
  width: 100%;
  max-width: 468px;
  margin: 0;                 /* top-aligned flow now there are sections below */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---- Wordmark ---- */
.wordmark { display: block; height: 30px; width: auto; }
.wordmark svg { display: block; height: 100%; width: auto; }

/* ---- Hero illustration ---- */
.hero-art {
  width: clamp(132px, 34vw, 188px);
  height: auto;
  margin: clamp(26px, 6vw, 40px) 0 clamp(20px, 4vw, 28px);
  user-select: none;
  -webkit-user-drag: none;
}

/* ---- Headline + subhead ---- */
.headline {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--pri);
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.6px;
  margin: 0 0 14px;
}
.subhead {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--osv);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 38ch;
}

/* ---- Form card ---- */
.card {
  width: 100%;
  margin-top: clamp(28px, 6vw, 38px);
  background: var(--s0);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(20px, 5vw, 28px);
  text-align: left;
}
.field-row { display: flex; gap: 12px; }
.field { margin-bottom: 14px; flex: 1 1 0; min-width: 0; }
.field:last-of-type { margin-bottom: 0; }

label {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.2px;
  color: var(--osv);
  margin: 0 0 6px 2px;
}
label .opt { font-weight: 400; opacity: 0.7; }

input[type="text"],
input[type="email"] {
  width: 100%;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;             /* >=16px stops iOS focus zoom */
  color: var(--os);
  background: var(--s0);
  border: 1px solid var(--ghost);
  border-radius: var(--radius-input);
  padding: 13px 15px;
  line-height: 1.3;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder { color: #9aa0a0; font-weight: 400; }
input:hover { border-color: rgba(27, 59, 90, 0.34); }
input:focus {
  outline: none;
  border-color: var(--pri);
  box-shadow: 0 0 0 3px rgba(27, 59, 90, 0.12);
}
input:disabled { background: var(--sl); color: var(--osv); }

/* invalid only after a submit attempt (set via JS) */
form.was-validated input:invalid { border-color: var(--err); }

/* honeypot — visually gone, off-screen, not tabbable */
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---- Button ---- */
.btn {
  width: 100%;
  margin-top: 18px;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  color: #fff;
  background: linear-gradient(90deg, var(--pri) 0%, var(--pri-c) 100%);
  border-radius: var(--radius-pill);
  padding: 15px 22px;
  box-shadow: var(--shadow-btn);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(27, 59, 90, 0.34); }
.btn:active { transform: translateY(1px) scale(0.992); }
.btn:focus-visible { outline: 3px solid rgba(27, 59, 90, 0.4); outline-offset: 2px; }
.btn[disabled] { cursor: progress; filter: saturate(0.9) brightness(0.98); }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Status line + success ---- */
.status {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 14px 2px 0;
  min-height: 0;
}
.status.is-error { color: var(--err); }

.success { text-align: center; padding: 6px 4px 4px; }
.success .check {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%;
  background: #e6f2ec;            /* forest 100 */
  display: grid; place-items: center;
}
.success .check svg { width: 26px; height: 26px; }
.success h2 {
  font-family: var(--serif); font-weight: 700;
  color: var(--pri); font-size: 22px; line-height: 1.2; margin: 0 0 8px;
}
.success p {
  font-family: var(--sans); font-weight: 400;
  color: var(--osv); font-size: 15px; line-height: 1.6; margin: 0 auto; max-width: 34ch;
}

/* ---- Reassurance + footer ---- */
.reassurance {
  display: flex; align-items: flex-start; justify-content: center; gap: 7px;
  font-family: var(--sans); font-weight: 400;
  font-size: 13px; line-height: 1.5; color: var(--osv);
  margin: clamp(18px, 4vw, 22px) auto 0; max-width: 40ch;
}
/* top-align with the first line: nudge the 14px icon onto that line's centre */
.reassurance svg { width: 14px; height: 14px; flex: none; opacity: 0.85; margin-top: 2.75px; }

.footer {
  width: 100%;
  margin-top: clamp(32px, 7vw, 52px);
  text-align: center;
  font-family: var(--sans); font-weight: 400;
  font-size: 12px; line-height: 1.7; color: var(--osv);
}
.footer a { color: var(--pri); text-decoration: none; font-weight: 500; }
.footer a:hover { text-decoration: underline; }
.footer .dot { opacity: 0.4; margin: 0 8px; }

.noscript {
  margin-top: 16px; padding: 12px 14px;
  background: var(--sec-cont); border-radius: var(--radius-input);
  font-size: 13px; color: var(--warm-display); text-align: center;
}

/* ---- "What you'll be testing" feature cards ---- */
.features {
  width: 100%;
  max-width: 768px;
  margin: clamp(36px, 8vw, 56px) auto 0;
}
.features-head {
  text-align: center;
  margin: 0 auto clamp(20px, 4vw, 28px);
  max-width: 26ch;
}
.features-kicker {
  font-family: var(--sans); font-weight: 600;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--warm-display); margin: 0 0 8px;
}
.features-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(21px, 5.2vw, 27px); line-height: 1.22;
  letter-spacing: -0.4px; color: var(--pri); margin: 0;
}
/* subtle tan heart divider above the section */
.divider { display: flex; justify-content: center; margin: 0 0 clamp(20px, 4vw, 28px); }
.divider svg { width: 132px; height: auto; display: block; }
.feature-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.feature-card {
  background: var(--s0); border-radius: 18px;
  box-shadow: var(--shadow-card); padding: 22px 20px; text-align: left;
}
.feature-card .ico {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--sec-cont);
  display: grid; place-items: center; margin-bottom: 14px;
}
.feature-card .ico svg { width: 22px; height: 22px; }
.feature-card h3 {
  font-family: var(--sans); font-weight: 600;
  font-size: 15px; line-height: 1.3; color: var(--os); margin: 0 0 6px;
}
.feature-card p {
  font-family: var(--sans); font-weight: 400;
  font-size: 13.5px; line-height: 1.55; color: var(--osv); margin: 0;
}
@media (max-width: 600px) {
  .feature-cards { grid-template-columns: 1fr; gap: 12px; }
  .feature-card { padding: 18px; }
}

/* ---- Legal pages ---- */
.legal {
  max-width: 720px; margin: 0 auto;
  padding: clamp(32px, 7vw, 64px) 22px clamp(48px, 8vw, 88px);
}
.legal .back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--pri);
  text-decoration: none; margin-bottom: 28px;
}
.legal .back:hover { text-decoration: underline; }
.legal .doc-title {
  font-family: var(--serif); font-weight: 700; color: var(--pri);
  font-size: clamp(28px, 6vw, 36px); line-height: 1.15; letter-spacing: -0.5px;
  margin: 8px 0 6px;
}
.legal .updated { font-size: 12.5px; color: var(--osv); margin: 0 0 24px; }
.legal .intro {
  font-size: 16px; line-height: 1.65; color: var(--osv);
  background: var(--s0); border-radius: var(--radius-input);
  box-shadow: var(--shadow-ambient); padding: 18px 20px; margin: 0 0 30px;
}
.legal h2 {
  font-family: var(--serif); font-weight: 700; color: var(--pri);
  font-size: 19px; line-height: 1.3; margin: 30px 0 10px;
}
.legal p { font-size: 15.5px; line-height: 1.7; color: var(--osv); margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal li { font-size: 15.5px; line-height: 1.7; color: var(--osv); margin: 0 0 8px; }
.legal a { color: var(--pri); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
