/* Overcomers Counseling. Colors meet WCAG 2.2 AA (most AAA); see PLAN.md. */

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

:root {
  --ink: #1f1b2d;          /* body text: 15.9:1 on paper */
  --ink-soft: #4a4458;     /* secondary text: 8.6:1 */
  --paper: #fffcf7;
  --sand: #f6efe4;         /* alternating bands */
  --line: #ddd2c2;
  --plum: #2b2140;         /* header/footer: white text 15:1 */
  --plum-text: #f3eefa;
  --link: #6a2c91;         /* 8.6:1 on paper */
  --accent: #9c3a17;       /* buttons: white text 6.9:1 */
  --accent-dark: #7f2e12;
  --peach: #f6b26b;        /* light button on plum: 8.3:1 */
  --alert-bg: #fdeeea;
  --alert-line: #9b1c1c;
  --focus: #f6b26b;
  --radius: 12px;
  --wrap: 72rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
}

img, iframe { max-width: 100%; }
img { height: auto; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 3px; }

h1, h2, h3, h4, h5, h6 { line-height: 1.25; margin: 1.6em 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 2.9rem); margin-top: 0.4em; }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2rem); }
h3 { font-size: 1.3rem; }
h4, h5, h6 { font-size: 1.125rem; }

/* Keyboard focus: two-tone ring that reads on light and dark backgrounds. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus);
  border-radius: 2px;
}
main:focus { outline: none; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  background: var(--peach);
  color: var(--plum);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons. The transparent border keeps buttons visible in Windows High Contrast. */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--accent-dark); }
.button:disabled { opacity: 0.7; cursor: progress; }
.button-light { background: var(--peach); color: var(--plum); }
.button-light:hover { background: #fff; }
.button-outline { background: transparent; color: #fff; border-color: #fff; }
.button-outline:hover { background: #fff; color: var(--plum); }

/* Header */
.site-header { background: var(--plum); color: var(--plum-text); }
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  padding-block: 0.75rem;
}
.brand { display: block; line-height: 0; }
.brand img { width: 150px; }
.site-nav { flex: 1 1 auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--plum-text); text-decoration: none; padding: 0.35rem 0; display: inline-block; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--peach); font-weight: 700; }
.site-header .button-light[aria-current="page"] { background: #fff; }

/* Page content */
.page { padding-block: 2rem 4rem; }
.prose { max-width: 46rem; }
.prose img { display: block; margin: 1.5rem 0; border-radius: var(--radius); }
.prose figure { margin: 1.5rem 0; }
.prose iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 4px solid var(--line); color: var(--ink-soft); }
.prose li + li { margin-top: 0.35rem; }
.prose hr, hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.lead { font-size: 1.3rem; max-width: 46rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.95rem; font-weight: 700; margin: 0; }
.hint { color: var(--ink-soft); font-size: 1rem; font-weight: 400; }

table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; }
caption { text-align: left; font-weight: 700; padding-bottom: 0.5rem; }
th, td { border: 1px solid var(--line); padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }
thead th { background: var(--sand); }

/* Callouts */
.callout {
  background: var(--sand);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  max-width: 46rem;
}
.callout h2 { margin-top: 0; font-size: 1.4rem; }
.callout > :last-child { margin-bottom: 0; }
.callout-strong { background: #f1e9f7; border-left-color: var(--link); }
.callout-alert { background: var(--alert-bg); border-left-color: var(--alert-line); }

/* Forms */
.mc-form { display: grid; gap: 1rem; max-width: 28rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.field input {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--ink-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.mc-form .button { justify-self: start; }
.mc-status { margin: 0; font-weight: 700; }
.mc-status:empty { display: none; }
.hush-form { margin-block: 1rem; }
.hush-form iframe { width: 100%; border: 0; }

.contact-list dt { font-weight: 700; margin-top: 1rem; }
.contact-list dd { margin: 0.2rem 0 0; }

/* Home */
.hero { position: relative; background: var(--plum); color: #fff; overflow: hidden; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgb(27 20 42 / 0.93) 0%, rgb(27 20 42 / 0.8) 50%, rgb(27 20 42 / 0.25) 100%);
}
.hero-content { position: relative; z-index: 2; padding-block: clamp(3rem, 8vw, 6.5rem); }
.hero h1 { max-width: 18ch; margin: 0.3em 0; }
.hero .lead { max-width: 36rem; }
.hero .eyebrow { color: var(--peach); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.section { padding-block: 2.5rem; }
.band { background: var(--sand); padding-block: 2.5rem; }
.band h2:first-child, .section > h2:first-child { margin-top: 0; }

.cards {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.card h3 { margin-top: 0; font-size: 1.2rem; }
.card p { margin-bottom: 0; }

.split { display: grid; gap: 2rem; align-items: center; }
.split img { border-radius: var(--radius); max-height: 28rem; width: auto; justify-self: center; }
.columns { display: grid; gap: 0 3rem; }
@media (min-width: 48rem) {
  .split { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .columns { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 40rem) {
  .hero::before { background: rgb(27 20 42 / 0.82); }
}

.service-group { margin-top: 2.5rem; }

/* Blog */
.post-list { list-style: none; padding: 0; max-width: 46rem; }
.post-list li { border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; }
.post-list h2 { font-size: 1.4rem; margin-bottom: 0.2rem; }
.post-meta { color: var(--ink-soft); margin-top: 0; font-size: 1rem; }
.post-header h1 { margin-bottom: 0.3rem; }
.post-image { display: block; border-radius: var(--radius); margin: 1rem 0 2rem; max-height: 26rem; width: auto; }

/* Footer */
.site-footer { background: var(--plum); color: var(--plum-text); margin-top: 2rem; }
.site-footer a { color: #fff; }
.site-footer h2 { font-size: 1.15rem; margin: 0 0 0.6rem; color: var(--peach); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  padding-block: 3rem 2rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 0.35rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.2);
  padding-block: 1.25rem 2rem;
  font-size: 1rem;
}
.footer-bottom p { margin: 0; }
.social { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer :focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
