/* St. Rita Mercy Foundation. Colors, Lato and the emblem come from the original
   site. EB Garamond echoes the lettering in the logo. */

@font-face { font-family: Lato; src: url("../fonts/Lato-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Lato; src: url("../fonts/Lato-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/EBGaramond-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
/* The italic is Newsreader: the italic h in EB Garamond closes up and reads as b at large sizes */
@font-face { font-family: "EB Garamond"; src: url("../fonts/Newsreader-400i.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

:root {
  --navy: #3C5871;
  --navy-deep: #1E2F40;   /* text on the sunset sky */
  --gold: #C99141;        /* rules, footer band */
  --gold-ink: #9A6B22;    /* gold text on white: passes contrast */
  --tan: #C9BAA7;
  --brown: #544035;
  --brown-deep: #2F2118;  /* text on the gold band */
  --ink: #2F2B27;
  --rule: rgba(84, 64, 53, .22);
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 32px);
  --gap: clamp(28px, 5.5vw, 72px);
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --enter: cubic-bezier(.22, 1, .36, 1);
  --emblem: url("../img/emblem.svg");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .22 0 0 0 0 .15 0 0 0 0 .1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { list-style: none; }
address { font-style: normal; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
::selection { background: rgba(201, 145, 65, .35); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 16px; background: var(--navy); color: #fff; }
.skip:focus { top: 12px; }
.nb { white-space: nowrap; }

/* Header: logo between two pairs of links, condenses on scroll */
.site-head { position: sticky; top: -24px; z-index: 20; background: #fff; transition: box-shadow .3s ease; }
.site-head.is-stuck { box-shadow: 0 1px 0 var(--rule); }
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: clamp(28px, 4vw, 60px);
  height: 104px;
  transition: transform .35s var(--enter);
}
.is-stuck .nav { transform: translateY(12px); }
.logo { grid-column: 2; grid-row: 1; display: block; }
.logo img { width: 272px; transition: transform .35s var(--enter); }
.is-stuck .logo img { transform: scale(.78); }
.menu { display: contents; }
.menu ul { display: flex; gap: clamp(20px, 3vw, 44px); grid-row: 1; }
.menu-l { grid-column: 1; justify-content: flex-end; }
.menu-r { grid-column: 3; justify-content: flex-start; }
.menu a {
  position: relative;
  display: block;
  padding-block: 10px;
  color: var(--gold-ink);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .2s ease;
}
.menu a::after {
  content: "";
  position: absolute;
  inset: auto 0 2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--enter);
}
.menu a[aria-current="page"] { color: var(--navy); }
.menu a[aria-current="page"]::after { background: var(--navy); transform: scaleX(1); }
.menu-toggle { display: none; }
@media (hover: hover) and (pointer: fine) {
  .menu a:hover { color: var(--navy); }
  .menu a:hover::after { transform: scaleX(1); }
}

/* Hero: the headline sits in the open sky */
.hero { position: relative; overflow: hidden; height: clamp(440px, 46vw, 760px); background: #8f7a62; }
.hero-media { position: absolute; inset: 0 -2px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 0; animation: settle 1.9s var(--enter) both; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(52% 50% at 76% 42%, rgba(255, 232, 196, .3), rgba(255, 232, 196, 0) 72%); }
.hero-copy { position: absolute; top: clamp(28px, 4.4vw, 84px); left: calc(max(var(--gutter), (100% - var(--wrap)) / 2) + (min(100% - 2 * var(--gutter), var(--wrap)) - var(--gap)) * 7 / 12 + var(--gap)); right: var(--gutter); }
.hero-title { color: var(--navy-deep); font: 500 clamp(2.4rem, 4.8vw, 6rem)/1.02 var(--serif); letter-spacing: -.014em; text-wrap: nowrap; }
.ln { display: block; overflow: hidden; padding-block: .06em .14em; margin-block: -.06em -.14em; }
.ln > span { display: block; animation: rise .95s var(--enter) both; animation-delay: calc(.1s + var(--n) * 80ms); }
.hero-link {
  display: inline-block;
  margin-top: clamp(12px, 1.5vw, 24px);
  color: var(--navy-deep);
  font: italic 500 clamp(1.25rem, 1.8vw, 1.75rem)/1.2 var(--serif);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  animation: fade .8s ease .55s both;
}
@media (hover: hover) and (pointer: fine) { .hero-link:hover { text-decoration-thickness: 2px; } }
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes rise { from { transform: translateY(108%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Sections and shared type */
.section { padding-block: clamp(56px, 7.5vw, 104px) clamp(64px, 8.5vw, 120px); }
.section--tight { padding-top: clamp(36px, 4.5vw, 60px); }
.eyebrow {
  position: relative;
  margin-bottom: 16px;
  color: var(--gold-ink);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .24em;
  line-height: 1.3;
  text-transform: uppercase;
}
.eyebrow::after { content: ""; display: block; width: 84px; height: 3px; margin-top: 10px; background: var(--gold); }
.title { color: var(--navy); font: 500 clamp(2.25rem, 3.7vw, 3.25rem)/1.08 var(--serif); letter-spacing: -.008em; margin-bottom: 22px; }
.lead { color: var(--navy); font: 500 clamp(1.5rem, 2.25vw, 2rem)/1.25 var(--serif); }
.works-intro { margin-bottom: 18px; }

/* Reading on: set like a printed note, not a button */
.more {
  display: inline-block;
  color: var(--brown);
  font: italic 500 1.1875rem/1.3 var(--serif);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color .2s ease;
}
.more[hidden] { display: none; }
.more--toggle { align-self: flex-start; padding: 0; border: 0; background: none; cursor: pointer; }
.more--toggle::after { content: "+"; display: inline-block; margin-left: .35em; color: var(--gold-ink); font-style: normal; transition: transform .25s var(--enter); }
.more--toggle[aria-expanded="true"]::after { transform: rotate(45deg); }
@media (hover: hover) and (pointer: fine) {
  .more:hover { color: var(--navy); text-decoration-thickness: 2px; }
}

/* Beliefs: words on the left, the seven works on the right */
.beliefs { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px var(--gap); align-items: start; }
@media (min-width: 961px) { .beliefs > :first-child { position: sticky; top: 112px; } }
.works { counter-reset: work; }
.works li {
  counter-increment: work;
  display: grid;
  grid-template-columns: 3rem 1fr;
  align-items: baseline;
  padding-block: .66rem;
  border-top: 1px solid var(--rule);
  color: var(--brown);
  font: 500 clamp(1.5rem, 2.3vw, 2rem)/1.14 var(--serif);
}
.works li:last-child { border-bottom: 1px solid var(--rule); }
.works li::before { content: counter(work); color: var(--gold-ink); font-style: italic; font-variant-numeric: oldstyle-nums; }

/* Tan band */
.band { background: var(--grain), var(--tan); color: var(--brown); }
.band h2 { font: 500 clamp(2.25rem, 3.7vw, 3.25rem)/1.08 var(--serif); letter-spacing: -.008em; margin-bottom: 16px; }
.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; gap: var(--gap); }
.feature-text { align-self: center; }
.feature + .feature { margin-top: clamp(48px, 7vw, 92px); }
.feature--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature--flip .photo { order: 2; }
.photo { display: block; border-radius: 28px; }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; filter: sepia(.1) saturate(.92); }
.statement { font: 500 clamp(1.25rem, 1.8vw, 1.5rem)/1.36 var(--serif); }
.statement em { font-style: italic; line-height: 0; }
.band .statement { color: var(--brown-deep); font-size: clamp(1.1875rem, 1.55vw, 1.375rem); line-height: 1.42; }
.photo { position: relative; }
.photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--tan); mix-blend-mode: multiply; opacity: .16; pointer-events: none; }

/* Home grantee cards */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 40px; }
.section-head .title { margin-bottom: 0; }
.section-head .more { padding-bottom: 12px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px clamp(28px, 4.5vw, 60px); margin-top: clamp(32px, 4vw, 48px); }
.card { display: flex; flex-direction: column; padding-top: 24px; border-top: 1px solid var(--rule); }
.card h3 { margin-bottom: 8px; color: var(--navy); font: 500 1.5rem/1.15 var(--serif); }
.card p:not(.place) { font-size: 1rem; line-height: 1.6; margin-bottom: 12px; }
.card .more { margin-top: auto; align-self: flex-start; }

/* All grantees */
.directory-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px var(--gap); align-items: end; }
.intro { color: var(--navy); font: 500 clamp(1.25rem, 1.8vw, 1.5rem)/1.36 var(--serif); }
.filter { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px 24px; }
.filter[hidden] { display: none; }
.filter button {
  position: relative;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--brown);
  cursor: pointer;
  font: italic 500 1.1875rem/1 var(--serif);
  transition: color .2s ease;
}
.filter small { margin-left: .15em; color: var(--gold-ink); font-size: .85em; font-style: normal; font-variant-numeric: oldstyle-nums; }
.filter button::after { content: ""; position: absolute; inset: auto 0 2px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--enter); }
.filter button[aria-pressed="true"] { color: var(--navy); }
.filter button[aria-pressed="true"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .filter button:hover { color: var(--navy); } }

.directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(28px, 4.5vw, 60px); margin-top: clamp(32px, 4vw, 48px); }
.entry { display: flex; flex-direction: column; align-items: stretch; padding-block: 24px 44px; border-top: 1px solid var(--rule); }
.entry[hidden] { display: none; }
.entry:target { border-top: 2px solid var(--gold); padding-top: 23px; }
.entry-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 76px; margin-bottom: 16px; }
.place { flex: none; align-self: flex-start; color: var(--gold-ink); font: italic 500 1.0625rem/1.2 var(--serif); text-align: right; }
.entry h2 { margin-bottom: 8px; color: var(--navy); font: 500 1.5rem/1.15 var(--serif); }
.entry h2 a { text-decoration: none; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .16em; }
.entry h2 a:focus-visible { text-decoration: underline; }
@media (hover: hover) and (pointer: fine) { .entry h2 a:hover { text-decoration: underline; } }
.entry-text { margin-bottom: 12px; font-size: 1rem; line-height: 1.6; overflow: hidden; }
.is-folded .entry:not(.is-open) .rest { display: none; }
.entry .more--toggle { margin-top: auto; }
.mark { width: 48px; height: 48px; margin-bottom: 14px; }
.entry-note { padding-block: 24px 44px; border-top: 1px solid var(--rule); }
.entry-note p { margin-bottom: 10px; color: var(--brown); font: italic 500 1.5rem/1.25 var(--serif); }
.is-filtered .entry-note { display: none; }

/* Banner on inner pages, with the top of the emblem */
.banner { position: relative; display: flex; align-items: center; min-height: clamp(170px, 19.2vw, 277px); overflow: hidden; padding-block: clamp(32px, 4vw, 56px); background: var(--grain), var(--tan); color: var(--brown); }
/* Always taller than the band, so the emblem is cut by the band's edge and never ends inside it */
.banner::after { content: ""; position: absolute; top: 10px; right: 0; height: max(clamp(190px, 25vw, 370px), 100% + 44px); aspect-ratio: 580 / 578; background: var(--emblem) no-repeat right top / contain; pointer-events: none; }
.banner .wrap { position: relative; z-index: 1; }
.banner h1 { max-width: min(52rem, 100% - 22vw); font: 500 clamp(2.25rem, 3.7vw, 3.25rem)/1.08 var(--serif); letter-spacing: -.008em; }
.banner .eyebrow { margin-bottom: 12px; color: var(--brown); }
.banner .eyebrow::after { display: none; }

/* Grant process */
.process { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 var(--gap); align-items: stretch; }
.process h2 { margin-bottom: 16px; color: var(--navy); font: 500 clamp(1.5rem, 2.2vw, 1.875rem)/1.18 var(--serif); text-wrap: pretty; }
.rules li { padding-block: .72rem; border-top: 1px solid var(--rule); font-size: 1.0625rem; line-height: 1.42; }
.rules li:last-child { border-bottom: 1px solid var(--rule); }
.process-side { display: flex; flex-direction: column; justify-content: space-between; gap: 38px; }
.process > section:first-child h2, .process-side > :first-child h2 { min-height: 2.36em; }
.panel { grid-column: 1 / -1; margin-top: clamp(40px, 5vw, 64px); }
.rules--two { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gap); }
.rules--two li:nth-last-child(2) { border-bottom: 1px solid var(--rule); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px var(--gap); align-items: start; }
.contact-card { padding-block: 24px 28px; border-block: 1px solid var(--rule); }
.contact address { margin-bottom: 14px; color: var(--brown); font: 500 1.5rem/1.3 var(--serif); }
.contact .mail { color: var(--navy); font: 500 1.25rem/1.25 var(--serif); text-decoration-color: var(--gold); overflow-wrap: anywhere; }
.contact-note { color: var(--navy); font-size: clamp(1.5rem, 2.25vw, 2rem); line-height: 1.25; }

/* Scripture */
.quote {
  --mark: clamp(230px, 30vw, 470px);
  position: relative;
  overflow: hidden;
  padding-block: clamp(72px, 9vw, 132px) clamp(84px, 10.5vw, 150px);
  background: var(--grain), var(--tan);
  color: var(--brown);
}
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 360deg; }
.quote::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--mark);
  aspect-ratio: 580 / 578;
  background: var(--emblem) no-repeat right bottom / contain;
  pointer-events: none;
  -webkit-mask-image: conic-gradient(from -8deg at 50% 54%, #000 var(--sweep), transparent 0);
  mask-image: conic-gradient(from -8deg at 50% 54%, #000 var(--sweep), transparent 0);
  transition: --sweep 1.5s cubic-bezier(.45, .05, .25, 1);
}
.quote.pre-sweep::after { --sweep: 0deg; }
.quote .wrap { position: relative; z-index: 1; }
.quote blockquote { font: italic 500 clamp(1.75rem, 3.7vw, 3.75rem)/1.17 var(--serif); letter-spacing: -.005em; }
.quote .l { display: block; padding-left: .9em; text-indent: -.9em; }
.quote .l:first-child { text-indent: calc(-.97em - .42em); }
.quote .l:last-child { text-indent: -.97em; }
.quote .l2 { display: inline; }
.quote figcaption { margin-top: 28px; font-size: .8125rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }

/* Footer */
.site-foot { background: var(--grain), var(--gold); color: var(--brown-deep); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 22px 48px; padding-block: 34px 30px; }
.foot .name { margin-bottom: 6px; font: 500 1.375rem/1.2 var(--serif); letter-spacing: .1em; text-transform: uppercase; }
.foot address { font-size: .9375rem; line-height: 1.6; }
.foot ul { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.foot ul a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot ul a:hover { text-decoration: underline; } }

/* Tablet */
@media (max-width: 960px) {
  .directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { column-gap: 24px; }
  .directory-head { grid-template-columns: 1fr; }
  .filter { justify-content: flex-start; }
  .hero-copy { left: 50%; }
  .hero-media img { object-position: 58% 0; }
  .hero-title { font-size: clamp(2rem, 5.2vw, 3.1rem); }
  .hero-link { font-size: 1.5rem; }
  .directory > .entry-note { display: none; }
}

/* Hang the eyebrow rule in the left margin on wide screens, as on the original */
@media (min-width: 1320px) {
  .eyebrow::after { position: absolute; right: 100%; top: .55em; width: 48px; margin: 0 14px 0 0; }
}

/* Narrow screens: flush verse lines, and the opening mark stops hanging */
@media (max-width: 760px) {
  .quote blockquote { padding-right: max(0px, var(--mark) - var(--gutter) - 24px); font-size: clamp(1.625rem, 6.6vw, 2.25rem); }
  .quote .l, .quote .l:first-child, .quote .l:last-child { padding-left: 0; text-indent: 0; }
  .quote .l2 { display: block; }
}

/* Phone menu */
@media (max-width: 860px) {
  .site-head { top: 0; }
  .is-stuck .nav { transform: none; }
  .is-stuck .logo img { transform: none; }
  .nav { display: flex; flex-wrap: wrap; justify-content: space-between; height: auto; min-height: 76px; padding-block: 12px; }
  .logo img { width: 190px; }
  .menu { display: flex; flex-wrap: wrap; gap: 4px 20px; width: 100%; }
  .menu ul { gap: 4px 20px; flex-wrap: wrap; }
  .js .nav { height: 76px; padding-block: 0; flex-wrap: nowrap; }
  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--navy);
    cursor: pointer;
    font: 700 .75rem/1 var(--sans);
    letter-spacing: .13em;
    text-transform: uppercase;
  }
  .menu-toggle i { position: relative; display: block; width: 24px; height: 12px; }
  .menu-toggle i::before, .menu-toggle i::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
    transition: transform .28s var(--enter);
  }
  .menu-toggle i::before { top: 0; }
  .menu-toggle i::after { bottom: 0; }
  .menu-toggle[aria-expanded="true"] i::before { transform: translateY(5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] i::after { transform: translateY(-5px) rotate(-45deg); }
  .js .menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 4px var(--gutter) 20px;
    background: #fff;
    box-shadow: 0 1px 0 var(--rule), 0 24px 34px -24px rgba(47, 33, 24, .6);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .24s var(--enter), visibility 0s linear .24s;
  }
  .js .menu.is-open { clip-path: inset(0 0 -60px 0); visibility: visible; transition: clip-path .34s var(--enter); }
  .js .menu ul { display: block; }
  .js .menu li { opacity: 0; transform: translateY(6px); }
  .js .menu.is-open li { opacity: 1; transform: none; transition: opacity .3s ease, transform .4s var(--enter); transition-delay: calc(var(--i, 0) * 40ms + 60ms); }
  .menu-scrim { position: fixed; inset: 0; z-index: 15; background: rgba(30, 47, 64, .38); opacity: 0; visibility: hidden; transition: opacity .24s ease, visibility 0s linear .24s; }
  .menu-scrim.is-on { opacity: 1; visibility: visible; transition: opacity .3s ease; }
  body.menu-open { overflow: hidden; }
  .js .menu a {
    padding-block: 15px;
    border-top: 1px solid var(--rule);
    color: var(--navy);
    font: 500 1.5rem/1.1 var(--serif);
    letter-spacing: 0;
    text-transform: none;
  }
  .js .menu a::after { display: none; }
  .js .menu a[aria-current="page"] { color: var(--gold-ink); }
}

/* Phone */
@media (max-width: 680px) {
  body { font-size: 1rem; }
  .beliefs, .feature, .feature--flip, .process, .directory-head { grid-template-columns: minmax(0, 1fr); }
  .feature--flip .photo { order: 0; }
  .photo, .photo img { --radius: 20px; border-radius: 20px; }
  .photo img { height: auto; }
  .cards { grid-template-columns: minmax(0, 1fr); row-gap: 36px; }
  .section-head .more { order: 3; padding-bottom: 0; }
  .directory { grid-template-columns: minmax(0, 1fr); }
  .entry { padding-block: 22px 36px; }
  .filter { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; width: 100%; }
  .filter[hidden] { display: none; }
  .filter button { justify-self: start; min-height: 44px; text-align: left; }
  .filter button::after { bottom: 6px; }
  .more { padding-block: 10px; }
  .entry .more--toggle { margin-top: 2px; }
  .banner { padding-bottom: 138px; }
  .banner h1 { max-width: none; }
  .banner::after { top: auto; bottom: 0; height: auto; width: 128px; background-position: right bottom; }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .rules--two { grid-template-columns: minmax(0, 1fr); }
  .rules--two li:nth-last-child(2) { border-bottom: 0; }
  .quote { --mark: 190px; padding-bottom: 188px; }
  .quote blockquote { padding-right: 0; }
  .foot { align-items: flex-start; }
  .foot ul { flex-direction: column; gap: 2px; }
  .foot ul a { display: inline-block; padding-block: 10px; }
  .foot address a { display: inline-block; padding-block: 8px; }
}

/* Phone hero: the same idea as desktop, using a tall crop with more sky */
@media (max-width: 560px) {
  .hero { height: auto; aspect-ratio: 1170 / 1860; }
  .hero-media img { object-position: center top; transform-origin: 50% 70%; }
  .hero-media::after { display: none; }
  .hero-copy { top: 24px; left: var(--gutter); right: var(--gutter); }
  .hero-title { font-size: clamp(2.5rem, 11.8vw, 3.25rem); }
  .hero-link { margin-top: 6px; padding-block: 8px; }
}
@media (max-width: 350px) {
  .hero-title { font-size: 2.125rem; }
  .hero-link { margin-top: 0; }
}

/* Reveal on scroll. Hidden state is set only by site.js, on elements below the fold. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .reveal { transition: opacity .75s var(--enter), transform .75s var(--enter); transition-delay: calc(var(--d, 0) * 45ms); }
  .reveal.pre { opacity: 0; transform: translateY(18px); }
  .reveal-photo { transition: opacity .6s ease; }
  .reveal-photo img { transition: clip-path 1.1s var(--enter); }
  .reveal-photo.pre { opacity: 0; }
  .reveal-photo.pre img { clip-path: inset(7% 3% 7% 3% round var(--radius, 28px)); }
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
  .site-head { view-transition-name: site-head; }
}
/* Wide screens: the header settles as the page starts to scroll, moving one way only */
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .nav { animation: nav-settle linear both; animation-timeline: scroll(root); animation-range: 0 24px; transition: none; }
    .logo img { animation: logo-settle linear both; animation-timeline: scroll(root); animation-range: 0 24px; transition: none; }
    @keyframes nav-settle { to { transform: translateY(12px); } }
    @keyframes logo-settle { to { transform: scale(.78); } }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-head, .quote::after, .banner::after { display: none; }
  .pre, .pre img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .is-folded .entry .rest { display: inline !important; }
  .more--toggle { display: none !important; }
}
