/* Base: fonts, reset, typography, layout primitives, texture, a11y utilities */

/* ---------- Fonts ----------
   Self-hosted, subset, renamed WOFF2 (see /assets/fonts/LICENSE.txt).
   Each face has a metric-matched system fallback so swap causes no layout shift. */
@font-face {
  font-family: 'BA Serif';
  src: url('/assets/fonts/ba-serif.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
/* Display cuts: static, optical size 72, weight 500. Small, so the headline (the LCP element) renders early. */
@font-face {
  font-family: 'BA Serif Display';
  src: url('/assets/fonts/ba-serif-display.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'BA Serif Display';
  src: url('/assets/fonts/ba-serif-italic-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'BA Grotesk';
  src: url('/assets/fonts/ba-grotesk.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'BA Mono';
  src: url('/assets/fonts/ba-mono.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'BA Mono';
  src: url('/assets/fonts/ba-mono-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
/* Fallbacks. Values computed from the subset fonts against the named system face
   (dev/build-fonts.py prints them): size-adjust from average advance width, overrides divided by it. */
@font-face {
  font-family: 'BA Serif Fallback';
  src: local('Georgia');
  size-adjust: 91.52%;
  ascent-override: 80.31%;
  descent-override: 28.95%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'BA Grotesk Fallback';
  src: local('Arial');
  size-adjust: 94.13%;
  ascent-override: 93.27%;
  descent-override: 22.31%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'BA Mono Fallback';
  src: local('Courier New');
  size-adjust: 99.92%;
  ascent-override: 78.19%;
  descent-override: 34.21%;
  line-gap-override: 0%;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--newsprint);
}
/* The fixed Call / Join now bar must not cover a focused link when the page scrolls to it (audit F3) */
@media (max-width: 719px) {
  html { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  font-synthesis: none;
  color: var(--ink);
  background-color: var(--newsprint);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere; /* long emails and URLs break rather than scroll the page sideways */
}

/* Paper grain over the whole ground: a tiled 64px PNG, fixed, under everything.
   Off when the visitor asked for less data. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 64px 64px;
}
@media (prefers-reduced-data: reduce) {
  body::before { display: none; }
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, h4, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
hr { border: 0; border-top: var(--hairline) solid var(--rule); margin: 0; }
address { font-style: normal; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  line-height: var(--lh-heading);
  letter-spacing: var(--track-display);
  text-wrap: balance;
}
h1 { font-size: var(--fs-hero); line-height: var(--lh-display); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); }
/* Below about 32px the text face (optical size 16) holds its hairlines; the display cut is for h1, h2 and big figures */
h3 { font-family: var(--font-body); font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.01em; }
h4 { font-family: var(--font-body); font-size: var(--fs-lead); line-height: 1.25; letter-spacing: 0; }
@media (max-width: 639px) {
  h1 { line-height: var(--lh-tight); }
}

/* The one highlighted phrase in a heading: bold italic (a real 700 cut of the display face), no underline */
h1 em, h2 em, .hl {
  font-style: italic;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}

p { text-wrap: pretty; }
strong, b { font-weight: var(--fw-bold); }
em, i { font-style: italic; }
small { font-size: var(--fs-xs); }

a {
  color: inherit;
  text-decoration: none;
}
/* Running-text links underline with a hairline and turn red on hover */
.prose a, .link-inline, p > a:not(.btn), .prose li > a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule);
  transition: color var(--dur-fast) var(--ease-ink), text-decoration-color var(--dur-fast) var(--ease-ink);
}
.prose a:hover, .link-inline:hover, p > a:not(.btn):hover, .prose li > a:not(.btn):hover {
  color: var(--red);
  text-decoration-color: currentColor;
}

::selection { background: var(--red); color: var(--newsprint); }
::marker { color: var(--lead); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--r-chip);
}
/* On ink surfaces the red ring is 2.6:1; newsprint is 16:1 (audit F2) */
.section--ink :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible {
  outline-color: var(--newsprint);
}

/* ---------- Text utilities ---------- */
.eyebrow {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--lead);
}
.section--ink .eyebrow { color: var(--on-ink-2); }

/* Run-in head: the legal notice's "SUPREME COURT…" opener. Bold caps, then the sentence runs on. */
.runin {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.8em;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
}
.runin--red { color: var(--red); }

.lead { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--lead); max-width: var(--measure-lead); }
.section--ink .lead { color: var(--on-ink-2); }
.smalltype { font-size: var(--fs-xs); line-height: var(--lh-small); }
.notice-text {
  font-size: var(--fs-xs);
  line-height: var(--lh-small);
  color: var(--lead);
  text-wrap: pretty;
}
@media (min-width: 640px) {
  .notice-text--justified { text-align: justify; hyphens: auto; }
}
.mono { font-family: var(--font-mono); }
.label { font-family: var(--font-label); letter-spacing: var(--track-caps); text-transform: uppercase; font-size: var(--fs-label); }
.tnum { font-variant-numeric: tabular-nums; }
/* Every phone number on the site in the label face, whatever surrounds it */
a[href^="tel:"] { font-family: var(--font-label); font-weight: 600; letter-spacing: var(--track-caps); font-variant-numeric: proportional-nums; }
.muted { color: var(--lead); }
.measure { max-width: var(--measure); }

/* Courier date / index line, e.g. "NOTICE OF SALE · SALE 10/14/2026" */
.docket-line {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--lead);
  font-variant-numeric: tabular-nums;
}

/* ---------- Rules ---------- */
.rule { border: 0; border-top: var(--hairline) solid var(--rule); }
.rule--ink { border-top-color: var(--ink); }
/* Oxford rule: 1px over 3px, the newspaper section divider */
.rule--oxford {
  border: 0;
  height: 6px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 3px no-repeat;
}
.section--ink .rule { border-top-color: var(--line-on-ink); }
.section--ink .rule--oxford { background-image: linear-gradient(var(--newsprint), var(--newsprint)), linear-gradient(var(--newsprint), var(--newsprint)); }

/* ---------- The stamp ----------
   Notary Red, double hairline border, a few degrees off true. One per viewport. */
.stamp {
  display: inline-block;
  padding: 0.3em 0.7em 0.25em;
  border: 1px double var(--red);
  outline: 1px solid var(--red);
  outline-offset: 2px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--fs-label);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  line-height: 1;
  color: var(--red);
  background: var(--newsprint);
  transform: rotate(var(--tilt-stamp));
  transform-origin: center;
}
.stamp--lg { font-size: var(--fs-sm); padding: 0.4em 0.9em 0.35em; }
.stamp--flat { transform: none; }
.stamp--ghost { border-style: dashed; outline: 0; color: var(--lead); border-color: var(--lead); }

/* ---------- Registration marks ----------
   Two crossed hairlines in a 12px circle, outer corners of the hero and footer. */
.reg-marks { position: relative; }
.reg-marks::before, .reg-marks::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--lead);
  border-radius: 50%;
  background:
    linear-gradient(var(--lead), var(--lead)) center / 1px 18px no-repeat,
    linear-gradient(var(--lead), var(--lead)) center / 18px 1px no-repeat;
  pointer-events: none;
}
.reg-marks::before { top: 12px; left: 12px; }
.reg-marks::after { bottom: 12px; right: 12px; }
@media (max-width: 719px) {
  .reg-marks::before, .reg-marks::after { display: none; }
}
.section--ink.reg-marks::before, .section--ink.reg-marks::after { border-color: var(--on-ink-3); background-image: linear-gradient(var(--on-ink-3), var(--on-ink-3)), linear-gradient(var(--on-ink-3), var(--on-ink-3)); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(40px, 4vw, 64px); }
.section--white { background: var(--newsprint); border-block: var(--hairline) solid var(--rule); }
/* Secondary paper band: alternates with the page ground so long runs of sections have rhythm */
.section--tint { background: var(--newsprint-2); border-block: var(--hairline) solid var(--rule); }
.section--tint .section-head { box-shadow: inset 0 4px 0 -1px var(--ink); padding-top: 20px; } /* Oxford pair: 1px border + 3px inset */
.section--tint .chip:hover { background: var(--newsprint); }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section--ink::selection, .section--ink ::selection { background: var(--brass); color: var(--ink); }

/* Full-bleed child inside a container (the calendar board) */
.bleed { margin-inline: var(--bleed); padding-inline: var(--gutter); }

.stack { display: flex; flex-direction: column; }
.stack--xs { gap: 6px; }
.stack--sm { gap: 8px; }
.stack--md { gap: 16px; }

/* Column hairlines (draft class name kept): visible newspaper columns on wide screens */
.grid-bg, .grid-bg--ink { position: relative; }
@media (min-width: 1080px) {
  .grid-bg {
    background-image: repeating-linear-gradient(90deg, transparent 0 calc((100% - 11 * var(--col-gap)) / 12), var(--rule-soft) calc((100% - 11 * var(--col-gap)) / 12) calc((100% - 11 * var(--col-gap)) / 12 + 1px), transparent calc((100% - 11 * var(--col-gap)) / 12 + 1px) calc((100% - 11 * var(--col-gap)) / 12 + var(--col-gap)));
    background-origin: content-box;
  }
  .grid-bg--ink { background-image: none; }
}

/* ---------- Icons ---------- */
.icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

/* ---------- Accessibility ---------- */
.nowrap { white-space: nowrap; }
.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;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: var(--z-skip);
  background: var(--ink);
  color: var(--newsprint);
  padding: 12px 18px;
  font-family: var(--font-label);
  font-size: var(--fs-sm);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
}
.skip-link:focus { top: 12px; }

/* Gated member values: blurred placeholder strings, hidden from assistive tech,
   always paired with a visually hidden "Members only" */
.gated { filter: blur(6px); user-select: none; }

/* ---------- Motion baseline ----------
   Pre-reveal states live under html.js (added by main.js) so nothing is hidden without JS.
   Reduced motion: no translation or scale anywhere; fades only. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
