/* Joey's site: the "D1 Clean professional" look with the F2 Trusted fonts (owner picked, 2026-11-17).
   Change colours, fonts and spacing in the variables below. Phone first: base rules are for 390px, wider rules are at the bottom. */
:root {
  /* colours (contrast checked against WCAG AA, see docs/design/README.md) */
  --tx: #1f2937;      /* body text */
  --mu: #4b5563;      /* muted text */
  --ac: #f59e0b;      /* amber: buttons only */
  --bg: #ffffff;
  --alt: #eaf0f8;     /* pale navy tint sections */
  --tint: #dbe5f2;
  --navy: #1b2a41;
  --ln: #d5dde8;      /* lines and borders */
  --ph-bg: #fff3c4;   /* "Joey adds this" boxes */
  --ph-tx: #3b2f00;
  /* fonts: headings Source Serif 4, text Source Sans 3 (self-hosted in /fonts, SIL OFL) */
  --fh: "Source Serif 4", Georgia, "Times New Roman", serif;
  --fb: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  /* spacing and shape */
  --gap: 1rem;
  --pad: 1.25rem;
  --radius: .9rem;
  --tap: 2.75rem;     /* smallest button/tap height */
}

@font-face { font-family: "Source Serif 4"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/source-serif-4-600.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/source-serif-4-700.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/source-sans-3-400.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/source-sans-3-600.woff2") format("woff2"); }

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--fb); color: var(--tx); background: var(--bg); line-height: 1.6; font-size: 1.0625rem; overflow-wrap: anywhere; }
h1, h2, h3, .brand { font-family: var(--fh); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .75rem; font-weight: 700; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.hero-photo :focus-visible, section.navy :focus-visible, .band :focus-visible { outline-color: #fff; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
main { min-height: 50vh; }
section { padding: 3rem 0; }
section.alt { background: var(--alt); }
section.navy, .band { background: var(--navy); color: #fff; }
section.navy h2, .band h2, .band p { color: #fff; }
.band { text-align: center; }

/* Placeholder style: every "Joey adds this" text and every empty photo spot uses class "ph".
   Add data-joey-fills="what Joey sends" so the owner can search for it. */
.ph { background: var(--ph-bg); color: var(--ph-tx); border: 2px dashed var(--ph-tx); padding: 0 .35em; font-size: .9em; font-weight: 600; }
.ph a { color: inherit; }
.ph.photo { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 11rem; padding: 1rem; border-radius: var(--radius); aspect-ratio: 16/9; }
.ph.block { display: block; padding: .75rem 1rem; }

/* Buttons */
.btn { display: inline-block; background: var(--ac); color: var(--tx); font-weight: 700; text-decoration: none; padding: .8rem 1.5rem; border-radius: .5rem; border: 2px solid var(--ac); min-height: var(--tap); }
.btn.small { padding: .45rem .9rem; font-size: .92rem; }
.btn.ghost { background: #fff; border-color: var(--tx); }
section.navy .btn.ghost { background: #fff; color: var(--navy); border-color: #fff; }
.menu-toggle, .btn .short { display: none; }

/* Header: one slim row on phones (name, small "Get a quote" button, menu icon) */
header.site { border-bottom: 1px solid var(--ln); background: #fff; position: sticky; top: 0; z-index: 5; }
header.site .wrap { position: relative; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 0; flex-wrap: wrap; }
.brand { text-decoration: none; font-weight: 700; font-size: 1rem; flex: 1 1 9rem; min-width: 0; overflow-wrap: break-word; line-height: 1.2; }
header.site .bar > .btn.small { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: .3rem .75rem; font-size: .9rem; white-space: nowrap; }
.btn .long { display: none; }
.btn .short { display: inline; }
.menu-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); font-size: 1.5rem; line-height: 1; background: #fff; color: var(--navy); border: 2px solid var(--navy); border-radius: .5rem; cursor: pointer; }
.menu { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0 0 .5rem; list-style: none; font-size: .95rem; }
.menu a { text-decoration: none; padding: .35rem 0; display: inline-block; color: var(--mu); }
.menu a[aria-current] { color: var(--navy); font-weight: 700; border-bottom: 3px solid var(--navy); }
/* With JavaScript the phone links sit in a panel opened by the icon; without it they simply show. */
html.js nav.main { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--ln); box-shadow: 0 8px 16px rgba(0,0,0,.12); }
html.js header.site.open nav.main { display: block; }
html.js .menu { flex-direction: column; padding: .5rem var(--pad) 1rem; }
html.js .menu a { display: block; padding: .75rem 0; min-height: var(--tap); }

/* Footer */
footer.site { background: #fff; border-top: 1px solid var(--ln); padding: 1.5rem 0; font-size: .95rem; }
footer.site p { margin: .35rem 0; }
footer.site ul { list-style: none; margin: .35rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
footer.site ul a { display: inline-block; padding: .5rem 0; }

/* Pictures (sample AI pictures now, real photos later) */
.ai { margin: 0; background: var(--tint); border-radius: var(--radius); position: relative; overflow: hidden; }
.ai img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai .tag { position: absolute; left: .5rem; bottom: .5rem; max-width: calc(100% - 1rem); background: #111; color: #fff; font-size: .75rem; font-weight: 600; line-height: 1.3; padding: .25rem .5rem; border-radius: .3rem; }

/* Page blocks later tasks reuse */
.lead { font-size: 1.15rem; color: var(--mu); max-width: 40rem; }
.card { min-width: 0; background: #fff; border: 1px solid var(--ln); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 1rem; }
.card h3 { font-size: 1.2rem; color: var(--navy); }
.card p { margin: 0; color: var(--mu); }
.page-head { padding-bottom: 1.5rem; }
.audience { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.audience li { min-width: 0; background: #fff; border: 1px solid var(--ln); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 1rem; }
.audience h3 { font-size: 1.2rem; color: var(--navy); }
.audience p { margin: 0; color: var(--mu); }
.faq details { background: #fff; border: 1px solid var(--ln); border-radius: var(--radius); margin-bottom: .75rem; }
.faq summary { cursor: pointer; padding: 1rem; font-weight: 700; color: var(--navy); min-height: 2.75rem; }
.faq details p { margin: 0; padding: 0 1rem 1rem; color: var(--mu); }
.prose { max-width: 45rem; }
.notfound { text-align: center; }
.notfound .lead { margin-left: auto; margin-right: auto; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.notfound .actions { margin-top: 1.5rem; }

/* Hero with the picture behind the words (dark overlay keeps white text at 8.2:1 or better) */
.hero-photo { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: 3.5rem 0; min-height: 26rem; display: flex; align-items: center; text-align: center; }
.hero-photo .wrap { position: relative; z-index: 2; width: 100%; }
.hero-photo .hero-pic { position: absolute; inset: 0; border-radius: 0; }
.hero-photo .hero-pic img { object-position: center 30%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(10,16,28,.72); }
.hero-photo .hero-pic .tag { z-index: 3; left: auto; right: .5rem; }
.hero-photo h1 { max-width: 20ch; margin: 0 auto 1rem; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.hero-photo .lead { color: #fff; margin: 0 auto 1.5rem; }
.hero-photo.page-hero { min-height: 18rem; }
.ai.sm, .ph.photo.sm { aspect-ratio: 4/3; margin-bottom: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Home and programs blocks */
.who { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.who li { color: var(--navy); background: var(--alt); border: 1px solid var(--ln); border-radius: 2rem; padding: .4rem .9rem; font-size: .95rem; }
.cards { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.cards .card a.more { display: inline-block; margin-top: .75rem; padding: .5rem 0; color: var(--navy); font-weight: 600; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.steps li { counter-increment: s; background: #fff; border: 1px solid var(--ln); border-radius: var(--radius); padding: 1rem; min-width: 0; }
.steps li::before { content: counter(s); display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: .5rem; }
.steps h3 { color: var(--navy); font-size: 1.2rem; }
.steps p { margin: 0; color: var(--mu); }
.prog { border: 1px solid var(--ln); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; background: #fff; }
.prog h2 { font-size: 1.4rem; color: var(--navy); }
.prog dl { margin: 0; }
.prog dt { font-weight: 700; margin-top: .6rem; }
.prog dd { margin: 0; color: var(--mu); }
.prog ul { margin: 0; padding-left: 1.25rem; }
.prog .actions { justify-content: flex-start; margin-top: 1rem; }
.quote-spot { text-align: center; }
.band .btn { margin-top: .5rem; }

/* Quote form */
.quote-box { max-width: 40rem; margin: 0 auto; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .25rem; color: var(--navy); }
.field input, .field textarea { display: block; width: 100%; max-width: 100%; font: inherit; color: var(--tx); background: #fff; border: 2px solid var(--mu); border-radius: .5rem; padding: .6rem .75rem; min-height: var(--tap); }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: #b91c1c; }
.hint { margin: .25rem 0 0; font-size: .92rem; color: var(--mu); }
.hint.over { color: #b91c1c; font-weight: 600; }
.err { margin: .25rem 0 0; font-size: .95rem; font-weight: 600; color: #b91c1c; }
.notice { background: #fff; border: 2px solid var(--navy); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.25rem; }
.notice h2 { font-size: 1.3rem; }
.notice p, .notice ul { margin: 0 0 .5rem; }
.notice ul { padding-left: 1.25rem; }
.notice.bad { border-color: #b91c1c; }
.notice.ok { border-color: #166534; }
.notice a { color: #7f1d1d; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.send-row .hint { margin: 0; }
.send-row .btn { cursor: pointer; font: inherit; font-weight: 700; }
.send-row .btn[disabled] { opacity: .7; cursor: wait; }

/* Wider screens */
@media (min-width: 56rem) {
  h1 { font-size: 3.2rem; }
  .brand { flex: 0 0 auto; font-size: 1.15rem; overflow: visible; }
  header.site .wrap { display: flex; align-items: center; gap: 2rem; padding-top: .6rem; padding-bottom: .6rem; }
  header.site .bar { display: contents; }
  .brand { order: 1; }
  header.site nav.main { order: 2; margin-left: auto; }
  header.site .bar > .btn.small { order: 3; min-height: 0; padding: .45rem .9rem; font-size: .92rem; }
  .btn .long { display: inline; }
  .btn .short { display: none; }
  .menu-toggle { display: none; }
  .hero-photo h1 { font-size: 3.2rem; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .audience { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prog dl { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: .25rem 1.5rem; }
  .prog dt { margin-top: 0; }
  header.site nav.main, html.js nav.main { display: block; position: static; background: none; border: 0; box-shadow: none; }
  .menu, html.js .menu { flex-direction: row; padding: 0; }
  html.js .menu a { display: inline-block; padding: .35rem 0; min-height: 0; }
}
