/* Inner pages: rules on top of theme.css. Owned by the inner-pages lane. */

/* ---- hero bands ---- */
.hero.page-hero { min-height: 300px; }
.hero.page-hero--plain { min-height: 0; }
.hero.page-hero--plain .hero__body { padding-top: 48px; padding-bottom: 44px; }
.page-hero h1 { max-width: 20ch; overflow-wrap: anywhere; }
@media (min-width: 760px) {
  .hero.page-hero { min-height: 380px; }
  .hero.page-hero--plain { min-height: 0; }
  .hero.page-hero--plain .hero__body { padding-top: 64px; padding-bottom: 56px; }
}

/* ---- section rhythm on inner pages ---- */
main > .section { padding: 56px 0; }
@media (min-width: 760px) { main > .section { padding: 80px 0; } }
.stack > .photo { max-width: 860px; }
.stack > .prose h1:first-child { margin-bottom: 0.4em; }
.prose h1 { font-size: clamp(38px, 5vw, 60px); }
.stack > .gallery { margin-top: 8px; }

/* ---- grids: a lone cell stays card width, wrapping text never clips ---- */
.grid > .cell { min-width: 0; }
.cell--one { max-width: 560px; }
.cell .photo { box-shadow: none; }
.card, .cell .prose h2, .cell .prose h4 { overflow-wrap: anywhere; }
.cell .prose h4 { font-size: 24px; margin-top: 0.8em; }
.cell .prose h4 a { color: var(--red-dark); }
.cell .prose p a { overflow-wrap: anywhere; }

/* ---- map and text pairs (get help) ---- */
.grid--pair { align-items: center; gap: 24px; }
@media (min-width: 640px) { .grid--pair { gap: 48px; } }
.grid--pair + .grid--pair { margin-top: 40px; }
.stack:has(> .grid--pair) { gap: 40px; }
.grid--pair .cell { justify-content: center; }
.grid--pair .prose h2 { font-size: clamp(30px, 3.4vw, 44px); margin-top: 0; }
.grid--pair .prose p { font-size: 20px; }
.grid--pair .map { aspect-ratio: 4 / 3; }
/* keep the map on top when the text comes first, so each pair reads map then words */
@media (max-width: 639px) {
  .grid--pair > .cell:has(.prose):first-child { order: 2; }
}

/* ---- board of directors: link list beside the names ---- */
.grid--split { align-items: start; gap: 40px; }
@media (min-width: 640px) { .grid--split { gap: 64px; } }
.cell--links { gap: 14px; }
.cell--links h2 { margin-bottom: 6px; }
.cell--links .btns { display: block; }
.cell--links .btn { width: 100%; justify-content: space-between; }
.prose--names { display: grid; }
.cell .prose--names p, .prose--names p { margin: 0; padding: 13px 0; border-top: 1px solid var(--rule); color: var(--ink); font-size: 22px; line-height: 1.3; }
.prose--names p:last-child { border-bottom: 1px solid var(--rule); }
.prose--names p + p { margin-top: 0; }
@media (min-width: 640px) { .cell .prose--names p { font-size: 24px; } }

/* ---- list rows ---- */
.rows { max-width: 900px; }
.row h3 { overflow-wrap: anywhere; }
.row small { font-size: 16px; }
.section--paper-2 .row { border-color: var(--ink); }
@media (max-width: 639px) { .row { padding: 20px 0; } .row svg { width: 28px; height: 28px; } }

/* ---- archive pages (author, category, statistics) ---- */
.prose--article { max-width: 780px; }
.prose--article time { display: block; font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red-dark); margin-bottom: 8px; }
.prose--article time span + span::before { content: " "; }
.prose--article h2 { font-size: clamp(36px, 4.4vw, 56px); margin-top: 0; }
.prose--article h2 a { color: var(--ink); text-decoration: none; }
.prose--article h2 a:hover { color: var(--red-dark); }
.prose--article p:first-of-type a, .prose--article h2 + p a { font-size: 18px; }
.prose--article h2 + p { margin-top: 10px; margin-bottom: 18px; font-size: 18px; }
.prose--article h2 + p > span + span::before { content: "\2022"; margin: 0 10px; color: var(--text-2); }
.prose--article > div > p { font-size: 21px; }

/* ---- forms ---- */
.form { max-width: 900px; }
.field input, .field textarea { max-width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--red); }
.form .actions .btn { width: auto; }
@media (max-width: 639px) {
  .form .actions .btn { width: 100%; justify-content: center; }
  .field label { font-size: 20px; }
}

/* ---- gallery ---- */
.gallery--showcase button:first-child { border-radius: var(--radius); }
.gallery button { border-radius: var(--radius-sm); }

/* ---- buttons row on content pages ---- */
@media (max-width: 639px) { .btns .btn { width: 100%; justify-content: space-between; } }

/* showcase photo shows whole, never cropped */
.gallery--showcase button:first-child { aspect-ratio: 2 / 1; }
.gallery--showcase button:first-child img { height: 100%; object-fit: cover; object-position: 50% 35%; }
/* a lone last card matches the width of its siblings */
@media (min-width: 960px) { .cell--one { max-width: calc((100% - 48px) / 3); } }

/* a heading beside a gallery: stack them so the photos get the full width */
.grid:has(> .cell > .gallery) { grid-template-columns: minmax(0, 1fr); }
