/* ==========================================================================
   Paper Boy Biz — Base styles
   Reset, typography, layout primitives and utilities shared by every page.
   Depends on: tokens.css
   ========================================================================== */

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }

/* ---- Typography -------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  margin: 0 0 var(--space-3);
  color: var(--color-text);
}
h1 { font-size: var(--fs-h1); font-weight: var(--fw-heavy); line-height: var(--lh-tight); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-heavy); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-bold); }
h5 { font-size: var(--fs-h5); font-weight: var(--fw-bold); }
h6 { font-family: var(--font-body); font-size: var(--fs-h6); font-weight: var(--fw-bold); line-height: 1.4; margin: 0 0 var(--space-2); }
p { margin: 0 0 var(--space-4); }
small, .text-small { font-size: var(--fs-small); }
.text-muted { color: var(--color-text-muted); }
strong, b { font-weight: var(--fw-bold); }

a { color: var(--color-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-primary-dark); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 var(--space-2);
}

/* ---- Layout ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

.section { padding-block: var(--section-gap); }
.section--light { background: var(--color-bg-light); }
.section--tight { padding-block: var(--space-8); }
.section + .section:not(.section--light) { padding-top: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-6);
}
.section-head h2 { margin: 0; }
.section-head__link { font-weight: var(--fw-semibold); font-size: var(--fs-small); }

.page-title {
  padding-block: var(--space-6) var(--space-7);
  border-bottom: var(--border-width) solid var(--color-border);
  margin-bottom: var(--space-8);
}
.page-title h1 { margin: var(--space-3) 0 0; }
.page-title p { margin: var(--space-3) 0 0; color: var(--color-text-muted); max-width: 70ch; }

.two-col { display: grid; gap: var(--space-8); }
@media (min-width: 1024px) {
  .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: var(--space-10); }
}

/* ---- Prose (legal pages, blog posts, product descriptions) ------------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: var(--fs-h3); margin-top: var(--space-8); }
.prose h3 { font-size: var(--fs-h4); margin-top: var(--space-6); }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 var(--space-4); }
.prose li { margin-bottom: var(--space-2); }
.prose img { border-radius: var(--radius-md); margin-block: var(--space-6); }

/* ---- Utilities --------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 1000;
  background: var(--color-action); color: var(--color-text);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  font-weight: var(--fw-bold); text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 32px; height: 32px; }
.tabular { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: var(--space-4); }

/* ---- Heading size helpers (visual size without changing the outline) -- */
.h3 { font-size: var(--fs-h3); }
.h4 { font-size: var(--fs-h4); }
.h5 { font-size: var(--fs-h5); }
figure { margin: 0; }

/* ---- Page headers ------------------------------------------------------ */
.page-head { padding-block: var(--space-5) var(--space-6); }
.page-head h1 { margin: var(--space-3) 0 0; }
.page-head .eyebrow { margin-top: var(--space-4); }
.page-head .eyebrow + h1 { margin-top: 0; }
.page-head > p { margin: var(--space-2) 0 0; max-width: 70ch; }
.page-head--center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.page-head--center h1 { margin-top: var(--space-3); }
.center-head { text-align: center; max-width: 720px; margin: 0 auto var(--space-7); }
.center-actions { display: flex; justify-content: center; margin-top: var(--space-7); }
.eyebrow--inverse { color: var(--color-action); }

/* ---- Checklist --------------------------------------------------------- */
.checklist { display: flex; flex-direction: column; gap: var(--space-3); list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.checklist li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 0.9375rem; }
.checklist .icon { color: var(--color-success); margin-top: 3px; stroke-width: 2.5; }

/* ---- CTA band (dark) --------------------------------------------------- */
.cta-band { background: var(--color-primary-dark); color: var(--color-text-inverse); }
.cta-band__inner { display: flex; flex-direction: column; gap: var(--space-6); padding-block: var(--space-9); }
.cta-band h2 { color: var(--color-text-inverse); }
.cta-band p { color: var(--color-text-inverse-muted); margin: 0; max-width: 62ch; }
@media (min-width: 1024px) {
  .cta-band__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-10); }
  .cta-band .btn { flex: none; }
}

/* ---- Auth helpers (login, affiliate login) ---------------------------- */
.auth-logo { width: 96px; }

/* ---- Logo crop --------------------------------------------------------
   The logo is the WP media library file Untitled-design-22.png (500x500,
   id 23). Its artwork sits at x 58-444, y 70-412 inside transparent
   padding, so this wrapper clips the padding away. Size the wrapper by
   width (height follows the 387:343 ratio) or by --logo-h. */
.logo-crop { display: block; overflow: hidden; aspect-ratio: 387 / 343; line-height: 0; }
.logo-crop img { display: block; width: 129.199%; max-width: none; height: auto; margin: -18.088% 0 0 -14.987%; }
.logo-crop[style*="--logo-h"], .masthead__logo .logo-crop { height: var(--logo-h); width: calc(var(--logo-h) * 387 / 343); }
.auth-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: var(--fs-small); }

/* ---- Order status pills ----------------------------------------------- */
.status { display: inline-flex; padding: 3px 10px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--color-bg-light); color: var(--color-text); }
.status--processing { background: var(--color-info-bg); color: var(--color-primary-dark); }
.status--completed { background: var(--color-success-bg); color: var(--color-success); }
