@font-face {
  font-family: "Brutal Type";
  src: url("../fonts/brownfox-brutal-type.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Brutal Type";
  src: url("../fonts/brownfox-brutal-type-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Neutral ramp — light theme (low = light, high = dark ink) */
  --color-neutral-100: #f5f5f1;
  --color-neutral-200: #eceae3;
  --color-dark: #0a0c0d;

  /* Brand accent — BPR green */
  --color-accent-400: #c0d217;  /* brand primary */
  --color-accent-500: #a0af10;
  --color-accent-600: #7a870c;

  /* Semantic tokens */
  --color-bg: #fafaf7;
  --color-surface: var(--color-neutral-100);
  --color-surface-cool: #d5d7cb;
  --color-text: var(--color-dark);
  --color-text-muted: rgb(10 12 13 / 0.68);
  --color-border: rgb(10 12 13 / 0.1);
  --color-border-strong: rgb(10 12 13 / 0.18);

  --font-sans: "Brutal Type", system-ui, -apple-system, sans-serif;
  --rule-hair: 1px solid rgb(10 12 13 / 0.18);
  --rule-strong: 1px solid rgb(10 12 13 / 0.28);
  --ease-fast: 160ms cubic-bezier(0.3, 0, 0.2, 1);
  --ease-base: 260ms cubic-bezier(0.22, 1, 0.36, 1);
  --font-size-2xs: 0.6875rem;
  --font-size-xs: 0.8125rem;
  --font-size-sm: 0.9375rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.2rem;
  --font-size-xl: 1.375rem;
  --font-size-2xl: clamp(1.55rem, 2.75vw, 2.0625rem);
  --font-size-3xl: clamp(2rem, 5vw, 3.25rem);
  --font-size-4xl: clamp(3rem, 6.5vw, 4.875rem);
  --section-stack-gap: clamp(1.5rem, 3vw, 2.25rem);
  --card-padding-y: clamp(1.25rem, 2.5vw, 1.875rem);
  --card-padding-x: clamp(1.5rem, 3vw, 2.25rem);
  --card-gap: 0.75rem;
  --font-weight-strong: 800;

  /* Shared heading style (display) */
  --heading-line-height: 1.1;
  --heading-letter-spacing: -0.045em;
}

@media (max-width: 640px) {
  :root {
    --font-size-base: 1.0625rem;
    --font-size-xl: 1.4375rem;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  background: var(--color-bg);
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: repeating-linear-gradient(
    135deg,
    var(--color-accent-400) 0,
    var(--color-accent-400) 0.3rem,
    var(--color-bg) 0.3rem,
    var(--color-bg) 0.65rem
  );
  background-attachment: fixed;
  font-feature-settings: "liga", "kern", "tnum", "ss01";
}

main {
  display: block;
  max-width: 1200px;
  margin-inline: auto;
  background: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--color-text);
  text-wrap: balance;
}

p, ul, ol, blockquote, dl, dd, dt {
  margin: 0;
}

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

ul li {
  position: relative;
  padding-left: 1.25rem;
}

ul li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.42em;
  width: 0;
  height: 0;
  border-top: 0.35rem solid transparent;
  border-bottom: 0.35rem solid transparent;
  border-left: 0.45rem solid currentColor;
}

ul.list-plain li {
  padding-left: 0;
}

ul.list-plain li::before {
  content: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease-base), opacity var(--ease-base);
}

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

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

::selection {
  background-color: var(--color-accent-400);
  color: var(--color-text);
}

/* ── Container ────────────────────────────── */
.container {
  width: 100%;
  max-width: 100rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 3vw, 2.25rem);
}

/* ── Section spacing ──────────────────────── */
.section {
  position: relative;
  padding-block: clamp(2.75rem, 5.5vw, 4.25rem);
}

/* ── Shared display heading ───────────────── */
.section-heading {
  margin: 0;
  font-size: var(--font-size-2xl);
  font-weight: 400;
  line-height: var(--heading-line-height);
  letter-spacing: var(--heading-letter-spacing);
  color: var(--color-text);
  text-wrap: balance;
}

@media (max-width: 720px) {
  .section-heading {
    font-size: clamp(1.9rem, 5.5vw, 2.0625rem);
  }
}

.section-heading strong {
  font-weight: var(--font-weight-strong);
}

/* ── Shared body copy ─────────────────────── */
.section-copy {
  margin: 0;
  font-size: var(--font-size-lg);
  line-height: 1.55;
  color: var(--color-text);
}

.container > .section-copy {
  max-width: 60%;
}

@media (max-width: 720px) {
  .container > .section-copy {
    max-width: 100%;
  }
}

.section-copy strong {
  font-weight: var(--font-weight-strong);
}

/* ── Footnote ─────────────────────────────── */
.section-footnote {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* ── Long-form prose ──────────────────────────
   Type scale sourced from the frontpage (masthead + first section):
   h1/h2 → --font-size-2xl, body → --font-size-lg.
   Nested levels step down through the existing size scale.         */
.prose {
  color: var(--color-text);
  font-size: var(--font-size-lg);
  line-height: 1.6;
}

.prose h1,
.prose h2 {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: var(--rule-hair);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-strong);
  line-height: var(--heading-line-height);
  letter-spacing: var(--heading-letter-spacing);
  text-wrap: balance;
}

.prose > h1:first-child,
.prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin: clamp(1.75rem, 3vw, 2.25rem) 0 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-strong);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.prose h4 {
  margin: 1.25rem 0 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-strong);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.prose h5 {
  margin: 1rem 0 0;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.prose p,
.prose li,
.prose address { font-size: var(--font-size-lg); line-height: 1.6; }

.prose p { margin: 0; }
.prose address { font-style: normal; }

.prose ul,
.prose ol {
  margin: 1rem 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prose a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--color-border-strong);
  transition: text-decoration-color var(--ease-fast), color var(--ease-fast);
  word-break: break-word;
}

.prose a:hover {
  color: var(--color-accent-600);
  text-decoration-color: var(--color-accent-400);
}

/* Sibling spacing — placed last so it wins over element resets above. */
.prose > * + * { margin-top: 1rem; }
.prose > :is(h1, h2, h3, h4, h5) + * { margin-top: 0.5rem; }
.prose > h3 + * { margin-top: 1rem; }
.prose > :is(h1, h2) + * { margin-top: 1.5rem; }

/* ── Brand logo ───────────────────────────── */
.brand-logo {
  display: inline-flex;
  width: clamp(10rem, 18vw, 13.5rem);
  line-height: 0;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Button ───────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--ease-base),
    color var(--ease-base),
    transform var(--ease-fast);
}

.btn--primary,
.btn--secondary {
  min-height: 3.25rem;
  padding: 0.9rem 1.75rem;
}

.btn--primary::after,
.btn--secondary::after {
  content: "→";
  font-weight: 700;
  transition: transform var(--ease-base);
}

.btn--primary:hover::after,
.btn--secondary:hover::after {
  transform: translateX(4px);
}

.btn--primary {
  background-color: var(--color-accent-400);
}

.btn--secondary {
  background-color: transparent;
  border: 2px solid var(--color-dark);
}

.btn--primary:hover,
.btn--secondary:hover {
  background-color: var(--color-dark);
  color: var(--color-accent-400);
}

/* ── Footer ───────────────────────────────── */
.footer-root {
  max-width: 1200px;
  margin-inline: auto;
  background-color: var(--color-dark);
  color: var(--color-neutral-100);
  position: relative;
  overflow: hidden;
  border-top: var(--rule-strong);
}

.footer-minimal {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  padding-block: clamp(2rem, 4vw, 3rem);
}

@media (max-width: 640px) {
  .footer-minimal {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.footer-brand {
  font-size: var(--font-size-sm);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--color-neutral-100);
  margin: 0;
  text-transform: uppercase;
}

.footer-brand strong {
  font-weight: 800;
}

.footer-meta {
  font-size: var(--font-size-sm);
  color: rgb(245 245 241 / 0.65);
  line-height: 1.55;
  margin: 0;
}

.footer-address {
  font-style: normal;
  font-size: var(--font-size-sm);
  color: rgb(245 245 241 / 0.65);
  line-height: 1.55;
  margin: 0;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
  font-size: var(--font-size-2xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(245 245 241 / 0.65);
}

.footer-legal a:hover {
  color: var(--color-neutral-100);
}

/* ── Legal pages ─────────────────────────── */
.legal {
  padding-top: clamp(1.25rem, 2.4vw, 1.8rem);
}

.legal__inner {
  display: flex;
  flex-direction: column;
  gap: var(--section-stack-gap);
}

.legal__logo {
  align-self: flex-start;
  margin-bottom: clamp(3.5rem, 7vw, 5.25rem);
}

.legal__title {
  margin: 0;
  font-size: var(--font-size-2xl);
}

.legal-address {
  font-style: normal;
}

.legal__back {
  margin: 0;
}

.legal__back a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--font-size-sm);
  letter-spacing: 0.02em;
}

.legal__back a:hover {
  color: var(--color-text);
}

/* ── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, a, button { transition: none !important; }
}

/* ── Focus styles ─────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 4px;
  border-radius: 0.375rem;
  box-shadow: 0 0 0 6px rgb(192 210 23 / 0.22);
}
