/* Living Well at Home Study: shared styles for the index, privacy and thank-you pages. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --paper:       #faf8f3;
  --paper-deep:  #f1eee6;
  --tint:        #e6eeeb;
  --ink:         #1e2629;
  --ink-muted:   #4a5559;
  --accent:      #2e5e66;
  --accent-ink:  #ffffff;
  --line:        #d6d2c7;
  --field-line:  #7f8580;
  --error:       #a3321f;
  --focus:       #2e5e66;

  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #141a1c;
    --paper-deep: #1b2326;
    --tint:       #1c2a2c;
    --ink:        #eceeea;
    --ink-muted:  #a9b3b2;
    --accent:     #9cc8cd;
    --accent-ink: #10181a;
    --line:       #33403f;
    --field-line: #6d7c7b;
    --error:      #f0937f;
    --focus:      #9cc8cd;
  }
}

* { box-sizing: border-box; }

html { font-size: 112.5%; } /* 18px base */

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------------- header */

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px;
}
.wordmark {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.header-link { font-size: 1rem; padding: 12px 0; }

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

h1, h2 { line-height: 1.15; letter-spacing: -0.015em; margin: 0; }

h1 {
  font-size: clamp(2.4rem, 8.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
h1 { max-width: 16ch; text-wrap: balance; }
h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }

p { margin: 0 0 16px; }

.lede { font-size: 1.2rem; color: var(--ink); margin-top: 24px; max-width: 34em; }
.small { font-size: 1rem; color: var(--ink-muted); }

/* ------------------------------------------------------------------ hero */

.hero { padding: 32px 0 72px; }
.home-drawing { display: block; width: 156px; height: auto; margin-bottom: 36px; color: var(--accent); }
.home-drawing .fill { fill: var(--tint); }

.stage {
  margin-top: 20px; padding-left: 14px;
  border-left: 3px solid var(--accent);
  font-size: 1rem; color: var(--ink-muted);
}

.button {
  display: inline-block;
  margin-top: 28px;
  min-height: 56px; padding: 15px 26px;
  font: inherit; font-size: 1.05rem; font-weight: 700; line-height: 1.4;
  color: var(--accent-ink); background: var(--accent);
  border: 2px solid var(--accent); border-radius: 10px;
  text-decoration: none; cursor: pointer;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }
.button-quiet { color: var(--accent); background: transparent; }
.call { margin-top: 12px; font-size: 1.05rem; }
.call a { display: inline-block; font-weight: 700; padding: 10px 0; }

/* -------------------------------------------------------------- sections */

.section { padding: 48px 0; border-top: 1px solid var(--line); }

.story { background: var(--tint); border-top: 0; padding: 64px 0; }
.story figure { margin: 0; }
.story blockquote { position: relative; padding-top: 40px; }
.story blockquote::before {
  content: "\201C"; position: absolute; top: -18px; left: -4px;
  font-size: 5.5rem; line-height: 1; font-weight: 700; color: var(--accent);
}
.story blockquote {
  margin: 0; font-size: 1.35rem; line-height: 1.55;
}
.story blockquote p { margin-bottom: 12px; }
.founders { display: flex; align-items: center; margin-top: 24px; color: var(--ink-muted); font-size: 1rem; line-height: 1.4; }
.founders strong { color: var(--ink); }
.initials {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--paper); color: var(--accent);
  border: 2px solid var(--accent); font-weight: 700; font-size: 1rem;
}
.initials + .initials { margin-left: -12px; }
.founders .names { margin-left: 16px; }
.story .team { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); color: var(--ink-muted); }

.promises { list-style: none; margin: 0; padding: 0; }
.promises li {
  position: relative;
  padding: 12px 0 12px 36px;
  border-bottom: 1px solid var(--line);
}
.promises li:last-child { border-bottom: 0; }
.promises li { padding-left: 44px; }
.promises li::after {
  content: ""; position: absolute; left: 0; top: 13px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--tint);
}
.promises li::before {
  content: ""; position: absolute; left: 8px; top: 21px; z-index: 1;
  width: 12px; height: 7px;
  border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}

/* ------------------------------------------------------------------ form */

.signup { background: var(--paper-deep); border-top: 0; }
.signup .wrap { padding-top: 8px; padding-bottom: 8px; }

form { margin-top: 24px; }
.field { margin-bottom: 22px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 520px) { .field-pair { grid-template-columns: 1fr; } }

label, legend { display: block; font-weight: 700; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--ink-muted); }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; min-height: 54px; padding: 12px 14px;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid var(--field-line); border-radius: 8px;
}
input:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
textarea { min-height: 120px; resize: vertical; }

fieldset { border: 0; margin: 0 0 22px; padding: 0; }
.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 14px; margin: 0;
  font-weight: 400;
  background: var(--paper); border: 2px solid var(--field-line); border-radius: 8px;
  cursor: pointer;
}
.choice input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.choice:has(input:checked) { border-color: var(--accent); }

.form-note { margin-top: 14px; }

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

.site-footer { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 1rem; }
.site-footer p { margin-bottom: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 0; margin: 0 0 16px; list-style: none; }
.footer-links a { display: inline-block; padding: 8px 0; }

/* ----------------------------------------------------------- plain pages */

.page { padding: 32px 0 64px; }
.page h1 { font-size: 2.2rem; max-width: none; margin-bottom: 24px; }
.page h2 { font-size: 1.25rem; margin: 32px 0 8px; }


.story + .section { border-top: 0; }
.signup + .section { border-top: 0; }
.form-error { margin-top: 14px; padding: 12px 14px; border-left: 4px solid var(--error); background: var(--paper); color: var(--ink); }
.button:disabled { opacity: .7; cursor: wait; }
.field-error { margin: 8px 0 0; color: var(--error); font-weight: 700; font-size: 1rem; }
fieldset .field-error { margin: 0 0 8px; }
.hint { margin: 0 0 6px; font-size: 1rem; color: var(--ink-muted); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent-note { margin: 4px 0 16px; color: var(--ink-muted); }
.values { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.values li {
  padding: 18px 20px; border-left: 4px solid var(--accent);
  background: var(--tint); border-radius: 0 10px 10px 0;
  font-size: 1.15rem; line-height: 1.5;
}
.values strong { display: block; font-size: 1.25rem; margin-bottom: 2px; }
