/* base.css — reset, base typography, layout primitives. The :root below holds LAYOUT AND MOTION MEASURES ONLY: a colour or a family declared here would shadow variables.css, which loads first and is the runtime authority. */
:root {
  --base-size: 1rem;
  --line-height: 1.6;
  --section-pad: clamp(3.5rem, 6vw, 5rem);
  --section-pad-mobile: 2.5rem;
  --gap: clamp(1.25rem, 3vw, 2rem);
  --gap-sm: 1rem;
  --gutter: clamp(20px, 3vw, 50px);
  --gutter-mobile: 1.5rem;
  /* The content measure is owned by variables.css; this file loads after it, so a literal here would shadow the authority. These two delegate. */
  --container: var(--container-content);
  --container-md: 100rem;
  --container-sm: 75rem;
  --container-xs: 48rem;
  --container-lg: var(--container-wide);
  --radius: 0.375rem;
  --radius-lg: 0.75rem;
  --button-padding-y: 0.875rem;
  --button-padding-x: 1.75rem;

  /* In a :root because a @keyframes resolves a custom property against the ANIMATING element, not against the rule that started the animation. */
  --reveal-distance: 48px;
  --reveal-duration: 1.2s;
  --reveal-delay: 0ms;
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* --sans, not --serif: the body family is the project's text face. --serif stays declared for the long-form/quote face. */
  font-family: var(--sans);
  font-size: var(--base-size);
  line-height: var(--line-height);
  color: var(--ink);
  /* The site's ground is a SITE decision, painted here from a token, never a colour each page root
     repeats: it shows wherever no section paints its own — the header clearance, a generic template,
     a transparent strip — and a theme whose pages painted a cream `<main>` over a white body left
     that cream missing in exactly those places (operator, 2026-09-13). Pass 0 answers what the ground
     is; a section that differs paints itself, in its own block. */
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--brand-dark);
}

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

/* Themes calibrate the clamp() max values to the design's intended viewport. */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--sans);
  color: var(--ink);
}

h1 {
  font-size: clamp(2.5rem, 5.15vw, 5.625rem); /* ~90px max */
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(2rem, 2.86vw, 3.125rem); /* ~50px max */
  font-weight: 400;
  line-height: 1.21;
}
h2.is-large {
  font-size: clamp(2.25rem, 3.45vw, 3.75rem); /* ~60px — banner/CTA variant */
}

h3 {
  font-size: clamp(1.5rem, 2.25vw, 2.4375rem); /* ~39px max */
  font-weight: 400;
  line-height: 1.21;
}

h4 {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.15vw, 1.25rem); /* ~20px max */
  font-weight: 600;
  line-height: 1.23;
}

.t-body {
  font-family: var(--sans);
  font-size: clamp(1rem, 1.15vw, 1.25rem); /* ~20px */
  font-weight: 300;
  line-height: 1.5;
}

.t-lead {
  font-family: var(--sans);
  font-size: clamp(1.125rem, 1.5vw, 1.625rem); /* ~26px — about/lead body paragraphs */
  font-weight: 400;
  line-height: 1.54;
}

.t-quote {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.05vw, 1.125rem); /* ~18px — testimonial/quote body */
  font-weight: 300;
  line-height: 1.55;
}

p,
ul,
ol,
blockquote {
  margin: 0 0 1em;
}

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

.container-lg {
  width: 100%;
  max-width: var(--container-lg);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-fluid,
.container-full {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-pad {
  padding-block: var(--section-pad);
}

.btn-layout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: var(--button-padding-y) var(--button-padding-x);
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-layout:hover,
.btn-layout:focus-visible {
  transform: translateY(-1px);
}

.btn-layout.default {
  background: var(--button-bg);
  color: var(--button-text);
  border-color: var(--button-bg);
}

.btn-layout.default:hover,
.btn-layout.default:focus-visible {
  background: var(--button-bg-hover);
  border-color: var(--button-bg-hover);
  color: var(--button-text);
}

.btn-layout.hollow {
  background: transparent;
  color: var(--button-outline-color);
  border-color: var(--button-outline-color);
}

.btn-layout.hollow:hover,
.btn-layout.hollow:focus-visible {
  background: var(--button-outline-hover-bg);
  color: var(--button-outline-hover-color);
  border-color: var(--button-outline-hover-bg);
}

.entry-content > * + * {
  margin-top: 1.25rem;
}

.entry-list {
  display: grid;
  gap: var(--gap);
}

.entry-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.entry-card__title {
  margin-bottom: 0.5rem;
}

.entry-card__excerpt > *:last-child {
  margin-bottom: 0;
}

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

.reveal-pending {
  opacity: 0;
  will-change: opacity, transform;
}

.reveal-pending.scroll,
.reveal-pending.scroll-up,
.reveal-pending[data-reveal="up"] {
  transform: translate3d(0, var(--reveal-distance), 0);
}

.reveal-pending.scroll-down,
.reveal-pending[data-reveal="down"] {
  transform: translate3d(0, calc(var(--reveal-distance) * -1), 0);
}

.reveal-pending.scroll-left,
.reveal-pending[data-reveal="left"] {
  transform: translate3d(calc(var(--reveal-distance) * -1), 0, 0);
}

.reveal-pending.scroll-right,
.reveal-pending[data-reveal="right"] {
  transform: translate3d(var(--reveal-distance), 0, 0);
}

.ready,
.ready-up,
.ready-down,
.ready-left,
.ready-right {
  opacity: 1;
  animation-duration: var(--reveal-duration);
  animation-delay: var(--reveal-delay);
  animation-fill-mode: both;
  animation-timing-function: var(--reveal-ease);
  will-change: opacity, transform;
}

.ready,
.ready-up {
  animation-name: fadeInUp;
}

.ready-down {
  animation-name: fadeInDown;
}

.ready-left {
  animation-name: fadeInLeft;
}

.ready-right {
  animation-name: fadeInRight;
}

.reveal-visible {
  opacity: 1;
  transform: none;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, calc(var(--reveal-distance) * -1), 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, var(--reveal-distance), 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(calc(var(--reveal-distance) * -1), 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(var(--reveal-distance), 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-pending,
  .ready,
  .ready-up,
  .ready-down,
  .ready-left,
  .ready-right,
  .reveal-visible {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Cross-document view transitions. Both documents have to opt in, which every page does because this ships in the global stylesheet; a browser without the at-rule navigates the way it always did. The header opts into its own group (header.css) so the fixed bar is painted continuously. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: ease;
}

/* Reduced motion kills the crossfade. One transition NAME per selector list on purpose: a parser that does not recognise a given `::view-transition-*(name)` drops the whole list it appears in. */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root),
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }

  ::view-transition-group(site-header),
  ::view-transition-old(site-header),
  ::view-transition-new(site-header) {
    animation: none !important;
  }
}

@media (max-width: 575px) {
  .container,
  .container-fluid,
  .container-full,
  .container-lg {
    padding-inline: var(--gutter-mobile);
  }

  .section-pad {
    padding-block: var(--section-pad-mobile);
  }
}