/* ============================================================================
   base.css — reset, typography, primitives.

   Design intent (why this looks the way it does):
   The failure mode for a religious order's website is looking like a SaaS
   landing page — pill buttons, gradients, drop-shadowed cards, everything
   centred, an icon in a circle above every heading. That is the "AI built it"
   look and it is explicitly out of bounds here.

   Instead this leans editorial and printed: a strong serif display face, real
   typographic hierarchy doing the work instead of decoration, near-square
   corners, hairline rules, wide margins, and photographs given room to breathe.
   Restraint is the design. An 800-year-old order does not need a gradient.
   ========================================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

/* ---------- Document ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Headings ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: var(--leading-tight);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;      /* stops orphan words in headings */
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { text-wrap: pretty; }
p + p { margin-top: var(--s-4); }

.prose { max-width: var(--measure); }
.prose p + p { margin-top: var(--s-4); }
.prose h2 { margin: var(--s-7) 0 var(--s-4); }
.prose h3 { margin: var(--s-6) 0 var(--s-3); }

/* ---------- Links ---------- */
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- Layout primitives ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--narrow { max-width: var(--shell-narrow); }

.section { padding-block: clamp(var(--s-7), 8vw, var(--s-9)); }
.section--alt { background: var(--bg-alt); }
.section--dark {
  background: var(--brown-900);
  color: #e8ded9;
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a { color: var(--gold-500); }

/* ---------- Eyebrow: small caps label above a heading ----------
   Used instead of the icon-in-a-circle cliché. */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

/* ---------- Rule: a short gold hairline, the one recurring ornament ---------- */
.rule {
  width: 3rem;
  height: 2px;
  background: var(--accent);
  border: 0;
  margin: var(--s-5) 0;
}
.rule--center { margin-inline: auto; }

/* ---------- Buttons — square, bordered, no gradient, no pill ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--s-3) var(--s-6);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.btn--primary {
  background: var(--brown-900);
  color: #fff;
  border: 1px solid var(--brown-900);
}
.btn--primary:hover { background: var(--brown-700); border-color: var(--brown-700); color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--brown-900);
  border: 1px solid var(--brown-900);
}
.btn--ghost:hover { background: var(--brown-900); color: #fff; }

.btn--onDark {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.65);
}
.btn--onDark:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--brown-900); }

/* ---------- Pull quote — for the Charism / Mission statements ----------
   These are the order's own words. They get the most typographic dignity
   on the whole site: display face, large, gold rule, never boxed in a card. */
.pullquote {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.4;
  color: var(--brown-900);
  border-left: 2px solid var(--accent);
  padding-left: var(--s-5);
  max-width: 54ch;
}
.pullquote cite {
  display: block;
  margin-top: var(--s-4);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

/* ---------- Figure / portrait ----------
   Photographs of the friars: square crop, subtle warm tint on rest that
   lifts on hover. No heavy filters — these are real people, shown plainly. */
.portrait { margin: 0; }
.portrait img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 22%;   /* bias up — faces sit high in these frames */
  border-radius: var(--radius);
  filter: saturate(0.92);
  transition: filter var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.portrait:hover img { filter: saturate(1); transform: scale(1.012); }
.portrait figcaption {
  margin-top: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--heading);
}
.portrait .role {
  font-family: var(--font-body);
  font-size: var(--step--1);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.stack > * + * { margin-top: var(--s-4); }
.muted { color: var(--text-muted); }
.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;
}
.skip-link {
  position: absolute; top: -3rem; left: var(--s-4); z-index: 100;
  background: var(--brown-900); color: #fff; padding: var(--s-3) var(--s-4);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s-4); }
