/* Barefoot Consulting – site styles.
   Plain CSS, mobile first. No inline styles are used anywhere (strict CSP). */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Fjalla One";
  src: url("../fonts/fjalla-one-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --blue: #0075c1;          /* brand; white text on it is 4.9:1 (AA) */
  --blue-dark: #005b97;
  --navy: #06163a;
  --navy-2: #0a2a5e;
  --ink: #1b1b1b;
  --muted: #4a5561;
  --line: #d8e1ea;
  --tint: #f2f6fa;
  --danger: #b3261e;
  --success: #0b6b2e;
  --focus: #0b3d91;

  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fjalla One", Impact, "Arial Narrow", sans-serif;

  --radius: 8px;
  --shadow: 0 1px 2px rgba(6, 22, 58, 0.06), 0 6px 18px rgba(6, 22, 58, 0.08);
  --container: 72rem;
  --narrow: 46rem;
  --gutter: 1.25rem;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 400 1.125rem/1.6 var(--font-body);
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

/* Resilience: grid and flex children may shrink and long words may break, so enlarged text or a
   very narrow window wraps instead of scrolling sideways (WCAG "reflow"). */
main, .site-footer { overflow-wrap: anywhere; }
main :where(div, section, article, form, ul, li, aside, h1, h2, h3, p),
.site-footer :where(div, ul, li, p) { min-width: 0; }

a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--blue-dark); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: #fff; }

h1, h2, h3 {
  margin: 0 0 0.6em;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
p { margin: 0 0 1em; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.5rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: #fff;
  border-radius: 4px;
}
.skip-link:focus { top: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--narrow); }

.section { padding-block: 3.5rem; }
.section--tint { background: var(--tint); }
/* The brand blue is 4.48:1 on this tint, just under AA for small text, so links use the darker blue here. */
.section--tint a:not(.btn) { color: var(--blue-dark); }
.section--tint a:not(.btn):hover { color: var(--navy); }

.section__title {
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--blue);
}
.section__title::after {
  content: "";
  display: block;
  width: 3.5rem; height: 3px;
  margin: 0.6rem auto 0;
  background: var(--blue);
  opacity: 0.35;
}
.section__lead { margin-top: -0.5rem; text-align: center; font-size: 1.25rem; color: var(--muted); }

.h-sub { font-size: 1.75rem; color: var(--navy); }
.h-mini { margin-top: 1.75rem; font-size: 1.2rem; color: var(--navy); }
.h-note { font-family: var(--font-body); font-size: 0.95rem; text-transform: none; letter-spacing: 0; color: var(--muted); }

.fineprint { margin-top: 1rem; font-size: 0.95rem; color: var(--muted); }
.notice {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--blue);
  background: var(--tint);
}

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }

/* Small screens: the brand sits above a full-width nav that wraps instead of overflowing,
   so large text or a 320px window never scrolls sideways. */
.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-top: 0.85rem;
}

.brand {
  grid-area: brand;
  flex: 1 1 8rem;
  font: 400 clamp(1.5rem, 6vw, 1.95rem) / 1 var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--blue);
}
.brand:hover { color: var(--blue-dark); }

.site-nav {
  grid-area: nav;
  flex: 0 0 auto;
  width: calc(100% + var(--gutter) * 2);
  margin-inline: calc(var(--gutter) * -1);
  border-top: 1px solid var(--line);
}
/* Links start at their own width and share the spare room; if text is enlarged they wrap instead of overflowing. */
.site-nav ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.site-nav li { flex: 1 1 auto; }
.site-nav a {
  display: block;
  padding: 0.8rem 0.25rem 0.65rem;
  border-bottom: 3px solid transparent;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.site-nav a:hover { background: var(--tint); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
@media (min-width: 52rem) {
  .site-header__bar {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "brand nav";
    gap: 2rem;
    padding-block: 0.5rem;
  }
  .site-nav { width: auto; margin: 0; border: 0; }
  .site-nav ul { justify-content: flex-end; gap: 0.25rem; }
  .site-nav li { flex: 0 0 auto; }
  .site-nav a { padding: 1rem 0.9rem 0.85rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 1rem 1.6rem;
  border: 2px solid var(--blue);
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  font: 700 0.95rem/1 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn--small { padding: 0.75rem 1.1rem; font-size: 0.85rem; }
.btn--light { background: #fff; border-color: #fff; color: var(--navy); }
.btn--light:hover { background: #e4f0fb; border-color: #e4f0fb; color: var(--navy); }
.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; color: #fff; }
.btn[disabled] { opacity: 0.65; cursor: progress; }
.btn.btn--blocked,
.btn.btn--blocked[disabled] {
  background: #5a6570;
  border-color: #5a6570;
  color: #fff;
  opacity: 0.9;
  cursor: not-allowed;
}

/* ---------- Hero (home) ---------- */
.hero {
  background: radial-gradient(120% 140% at 85% 15%, #14449a 0%, var(--navy-2) 42%, var(--navy) 100%);
  color: #fff;
}
.hero__grid { display: grid; gap: 2rem; align-items: center; padding-block: 3rem; }
.hero h1 { margin-bottom: 0.35em; font-size: clamp(2rem, 11vw, 4.25rem); color: #fff; }
.hero h1 span { display: block; }
.hero__lead { margin-bottom: 1.75rem; font-size: clamp(1.2rem, 2.6vw, 1.6rem); color: #cfe6ff; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 0; }
.hero__media img { width: 100%; border-radius: 12px; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45); }

@media (min-width: 56rem) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; padding-block: 4.5rem; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: radial-gradient(120% 220% at 90% 0%, #14449a 0%, var(--navy-2) 45%, var(--navy) 100%);
  color: #fff;
}
.page-hero .container { padding-block: 2.75rem; }
.page-hero h1 { margin: 0; font-size: clamp(2.1rem, 6vw, 3.25rem); color: #fff; }
.page-hero__lead { max-width: 40rem; margin: 0.9rem 0 0; font-size: 1.2rem; color: #cfe6ff; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1.5rem; max-width: 40rem; margin-inline: auto; }
@media (min-width: 64rem) {
  .cards--3 { grid-template-columns: repeat(3, 1fr); max-width: none; }
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.card--accent { border-top: 4px solid var(--blue); }
.card__img { width: 100%; aspect-ratio: 760 / 500; object-fit: cover; background: var(--navy); }
.card__body { padding: 1.5rem; }
.card__title { margin-bottom: 0.6em; font-size: 1.6rem; color: var(--navy); }
.card__body > :last-child { margin-bottom: 0; }

/* ---------- Check list ---------- */
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding: 0.4rem 0 0.4rem 1.9rem; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.2rem; top: 0.85rem;
  width: 0.65rem; height: 0.33rem;
  border-bottom: 2px solid var(--blue);
  border-left: 2px solid var(--blue);
  transform: rotate(-45deg);
}

/* ---------- Call-to-action band ---------- */
.band { background: var(--blue-dark); color: #fff; }
.band__inner { display: grid; gap: 1.25rem; align-items: center; padding-block: 2.25rem; }
.band__title { margin: 0 0 0.25rem; font-size: 1.8rem; color: #fff; }
.band__text { margin: 0; color: #e4f0fb; }
@media (min-width: 40rem) {
  .band__inner { grid-template-columns: 1fr auto; }
}

/* ---------- Bio ---------- */
.bio { display: grid; gap: 1.5rem; align-items: start; }
.bio__photo {
  width: 10rem; height: 10rem;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.bio__name { margin-bottom: 0.5em; font-size: 1.9rem; color: var(--navy); }
.bio__certs-title { margin: 1.4rem 0 0.6rem; font-size: 1.05rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--blue-dark);
}
@media (min-width: 40rem) {
  .bio { grid-template-columns: auto 1fr; gap: 2rem; }
}

/* ---------- Discuss: consultation topics ---------- */
.consults { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 40rem) { .consults { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .consults { grid-template-columns: repeat(3, 1fr); } }

.consult {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.consult__title { flex: 1; margin: 0; font: 700 1.25rem/1.3 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--navy); }
.consult__meta { margin: 0 0 0.75rem; color: var(--muted); }
.consult .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; } }

.contact-info__lead { font-size: 1.25rem; font-weight: 700; color: var(--blue-dark); }

.hours { width: 100%; max-width: 22rem; border-collapse: collapse; }
.hours th, .hours td { padding: 0.35rem 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours th { padding-right: 1rem; font-weight: 600; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field label,
.field__label { font-weight: 600; }
.req { font-weight: 400; color: var(--muted); font-size: 0.9rem; }

.booking-intro { margin-bottom: 1.4rem; color: var(--muted); }
.booking-form .field textarea { min-height: 6rem; }
.booking-picker {
  gap: 0;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 2px rgba(6, 22, 58, 0.04);
}
.booking-picker.field--error { border-color: var(--danger); }
.picker-group + .picker-group {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.picker-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-bottom: 0.7rem;
}
.picker-group__meta {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue-dark);
}
.slot-days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
  gap: 0.55rem;
}
.slot-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.55rem 0.5rem;
  border: 1px solid #c5d1de;
  border-radius: 6px;
  background: var(--tint);
  color: var(--ink);
  font-family: var(--font-body);
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.slot-day__dow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.slot-day__date { font-size: 0.96rem; font-weight: 700; }
.slot-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr));
  gap: 0.55rem;
}
@media (min-width: 36rem) {
  .slot-days { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .slot-times { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.slot-time {
  padding: 0.55rem 0.5rem;
  border: 1px solid #c5d1de;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: 600 0.92rem/1.2 var(--font-body);
  text-align: center;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.slot-day:hover,
.slot-time:hover {
  border-color: var(--blue-dark);
  background: #e8f2fc;
}
.slot-day[aria-pressed="true"],
.slot-time[aria-checked="true"] {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 91, 151, 0.25);
}
.slot-day[aria-pressed="true"] .slot-day__dow { color: #dcebfa; }
.slot-note { margin: 0.85rem 0 0; font-weight: 600; color: var(--navy); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid #8a97a5;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field--error input,
.field--error select,
.field--error textarea { border-color: var(--danger); }
.field__error { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--danger); }

/* Honeypot: present for bots, invisible and unfocusable for people. */
.field--hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__status { min-height: 1.6em; margin: 0; font-weight: 600; }
/* The live region stays in the page (screen readers need it there) but takes no room until used. */
.form__status:empty { min-height: 0; margin-top: -1.1rem; }
.subscribe .form__status:empty { margin-top: -0.9rem; }
.form__status--ok { color: var(--success); }
.form__status--error { color: var(--danger); }
.form__turnstile { min-height: 0; }
.form__turnstile:empty { display: none; }

.subscribe { display: grid; gap: 0.9rem; }
@media (min-width: 40rem) {
  .subscribe { grid-template-columns: 1fr auto; align-items: end; }
  .subscribe .form__turnstile,
  .subscribe .form__status { grid-column: 1 / -1; }
}

/* ---------- Long-form text (privacy) ---------- */
.prose h2 { margin-top: 2rem; font-size: 1.5rem; color: var(--navy); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #d6e6f7; font-size: 1rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #cfe6ff; }
.site-footer__grid { display: grid; gap: 1.5rem; padding-block: 2.5rem 1.5rem; }
.site-footer__name { margin: 0 0 0.4rem; font: 400 1.5rem/1.1 var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; color: #fff; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-footer__legal {
  display: grid;
  gap: 0.25rem;
  padding-block: 1.25rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.9rem;
}
.site-footer__legal p { margin: 0; }
@media (min-width: 40rem) {
  .site-footer__grid { grid-template-columns: 1fr auto; }
  .site-footer__legal { grid-template-columns: 1fr auto; }
}

/* ---------- Print ---------- */
@media print {
  .site-nav, .skip-link, .hero__media, .band, .subscribe, .btn, .site-footer__links { display: none !important; }
  .hero, .page-hero, .site-footer { background: none; color: #000; }
  .hero h1, .page-hero h1, .hero__lead, .page-hero__lead, .site-footer a, .site-footer__name { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
