/* base.css — reset, typography, focus, accessibility defaults */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  overflow-x: clip;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--t-md);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  background: var(--c-cream);
}

/* logos are transparent PNGs — never put a placeholder tint behind them */
img.brand__img,
.page-hero__logo,
.invoice__logo {
  background: transparent;
}

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

button {
  cursor: pointer;
  background: none;
  border: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

a {
  color: var(--c-teal-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--c-dark);
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--f-display);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  color: var(--c-dark);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: var(--t-3xl);
}

h2 {
  font-size: var(--t-2xl);
}

h3 {
  font-size: var(--t-xl);
}

h4 {
  font-size: var(--t-lg);
}

p {
  text-wrap: pretty;
}

strong,
b {
  font-weight: var(--fw-semibold);
}

hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: var(--s-6) 0;
}

::selection {
  background: var(--c-sage);
  color: var(--c-dark);
}

/* ------------------------------------------------------------- focus state */
:focus-visible {
  outline: 3px solid var(--c-teal);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.on-dark :focus-visible,
.cta-band :focus-visible {
  outline-color: var(--c-focus-dark);
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: var(--z-toast);
  transform: translateY(-160%);
  background: var(--c-dark);
  color: var(--c-on-dark);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-full);
  text-decoration: none;
  font-weight: var(--fw-semibold);
  transition: transform var(--d-sm) var(--e-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--c-on-dark);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------- typography helpers */
.eyebrow {
  font-family: var(--f-body);
  font-size: var(--t-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-teal-deep);
}

.lead {
  font-size: var(--t-lg);
  line-height: var(--lh-snug);
  color: var(--c-muted);
}

/* Long unbreakable strings (emails, order ids, URLs) must never widen a
   grid/flex track or leak out of a card. `anywhere` — unlike `break-word` —
   also shrinks the min-content width, which is what actually stops the leak. */
p,
li,
dd,
dt,
address,
h1,
h2,
h3,
h4,
h5,
h6,
figcaption,
summary,
label,
legend,
td,
th,
span,
strong,
a,
em,
b,
small {
  overflow-wrap: anywhere;
}

/* …except where a string must stay on one line. */
.nowrap,
.mono.nowrap {
  overflow-wrap: normal;
  word-break: keep-all;
}

.muted {
  color: var(--c-muted);
}

.text-sm {
  font-size: var(--t-sm);
}

.mono {
  font-family: var(--f-mono);
  font-size: 0.92em;
}

.nowrap {
  white-space: nowrap;
}

/* long paragraphs in narrow columns */
.prose>*+* {
  margin-top: var(--s-4);
}

.prose h3 {
  margin-top: var(--s-6);
}

/* ------------------------------------------------------------------- lists */
.check-list {
  display: grid;
  gap: var(--s-3);
}

.check-list li {
  position: relative;
  padding-left: var(--s-6);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: var(--r-full);
  background: var(--c-sage);
  box-shadow: 0 0 0 4px var(--c-sage-soft);
}

/* ------------------------------------------------------------------- utilities */
.block {
  display: block !important;
}

.inline-block {
  display: inline-block !important;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}