/* familydocs.net. Family Docs Style Guide v2: one quiet, centered page on
   navy; the mockup (Marketing\Site Mockups\familydocs-home.html) wins on
   layout. Use only the variables below. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colors */
  --navy: #1B2A41;          /* page background; text on white */
  --harbor: #2F5D8A;        /* Send button, links and focus ring on white */
  --harbor-hover: #284F76;
  --harbor-light: #9DBEE0;  /* professionals list, focus ring on navy; never text on white */
  --amber: #D9822B;         /* small accents only: rule, dots, arrow */
  --muted: #4A586D;         /* secondary text inside white cards */
  --field: #8A96A8;
  --foot: #D3DAE3;          /* small text on navy */
  --white: #FFFFFF;

  /* Fonts */
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif;

  /* Sizes */
  --wrap: 1120px;
  --card: 680px;
  --gutter: 24px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--navy);
  color: var(--white);
  font: 1.0625rem/1.6 var(--font-body);
}
main { flex: 1 0 auto; }

h1, h2 { margin: 0; font-family: var(--font-head); font-weight: 700; }

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

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

.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 600px) {
  :root { --gutter: 16px; }
}

.skip { position: absolute; left: -9999px; top: 12px; padding: 8px 16px; background: var(--white); color: var(--navy); z-index: 20; }
.skip:focus { left: 12px; }

/* Header: logo-on-navy, centered, 36px tall (30px on phones). No menu. */

.site-header { padding: 32px 0 0; text-align: center; }
.site-header a, .site-header span { display: inline-block; }
.logo { display: block; width: auto; height: 36px; }
@media (max-width: 600px) {
  .logo { height: 30px; }
}

/* Hero: headline, amber rule, the professionals, link down to the form. */

.hero { display: flex; align-items: center; min-height: 68vh; padding: 64px 0 48px; text-align: center; }
.hero .wrap { width: 100%; }
h1 { max-width: 980px; margin: 0 auto; font-size: clamp(2.5rem, 6.4vw, 5rem); line-height: 1.03; letter-spacing: -0.02em; }
.rule { width: 48px; height: 3px; margin: 40px auto 32px; border-radius: 2px; background: var(--amber); }
.for {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 0;
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  color: var(--harbor-light);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.for li { position: relative; padding: 0 14px; }
.for + .for { margin-top: 10px; }
.for li + li::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
  transform: translateY(-50%);
}
.down { display: inline-block; margin-top: 48px; color: var(--foot); font-size: 0.9375rem; text-decoration: none; }
.down:hover { color: var(--white); text-decoration: none; }
.down span { display: block; margin-top: 6px; color: var(--amber); font-size: 1.375rem; line-height: 1; }
@media (max-width: 600px) {
  .hero { min-height: auto; padding: 56px 0 32px; }
  .for { flex-direction: column; gap: 6px; }
  .for + .for { margin-top: 6px; }
  .for li + li::before { display: none; }
}

/* White card: the form on the home page, the text on Privacy and 404. */

.ask { padding: 32px 0 96px; }
@media (max-width: 600px) {
  .ask { padding: 16px 0 64px; }
}
.card {
  max-width: var(--card);
  margin: 0 auto;
  padding: 40px;
  border-radius: 14px;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
@media (max-width: 600px) {
  .card { padding: 24px; }
}
.card h2 { font-size: clamp(1.625rem, 3.2vw, 2.125rem); line-height: 1.15; }
.card a { color: var(--harbor); }
.card a:hover { color: var(--harbor-hover); }
.card :focus-visible { outline-color: var(--harbor); }
.sub { margin: 12px 0 28px; color: var(--muted); }

.field { margin: 0 0 20px; }
label { display: block; margin: 0 0 6px; font-size: 1rem; font-weight: 700; }
label .opt { color: var(--muted); font-weight: 400; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--field);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font: 1rem/1.4 var(--font-body);
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--harbor); outline-offset: 1px; border-color: var(--harbor); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) {
  .row2 { grid-template-columns: 1fr; gap: 0; }
}
.note { margin: 4px 0 20px; color: var(--muted); font-size: 0.9375rem; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: var(--harbor);
  color: var(--white);
  font: 700 1.125rem var(--font-body);
  cursor: pointer;
}
.btn:hover { background: var(--harbor-hover); }
/* Turnstile (Managed mode) may show a small check box; keep it clear of Send. */
.cf-turnstile:not(:empty) { margin: 0 0 20px; }
/* Spam trap: hidden from people, filled in by some bots. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Thank-you and error notes. The Worker redirects to /#sent, /#closed (no
   HubSpot form yet) or /?r=...#failed;
   CSS :target shows the note, and on success hides the form, so no script is
   needed. */
.status { display: none; margin: 28px 0 0; padding: 16px 20px; border-radius: 8px; font-weight: 700; }
.status-sent { background: #E6EEF6; }
.status-failed, .status-closed { margin-bottom: 20px; border: 1.5px solid var(--navy); }
.status:target { display: block; }
.status-sent:target ~ form { display: none; }

/* Footer: thin top line, centered small text. */

.site-footer { padding: 28px 0 40px; border-top: 1px solid rgba(255, 255, 255, 0.12); color: var(--foot); font-size: 0.875rem; text-align: center; }
.site-footer p { margin: 4px 0; }
.dot { padding: 0 8px; color: var(--amber); }

/* Text pages (Privacy, 404, region) */

.text-page { padding: 56px 0 96px; }
.text-page h1 { margin-bottom: 8px; font-size: clamp(2rem, 4vw, 2.75rem); text-align: left; }
.text-page h2 { margin: 32px 0 8px; font-size: 1.375rem; }
.text-page p { margin: 0 0 1em; }
.meta { color: var(--muted); font-size: 0.9375rem; }
.review { padding: 0 4px; background: #FFF4CC; outline: 1px dashed #B58A00; font-weight: 700; }
.region { padding: 96px 0; text-align: center; }
.region h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
