/**
 * @file becket.css
 * St. Thomas Becket palette — remaps sitetheme's shadcn design tokens to the
 * teal / gold / warm-neutral scheme, and exposes the raw brand tokens the
 * bespoke chrome below needs.
 *
 * Loaded after sitetheme's src/theme.css and css/chrome.css (base-theme
 * libraries load before subtheme libraries), so these :root declarations win on
 * source order and the shared chrome picks up this palette for free.
 *
 * The token mapping is the whole theme. Everything under it is chrome the
 * design asks for that no component owns.
 */

:root {
  /* Raw brand palette, straight from the design. */
  --teal: #002933;
  --gold: #967033;
  --gold-light: #b68235;
  /* The fill behind a WHITE button label. White on --gold-light is 3.37:1 and
     on the mockup's own #967033 exactly 4.50:1 — passing by a hundredth, which
     is not a margin worth shipping. This is one step darker: 4.80:1 on the
     label and 4.34:1 against the parchment page. */
  --gold-deep: #906c30;
  --claret: #610d00;
  --parchment: #f7f3ec;
  --parchment-2: #fffdf8;
  --sand: #e0d4c2;
  --sand-2: #cdbfa8;
  --ink: #201f1d;
  --brand-border: color-mix(in srgb, var(--ink) 16%, transparent);
}

/* Map the brand palette onto sitetheme's shadcn tokens so every shared
 * component (button, card, cta, section, footer, navbar …) adopts the scheme
 * with no per-component overrides. Both schemes are targeted; Becket is
 * light-first, like the design. */
:root,
.dark {
  --background: var(--parchment);
  --foreground: var(--ink);
  /* Cards: the mockup's parchment, with a secondary border (see the card block
     below). `--card` is the token every card component already paints with, so
     setting it here reaches the image, testimonial and text cards at once — and
     leaves each component's own background PROP (accent, primary, inverted)
     still winning where an author has chosen one.
     The border is doing the work of separating a card from what is behind it;
     the fill is deliberately the same family as the page. */
  --card: var(--parchment);
  --card-foreground: var(--ink);
  --popover: var(--parchment-2);
  --popover-foreground: var(--ink);

  /* Teal is the STRUCTURAL brand color — hero and footer bands, the navbar
     CTA, focus states. Not the loudest color on the page, but the one that
     carries the identity. */
  --primary: var(--teal);
  --primary-foreground: var(--parchment);

  /* Sand is the quiet band behind the Mass times and the giving strip. */
  --secondary: var(--sand);
  --secondary-foreground: var(--ink);

  /* Gold is the call-to-action color: eyebrows, links, button fills, rings. */
  --accent: var(--gold);
  --accent-foreground: var(--teal);

  --muted: var(--sand);
  --muted-foreground: color-mix(in srgb, var(--ink) 70%, transparent);
  /* The card border is the secondary color itself. `--border` is what the card
     components draw with, so this keeps the three consistent without pinning a
     color inside any of them. */
  --border: var(--secondary);
  --input: var(--brand-border);
  --ring: var(--accent);

  /* The card eyebrow is a muted teal in the design, not gold — and gold at
     11px on the cream card measures 4.07:1, just under AA. This clears it at
     6.0:1 and matches the mockup. */
  --card-eyebrow: #3b6e73;

  --destructive: var(--claret);
  --destructive-foreground: var(--parchment);

  /* Links in body copy. Claret carries the design's link color on the page;
     on a dark field it inverts to white. Both are theme settings — see the
     "Content links" block below for how the dark case is detected. */
  --link: var(--claret);
  --link-inverted: #ffffff;

  /* Squared, like the design: the mockup uses 0 radius throughout. */
  --radius: 0px;
}

/* -------------------------------------------------------------------------
 * Buttons
 *
 * The design's primary call to action is GOLD on the dark hero, not the
 * structural teal. Geometry and sizing come from the base theme.
 *
 * TWO DELIBERATE DEVIATIONS from the mockup, both at the owner's direction:
 * the label is WHITE rather than the mockup's teal, and the fill is a step
 * darker than its #967033 to carry that label. White on the mockup's own gold
 * measures exactly 4.50:1 — it passes, but a hundredth of headroom is not worth
 * shipping, and every future nudge to either color would break it. `--gold-deep`
 * gives 4.80:1 on the label and 4.34:1 against the page.
 * ------------------------------------------------------------------------- */
.ct-btn.ct-btn--primary {
  background: var(--gold-deep);
  color: #fff;
  border: 1px solid var(--gold-deep);
}

.ct-btn.ct-btn--primary:hover,
.ct-btn.ct-btn--primary:focus-visible {
  /* Invert to teal rather than to parchment. Parchment IS the page color, so
     the fill measured 1:1 against the surface and the button dissolved into the
     background at the exact moment it should feel most solid. */
  background: var(--teal);
  color: #fff;
  /* White hairline on hover and focus, at the owner's direction. It also does
     real work on the DARK band, where a teal fill would otherwise have no edge
     against the teal behind it. */
  border: 1px solid #fff;
}

/* On a dark band, `secondary-inverted` draws itself in `--accent` — and gold
   #967033 on teal is 3.42:1, under AA for a 12-15px label. `--gold-light` is
   the same step already used for the primary fill and measures 4.79:1 here. */
.ct-btn.ct-btn--secondary-inverted {
  color: var(--gold-light);
  border-color: var(--gold-light);
}

/* Hover / focus. The base theme's own hover here shifts the fill to an
   80%-alpha near-identical teal and leaves text and border alone — nothing you
   can actually see happen, which on the dark band's only outline-gold control
   makes it feel dead.
 *
 * It BRIGHTENS rather than fills: the gold goes a step lighter and a thin gold
 * wash comes up behind it. Filling solid would collide with `primary-inverted`,
 * which fills on hover — and this variant has to stay the quieter of the two or
 * the hierarchy on that band inverts again.
 *
 * Measured: label 6.06:1 on the washed fill, border 7.54:1 against the band. */
.ct-btn.ct-btn--secondary-inverted:hover,
.ct-btn.ct-btn--secondary-inverted:focus-visible {
  background: color-mix(in srgb, var(--gold-light) 18%, transparent);
  color: #d4b169;
  border-color: #d4b169;
}

/* `primary-inverted` is authored for LIGHT surfaces: a teal border and teal
   label. On the teal band that is teal on teal — the button rendered as blank
   space (1:1 on both label and border).
   It takes a SOLID parchment fill on a dark band rather than another outline:
   with three outline variants on that band the primary action was the quietest
   thing there, which inverts the hierarchy it is named for. Solid also puts it
   at 13.91:1 on both label and boundary. */
.text-primary-foreground .ct-btn.ct-btn--primary-inverted,
.region-header .ct-btn.ct-btn--primary-inverted,
.ct-cta .ct-btn.ct-btn--primary-inverted {
  background: var(--parchment);
  border-color: var(--parchment);
  color: var(--teal);
}

.text-primary-foreground .ct-btn.ct-btn--primary-inverted:hover,
.text-primary-foreground .ct-btn.ct-btn--primary-inverted:focus-visible,
.region-header .ct-btn.ct-btn--primary-inverted:hover,
.region-header .ct-btn.ct-btn--primary-inverted:focus-visible,
.ct-cta .ct-btn.ct-btn--primary-inverted:hover,
.ct-cta .ct-btn.ct-btn--primary-inverted:focus-visible {
  background: var(--gold-light);
  color: var(--teal);
  border-color: var(--gold-light);
}

/* The shared focus ring is drawn in `--ring` (gold), which on Becket's gold
   primary is gold-on-gold. Ring against the SURFACE is what the spec measures,
   but a ring you cannot separate from the control is useless in practice — so
   it takes the structural color on light ground and parchment on dark. */
.ct-btn:focus-visible {
  outline-color: var(--teal);
}

.text-primary-foreground .ct-btn:focus-visible,
.ct-cta .ct-btn:focus-visible {
  outline-color: var(--parchment);
}

/* -------------------------------------------------------------------------
 * Header — a claret announcement strip over a teal navbar, both full-bleed.
 * ------------------------------------------------------------------------- */

/* The mark carries the parish's identity here, so it is given room — larger
   than the mockup's own 60px at the owner's direction — and inset to the same
   120px gutter the page content uses rather than sitting nearer the window
   edge. It steps down on narrower screens so the bar keeps its proportions
   instead of the logo crowding the menu. */
.region-header .navbar {
  padding-inline: clamp(1rem, 8.33vw, 120px);
  /* The row centres its cells and is tall enough to hold the mark with air
     around it, so growing the logo lengthens the bar instead of pushing the
     mark up into the utility strip. */
  align-items: center;
  min-height: clamp(88px, 9vw, 128px);
}

/* Size the branding CONTAINER, not the <img>.
 *
 * The block renders the mark as `img.h-full.w-full` inside a `.branding` box
 * that is only as tall as the site-name text. Setting a height on the image
 * therefore made it overflow its own parent — an inline-flex box centres its
 * overflow, so half the extra height went UP, through the navbar and into the
 * utility strip. Giving `.branding` the height and letting the image fill it
 * keeps the mark inside the row, which is then centred by the navbar. */
.region-header .navbar--logo {
  display: flex;
  align-items: center;
}

.region-header .navbar--logo .branding {
  height: clamp(60px, 6.6vw, 96px);
  align-items: center;
}

/* The wrappers between the cell and the branding box are inline-block, so they
   reserve descender space under the mark — about 8px of dead room that pushed
   the logo off the row's centre line even though the CELL was centred. Making
   them flex removes the baseline entirely. */
.region-header .navbar--logo > div,
.region-header .navbar--logo a {
  display: flex;
  align-items: center;
}

.region-header .navbar--logo img,
.region-header .navbar--logo svg {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
}
.region-header {
  background: var(--teal);
}

/* The strip shares the navbar's gutter, so "Give" starts on the logo's left
   edge and the search ends on the CTA's right edge. The component ships a flat
   3rem inset, which read as a wider bar sitting over a narrower one. The clamp
   is the SAME expression the navbar uses above — the two must track each other
   at every width, so if one changes the other has to change with it. */
.region-header .ct-utility-bar {
  padding-inline: clamp(1rem, 8.33vw, 120px);
  /* Secondary chrome: quieter than the navigation beneath it, but with enough
     air that the smaller text is not pinched against the band's edges. */
  padding-block: 0.75rem;
  background: var(--claret);
  color: var(--parchment);
  font-size: 0.8125rem;
}

.region-header .ct-utility-bar a {
  color: var(--parchment);
}

.region-header .ct-utility-bar a:hover {
  color: var(--gold-light);
}

/* Small text must not shrink the hit area with it. The links are already flex
   rows, so a min-height holds them at the 24px WCAG 2.5.8 target while the
   label itself gets smaller. */
/* Caps, with the 0.1em tracking the navbar links below already use — set caps
   at the component's 0.06em and the letters crowd, since uppercase needs more
   air than the mixed-case text that spacing was chosen for. */
.region-header .ct-utility-bar__nav :where(a) {
  font-size: 0.8125rem;
  min-height: 24px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* The diamond keeps its own proportion against the smaller text — at the
   component's 1rem margins it read as a gap rather than a separator. */
.region-header .ct-utility-bar__nav .menu__item:not(:first-child)::before {
  width: 4px;
  height: 4px;
  margin: 0 0.75rem;
}

/* Field and placeholder scale with the bar. It grows LEFTWARD — the field is the
   last thing in the bar and the bar's right gutter is what lines its edge up
   with the navbar CTA, so width here never moves that edge. */
.region-header .ct-utility-bar__input {
  width: 260px;
  padding: 0.5rem 2.375rem 0.5rem 1rem;
  font-size: 0.9375rem;
  /* 40px: a full-size control rather than a slot in the band, and well over the
     24px WCAG 2.5.8 target. The bar's own padding-block keeps a little air
     above and below it. */
  min-height: 40px;
  /* The component's 40% tint lands at 2.95:1 on claret — just under the 3:1
     WCAG 1.4.11 needs for a control's boundary, and a smaller field leans on
     that outline harder to read as a field at all. */
  border-color: color-mix(in srgb, var(--parchment) 46%, transparent);
}

.region-header .ct-utility-bar__search svg {
  right: 0.875rem;
  width: 18px;
  height: 18px;
}

.region-header .navbar {
  background: var(--teal);
  border-bottom: 1px solid color-mix(in srgb, var(--parchment) 12%, transparent);
}

/* Menu links: small uppercase sans, parchment on teal, gold on hover. */
.region-header .ct-nav__link {
  color: var(--parchment);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.region-header .ct-nav__item--parent:hover .ct-nav__link,
.region-header .ct-nav__item--parent:focus-within .ct-nav__link,
.region-header .ct-nav__link:hover,
.region-header .ct-nav__link:focus {
  color: var(--gold-light);
}

/* Native site name / slogan, for a tenant that shows text instead of a logo.
   sitetheme lets them inherit the bar's text color, which is ink here — so they
   vanished into the teal. Parchment like the menu links, gold on hover. */
.region-header .navbar--site-name,
.region-header .navbar--site-slogan {
  color: var(--parchment);
}

.region-header .navbar--brand:hover .navbar--site-name,
.region-header .navbar--brand:focus-visible .navbar--site-name {
  color: var(--gold-light);
}

/* The mockup's header CTA — a gold hairline with a sand label, filling gold on
   hover — expressed as the Outline (light) VARIANT rather than as a rule aimed
   at whatever sits in the header.
 *
 * It used to be `.region-header .navbar--links a`, which painted border,
 * background, color, padding and font-size onto the CTA no matter what. That
 * selector is (0,2,1) and beats `.ct-btn.ct-btn--primary` at (0,2,0), so the
 * button's Style prop had no visible effect at all — every option looked
 * identical — and pinning padding/font-size did the same to Size. Exactly the
 * failure docs/CANVAS-HEADER-FOOTER.md warns about, committed here by hand.
 *
 * Styling the variant instead keeps the design and gives the props back: pick
 * another Style in the editor and the button actually changes. */
/* White label and white rule, at the owner's direction — which is also what the
   base component's own `outline-light` does (`border-white/50 text-white`).
   Becket previously drew it in gold/sand, which read as a third gold control
   next to the two the band already has. White is the only thing on that band
   that isn't competing with the accent, and it measures 15.38:1 on teal for
   both the label and the boundary.
   The variant is for DARK fields by definition; on a light section it would be
   invisible, exactly as the base component intends. */
.ct-btn.ct-btn--outline-light {
  border: 1px solid #fff;
  /* A 10% white wash, at the owner's direction. It lifts the control off the
     band without becoming a filled button — that role belongs to the primary
     variant beside it. Translucent rather than a mixed color so it works on
     whatever the band behind it happens to be. */
  background: rgb(255 255 255 / 10%);
  color: #fff;
  letter-spacing: 0.1em;
}

/* White label on hover. The fill goes to `--gold-deep` rather than `--gold` to
   carry it: white on the mockup's #967033 is exactly 4.50:1 — it passes by a
   hundredth, and any later nudge to either color breaks it. This is the same
   step, and the same reasoning, as the primary button's fill; 4.80:1. */
.ct-btn.ct-btn--outline-light:hover,
.ct-btn.ct-btn--outline-light:focus-visible {
  background: var(--gold-deep);
  color: #fff;
  border-color: var(--gold-deep);
}

/* -------------------------------------------------------------------------
 * Mobile menu
 *
 * Modelled on the cathedral theme's, in Becket's palette: the hamburger overlay
 * becomes a scrolling teal panel carrying, top to bottom, the logo and close
 * button, the CTA, the main menu, the search field, and the utility links that
 * sitetheme's mobile-nav.js folds in from the utility bar.
 *
 * That is NOT the DOM order mobile-nav.js produces (logo row, search, menu,
 * links, utility), so the overlay is a single-column GRID with each child
 * pinned to an explicit row — reordering in CSS without touching the script.
 * The base theme's `row-start-*` utilities on those children are overridden
 * here; these rules are unlayered, so they win regardless of specificity.
 *
 * Keyed on `:root.navbar-compact` rather than a width, exactly as cathedral is:
 * navbar.js sets that class below 768px AND whenever the menu stops fitting, so
 * the styling follows the hamburger to whatever width it appears at. The two
 * rules that affect the CLOSED header are repeated in a plain media query at the
 * end, so they still hold in the window before the script runs.
 * ------------------------------------------------------------------------- */
:root.navbar-compact {
  /* The utility strip is not a top bar on mobile; its content moves inside. */
  .region-header .ct-utility-bar {
    display: none;
  }

  /* Overlay -> a scrolling teal single-column grid (see the note above). Rows
     size to content and pack to the top, so there is never dead space between
     blocks — the base theme's `1fr` menu row is what used to float the CTA. */
  .region-header .navbar--menu.navbar--menu--open {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: max-content;
    align-content: start;
    align-items: stretch;
    gap: 0;
    background: var(--teal);
    color: var(--parchment);
    overflow-y: auto;
    padding: 1rem 1.5rem 2.5rem;
  }

  /* Row 1: logo + close. */
  .region-header .navbar--menu--open .navbar--modal-top {
    grid-row: 1;
    padding: 0.5rem 0 1.25rem;
  }

  .region-header :is(.navbar--logo, .navbar--modal-logo) .branding {
    height: 64px;
    width: auto !important;
  }

  /* In-menu logo only: the <img> ships with Tailwind `h-full w-full`, which
     stretches it to the container width. Fill the height and let the width
     follow the aspect ratio instead. */
  .region-header .navbar--modal-logo .branding img {
    height: 100% !important;
    width: auto !important;
    max-width: none !important;
  }

  .region-header .navbar--menu--open .navbar--hide-menu {
    color: var(--parchment);
  }

  /* Row 4: search, between the menu and the utility links. */
  .region-header .navbar--m-search {
    grid-row: 4;
    margin: 1.5rem 0 0;
  }

  .region-header .navbar--m-search .ct-utility-bar__search {
    position: relative;
    display: flex;
    width: 100%;
  }

  .region-header .navbar--m-search .ct-utility-bar__input {
    width: 100%;
    padding: 0.85rem 2.75rem 0.85rem 1rem;
    font-size: 1.05rem;
    border-color: color-mix(in srgb, var(--parchment) 40%, transparent);
    color: var(--parchment);
  }

  /* Row 3: main menu, serif links with hairline dividers. */
  .region-header .navbar--menu--open .navbar--dropdown-menu-wrapper {
    grid-row: 3;
    margin-top: 1.5rem;
    padding: 0;
  }

  /* The base theme pads the inner wrapper 6rem at the bottom to make room for
     its fade-out gradient (the ::after hidden just below). Without the
     gradient that padding is only a hole between the last link and whatever
     follows — drop it. */
  .region-header .navbar--menu--open .navbar--dropdown-menu {
    padding-bottom: 0;
  }

  .region-header .navbar--menu--open .navbar--dropdown-menu-wrapper::after {
    display: none;
  }

  .region-header .navbar--menu--open .navbar--dropdown-menu :where(ul) {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .region-header .navbar--menu--open .navbar--dropdown-menu :where(li) {
    width: 100%;
  }

  .region-header .navbar--menu--open .ct-nav__link {
    display: block;
    width: 100%;
    padding: 0.85rem 0;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: none;
    color: var(--parchment);
    border-bottom: 1px solid color-mix(in srgb, var(--parchment) 18%, transparent);
  }

  /* The desktop caret is drawn under the label; in the column the submenu
     toggle button provides the affordance instead. */
  .region-header .navbar--menu--open .ct-nav__row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  /* The desktop's drawn caret (a ::after chevron under the label) has no place
     in the column — the toggle button carries the affordance here. */
  .region-header .navbar--menu--open .ct-nav__item--parent .ct-nav__row::after {
    display: none;
  }

  .region-header .navbar--menu--open .ct-nav__toggle {
    color: var(--gold-light);
  }

  /* The toggle's chevron is the only thing marking an item as expandable. */
  .region-header .navbar--menu--open .ct-nav__toggle svg {
    display: block;
    width: 1.4rem;
    height: 1.4rem;
  }

  /* The base theme repeats the parent as the first row of its own submenu. On
     desktop that is a hover affordance; here the parent's own label is already
     a link (the separate toggle button does the expanding), so the repeat is
     just a duplicate. */
  .region-header .navbar--menu--open .ct-nav__subitem--parent-link {
    display: none;
  }

  /* Submenus indent rather than float. */
  .region-header .navbar--menu--open .ct-nav__submenu.ct-nav__submenu {
    position: static;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    translate: none;
  }

  .region-header .navbar--menu--open .ct-nav__submenu.ct-nav__submenu a {
    padding: 0.7rem 0;
    font-size: 1.05rem;
    color: color-mix(in srgb, var(--parchment) 82%, var(--teal));
  }

  .region-header .navbar--menu--open .ct-nav__submenu.ct-nav__submenu a:hover,
  .region-header .navbar--menu--open .ct-nav__submenu.ct-nav__submenu a:focus {
    background: transparent;
    color: var(--gold-light);
  }

  /* Row 2: CTA, a full-width gold bar under the logo. */
  .region-header .navbar--menu--open .navbar--links {
    grid-row: 2;
    width: 100%;
    margin: 0;
  }

  .region-header .navbar--menu--open .navbar--links .ct-btn {
    width: 100%;
  }

  .region-header .navbar--menu--open .navbar--links a {
    justify-content: center;
    padding: 0.95rem 1.5rem;
    background: var(--gold-deep);
    color: #fff;
    border-color: var(--gold-deep);
  }

  /* Row 5: utility links, two columns under a rule. */
  .region-header .navbar--m-utility {
    grid-row: 5;
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid color-mix(in srgb, var(--parchment) 22%, transparent);
  }

  .region-header .navbar--m-utility .menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1.5rem;
  }

  .region-header .navbar--m-utility .menu__item {
    display: block;
  }

  .region-header .navbar--m-utility .menu__item::before {
    display: none;
  }

  .region-header .navbar--m-utility :where(a) {
    color: var(--parchment);
    font-size: 1.05rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
  }
}

/* The hamburger inherits the body ink from the base theme, which is invisible on
   the teal bar. */
.region-header .navbar--hamburger {
  color: var(--parchment);
}

/* Closed-header rules from the block above, repeated for the pre-JS window
   below 768px (the class is only set once navbar.js has measured). */
@media (max-width: 767px) {
  .region-header .ct-utility-bar {
    display: none;
  }

  .region-header :is(.navbar--logo, .navbar--modal-logo) .branding {
    height: 64px;
    width: auto !important;
  }
}

/* The folded-in clones belong only to the hamburger overlay. */
:root:not(.navbar-compact) .navbar--m-search,
:root:not(.navbar-compact) .navbar--m-utility {
  display: none;
}

/* -------------------------------------------------------------------------
 * Footer — the same teal as the hero, closing the page the way it opened.
 * ------------------------------------------------------------------------- */
.region-footer,
.ct-site-footer {
  background: var(--teal);
  color: var(--parchment);
}

.ct-site-footer a {
  color: var(--parchment);
}

.ct-site-footer a:hover {
  color: var(--gold-light);
}

/* -------------------------------------------------------------------------
 * Typographic voice
 *
 * sitetheme sets display type in UPPERCASE at weight 600 — tuned for Cathedral's
 * Faculty Glyphic, where caps carry the liturgical feel. This design is the
 * opposite: EB Garamond in sentence case at its natural weight, letting the
 * letterforms do the work. Undoing it here is exactly what a subtheme is for;
 * the base theme keeps its own default for everyone else.
 * ------------------------------------------------------------------------- */
.ct-cta.ct-cta :is(h1, h2, h3, h4, h5, h6),
.ct-section-header__title {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

:is(h1, h2, h3, h4, h5, h6) {
  font-weight: 400;
}

/* Headings sit in teal, a step darker than the body ink — the design separates
   the two rather than running everything at one color.
   NOTE the `:not()` contributes its argument's specificity, so this selector is
   (0,1,2) — heavier than it looks, and the hero rules below have to out-weigh
   it deliberately rather than by being written later. */
/* The `:not()`s name the classes the heading component ACTUALLY emits for its
   text_color prop — `text-inherit` (default), `text-background` (inverted),
   `text-primary`. The exclusion used to be `:not([class*="inverted"])`, which
   was a guess at a class name that never appears in the markup: choosing
   "Inverted" in the editor emits `text-background`, so this rule overrode it
   and the heading stayed teal on a dark band. Tailwind's utilities are layered
   and an unlayered rule beats them regardless of specificity, so the prop had
   no way to win. */
main :is(h1, h2, h3, h4, h5, h6):not(.text-background):not(.text-primary) {
  color: var(--teal);
}

/* The section header carries its own `text_color` prop as an inline
   `--ct-sh-color`. Reading through that variable keeps the prop working and
   only supplies the default, instead of stating a color that overrode it. */
.ct-section-header__title {
  color: var(--ct-sh-color, var(--teal));
}

/* ...but NOT inside a section that has declared itself inverted. Teal headings
   on the teal band rendered at 1.00:1 — invisible. A section marks itself with
   `text-primary-foreground`; it paints its background with a child, so there is
   no background class to key on. */
.text-primary-foreground.text-primary-foreground :is(h1, h2, h3, h4, h5, h6),
.text-primary-foreground.text-primary-foreground .ct-section-header__title {
  color: var(--parchment);
}

/* On the hero band the headline is parchment. Scoped to HEADINGS, not to
   `.font-serif`: the body copy and the buttons carry that class too, and
   coloring by font class silently repainted both. */
/* Three classes deep on purpose. The light-surface heading rule above carries
   two `:not(.class)` tests, each of which contributes class-level specificity —
   it weighs (0,2,2), so a two-class selector here silently lost to it and the
   hero headline turned teal on its own dark band. */
.ct-cta.ct-cta.ct-cta :is(h1, h2, h3, h4, h5, h6) {
  /* Slightly warmer than the page parchment — the design keeps the headline a
     touch creamier than the body text on this band. */
  color: #f2ead9;
  line-height: 1.12;
  max-width: 620px;
}

/* -------------------------------------------------------------------------
 * Hero wash — a left-to-right gradient rather than a flat tint.
 *
 * The CTA paints its color layer as a solid fill at the opacity its prop asks
 * for, which veils the photograph evenly across the whole band. The design
 * wants the opposite: dense behind the words on the left, clearing to nothing
 * on the right so the image opens up as the eye travels across.
 *
 * `background-color` has to be cleared with `!important` — the component writes
 * it inline from the prop, and a transparent stop in the gradient would
 * otherwise reveal that flat fill underneath and defeat the fade. The element's
 * own inline `opacity` (the prop) still scales the whole thing, so the prop
 * keeps controlling strength while this controls shape.
 *
 * SOLID ONLY. This is Becket's reading of the default "Solid" overlay. It must
 * not touch `.ct-cta__bg--gradient`: when an author picks To bottom / To right /
 * Radial, the component draws that gradient itself, and masking it left-to-right
 * made every style look identical (the bug that scoped this rule).
 * ------------------------------------------------------------------------- */
.ct-cta .ct-cta__bg--solid {
  /* MASK the layer rather than repaint it.
     This used to clear the inline `background-color` with `!important` and draw
     its own teal gradient — which meant the CTA's `background_color` prop could
     never show through on any hero in this theme. Masking fades whatever color
     the prop chose, so the prop keeps deciding the COLOR and this decides the
     SHAPE of the fade. */
  mask-image: linear-gradient(
    to right,
    rgb(0 0 0 / 100%) 0%,
    rgb(0 0 0 / 100%) 28%,
    rgb(0 0 0 / 55%) 58%,
    rgb(0 0 0 / 0%) 92%
  );
}

/* Below the text column the gradient has no room to run horizontally, so it
   falls back to a vertical wash that keeps the headline legible. */
@media (max-width: 767px) {
  .ct-cta .ct-cta__bg--solid {
    mask-image: linear-gradient(
      to bottom,
      rgb(0 0 0 / 100%) 0%,
      rgb(0 0 0 / 70%) 70%,
      rgb(0 0 0 / 45%) 100%
    );
  }
}

/* Hero body copy is a warm, receded parchment so the headline keeps the
   contrast. Set ABOVE the mockup's 20px at the owner's direction — it reads
   small against a 56px headline — and the measure widens with it so the line
   length stays in the comfortable range rather than getting narrower as the
   type grows. */
.ct-cta.ct-cta p {
  /* sitetheme upper-cases everything carrying `.font-serif` inside a CTA, which
     catches the body copy as well as the headline. */
  text-transform: none;
  letter-spacing: normal;
  color: color-mix(in srgb, var(--parchment) 80%, var(--teal));
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  line-height: 1.6;
  max-width: 46ch;
}

/* -------------------------------------------------------------------------
 * Eyebrows — wide-tracked SANS labels. The base theme puts `font-serif` in the
 * markup, so the family has to be reasserted here.
 *
 * 14px everywhere, at the owner's direction — up from the mockup's 11px.
 *
 * All FOUR places an eyebrow appears are listed: the standalone component, the
 * hero's, the card's, and the one inside a section header. That last one needs
 * naming explicitly — sitetheme styles it as `.ct-section-header .ct-eyebrow`
 * (0,2,0), which outranks a bare `.ct-eyebrow`, so it silently stayed at its own
 * 15.2px while the other three moved.
 *
 * Only the SIZE is unified. The section-header eyebrow keeps the base theme's
 * wider 0.4em tracking, which is part of that component's treatment rather than
 * something the others should inherit.
 * ------------------------------------------------------------------------- */
.ct-eyebrow,
.ct-cta__eyebrow-text,
.ct-card__eyebrow,
.ct-section-header .ct-eyebrow {
  font-size: 0.875rem;
}

.ct-eyebrow,
.ct-cta__eyebrow-text,
.ct-card__eyebrow {
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: 0.22em;
}

/* Claret is the label color on light bands — the design's third accent, used
   at this size only. */
.ct-eyebrow--primary {
  color: var(--claret);
}

/* On the hero the eyebrow sits on the photograph, so it takes a lighter gold
   than the one used on paper — it has to hold against a moving background, not
   a flat one. The decorative rules either side of it are not in this design. */
.ct-cta__eyebrow-text {
  color: #d4b169;
}

.ct-cta__eyebrow-rule {
  display: none;
}

/* With the rules gone the eyebrow should sit on the text's own edge rather than
   staying centred between them. */
.ct-cta__eyebrow {
  justify-content: flex-start;
}

/* -------------------------------------------------------------------------
 * Buttons — sans, small, wide-tracked. sitetheme sets the serif here (that is
 * Cathedral's button voice); this design uses the body face. Doubled class for
 * specificity: the base theme's per-size rules set tracking too.
 *
 * Weight is deliberately NOT set: `font_weight` is a prop on the component, and
 * pinning it here would override an author's choice with no way to tell why.
 * ------------------------------------------------------------------------- */
.ct-btn.ct-btn {
  font-family: var(--font-sans);
  letter-spacing: 0.12em;
}

/* Size is a PROP, so the theme must not pin one font-size for every button —
   doing so collapsed small/medium/large to a single 13px label and left the
   three sizes differing only by padding. These scale the component's own ramp
   into Becket's smaller, wider-tracked voice while keeping the steps distinct. */
/* 12 / 14 / 16 — even steps of ~15%, matching the box ramp (36/42/48). The old
   12/13/15 stepped 8% then 15%, and an 8% step on tracked uppercase is below
   the threshold at which anyone sees a difference. */
.ct-btn.ct-btn--size-small {
  font-size: 0.75rem;
}

.ct-btn.ct-btn--size-medium {
  font-size: 0.875rem;
}

.ct-btn.ct-btn--size-large {
  font-size: 1rem;
}

/* Icons ran 16/20/24 against cap heights of 8.7/9.4/10.8 — 1.38x rising to
   1.66x, so the glyph grew faster than its label and dominated the large
   button. These hold ~1.2x cap at every size. */
.ct-btn.ct-btn--size-small svg {
  width: 14px;
  height: 14px;
}

.ct-btn.ct-btn--size-medium svg {
  width: 16px;
  height: 16px;
}

.ct-btn.ct-btn--size-large svg {
  width: 18px;
  height: 18px;
}

/* Touch pointers get a 44px floor. The base ramp REMOVES vertical padding below
   1280px, so buttons got squatter exactly where fingers replace cursors. */
@media (pointer: coarse) {
  .ct-btn.ct-btn {
    min-height: 44px;
  }
}

/* An icon must not make a button taller than its iconless twin: without a
   common line box the SVG's own height drives the row, so a "Small" row came
   out three different heights depending on which buttons carried icons. */
.ct-btn.ct-btn {
  line-height: 1.2;
}

.ct-btn.ct-btn > span:has(svg),
.ct-btn.ct-btn svg {
  flex: 0 0 auto;
}

.ct-btn.ct-btn > span:has(svg) {
  display: inline-flex;
  align-items: center;
  height: 1.2em;
}

/* -------------------------------------------------------------------------
 * Hero measure — the CTA runs edge to edge while every other section sits in a
 * container, and a hero starting left of the section below it reads as a
 * mistake.
 *
 * This mirrors what a section actually does: Tailwind's `container` max-width
 * at each breakpoint, centred, plus the same gutter `.ct-section-gutter` uses
 * (1.25rem / 2rem / 3rem). The previous `width: min(100% - 2rem, 1200px)`
 * approximated it and only agreed at desktop — below about 1230px it collapsed
 * to a flat 1rem, so on tablets and narrow windows the headline and buttons sat
 * 16px from the viewport edge while the section under them was inset 98–110px.
 *
 * Matching the mechanism rather than a number means the two stay aligned if the
 * container or the gutter is ever retuned. Measured delta against a section's
 * content edge: 0px at every width tested.
 * ------------------------------------------------------------------------- */
.ct-cta__content {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 640px) {
  .ct-cta__content {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .ct-cta__content {
    max-width: 768px;
    padding-inline: 2rem;
  }
}

@media (min-width: 1024px) {
  .ct-cta__content {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .ct-cta__content {
    max-width: 1280px;
    padding-inline: 3rem;
  }
}

@media (min-width: 1536px) {
  .ct-cta__content {
    max-width: 1536px;
  }
}

/* Section titles run a step larger than the base theme's clamp, which tops out
   at 37.6px — the design sets them at 40. */
.ct-section-header__title {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
}

/* Menu items need room to read as separate destinations — the base theme's 4px
   gap runs them into one another at this size and tracking. */
.region-header .ct-nav__list {
  gap: 2rem;
}

/* The dropdown caret sits tight against its label. */
.region-header .ct-nav__row {
  gap: 0.35rem;
}

/* NOTE: the footer's dark field is the site-footer component's own
   `background_color` PROP, rendered as an inline style — it is set to teal in
   this tenant's footer region, not here. CSS cannot win against an inline
   style, so do not try to re-color it from this file. */

/* NOTE: no font-family override for footer text.
 *
 * There was one here, forcing the body face on `.ct-footer .ct-text`. It also
 * overrode the Text component's own `font_family` prop, so an author who chose
 * "Serif" in the editor got sans anyway with nothing to explain why — the
 * component appeared broken. Theme CSS must not pin a property a component
 * exposes as a setting; if the footer wants a different face, that is a prop on
 * the instance. See CLAUDE.md, "bespoke theme CSS silently defeats a
 * component's variant/size props".
 */

/* -------------------------------------------------------------------------
 * Secondary button = the design's inline text link
 *
 * The mockup's "Learn about our parish →" is not a filled box at all: it is a
 * claret, letter-spaced, underlined link. Rendering it as a gold box was both
 * wrong to the design AND the one control still failing contrast (teal on the
 * darker gold measures 3.42:1). As a text link on parchment it clears AA
 * comfortably and matches the mockup.
 * ------------------------------------------------------------------------- */
.ct-btn.ct-btn--secondary {
  padding-inline: 0;
  /* Enough vertical padding for a real target. As a text link this variant was
     23-27px tall — under the 24px WCAG 2.5.8 minimum at its smallest, and
     nowhere near comfortable on a phone. The rule stays a hairline UNDER the
     text rather than a border on the box, so growing the hit area does not drag
     the underline away from the words. */
  padding-block: 0.75rem;
  /* A little horizontal padding so adjacent text links do not read as one
     continuous sentence — at zero inset the gap between two of these was
     smaller than the gap between a label and its own icon. */
  padding-inline: 0.375rem;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--claret);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: color-mix(in srgb, var(--claret) 45%, transparent);
}

.ct-btn.ct-btn--secondary:hover,
.ct-btn.ct-btn--secondary:focus-visible {
  background: transparent;
  color: var(--teal);
  text-decoration-color: var(--teal);
}

/* -------------------------------------------------------------------------
 * Footer column headings
 *
 * The mockup sets these in #967033 on the teal field — 3.42:1, under AA for
 * 11px text. `--gold-light` is the next step in the same ramp and clears it at
 * 4.57:1, so the footer keeps the design's gold without the readability cost.
 * ------------------------------------------------------------------------- */
.ct-footer .ct-link-list__title,
.ct-footer :is(h2, h3, h4) {
  color: var(--gold-light);
}

/* -------------------------------------------------------------------------
 * Main menu — matched to the mockup's own declarations.
 *
 * Every value below is lifted from the mockup's inline styles rather than
 * eyeballed: nav gap clamp(14px,2.2vw,28px); labels Nunito 13px/0.1em in
 * #e0d4c2 going gold on hover, laid out as a COLUMN with the caret beneath;
 * panel #fffdf8 with a 1px #cdbfa8 border, a 2px #967033 top edge and
 * 0 12px 28px rgba(0,41,51,.22); items EB Garamond 17px #002933 at 10px/24px,
 * hovering to #f2ead9 with #610d00 text.
 * ------------------------------------------------------------------------- */
/* The mockup's 28px gap, tapering as the viewport does.
 *
 * The 28px holds all the way down to ~1270px: with the labels free to wrap to
 * two lines, spacing no longer has to be spent buying a single line, so it
 * keeps the design's own value across every desktop width and only tapers
 * below that. The 18px floor is where the items would start reading as one
 * run-on line; below it navbar.js hands over to the hamburger rather than
 * tightening further. */
.region-header .ct-nav__list {
  gap: clamp(18px, 2.2vw, 28px);
}

/* Menu labels a step above the mockup's 13px, at the owner's direction. The
   tracking stays proportional (0.1em) so the wider set does not loosen, and the
   gap tightens slightly at the top end to keep five items plus the CTA on one
   line down to 1024px. */
.region-header .ct-nav__link {
  color: var(--sand);
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.06vw, 15.5px);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 0 6px;
}

.region-header .ct-nav__item--parent:hover .ct-nav__link,
.region-header .ct-nav__item--parent:focus-within .ct-nav__link,
.region-header .ct-nav__link:hover,
.region-header .ct-nav__link:focus {
  color: var(--gold);
}

/* Label above, caret below — the mockup stacks them. */
.region-header .ct-nav__row {
  flex-direction: column;
  gap: 3px;
}

/* The base theme's caret is a 24px FILLED glyph; the mockup's is a 9x6 hairline
   chevron. Draw it instead of scaling a different shape down.
   Scoped to the DESKTOP state: the same <svg> is the submenu toggle's chevron in
   the mobile accordion, and hiding it there left the expandable items with no
   affordance at all. */
:root:not(.navbar-compact) .region-header .ct-nav__row svg {
  display: none;
}

/* The box MUST be square. This is the rotated-corner chevron: two adjacent
   borders on a box, turned 45deg, so each border becomes one arm of the V. The
   arms are therefore as long as the sides they came from — a 9x6 box drew a 9px
   arm meeting a 6px one, which reads as a tick rather than a chevron.
   The 9x6 in the mockup is the chevron's VISUAL size, not the box's: a square of
   side S rotates to a mark 2*(S/sqrt2) wide and (S/sqrt2) tall, so 6.5px gives
   ~9.2 x 4.6 — the mockup's width, with the symmetry it actually has. */
.region-header .ct-nav__item--parent .ct-nav__row::after {
  content: "";
  width: 6.5px;
  height: 6.5px;
  border-right: 1.4px solid var(--gold);
  border-bottom: 1.4px solid var(--gold);
  /* Rotation leaves the glyph's ink low in its own box; lift it back onto the
     label's centre line. */
  transform: rotate(45deg) translate(-1px, -1px);
  transform-origin: center;
}

/* ---- dropdown panel ----
 *
 * Inside the SAME media query the base theme uses. Its desktop panel rules live
 * in `@media (min-width: 48rem)`; a plain override outside that query loses to
 * them not on specificity but because the cascade compares the winning
 * declarations after both match, and the base theme's desktop block is the last
 * one standing for these properties. Matching the query keeps the comparison
 * honest, and the doubled class settles it.
 */
@media (min-width: 48rem) {
  .region-header .ct-nav__submenu.ct-nav__submenu {
    min-width: 230px;
    max-width: none;
    width: max-content;
    margin-top: 6px;
    padding: 8px 0;
    border: 1px solid var(--sand-2);
    border-top: 2px solid var(--gold);
    border-radius: 0;
    background: var(--parchment-2);
    box-shadow: 0 12px 28px rgba(0, 41, 51, 0.22);
  }
}

.region-header .ct-nav__submenu.ct-nav__submenu a {
  display: block;
  padding: 10px 24px;
  color: var(--teal);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.region-header .ct-nav__submenu.ct-nav__submenu a:hover,
.region-header .ct-nav__submenu.ct-nav__submenu a:focus {
  background: #f2ead9;
  color: var(--claret);
}

@media (min-width: 48rem) {
  /* The base theme repeats the parent as the first row of its own dropdown — a
     reasonable touch-device affordance, but the mockup's panel lists only the
     children, and the parent is already one hover away. */
  .region-header .ct-nav__subitem--parent-link {
    display: none;
  }

  /* The mockup centres the panel under its label rather than aligning it to the
     item's left edge.
     Centred with the standalone `translate` property, NOT `transform`: the base
     theme animates the open/close state by REWRITING transform
     (translateY(4px) -> translateY(0)), which silently dropped the horizontal
     half-shift the moment the panel opened — centred while closed, off to the
     right while anyone could see it. `translate` composes with transform
     instead of competing with it. */
  .region-header .ct-nav__item--parent > .ct-nav__submenu {
    left: 50%;
    translate: -50% 0;
  }
}

/* NOTE: images in the footer used to need a fix here (cq-full breaking out of
 * the footer, and a 0-wide <img> defeating `sizes="auto"`). Both are fixed in
 * sitetheme now — the footer cells are query containers and the image component
 * states its own width — so nothing theme-specific is needed. */

/* -------------------------------------------------------------------------
 * Cards — a lightened secondary surface inside a secondary border.
 *
 * The surface comes from `--card` (set in the token block above), so the image,
 * testimonial and text cards all pick it up and each component's own background
 * PROP still wins where an author has chosen accent / primary / inverted.
 *
 * The border has to be stated here: the card component only draws one on a
 * TRANSPARENT card (its framed border is a compound variant gated on
 * `backgroundColor: noColor`), so a filled card lost its edge. In this design
 * the two go together — the fill is close enough to the page that the border is
 * what makes a card read as a panel.
 * ------------------------------------------------------------------------- */
.ct-card,
.ct-card-testimonial,
.ct-text-card {
  border: 1px solid var(--secondary);
}

/* The card component's own hover shifts the fill; keep the edge with it. */
.ct-card:hover,
.ct-card-testimonial:hover {
  border-color: var(--sand-2);
}

/* Squared corners on cards, like everything else in this theme — the base
   component applies `rounded-lg`/`rounded-xl` utilities, which survive the
   `--radius: 0` token because they are literal Tailwind values rather than
   token-driven. */
.ct-card,
.ct-card-testimonial,
.ct-text-card {
  border-radius: 0;
}

/* -------------------------------------------------------------------------
 * Card headings
 *
 * A step larger and heavier than the base 20px/400 — on a card the heading is
 * the thing being chosen, and at the theme's default weight it sat level with
 * the body copy beneath it.
 *
 * A linked card also shows the long right arrow after its title (the markup
 * ships hidden from the component; this is where it is switched on), matching
 * the arrow the button component uses so "this goes somewhere" reads the same
 * everywhere.
 * ------------------------------------------------------------------------- */
.ct-card h3 {
  font-size: 1.375rem;
  font-weight: 500;
}

.ct-card__arrow {
  display: inline-block;
  /* A character, so it inherits the heading's face and color — no sizing
     needed beyond letting it sit on the same line. */
  transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Hover settles over 700ms rather than snapping.
 *
 * The component transitions only `opacity, transform`, so the fill and border
 * changes had no duration at all and landed instantly while the scale eased —
 * two halves of one gesture moving at different speeds, which is what read as
 * abrupt.
 *
 * `opacity` stays on the component's 1.1s: that is the scroll-REVEAL, not the
 * hover, and shortening it would speed up how cards arrive on the page. */
/* Four classes deep on purpose. scroll-reveal.css sets the transition through
   `html.is-scroll-reveal .region-content .ct-section-grid > *` — (0,3,1) — and a
   plain `.ct-card` never got near it. The reveal and the hover both animate
   `transform` on the same element, so one of them has to own the declaration;
   this keeps the reveal's opacity timing and gives the gesture 700ms. */
.ct-card.ct-card.ct-card.ct-card,
.ct-card-testimonial.ct-card-testimonial.ct-card-testimonial.ct-card-testimonial {
  transition:
    opacity 1.1s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* A card's image shares the gesture. */
.ct-card img {
  transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .ct-card,
  .ct-card-testimonial,
  .ct-card__arrow,
  .ct-card img {
    transition: none;
  }
}

/* The whole card is the link, so the arrow answers to hovering anywhere on it. */
.ct-card:hover .ct-card__arrow,
.ct-card:focus-within .ct-card__arrow {
  transform: translateX(0.25em);
}

/* -------------------------------------------------------------------------
 * Event cards
 * ------------------------------------------------------------------------- */

/* The date reads as an eyebrow: the same size, tracking and weight as every
   other eyebrow in the theme, rather than the base theme's bold 16px. The
   selector stays doubled: the base rule it overrides
   (events-carousel.css `.ct-event-card__date`) is only 0,1,0, so a single
   selector would tie on specificity and leave the winner to load order. */
.ct-event-card__date.ct-event-card__date {
  /* Serif: the card's date is the event's fact, the same as the date on the
     node. It keeps the eyebrow's caps and tracking — that is what makes it read
     as a label slot — but not the label's face. */
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--card-eyebrow, var(--accent));
}

/* -------------------------------------------------------------------------
 * Card hover — the same gesture the event cards use.
 *
 * Matching `scale(1.05)` and their shadow, so a card behaves the same wherever
 * one appears. The base card component only scales to 1.03 and adds no shadow.
 *
 * ONE difference, deliberate: the event card runs this at 0.25s and these run at
 * 700ms, which was asked for separately. Same movement, longer settle.
 * ------------------------------------------------------------------------- */
/* Four classes again: the reveal's `.is-visible` rule resets `transform` at
   (0,3,1), so a two-class hover set the shadow but never the scale — the card
   lifted its shadow while staying exactly the same size. */
.ct-card.ct-card.ct-card.ct-card:hover,
.ct-card.ct-card.ct-card.ct-card:focus-within {
  transform: scale(1.05);
  box-shadow: 0 16px 32px rgb(46 35 24 / 0.22);
  z-index: 2;
}

/* -------------------------------------------------------------------------
 * Text + Image
 *
 * The component sets a foreground on its WRAPPER for each background
 * (`text-primary-foreground` and friends) and lets the parts inherit it. Three
 * things broke that in this theme:
 *
 *  - the title is an <h2>, so the theme's "headings are teal" rule painted it
 *    teal on every background — teal on the primary band is 1:1, invisible,
 *  - the link takes `--accent-foreground`, which is teal, so it vanished on the
 *    primary band too,
 *  - the eyebrow is `--accent` (gold), which is 4.07:1 on parchment, 3.08:1 on
 *    sand and 1:1 on the accent band — gold on gold.
 *
 * Everything inside a colored block now INHERITS the wrapper's foreground,
 * which is the color the component already chose for that background. Written
 * at three classes to clear the heading rule's (0,2,2).
 * ------------------------------------------------------------------------- */
.ct-text-image.ct-text-image[class*="bg-"] :is(h1, h2, h3, h4, h5, h6),
.ct-text-image.ct-text-image[class*="bg-"] .ct-text-image__eyebrow,
.ct-text-image.ct-text-image[class*="bg-"] .ct-text-image__byline,
.ct-text-image.ct-text-image[class*="bg-"] .ct-text-image__text,
.ct-text-image.ct-text-image[class*="bg-"] .ct-text-image__link {
  color: inherit;
}

/* The accent band needs its own pairing: gold #967033 carries teal at 3.42:1 and
   white at only 4.50:1. One step darker takes white to 4.80:1, which is the same
   move the primary button made for the same reason. */
.ct-text-image.ct-text-image.bg-accent {
  background-color: var(--gold-deep);
  color: #fff;
}

/* On the uncolored and sand blocks the eyebrow keeps a color of its own — gold
   is 4.07:1 on parchment and 3.08:1 on sand, both under AA at this size. Claret
   is the label color the rest of the theme already uses on light ground. */
/* Three classes so this survives the inherit rule above (0,3,1) — otherwise the
   sand block's eyebrow fell back to body ink and stopped reading as an eyebrow,
   readable but indistinguishable from the copy under it. */
.ct-text-image:not([class*="bg-"]) .ct-text-image__eyebrow,
.ct-text-image.ct-text-image.bg-secondary .ct-text-image__eyebrow {
  color: var(--claret);
}

/* The component upper-cases its title and byline — Cathedral's voice, tuned for
   Faculty Glyphic. Becket runs sentence case everywhere else, so the same
   correction applied to the CTA and section headers belongs here too. The
   eyebrow and link stay uppercase: those are labels, not prose. */
.ct-text-image .ct-text-image__title,
.ct-text-image .ct-text-image__byline {
  text-transform: none;
  letter-spacing: normal;
}

/* -------------------------------------------------------------------------
 * Event pages and breadcrumbs
 * ------------------------------------------------------------------------- */

/* Event copy is read at length, so it takes the serif face the theme uses for
   reading rather than the sans it inherited from the body. Set on the body
   wrapper, not its paragraphs, so lists and inline markup come with it. */
.ct-event__body {
  font-family: var(--font-serif);
}

/* The "Upcoming Event" label is chrome, not content — sans keeps it distinct
   from the serif title and copy it sits between.
   Doubled class because sitetheme's event-detail.css sets the serif here at the
   same specificity AND loads after this file: it is attached by the event
   template, so it lands after the theme's global CSS and wins on order. */
.ct-event__eyebrow.ct-event__eyebrow {
  font-family: var(--font-sans);
}

/* When and where, on the node and on the card. These are the event's facts, so
   they take the reading face like the body does; the label above them stays
   sans. Set on the node's meta WRAPPER so the date, the place and anything
   added beside them stay consistent without needing a rule each. */
.ct-event__meta,
.ct-event-card__place {
  font-family: var(--font-serif);
}

/* Breadcrumbs in the serif face, sentence case — the trail reads as part of the
   page's voice rather than as chrome bolted above it. */
nav[aria-label="breadcrumb"] {
  font-family: var(--font-serif);
}

/* `secondary` is a claret text link, authored for light ground — on the teal
   header that is 1.7:1 and effectively invisible. The header is a dark band, so
   it takes the same gold treatment `secondary-inverted` already carries there.
   Without this, choosing Secondary in the editor now that the Style prop works
   would produce a button nobody can read. */
.region-header .ct-btn.ct-btn--secondary {
  color: var(--gold-light);
}

.region-header .ct-btn.ct-btn--secondary:hover,
.region-header .ct-btn.ct-btn--secondary:focus-visible {
  color: #d4b169;
}

/* Modal copy is read at length, so it takes the serif reading face like the
   event body and the breadcrumb trail. Set on the body wrapper rather than its
   paragraphs so lists, emphasis and any headings inside the rich text come with
   it. The modal's own title is already serif via the heading scale. */
.ct-modal__body {
  font-family: var(--font-serif);
}

/* Mass Readings takes the serif reading face like the rest of Becket's copy —
   the feast, the summaries and the citations are all read as text, not chrome.
   Set on the component root so anything added inside it follows. */
.ct-mass-readings {
  font-family: var(--font-serif);
}

/* Mass Readings manages its own color: every part of it inherits the band it
 * sits on, so it stays readable on a dark section. Becket otherwise paints all
 * headings and links teal, which on the teal band renders both invisible —
 * measured at teal-on-teal before this.
 *
 * Doubled classes (0,3,0) because the theme's heading rule is
 * `main :is(h1…h6):not(.text-background):not(.text-primary)` at (0,2,2). The
 * alternative — adding another `:not()` to that rule — would take it to (0,3,2)
 * and it would then outrank `.ct-cta.ct-cta.ct-cta :is(h1…)` at (0,3,1), which
 * is what keeps the homepage hero headline legible. Cheaper to be specific here
 * than to move a rule the whole theme leans on. */
.ct-mass-readings .ct-mass-readings__heading.ct-mass-readings__heading,
.ct-mass-readings .ct-mass-readings__link.ct-mass-readings__link {
  color: inherit;
}

/* Column dividers on a SECONDARY section take the accent color.
 *
 * The component draws them in `--border`, which Becket maps to `--secondary` —
 * the same sand the section is filled with, so on a secondary background the
 * dividers were sand on sand and drew nothing at all. Gold is the theme's other
 * line color and is what separates content elsewhere.
 *
 * `.text-secondary-foreground` is the class the section itself carries for a
 * secondary background (set from the component's token map), so this keys off
 * the background actually chosen rather than guessing. Not inside a media query:
 * the dividers are a right border on desktop and a bottom border once the
 * columns stack, and both want the same color. (0,4,0) clears the component's
 * own (0,3,0) rule. */
.text-secondary-foreground .ct-section-dividers > *:not(:last-child):not([data-ct-col-placeholder]) {
  border-color: var(--accent);
}

/* -------------------------------------------------------------------------
 * Content links
 *
 * A link inside BODY COPY — a Text component, a card body, a section-header
 * lead, a person's bio — is claret and underlined, and turns white on a dark
 * field. Both colors are theme settings (`--link`, `--link-inverted`), so a
 * tenant can rebrand them without touching CSS.
 *
 * The underline is not decoration. Claret on parchment is otherwise the only
 * thing separating a link from the words around it, and color alone is not an
 * accessible affordance (WCAG 1.4.1). It sits at 45% so it reads as a hint
 * rather than a rule, and goes full strength on hover/focus.
 *
 * SCOPED TO RICH-TEXT CONTAINERS, not to `main a`. sitetheme's content-link
 * rule in theme.css covers every link in <main>, which also catches card
 * titles, the invisible stretched-link overlay on an event card, and image
 * links — none of which are "a text link", and all of which looked wrong
 * underlined (measured on the stbtx home page: 3 card titles and 11 event-card
 * overlays picked up an underline before this was narrowed).
 *
 * WHICH COLOR IS CHOSEN BY INHERITANCE, not by selector weight: a dark field
 * sets `--ct-link` on its subtree and the single link rule reads it. That is
 * what lets a card inside a dark band reset it back — a specificity ladder
 * would have had to out-rank every combination instead.
 *
 * The dark case keys off the TEXT color rather than the background, because a
 * section's background is an arbitrary hex now (the color picker stores
 * `#rrggbb`) and only the four legacy named tokens still emit a matching
 * `text-*-foreground` class. What a dark field always has is the light
 * foreground class the author must already have set for the copy to be legible
 * — `text-primary-foreground`, `text-background`, `ct-text--inverted`. So: if
 * the surrounding words are light, the link goes light with them. A custom dark
 * hex is therefore handled the moment the author sets the text color they
 * needed anyway.
 * ------------------------------------------------------------------------- */

/* Every component that renders a rich-text prop. Add to this list when a new
   one ships a `contentMediaType: text/html` prop. */
main
  :is(
    .ct-text,
    .ct-text-card__body,
    .ct-section-header__lead,
    .ct-person__description,
    .ct-text-image__text,
    .ct-modal__body
  )
  a:not(.ct-btn, .ct-document) {
  color: var(--ct-link, var(--link));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}

main
  :is(
    .ct-text,
    .ct-text-card__body,
    .ct-section-header__lead,
    .ct-person__description,
    .ct-text-image__text,
    .ct-modal__body
  )
  a:not(.ct-btn, .ct-document):is(:hover, :focus-visible) {
  text-decoration-color: currentColor;
}

/* Light text ⇒ dark field. */
main :is(.text-primary-foreground, .text-background, .ct-text--inverted) {
  --ct-link: var(--link-inverted);
}

/* A card is its own surface: dropped on a dark band it keeps its light `--card`
   fill and resets its text to ink, so its links must come back to the light
   color too (without this they turned white on parchment — 1.11:1). Higher
   specificity than the rule above, so it wins inside a dark band.
   The `:not()` leaves a card that is ITSELF dark — the primary / inverted card
   variants carry the light-foreground class on their own root — inverted. */
main
  :is(.ct-card, .ct-text-card, .ct-card-testimonial):not(
    .text-primary-foreground,
    .text-background
  ) {
  --ct-link: var(--link);
}

/* An author-chosen text color wins over both: they picked that color
   deliberately, and a link inside it follows the copy (text.css already does
   this with `currentColor`; setting the variable to the same value makes the
   outcome identical whichever of the two rules the cascade picks). Last, so it
   also holds inside a dark band. `--inverted` is deliberately absent — that IS
   the dark case. */
main :is(.ct-text--primary, .ct-text--secondary, .ct-text--accent) {
  --ct-link: currentColor;
}
