/* BR design kit — base typography, focus, motion, container.
   Mirrors benryan.com.au app/globals.css (@layer base + the unlayered ≤1000px block). */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-optical-sizing: none;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  transition:
    background-color 250ms ease,
    color 250ms ease;
}

/* Display headings: Atkinson, weight 600, mixed case, tight */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
h4 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
h1 { font-size: 4.5rem; }
h2 { font-size: 3.5rem; }
h3 { font-size: 2.5rem; }
h4 { font-size: 2rem; }

p {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
}
p.lg {
  font-size: 1.75rem;
  line-height: 1.3;
}

/* Eyebrow / meta label: mono, uppercase, tracked */
p.sm,
a.sm {
  text-decoration: none;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-secondary);
  letter-spacing: 0.1rem;
}

/* Card / tile titles, independent of heading level */
.card-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.container {
  width: 100%;
  padding: 2rem;
  max-width: 2000px;
  margin: 0 auto;
}

.prose {
  max-width: var(--measure);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

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

/* Key threshold on the site is 1000px, not Tailwind's lg (1024) */
@media (max-width: 1000px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
  p.lg { font-size: 1.125rem; }
  p.sm { font-size: 0.8rem; letter-spacing: 0.05rem; }
  .container { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
  }
}
