/* Horscrust PA Services
   Colour pairs are contrast-checked against WCAG 2.2 AA; see SETUP.md. */

@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-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; 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: "Lora";
  src: url("/fonts/lora-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/fonts/lora-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --paper: #FAF6F3;
  --surface: #FFFFFF;
  --ink: #2B2A2E;
  --ink-muted: #55525A;
  --rose: #B76E79;          /* decorative and large text only (3.5:1) */
  --copper: #B87333;        /* decorative and large text only (3.5:1) */
  --accent: #8E4A55;        /* links, headings (6.0:1) */
  --btn-bg: #8A4A1F;        /* white text 6.8:1 */
  --btn-bg-hover: #6E3A17;  /* white text 9.2:1 */
  --btn-text: #FFFFFF;
  --band: #2B2A2E;
  --band-text: #F3ECE8;
  --on-band: #E8B4A8;       /* 7.8:1 on band */
  --border: #77727C;        /* 4.4:1 on paper */
  --error: #A3262A;         /* 6.8:1 on paper */
  --focus: #2B2A2E;
  --focus-on-band: #E8B4A8;
  --success-bg: #EEF5EF;
  --success-border: #2F6B3A;

  --font-body: "Atkinson Hyperlegible", "Segoe UI", Verdana, sans-serif;
  --font-head: "Lora", Georgia, "Times New Roman", serif;
  --measure: 68ch;
  --wrap: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1E1D21;
    --surface: #2A282D;
    --ink: #EDE6E1;
    --ink-muted: #B9B2AE;
    --rose: #E8B4A8;
    --copper: #E3A574;
    --accent: #E8B4A8;
    --btn-bg: #E3A574;
    --btn-bg-hover: #F0C29C;
    --btn-text: #1E1D21;
    --band: #141316;
    --band-text: #EDE6E1;
    --on-band: #E8B4A8;
    --border: #8C8590;
    --error: #FF8A80;
    --focus: #F2C9BE;
    --focus-on-band: #F2C9BE;
    --success-bg: #1F2E22;
    --success-border: #8FCB98;
  }
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}


h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.25rem, 5vw + 1rem, 3.25rem); line-height: 1.15; color: var(--ink); }
h2 { font-size: clamp(1.75rem, 3vw + 1rem, 2.25rem); color: var(--accent); }
h3 { font-size: 1.375rem; line-height: 1.3; color: var(--accent); }

p, ul { margin: 0 0 1em; }

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 40rem) { .wrap { padding: 0 2rem; } }

.prose { max-width: var(--measure); }

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
  border: 2px solid var(--focus);
}
.skip-link:focus { top: 1rem; }

/* Header band */
.site-header {
  background: var(--band);
  color: var(--band-text);
  border-bottom: 2px solid var(--rose);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.site-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--band-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}
.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-band);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--on-band); }
.nav-list a[aria-current] { border-bottom-color: var(--on-band); font-weight: 700; }
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: var(--focus-on-band); }


/* Hero */
.hero { padding: 3rem 0 1rem; }
.bookplate {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  text-align: center;
  border: 4px double var(--rose);
  outline: 1px solid var(--rose);
  outline-offset: 6px;
}
@media (min-width: 40rem) { .bookplate { padding: 3rem 2.5rem; } }
.eyebrow {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  font-size: 1.125rem;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}
.byline {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.375rem;
  color: var(--accent);
}
.hero-lead { font-size: 1.25rem; max-width: 34em; margin-left: auto; margin-right: auto; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin: 1.5rem 0 0;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.5rem;
  border: 2px solid var(--btn-bg);
  border-radius: 4px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); }
.button-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.button-secondary:hover { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.button[aria-disabled="true"] { opacity: 0.75; cursor: progress; }

/* Divider */
.divider {
  display: flex;
  justify-content: center;
  color: var(--rose);
  margin: 2rem 0;
}

/* Sections */
.section { padding: 1rem 0 2rem; }

.headshot { margin: 0 0 1.25rem; max-width: 14rem; }
.headshot img {
  display: block;
  width: 100%;
  height: auto;
  border: 4px double var(--rose);
  padding: 4px;
}
@media (min-width: 40rem) {
  .headshot { float: right; width: 13rem; margin: 0.25rem 0 1rem 1.75rem; }
  .about .prose::after { content: ""; display: block; clear: both; }
}


/* Service cards */
.cards {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 56rem) { .cards { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--copper);
  border-radius: 4px;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
}
.card h3 { margin-bottom: 0.25rem; }
.rate {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.leader {
  flex: 1 1 2rem;
  border-bottom: 2px dotted var(--rose);
  min-width: 2rem;
}
.price {
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 600;
  white-space: nowrap;
}
.terms { color: var(--ink-muted); font-size: 1rem; margin-bottom: 0.75em; }
.tasks { padding-left: 1.25rem; }
.tasks li { margin-bottom: 0.25em; }
.tasks li::marker { color: var(--copper); }
.card-link { margin-top: auto; margin-bottom: 0; padding-top: 0.5rem; }
.card-link a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* Contact */
.contact { display: grid; gap: 2rem; }
@media (min-width: 56rem) {
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 36rem); align-items: start; }
}
.form-panel { max-width: 36rem; }
.field { margin-bottom: 1.25rem; }
label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.req, .opt { font-weight: 400; color: var(--ink-muted); }
input, select, textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 1.125rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 4px;
}
textarea { resize: vertical; min-height: 10rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus); }
[aria-invalid="true"] { border-color: var(--error); border-width: 3px; }

.field-error {
  color: var(--error);
  font-weight: 700;
  margin: 0 0 0.25rem;
}
.field-error::before { content: "\26A0\FE0E  "; }

.error-summary {
  border: 3px solid var(--error);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
}
.error-summary h3 { color: var(--error); font-size: 1.25rem; }
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary a { color: var(--error); font-weight: 700; }

.form-status {
  border: 2px solid var(--success-border);
  background: var(--success-bg);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}
.form-status.is-error { border-color: var(--error); background: var(--surface); color: var(--error); }

.privacy { font-size: 1rem; color: var(--ink-muted); }

/* Honeypot: off-screen, not display:none */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer band */
.site-footer {
  background: var(--band);
  color: var(--band-text);
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 2px solid var(--rose);
  font-size: 1rem;
}
.site-footer a { color: var(--on-band); }
.footer-inner p { margin: 0.25rem 0; }
.footer-inner a { display: inline-block; padding: 0.6rem 0; }

/* Simple pages */
.page { padding: 3rem 0; }

@media (forced-colors: active) {
  .button { border: 2px solid ButtonText; }
  .card { border-top-width: 1px; }
}

@media print {
  .site-header, .skip-link, .divider, .form-panel { display: none; }
  body { background: #fff; color: #000; }
}
