/* Full Circle AT — site styles.
   Colors are set once here; every text/background pair meets WCAG AA (most meet AAA). */

/* Manrope, served from this site (Open Font License). */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
}

:root {
  --text: #111111;
  --muted: #4a4a4a;
  --bg: #ffffff;
  --surface: #fbfaf3;
  --purple: #503aa8;
  --purple-dark: #3b2a80;
  --pink: #f6cff4;
  --focus: #ffee58;
  --border: #c9c6d6;
  --error: #b00020;
  --success: #1e6b34;
  --radius: 10px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f4f2fb;
    --muted: #cfcbe0;
    --bg: #15131c;
    --surface: #211e2c;
    --purple: #c9b8ff;
    --purple-dark: #e1d6ff;
    --pink: #3a2a48;
    --border: #4b4560;
    --error: #ff8a95;
    --success: #7fdc9a;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

/* ---------- Focus and skip link ---------- */

:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus);
}
main:focus { outline: none; box-shadow: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: .75rem 1.25rem;
  background: var(--focus);
  color: #111;
  font-weight: 700;
  border: 3px solid #111;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Header and menu ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.35rem;
}
.brand img { width: 64px; height: auto; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: .45rem .75rem;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}
.site-nav a:hover { background: var(--surface); text-decoration: underline; }
.site-nav a[aria-current="page"] {
  background: var(--purple);
  color: var(--bg);
}

/* ---------- Content ---------- */

.content { padding-block: 2.5rem 4rem; }

h1, h2, h3, h4 { line-height: 1.25; margin: 2rem 0 .75rem; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin-top: 0; letter-spacing: -.01em; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }
.lede { font-size: 1.35rem; color: var(--muted); max-width: 40rem; }

p, ul, ol, blockquote, table, figure { margin: 0 0 1.25rem; }
li + li { margin-top: .4rem; }

a { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--purple-dark); text-decoration-thickness: 2px; }
a[href^="tel:"] { white-space: nowrap; }

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

hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

blockquote {
  margin-inline: 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-left: 6px solid var(--purple);
  border-radius: 0 var(--radius) var(--radius) 0;
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite { display: block; margin-top: .75rem; font-style: normal; font-weight: 700; }

table { width: 100%; border-collapse: collapse; }
caption { text-align: left; font-weight: 700; padding-bottom: .5rem; }
th, td { text-align: left; padding: .65rem .85rem; border: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface); }

iframe { max-width: 100%; border: 0; }

/* Buttons: <a class="button"> or <button class="button">. Add "button-outline" for the second style. */
.button, .contact-form button {
  display: inline-block;
  padding: .8rem 1.6rem;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, .contact-form button:hover { background: var(--purple); border-color: var(--purple); color: var(--bg); text-decoration: underline; }
.button-outline { background: transparent; color: var(--text); }
.buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }

/* ---------- Blog ---------- */

.post-list { list-style: none; padding: 0; }
.post-list > li + li { margin-top: 0; border-top: 1px solid var(--border); }
.post-list article { padding-block: 1.5rem; }
.post-list h2 { margin-top: 0; }
.post-date { color: var(--muted); font-size: 1rem; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; padding: 0; }
.pagination li + li { margin-top: 0; }

/* ---------- Forms ---------- */

.contact-form { max-width: 36rem; }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field input, .field textarea {
  display: block;
  width: 100%;
  padding: .7rem .8rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--muted);
  border-radius: 6px;
}
.field-error input, .field-error textarea { border-color: var(--error); border-width: 3px; }
.error-message { color: var(--error); font-weight: 700; margin: 0 0 .35rem; }
.hp-field { display: none; }

.error-summary, .notice {
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  border: 4px solid var(--error);
  border-radius: var(--radius);
}
.error-summary h2, .notice h2 { margin-top: 0; font-size: 1.35rem; }
.error-summary a { color: var(--error); font-weight: 700; }
.notice-success { border-color: var(--success); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: 2rem;
  font-size: 1rem;
}
.site-footer h2 { font-size: 1.15rem; margin-top: 0; }
.footer-columns { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.footer-columns ul { list-style: none; padding: 0; }
.copyright { color: var(--muted); margin-bottom: 0; }

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

@media (forced-colors: active) {
  .site-nav a[aria-current="page"] { border: 2px solid CanvasText; }
  .button { border: 2px solid ButtonText; }
}
