/* FunderTrail — one stylesheet, no external fonts or assets. */

:root {
  /* palette: warm paper neutrals + one ink-blue accent */
  --paper: #faf8f5;
  --paper-2: #f3f0ea;
  --white: #ffffff;
  --ink-900: #1c1f24;
  --ink-600: #555b64;
  --ink-300: #d9d4ca;
  --ink-200: #e6e1d8;
  --blue-700: #2b4a9b;
  --blue-800: #213b7e;
  --blue-50: #ebeff8;
  --green-700: #1f6a47;
  --green-50: #e8f3ec;
  --red-700: #a3302b;
  --red-50: #fbecea;

  /* semantic */
  --bg: var(--paper);
  --bg-alt: var(--paper-2);
  --surface: var(--white);
  --text: var(--ink-900);
  --text-muted: var(--ink-600);
  --border: var(--ink-200);
  --border-strong: var(--ink-300);
  --accent: var(--blue-700);
  --accent-hover: var(--blue-800);
  --accent-soft: var(--blue-50);
  --on-accent: #ffffff;
  --ok: var(--green-700);
  --ok-soft: var(--green-50);
  --err: var(--red-700);
  --err-soft: var(--red-50);
  --skeleton: #e9e4da;

  /* type */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, Cambria, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-sm: 0.875rem;   /* 14 */
  --fs-base: 1rem;     /* 16 */
  --fs-lead: 1.125rem; /* 18 */
  --fs-h3: 1.25rem;    /* 20 */
  --fs-h2: clamp(1.625rem, 1.2rem + 1.6vw, 2rem);      /* 26–32 */
  --fs-h1: clamp(2.125rem, 1.4rem + 3.2vw, 3.25rem);   /* 34–52 */

  /* space: 4/8 grid */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-1: 0 1px 2px rgba(28, 31, 36, 0.06), 0 4px 16px rgba(28, 31, 36, 0.06);
  --dur: 180ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --container: 1080px;
  --prose: 65ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-alt: #191c21;
    --surface: #1d2026;
    --text: #e8e6e1;
    --text-muted: #a6abb3;
    --border: #2d3138;
    --border-strong: #3a3f47;
    --accent: #93acee;
    --accent-hover: #b1c4f4;
    --accent-soft: #1f2a45;
    --on-accent: #10172b;
    --ok: #7cc79e;
    --ok-soft: #16271e;
    --err: #f09a94;
    --err-soft: #2e1a19;
    --skeleton: #2a2e35;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-base)/1.6 var(--font-sans);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; color: var(--text); margin: 0; }
h1 { font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -0.015em; }
h2 { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
p { margin: 0; }
p + p { margin-top: var(--s-4); }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s-4); }
@media (min-width: 640px) { .container { padding: 0 var(--s-5); } }
.prose { max-width: var(--prose); }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-sm); }
.eyebrow {
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-muted);
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 10;
  background: var(--surface); color: var(--text); padding: var(--s-2) var(--s-4);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.skip:focus { top: var(--s-4); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); min-height: 64px;
}
.wordmark {
  font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem;
  color: var(--text); text-decoration: none; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: var(--s-2);
}
.wordmark:hover { color: var(--text); }
.wordmark svg { width: 22px; height: 22px; color: var(--accent); }
.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav a:not(.btn) { color: var(--text-muted); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; }
.nav a:not(.btn):hover { color: var(--text); }
.nav .nav-links { display: none; gap: var(--s-5); }
@media (min-width: 760px) { .nav .nav-links { display: flex; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5);
  font: 600 var(--fs-base)/1 var(--font-sans);
  border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface); color: var(--text); border-color: var(--text-muted); }
.btn-sm { min-height: 40px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- hero ---------- */
.hero { padding: var(--s-8) 0 var(--s-8); }
.hero-grid { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 900px) {
  .hero { padding: var(--s-9) 0; }
  .hero-grid { grid-template-columns: 1.15fr 1fr; gap: var(--s-8); }
}
.hero h1 { margin-top: var(--s-3); max-width: 15ch; }
.hero .lead { margin-top: var(--s-5); font-size: var(--fs-lead); color: var(--text-muted); max-width: 52ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero .fine { margin-top: var(--s-4); }

/* the anatomy card: shows the structure of one entry, no data */
.anatomy {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1); padding: var(--s-5); margin: 0;
}
.anatomy-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-3); align-items: baseline; }
.anatomy-label span:last-child { font-size: var(--fs-sm); color: var(--text-muted); }
.entry { margin-top: var(--s-4); border-top: 1px solid var(--border); padding-top: var(--s-4); }
.field { display: grid; grid-template-columns: 9.5rem 1fr; gap: var(--s-3); align-items: center; padding: var(--s-2) 0; }
.field dt { font-size: var(--fs-sm); color: var(--text-muted); }
.field dd { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.bar { display: block; height: 10px; border-radius: 3px; background: var(--skeleton); }
.bar.w-90 { width: 90%; } .bar.w-75 { width: 75%; } .bar.w-60 { width: 60%; }
.bar.w-45 { width: 45%; } .bar.w-30 { width: 30%; }
.bar.strong { height: 14px; background: var(--border-strong); }
.anatomy-note { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--text-muted); }
@media (max-width: 420px) { .field { grid-template-columns: 1fr; gap: var(--s-1); } }

/* ---------- sections ---------- */
.section { padding: var(--s-8) 0; border-top: 1px solid var(--border); }
@media (min-width: 900px) { .section { padding: var(--s-9) 0; } }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: var(--prose); margin-bottom: var(--s-6); }
.section-head p { margin-top: var(--s-3); color: var(--text-muted); font-size: var(--fs-lead); }

.split { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--s-8); } }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding: var(--s-3) 0 var(--s-3) var(--s-6); border-bottom: 1px solid var(--border); }
.checklist li:first-child { padding-top: 0; }
.checklist li:first-child::before { top: 4px; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: calc(var(--s-3) + 4px);
  width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.checklist strong { font-weight: 600; }

.not-list { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); border-left: 3px solid var(--border-strong); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.not-list p { color: var(--text-muted); }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-7); } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border-strong); font: 600 var(--fs-sm)/1 var(--font-sans); color: var(--accent);
  margin-bottom: var(--s-3);
}
.steps h3 { margin-bottom: var(--s-2); }
.steps p { color: var(--text-muted); }

/* sample slot */
.sample-slot {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: var(--s-7) var(--s-5); text-align: center; background: var(--surface);
}
.sample-slot strong { display: block; font-family: var(--font-serif); font-size: var(--fs-h3); }
.sample-slot p { margin-top: var(--s-2); color: var(--text-muted); }

/* pricing */
.pricing { display: grid; gap: var(--s-5); align-items: start; }
@media (min-width: 900px) { .pricing { grid-template-columns: 1.4fr 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s-6); }
.plan.main { border-color: var(--accent); box-shadow: var(--shadow-1); }
.plan .price { font-family: var(--font-serif); font-size: 2.75rem; line-height: 1; margin-top: var(--s-3); letter-spacing: -0.02em; }
.plan .price span { font-family: var(--font-sans); font-size: var(--fs-base); color: var(--text-muted); letter-spacing: 0; margin-left: var(--s-1); }
.plan .who { margin-top: var(--s-2); color: var(--text-muted); }
.plan .checklist { margin-top: var(--s-5); }
.plan .btn { margin-top: var(--s-5); width: 100%; }
.plan.add .price { font-size: 2rem; }
.free-line {
  margin-bottom: var(--s-5); padding: var(--s-4) var(--s-5); border-radius: var(--radius);
  background: var(--accent-soft); color: var(--text);
}

/* faq */
.faq { max-width: 760px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: var(--s-5) var(--s-7) var(--s-5) 0; position: relative;
  font-weight: 600; font-size: var(--fs-lead); line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: var(--s-2); top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: translateY(-75%) rotate(45deg); transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq .answer { padding: 0 0 var(--s-5); color: var(--text-muted); max-width: var(--prose); }

/* form */
.form-wrap { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .form-wrap { grid-template-columns: 1fr 1.2fr; gap: var(--s-8); } }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s-6) var(--s-5); box-shadow: var(--shadow-1); }
@media (min-width: 640px) { .form-card { padding: var(--s-6); } }
.field-row { margin-bottom: var(--s-5); }
.field-row label { display: block; font-weight: 600; margin-bottom: var(--s-1); }
.field-row .hint { display: block; font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--s-2); }
.input {
  width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3);
  font: 400 var(--fs-base)/1.5 var(--font-sans); color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
textarea.input { min-height: 96px; resize: vertical; }
.input:hover { border-color: var(--text-muted); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--err); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--err-soft); }
.field-error { display: block; margin-top: var(--s-1); font-size: var(--fs-sm); color: var(--err); min-height: 0; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--radius); font-size: var(--fs-sm); }
.form-status:empty { display: none; }
.form-status.error { background: var(--err-soft); color: var(--err); }
.form-success { text-align: left; }
.form-success h3 { color: var(--ok); }
.form-success p { margin-top: var(--s-3); color: var(--text-muted); }
.consent { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--text-muted); }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: var(--s-7) 0; font-size: var(--fs-sm); color: var(--text-muted); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* legal pages */
.legal { padding: var(--s-8) 0; }
.legal h1 { font-size: var(--fs-h2); }
.legal .updated { margin-top: var(--s-2); color: var(--text-muted); font-size: var(--fs-sm); }
.legal h2 { font-size: var(--fs-h3); margin-top: var(--s-7); margin-bottom: var(--s-3); }
.legal ul { padding-left: var(--s-5); margin: var(--s-3) 0 0; }
.legal li + li { margin-top: var(--s-2); }
.legal p, .legal li { color: var(--text); }

/* utilities */
.mt-4 { margin-top: var(--s-4); }
.btn-block { width: 100%; }

/* added: contact + order-details pages, pricing actions */
[hidden] { display: none !important; }
.page { padding: var(--s-8) 0; }
.page h1 { font-size: var(--fs-h2); margin-top: var(--s-2); }
.page .eyebrow + h1 { margin-top: var(--s-3); }
.form-success h2 { font-size: var(--fs-h3); color: var(--ok); }
.field-row label .optional { font-weight: 400; color: var(--text-muted); }
.plan-actions { display: grid; gap: var(--s-3); margin-top: var(--s-5); }
.plan .plan-actions .btn { margin-top: 0; }
.plan-note { margin-top: var(--s-3); }
.need-list { margin: var(--s-4) 0 0; padding-left: var(--s-5); color: var(--text-muted); }
.need-list li + li { margin-top: var(--s-2); }
