/* ─── Base — resets, type, layout, buttons, shared bits ───────────────────
   Mobile-first; breakpoints 480 / 640 / 768 / 992 / 1200.
   ────────────────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  /* Themed page scrollbar (docs/styling.md) */
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary-color) 60%, var(--bg-color)) var(--bg-light);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-track {
    background: var(--bg-light);
  }
  ::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary-color) 60%, var(--bg-color));
    border: 2px solid var(--bg-light);
    border-radius: 999px;
  }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

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

/* Emoji in content stay inline at 1em (WordPress' emoji CSS is removed in
   includes/performance.php). Keep this rule. */
img.emoji,
img.wp-smiley {
  display: inline !important;
  width: 1em !important;
  height: 1em !important;
  max-width: none;
  margin: 0 0.07em !important;
  vertical-align: -0.1em !important;
  box-shadow: none !important;
  border: none !important;
  background: none !important;
  padding: 0 !important;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 0.45em;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(38px, 6vw, 76px);
}

h2 {
  font-size: clamp(28px, 4vw, 50px);
}

h3 {
  font-size: 21px;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

.screen-reader-text,
.screen-reader-response {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: var(--g);
  color: var(--on-dark);
  padding: 8px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  left: 8px;
}

.main {
  display: block;
}

.main:focus {
  outline: none;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 18px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 28px;
  }
}

.container--narrow {
  max-width: 800px;
}

.sec {
  padding: var(--sec-y) 0;
}

.sec--tight {
  padding-top: 20px;
}

.soft {
  background: var(--soft);
}

.text-center {
  text-align: center;
}

/* Section heading */
.sec-h {
  max-width: 640px;
  margin-bottom: 44px;
}

.sec-h--c {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.sec-h .lead {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g2);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--coral);
  border-radius: 2px;
}

.lead {
  font-size: 18.5px;
  color: var(--mut);
}

.small {
  font-size: 13.5px;
  color: var(--mut);
}

.ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ─── Buttons & links ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--g);
  color: var(--on-dark);
  border: 1.5px solid var(--g);
  border-radius: 999px;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, background-color .2s, color .2s, box-shadow .2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-btn);
}

.btn .ico {
  width: 18px;
  height: 18px;
  transition: transform .2s;
}

.btn:hover .ico {
  transform: translateX(3px);
}

.btn--ghost {
  background: transparent;
  color: var(--g);
}

.btn--ghost:hover {
  background: var(--g);
  color: var(--on-dark);
}

.btn--lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--g);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 14.5px;
}

.btn--full {
  width: 100%;
}

.btn[disabled] {
  opacity: .6;
  cursor: wait;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--g2);
  text-decoration: none;
}

.more .ico {
  width: 18px;
  transition: transform .2s;
}

.more:hover .ico {
  transform: translateX(4px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px 7px 10px;
  font-size: 14px;
  font-weight: 500;
}

.pill i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 20%, transparent);
}

.crumbs {
  font-size: 14px;
  color: var(--mut);
  margin-bottom: 20px;
}

.crumbs a {
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

/* ─── Inner page heading ─────────────────────────────────────────────────── */
.page-h {
  padding: 50px 0 30px;
}

.page-h h1 {
  max-width: 900px;
}

.page-h .lead {
  max-width: 680px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.chips a {
  text-decoration: none;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14.5px;
  font-weight: 500;
  transition: border-color .2s;
}

.chips a:hover {
  border-color: var(--g2);
}

.chips a[aria-current] {
  background: var(--g);
  color: var(--on-dark);
  border-color: var(--g);
}

@media (min-width: 768px) {
  .page-h {
    padding: 60px 0 30px;
  }
}

/* Pagination */
.pagination {
  margin-top: 44px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  font-weight: 600;
}

.pagination .page-numbers.current {
  background: var(--g);
  border-color: var(--g);
  color: var(--on-dark);
}

.pagination a.page-numbers:hover {
  border-color: var(--g2);
}

/* ─── Reveal on scroll (only when JS runs — html.js, includes/assets.php) ── */
@media (prefers-reduced-motion: no-preference) {
  .js .rv {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s ease var(--d, 0s), transform .8s var(--ease) var(--d, 0s);
  }

  .js .rv.is-in {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
