/* Gruppo '89: the Aquileia floor. Light by default, dark only when the visitor toggles it. */
@font-face {
  font-family: 'Forum';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/forum-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Forum';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/forum-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/sourcesans3-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/sourcesans3-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/sourcesans3-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/sourcesans3-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/sourcesans3-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/sourcesans3-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/sourcesans3-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/sourcesans3-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --stone: #f2f3f0;
  --joint: #d9dcd5;
  --ink: #141414;
  --ink-soft: #3d3f3b;
  --lagoon: #2f6f73;
  --ochre: #b37d1c;
  --ochre-field: #c99536;
  --brick: #a8462e;
  --slate: #4b6283;
  --rose: #a5636d;
  --display: "Forum", "Times New Roman", serif;
  --text: "Source Sans 3", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --surface: #ffffff;
  --lagoon-field: #2f6f73;
  --on-field: #ffffff;
  --ink-strong: #000000;
  --wave: url("../images/wave.svg");
  color-scheme: light;
}
/* dark version: only when the visitor chooses it with the toggle, never automatic */
:root[data-theme="dark"] {
  --stone: #151816;
  --surface: #1f2321;
  --joint: #353b37;
  --ink: #eceee9;
  --ink-soft: #b8bdb4;
  --ink-strong: #ffffff;
  --ochre-field: #7a5614;
  --lagoon-field: #1d4a4d;
  --ochre: #b37d1c;
  --brick: #c65a3f;
  --lagoon: #3f8c90;
  --slate: #6f86a8;
  --rose: #b97580;
  --wave: url("../images/wave-dark.svg");
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font: 400 1.25rem/1.55 var(--text);
}
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
/* on the lagoon field the ring turns light: 5.8:1 in light, 9.8:1 in dark */
.panel--who :focus-visible { outline-color: var(--on-field); }
main:focus { outline: none; }
.skip-link {
  position: absolute; left: var(--gutter); top: 8px; z-index: 10;
  background: var(--ink); color: var(--stone); font-weight: 700; padding: 12px 16px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* threshold: where you step onto the floor */
.threshold {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter) 18px;
  flex-wrap: wrap;
}
.brand-heading { margin: 0; font: inherit; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.brand svg { width: 116px; height: auto; display: block; }
.brand-place { display: block; font: 600 0.9375rem/1.35 var(--text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); padding-left: 18px; border-left: 2px solid var(--ink); }
.threshold nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; }
.threshold nav a { font: 600 1.25rem/1 var(--text); text-decoration: none; padding: 10px 0; display: inline-block; border-bottom: 2px solid transparent; }
.threshold nav a:hover, .threshold nav a[aria-current] { border-bottom-color: var(--ink); }

.header-tools { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 600 0.9375rem/1 var(--text); color: var(--ink); background: transparent;
  border: 2px solid var(--ink); padding: 9px 12px 8px; border-radius: 0;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 16px; height: 16px; flex: none; }
.theme-toggle:hover { background: var(--ink); color: var(--stone); }
.theme-toggle[aria-pressed="true"] { background: var(--ink); color: var(--stone); }
.band { height: 22px; background: var(--wave) repeat-x left center / 56px 22px; }

/* the floor: three panels laid side by side like the Theodorian halls */
.floor {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "who archive" "prayer archive";
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 10px var(--gutter) 10px;
}
.panel { min-width: 0; overflow-wrap: break-word; padding: clamp(24px, 3vw, 44px); position: relative; }
.panel h2 { font: 400 clamp(2rem, 2.6vw, 2.65rem)/1.08 var(--display); margin: 0 0 18px; letter-spacing: 0.01em; text-wrap: balance; }

.panel--prayer { grid-area: prayer; background: var(--ochre-field); }
.prayer-date { font: 400 clamp(3rem, 5vw, 4.6rem)/0.98 var(--display); margin: 6px 0 10px; letter-spacing: -0.005em; }
.prayer-date small { display: block; font: 400 1.5625rem/1.3 var(--display); letter-spacing: 0.01em; margin-top: 12px; }
.prayer-place { font-weight: 600; margin: 0 0 22px; max-width: 34ch; }
.prayer-lead { font: 400 clamp(2rem, 3.1vw, 2.85rem)/1.12 var(--display); margin: 4px 0 18px; max-width: 16ch; text-wrap: balance; }
.prayer-recent { font-weight: 600; margin: 14px 0 0; max-width: 42ch; text-wrap: pretty; }
.prayer-note { margin: 0 0 8px; max-width: 40ch; text-wrap: pretty; }
.prayer-date small { text-wrap: pretty; }
.prayer-actions { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 20px; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--stone); text-decoration: none;
  font: 600 1.25rem/1 var(--text); padding: 16px 22px 15px;
}
.button:hover { background: var(--ink-strong); text-decoration: underline; }
.prayer-actions a:not(.button) { font-weight: 600; align-self: center; }

.panel--who { grid-area: who; background: var(--lagoon-field); color: var(--on-field); }
.panel--who p { margin: 0 0 14px; max-width: 46ch; }
.panel--who strong { font-weight: 700; }
.panel--who a { font-weight: 600; }

.panel--archive { grid-area: archive; background: var(--surface); }

.doors { list-style: none; margin: 0; padding: 0; }
.doors li > div { min-width: 0; }
.doors li { display: grid; grid-template-columns: 28px 1fr auto; gap: 18px; padding: 22px 0 24px; border-top: 1px solid var(--joint); }
.doors li:first-child { border-top: 2px solid var(--ink); }
.doors .tessera { width: 22px; height: 22px; display: block; margin-top: 8px; }
.doors a { font: 400 2.1rem/1.1 var(--display); text-decoration: none; }
.doors a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.doors p { margin: 8px 0 0; color: var(--ink-soft); max-width: 48ch; }
.door-photo { margin: 6px 0 0; width: 168px; }
.door-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.door-photo figcaption { font-size: 0.9375rem; line-height: 1.35; color: var(--ink-soft); margin-top: 8px; }
.door-photo { position: relative; }
/* caption only on hover or keyboard focus where hover exists; touch screens keep it visible below */
@media (hover: hover) {
  .door-photo figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
    padding: 8px 10px 9px; background: rgb(20 20 20 / .82); color: #fff;
    opacity: 0; transform: translateY(4px);
    transition: opacity 180ms cubic-bezier(.16, 1, .3, 1), transform 180ms cubic-bezier(.16, 1, .3, 1);
  }
  .doors li:hover .door-photo figcaption, .doors li:focus-within .door-photo figcaption { opacity: 1; transform: none; }
}
@media (hover: hover) and (prefers-reduced-motion: reduce) {
  .door-photo figcaption { transition: none; transform: none; }
}
.k-iniziative { background: var(--slate); clip-path: polygon(50% 4%, 100% 96%, 0 96%); }
@media (forced-colors: active) { .tessera { forced-color-adjust: none; } }
.k-taize { background: var(--ochre); }
.k-eventi { background: var(--brick); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.k-europei { background: var(--lagoon); border-radius: 50%; }
.k-meeting { background: var(--rose); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }

footer { padding: 0 0 36px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; padding: 26px var(--gutter) 0; }
.footer-inner svg { width: 96px; height: auto; }
.footer-inner p { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px 24px; flex-wrap: wrap; }
.footer-links a { font-weight: 600; display: inline-block; padding: 10px 0; }
.footer-inner .muted { color: var(--ink-soft); font-size: 0.9375rem; }

@media (max-width: 1080px) {
  .floor { grid-template-columns: 1fr; grid-template-areas: "who" "prayer" "archive"; grid-template-rows: none; }
}
/* very wide screens: content capped and centred, wave bands stay full-bleed */
.threshold, .floor, .footer-inner { max-width: 1440px; margin-inline: auto; }
/* touch: links at least 44px tall */
@media (pointer: coarse) {
  .threshold nav a, .footer-links a { padding: 13px 0; }
}
@media (max-width: 720px) {
  /* header: logo + theme button on one row, the five links as a tidy 3 + 2 grid below */
  .threshold { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand toggle" "nav nav"; align-items: center; gap: 10px 12px; }
  .brand-heading { grid-area: brand; }
  .header-tools { display: contents; }
  .threshold nav { grid-area: nav; }
  .threshold nav ul { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 24px; }
  .theme-toggle { grid-area: toggle; min-width: 44px; min-height: 44px; justify-content: center; padding: 10px; }
  .theme-toggle svg { width: 18px; height: 18px; }
  .theme-toggle .toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .brand svg { width: 84px; }
  /* archive: text full width, then a small thumbnail with its caption beside it */
  .doors li { grid-template-columns: 28px 1fr; }
  .door-photo { grid-column: 2; width: 100%; max-width: 360px; margin-top: 14px; }
  .floor { padding-inline: 0; gap: 0; }
  .panel { padding: 30px var(--gutter) 34px; }
}


/* ---------- pages beyond the home ---------- */
.page { max-width: 1440px; margin-inline: auto; padding: 30px var(--gutter) 56px; }
.page-header { max-width: 70ch; margin: 0 0 30px; }
.page-header h1 { font: 400 clamp(2.25rem, 4vw, 3.4rem)/1.08 var(--display); margin: 0; text-wrap: balance; }
.page-meta { margin: 12px 0 0; color: var(--ink-soft); font-weight: 600; }
.breadcrumbs { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 0.9375rem; color: var(--ink-soft); }
.breadcrumbs li + li::before { content: "/"; padding: 0 10px; color: var(--joint); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* reading surface: the white panel of the floor */
.prose { background: var(--surface); max-width: 860px; padding: clamp(24px, 4vw, 52px); overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { max-width: 70ch; }
.prose h2 { font: 400 clamp(1.75rem, 2.6vw, 2.2rem)/1.15 var(--display); margin: 1.6em 0 0.5em; }
.prose h3 { font: 600 1.5625rem/1.25 var(--text); margin: 1.4em 0 0.4em; }
.prose h4 { font: 700 1.25rem/1.3 var(--text); margin: 1.2em 0 0.3em; }
.prose img { max-width: 100%; height: auto; }
.prose img, .prose a img { display: block; margin: 0 0 1em; }
.prose blockquote { margin: 1.4em 0; padding: 18px 22px; background: var(--stone); }
.prose blockquote p { margin: 0 0 0.6em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; height: 22px; background: var(--wave) repeat-x left center / 56px 22px; margin: 2em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1.0625rem; }
.prose th, .prose td { border-bottom: 1px solid var(--joint); padding: 8px 10px; text-align: left; vertical-align: top; }
.back-link { margin: 26px 0 0; font-weight: 600; }
.event-facts { margin: 18px 0 0; display: grid; gap: 6px; max-width: 70ch; }
.event-facts div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 12px; }
.event-facts dt { font-weight: 700; }
.event-facts dd { margin: 0; }

/* listings: sections and the event archive */
.listing { list-style: none; margin: 0; padding: 0; max-width: 980px; background: var(--surface); }
.listing li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 6px 24px; padding: 20px clamp(18px, 3vw, 36px); border-top: 1px solid var(--joint); }
.listing li:first-child { border-top: 2px solid var(--ink); }
.listing.no-dates li { grid-template-columns: 1fr; }
.listing time { font: 400 1.5625rem/1.2 var(--display); }
.listing h2 .tessera { display: inline-block; width: 14px; height: 14px; margin-right: 12px; vertical-align: 0.05em; }
.listing time small { display: block; font: 600 0.9375rem/1.4 var(--text); color: var(--ink-soft); }
.listing h2 { font: 400 1.5625rem/1.2 var(--display); margin: 0; }
.listing h2 a { text-decoration: none; }
.listing h2 a:hover { text-decoration: underline; }
.listing p { margin: 6px 0 0; color: var(--ink-soft); }
.prose.page-intro { max-width: 980px; margin: 0; padding-bottom: 24px; }
.page-intro p { margin: 0 0 0.8em; }
.pagination { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 0; padding: 0; }
.pagination a, .pagination span { display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; text-align: center; padding: 0 10px; font-weight: 600; text-decoration: none; border: 2px solid var(--ink); }
.page .pagination a, .page .pagination span { color: var(--ink); background: transparent; }
.page .pagination .active span { background: var(--ink); color: var(--stone); }
.page .pagination .disabled span { border-color: var(--joint); color: var(--ink-soft); }

/* contact form (markup from the form plugin) */
.prose form { margin-top: 24px; }
.prose .form-group { margin: 0 0 20px; }
.prose .form-label { display: block; font-weight: 600; margin-bottom: 6px; }
.prose .form-label .required, .prose .form-label span[class*="required"] { color: inherit; }
.prose input[type="text"], .prose input[type="email"], .prose textarea {
  width: 100%; max-width: 640px; font: inherit; color: var(--ink); background: var(--stone);
  border: 2px solid var(--ink); border-radius: 0; padding: 12px 14px;
}
.prose textarea { min-height: 10em; resize: vertical; }
.prose .button-wrapper button, .prose button[type="submit"] {
  font: 600 1.25rem/1 var(--text); background: var(--ink); color: var(--stone); border: 0; padding: 16px 22px 15px; cursor: pointer;
}
.prose .button-wrapper button:hover, .prose button[type="submit"]:hover { background: var(--ink-strong); text-decoration: underline; }
.toast, .notices { padding: 14px 18px; margin: 0 0 20px; font-weight: 600; background: var(--stone); border: 2px solid var(--ink); }
.toast-error, .notices.red, .notices.error { border-color: var(--brick); }
.has-errors input, .has-errors textarea { border-color: var(--brick); }

/* error page */
.error-code { font: 400 clamp(4rem, 12vw, 8rem)/1 var(--display); margin: 0 0 10px; }

@media (max-width: 720px) {
  .page { padding-inline: 0; }
  .page-header, .breadcrumbs { padding-inline: var(--gutter); }
  .listing li { grid-template-columns: 1fr; }
}
