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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  /* Themed page scrollbar (docs/styling.md) */
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--soft);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }
  ::-webkit-scrollbar-track {
    background: var(--soft);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--butter);
    border: 2px solid var(--ink);
    border-radius: 999px;
  }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-weight: 500;
  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.06;
  margin: 0 0 0.45em;
  overflow-wrap: break-word;
}

h1,
h2 {
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(34px, 5vw, 68px);
}

h2 {
  font-size: clamp(27px, 3.6vw, 48px);
}

h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
}

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

:focus-visible {
  outline: 2px solid var(--acc);
  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(--ink);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 999px;
}

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

.main {
  display: block;
}

.main:focus {
  outline: none;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1260px;
  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);
  border-top: var(--bw) solid var(--line);
  border-bottom: var(--bw) solid var(--line);
}

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

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

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

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

/* The tilted butter sticker eyebrow */
.eyebrow {
  display: inline-block;
  background: var(--butter);
  color: var(--ink);
  border: var(--bw) solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

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

@media (min-width: 768px) {
  .lead {
    font-size: 19px;
  }
}

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

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

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

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shd);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.btn .ico {
  width: 18px;
  height: 18px;
}

.btn--alt {
  background: var(--paper);
  color: var(--ink);
}

.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: 700;
  color: var(--ink);
  text-decoration: none;
}

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

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

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

.crumbs a {
  text-decoration: none;
}

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

/* Round-tick list ("Get started", form hero) */
.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.ticks li {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
}

.ticks .ico {
  width: 30px;
  height: 30px;
  padding: 5px;
  border: var(--bw) solid var(--line);
  border-radius: 50%;
  background: var(--butter);
}

/* Section heading + button/controls on one row */
.row-h {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.row-h .sec-h {
  margin-bottom: 20px;
}

.row-h > .btn,
.row-h > .sl-ctrl {
  flex: none;
  margin-bottom: 26px;
}

@media (min-width: 640px) {
  .row-h {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
  }

  .row-h .sec-h {
    margin-bottom: 40px;
  }

  .row-h > .btn,
  .row-h > .sl-ctrl {
    margin-bottom: 46px;
  }
}

/* ─── Inner page heading ─────────────────────────────────────────────────── */
.page-h {
  padding: 40px 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: var(--bw) solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14.5px;
  font-weight: 700;
  transition: transform .2s, background-color .2s;
}

.chips a:hover {
  transform: translateY(-2px);
  background: var(--butter);
}

.chips a[aria-current] {
  background: var(--ink);
  color: var(--bg);
}

@media (min-width: 768px) {
  .page-h {
    padding: 56px 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: 48px;
  height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  border: var(--bw) solid var(--line);
  background: var(--paper);
  text-decoration: none;
  font-weight: 700;
}

.pagination .page-numbers.current {
  background: var(--butter);
  box-shadow: var(--shd-sm);
}

.pagination a.page-numbers:hover {
  background: var(--soft);
}

/* ─── Shared keyframes ───────────────────────────────────────────────────── */
@keyframes ddm-rot {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ddm-pop {
  from {
    opacity: 0;
    transform: scale(.92) translateY(20px);
  }
}

@keyframes ddm-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ─── Reveal on scroll (only when JS runs — html.js, includes/assets.php) ── */
@media (prefers-reduced-motion: no-preference) {
  .js .rv {
    opacity: 0;
    transform: translateY(26px);
    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;
  }
}
