/* cut+paste — Base (fonts + reset + typography + structure) */

/* ==================== FONTS ==================== */
/* Self-hosted. No third-party font CDN — no request leaves our origin. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/Archivo.woff2") format("woff2");
}

@font-face {
  font-family: "Azeret Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/AzeretMono-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Azeret Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/AzeretMono-Bold.woff2") format("woff2");
}

/* ==================== RESET ==================== */

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

html {
  margin: 0;
  padding: 0;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip, not hidden: the rotated/scaled teaser overflows horizontally and
     must be contained, but `hidden` would make body a scroll container and
     propagate to the viewport. `clip` contains without that side effect. */
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

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

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

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- links ----------
   One inline-link treatment, defined here and nowhere else: a hair-rule
   underline in the brand orange, going orange on hover. Every text link on
   the site uses it. A link whose whole box is the target -- a button, a chip,
   a card, a nav list entry -- is not a text link and carries its own hover;
   adding one of those means adding nothing here.

   Adding a new text-link context means adding its selector to this list. That
   is the point: the declaration stays in one place instead of being retyped
   per component, which is how the four earlier copies drifted to two
   different thicknesses. */
.prose a,
.consent a,
.cal__note a,
.cal__status a,
.foot__legal a,
.doc-foot__inner a {
  text-decoration: underline;
  text-decoration-thickness: var(--rule-hair);
  text-underline-offset: 0.22em;
  text-decoration-color: var(--orange);
  transition: color 0.18s linear;
}

.prose a:hover,
.consent a:hover,
.cal__note a:hover,
.cal__status a:hover,
.foot__legal a:hover,
.doc-foot__inner a:hover {
  color: var(--orange);
}

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

/* Visible focus everywhere — brutalist, unapologetic */
:focus-visible {
  outline: var(--rule) solid var(--orange);
  outline-offset: 3px;
}

/* Keeps a format-bounded run -- a time label, a street address -- off two
   lines. Used inside the calendar meta lines; see fillMeta in js/calendar.js. */
.nowrap {
  white-space: nowrap;
}

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

/* ==================== CONCRETE ==================== */
/* Fractal-noise grain over everything. This is the "surface material." */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 220px;
}

/* ==================== TYPOGRAPHY ==================== */

.mega {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-mega);
  line-height: 0.78;
  letter-spacing: var(--track-mega);
  text-transform: lowercase;
}

.h-xl {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-xl);
  line-height: 0.82;
  letter-spacing: -0.035em;
  text-transform: lowercase;
}

.h-l {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-l);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.h-m {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-m);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.32;
  font-weight: 400;
  max-width: 34ch;
}

.body {
  font-size: var(--step-body);
  line-height: 1.5;
  max-width: 58ch;
}

/* The uncomfortably small register. Mono, tracked wide, uppercase. */
.micro {
  font-family: var(--mono);
  font-size: var(--step-micro);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
}

.micro-b {
  font-family: var(--mono);
  font-size: var(--step-micro);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
}

.nano {
  font-family: var(--mono);
  font-size: var(--step-nano);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-60);
}

/* The "+" is the brand. It's always orange, everywhere it appears. */
.plus {
  color: var(--orange);
  font-style: normal;
}

/* ==================== STRUCTURE ==================== */

.shell {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Reading container for text-only pages. A sibling of .shell, not a modifier
   of it: .shell frames a full-bleed composition, .sheet holds one column of
   copy. Both centre; they differ only in measure. */

.sheet {
  width: 100%;
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow {
  max-width: 1000px;
}

/* ==================== PROSE ==================== */
/* Long-form copy. The reset strips list markers and link underlines site-wide
   because the site is an interface; a document is not, so both come back here
   and nowhere else. */

.prose {
  font-size: var(--step-body);
  line-height: 1.62;
}

.prose p {
  margin-block: 0 1.15rem;
}

.prose p:last-child {
  margin-block-end: 0;
}

.prose h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-l);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  margin-block: clamp(2.5rem, 6vw, 4rem) 1.1rem;
}

.prose h2:first-child {
  margin-block-start: 0;
}

.prose h3 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: var(--step-micro);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--ink-60);
  margin-block: 1.9rem 0.7rem;
}

.prose ul,
.prose ol {
  margin-block: 0 1.15rem;
}

.prose li {
  position: relative;
  padding-inline-start: 1.5em;
  margin-block-end: 0.55rem;
}

/* The brand mark doubles as the bullet. */
.prose ul > li::before {
  content: "+";
  position: absolute;
  inset-inline-start: 0;
  color: var(--orange);
  font-weight: 700;
}

.prose ol {
  counter-reset: prose-ol;
}

.prose ol > li {
  counter-increment: prose-ol;
}

.prose ol > li::before {
  content: counter(prose-ol, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  font-family: var(--mono);
  font-size: var(--step-micro);
  letter-spacing: var(--track-micro);
  color: var(--ink-35);
  top: 0.25em;
}

.prose strong {
  font-weight: 700;
}

/* ==================== RULES ==================== */

/* Exposed structural rule — brutalism shows its skeleton */
.rule {
  height: var(--rule);
  background: var(--ink);
  border: none;
  margin: 0;
}

.rule-hair {
  height: var(--rule-hair);
  background: var(--ink-12);
  border: none;
  margin: 0;
}

/* ==================== CROP MARKS ==================== */
/* Printer's registration marks pinned to the viewport corners. */

.crop {
  position: fixed;
  width: 22px;
  height: 22px;
  pointer-events: none;
  z-index: 800;
  border-color: var(--ink);
  border-style: solid;
  border-width: 0;
  opacity: 0.55;
}

.crop--tl {
  top: 12px;
  left: 12px;
  border-top-width: var(--rule);
  border-left-width: var(--rule);
}
.crop--tr {
  top: 12px;
  right: 12px;
  border-top-width: var(--rule);
  border-right-width: var(--rule);
}
.crop--bl {
  bottom: 12px;
  left: 12px;
  border-bottom-width: var(--rule);
  border-left-width: var(--rule);
}
.crop--br {
  bottom: 12px;
  right: 12px;
  border-bottom-width: var(--rule);
  border-right-width: var(--rule);
}

@media (max-width: 768px) {
  .crop {
    width: 14px;
    height: 14px;
  }
}
