/* Shared visual character with Hármas Kötelék; original viewer styles stay in styles.css. */
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces/Fraunces-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --color-primary: #343b32;
  --color-secondary: #dbb86b;
  --color-text: #5d6256;
  --color-accent: #7c592b;
  --color-soft: #f2ecdf;
  --color-white: #fffdf8;
  --color-cream: #eee5d4;
  --color-line: #ded7c7;
  --font-display: "Fraunces", Georgia, serif;
  --shadow-soft: 0 16px 40px #3933270d;
  --max-width: 1180px;
}

html { scroll-padding-top: 130px; }
body { background: #fcf9f2; font-size: 16px; font-weight: 400; line-height: 1.8; }
::selection { background: #eed49a; color: #343b32; }
.container, .container.wide { width: calc(100% - 96px); max-width: var(--max-width); }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon, .section-icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ui-icon { width: 24px; height: 24px; flex: 0 0 24px; }
.section-icon { display: block; width: 36px; height: 36px; margin-bottom: 22px; color: var(--color-accent); }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 200; transform: translateY(-200%); padding: 12px 20px; background: var(--color-primary); color: white; }
.skip-link:focus { transform: none; }
body :is(a, button, summary, [tabindex]):focus-visible { outline: 2px solid var(--color-accent); outline-offset: 5px; }
main:focus { outline: none; }

/* A compact masthead, with a distinct invitation to support the foundation. */
.site-header { position: sticky; top: 0; z-index: 50; padding: 20px 0; background: #fcf9f2f5; border-bottom: 1px solid var(--color-line); animation: none; }
.header-inner { align-items: center; justify-content: space-between; gap: 28px; }
.brand-logo { width: 238px; flex: 0 0 238px; }
.brand-logo:hover img, .brand-logo:focus-visible img { transform: none; filter: none; }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.5vw, 36px); }
.site-nav a { font: 450 1.05rem/1.4 var(--font-display); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--color-accent); }
.site-nav .donate-link { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; border: 1px solid #bd9146; border-radius: 28px 28px 8px 28px; background: var(--color-secondary); color: #3d3424; }
.donate-link .ui-icon { width: 32px; height: 32px; flex-basis: 32px; padding: 8px; border-radius: 50%; background: #f7e9c8; color: #85502e; fill: currentColor; }
.site-nav .donate-link:hover { background: #e6c681; color: #3d3424; }
.menu-toggle { display: none; }

/* Comfortable type and restrained ornament; the photographs carry the story. */
.section { padding: 90px 0; }
h1, h2, h3, .display-title, .life-title { font-family: var(--font-display); font-weight: 450; font-optical-sizing: auto; font-variation-settings: "SOFT" 30, "WONK" 1; letter-spacing: -.03em; color: var(--color-primary); }
h1 { font-size: clamp(3.6rem, 6.5vw, 5.7rem); line-height: 1.06; margin-bottom: 28px; }
h2 { font-size: clamp(2.3rem, 3.8vw, 3.5rem); line-height: 1.16; margin-bottom: 26px; text-wrap: balance; }
h3 { text-transform: none; }
p { margin-bottom: 22px; }
.bordered { border: 0; padding-left: 0; }
.intro-section { padding: 70px 0 90px; }
.intro-section .split { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(36px, 5vw, 76px); }
.intro-section p { color: var(--color-text); font-size: 1.025rem; }
.woven-mark { display: block; width: 100px; height: 32px; margin-bottom: 24px; background: url("assets/icons/three-strands.svg") left center / contain no-repeat; }
.intro-section .media-block { position: relative; padding: 10px; background: var(--color-cream); border-radius: 4px 72px 4px 4px; transform: none; }
.intro-section .media-block::after { content: ""; position: absolute; right: -20px; bottom: -32px; width: 145px; height: 48px; background: url("assets/icons/three-strands.svg") center / contain no-repeat; }
.welcome-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 2px 62px 2px 2px; box-shadow: none; object-position: center; }
.intro-actions { display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap; margin-top: 32px; }
.primary-action { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 22px 12px 16px; border-radius: 4px 24px 24px 4px; background: var(--color-secondary); color: #352e21; font: 450 1.1rem/1.4 var(--font-display); text-decoration: none; }
.primary-action .ui-icon { box-sizing: content-box; padding-right: 12px; border-right: 1px solid #aa823e; }
.primary-action:hover { background: #eed49a; }
.text-action { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--color-accent); font-size: .9rem; font-weight: 600; text-decoration: none; }
.action-arrow { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #b9a882; border-radius: 50%; transition: background-color 180ms ease, transform 180ms ease; }
.action-arrow .ui-icon { width: 18px; height: 18px; }
.text-action:hover .action-arrow { background: var(--color-secondary); transform: translateX(3px); }

/* The house: a quiet heading beside a readable story, then a three-photo tour. */
.agape-section { background: #eee7d7; }
.agape-section .copy-block { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 0 72px; max-width: none; }
.agape-section h2 { grid-row: 1 / 4; }
.agape-section p { grid-column: 2; color: var(--color-text); }
.agape-section p:first-of-type { font-size: 1.1rem; color: var(--color-primary); }
.gallery-agape { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 48px; gap: 20px; transform: none; }
.gallery-agape .gallery-tile { aspect-ratio: 4 / 3; border: 0; border-radius: 4px; }


.gallery-tile { border: 0; }
.welcome-photo, .profile-photo img, .gallery-tile img { transition: opacity 220ms ease, transform 350ms ease; }
.welcome-photo.image-loading, .profile-photo img.image-loading, .gallery-tile img.image-loading { opacity: 0; }
.gallery-tile:hover, .gallery-tile:focus-visible { transform: none; box-shadow: none; }
.gallery-tile:hover img { transform: scale(1.035); }
.gallery-tile::before { content: ""; position: absolute; z-index: 2; right: 12px; bottom: 12px; width: 32px; height: 32px; border-radius: 50%; background: #fffdf8e6 url("assets/icons/expand-photo.svg") center / 18px no-repeat; opacity: 0; transition: opacity 180ms ease; }
.gallery-tile:hover::before, .gallery-tile:focus-visible::before { inset: auto 12px 12px auto; background: #fffdf8e6 url("assets/icons/expand-photo.svg") center / 18px no-repeat; opacity: 1; }

/* The foundation: an open layout rather than a boxed panel. */
.foundation-grid { gap: 48px; }
.foundation-title { grid-template-columns: 160px minmax(0, 1fr); gap: 42px; max-width: 900px; }
.foundation-logo { width: 160px; }
.display-title { margin: 0; font-size: clamp(2.3rem, 4vw, 3.7rem); font-weight: 450; line-height: 1.14; }
.foundation-copy { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; gap: clamp(36px, 6vw, 84px); padding: 0; background: transparent; box-shadow: none; }
.profile-photo { width: 100%; aspect-ratio: auto; padding: 8px; background: #fffdf8; border: 1px solid var(--color-line); border-radius: 4px; }
.profile-photo::before { content: none; }
.profile-photo img { position: static; width: 100%; height: auto; border-radius: 0; box-shadow: none; }
.photo-credit { margin: 8px 2px 2px; color: var(--color-text); font-size: .8rem; line-height: 1.5; }
.profile-photo:hover img, .profile-photo:hover::before { transform: none; filter: none; }
.foundation-text { margin: 0; color: var(--color-text); }
.foundation-text p:first-child { font: 400 1.3rem/1.65 var(--font-display); color: var(--color-primary); }
.beleid-disclosure { margin-top: 48px; padding: 0; border: 1px solid var(--color-line); border-radius: 6px; background: #f5efe3; }
.beleid-toggle { display: flex; justify-content: space-between; gap: 20px; min-height: 80px; padding: 20px 28px; font: 450 1.35rem/1.4 var(--font-display); }
.beleid-toggle::before { content: none; }
.disclosure-mark { position: relative; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid #b9a882; border-radius: 50%; color: var(--color-accent); transition: transform 220ms ease, background-color 220ms ease; }
.disclosure-mark::before, .disclosure-mark::after { content: ""; position: absolute; left: 9px; top: 15px; width: 14px; height: 2px; border-radius: 1px; background: currentColor; }
.disclosure-mark::after { transform: rotate(90deg); }
.beleid-disclosure[open] .disclosure-mark { transform: rotate(45deg); background: #ead9b6; }
.beleid-toggle:hover .disclosure-mark { background: #ead9b6; }
.beleid-content { max-width: none; margin: 0 28px 28px; padding-top: 28px; }
.beleid-content > p { max-width: 76ch; }
.beleid-content p { font-size: 16px; }
.pdf-viewer { border-radius: 8px; box-shadow: none; }
.pdf-viewer:fullscreen, .pdf-viewer.pdf-pseudo-fullscreen { border-radius: 0; }
.pdf-tab { color: var(--color-text); }
.pdf-tab.is-active { background: #f3ead7; border-bottom-color: var(--color-accent); }

/* Support: a bank-details panel and two open, personal invitations. */
.support-section { background: #f1e6ce; }
.support-section > .container > .copy-block { max-width: 780px; }
.support-section > .container > .copy-block > p { color: #545747; }
.support-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 36px; margin-top: 38px; }
.support-item { padding: 26px 0 0; gap: 20px; border-top: 1px solid #cbb789; }
.support-item:first-child { padding: 28px; border: 1px solid #d8c6a1; border-radius: 28px 4px 4px 4px; background: #fffaf0; }
.support-item:hover { transform: none; }
.support-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.support-item h3 { font: 450 1.65rem/1.25 var(--font-display); letter-spacing: -.02em; }
.support-icon { width: 48px; height: 48px; border-radius: 50%; background: #e9d6ac; color: var(--color-accent); }
.support-icon svg { width: 28px; height: 28px; stroke-width: 1.5; }
.support-details { gap: 12px; }
.support-details strong { color: var(--color-accent); font-size: .75rem; font-weight: 600; }
.support-details span, .support-copy { color: #545747; font-size: .94rem; line-height: 1.8; }
.support-details p:first-child span { color: var(--color-primary); font-weight: 500; font-variant-numeric: tabular-nums; }

/* A larger, more relaxed album keeps every existing photograph accessible. */
.life-section { padding-bottom: 0; }
.life-title { font-size: clamp(2.3rem, 4.5vw, 4rem); font-weight: 450; line-height: 1.15; margin-bottom: 38px; }
.gallery-life { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.gallery-life .gallery-tile { border-radius: 4px; }
.gallery-life > .gallery-tile:first-child { grid-column: span 2; grid-row: span 2; border-radius: 42px 4px 4px 4px; }
.gallery-life-rows { --row-height: clamp(155px, 20vw, 240px); grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 18px; }
.gallery-life-rows .gallery-tile { flex: var(--photo-ratio) 1 calc(var(--row-height) * var(--photo-ratio)); min-width: 0; width: auto; aspect-ratio: var(--photo-ratio); padding: 0; }
.gallery-life > .gallery-tile:not(:first-child) img { object-position: center top; }
@media (min-width: 801px) {
  .gallery-life { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gallery-life > .gallery-tile:first-child { grid-column: span 3; }
  .gallery-life > .gallery-tile:nth-child(2) { grid-column: span 3; }
  .gallery-life > .gallery-tile:not(:first-child) { aspect-ratio: auto; }
}

.contact-section { margin-top: 90px; background: #343b32; }
.contact-inner { padding-block: 72px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.contact-info::after { content: ""; width: 130px; height: 42px; margin-top: 28px; background: url("assets/icons/three-strands.svg") center / contain no-repeat; }
.contact-info p { color: #e3e2d5; max-width: 360px; }
.contact-links { gap: 4px; }
.contact-links a { min-height: 44px; color: #eed49a; font-size: 1rem; }
.contact-links svg { stroke-width: 1.5; }
.contact-map { border: 0; border-radius: 4px; }
.contact-map iframe { height: 300px; }
.map-open { font-size: .8rem; min-height: 44px; box-shadow: none; border: 1px solid #69735e; }
.contact-section :is(a, button):focus-visible, .lightbox :is(a, button):focus-visible { outline-color: #eed49a; }
.lightbox { z-index: 100; background: #20271ef2; }
.lightbox-tool, .lightbox-close { min-width: 44px; min-height: 44px; }
.lightbox-actions { gap: 12px; }
/* Keep content visible without animation, including tall sections on small screens. */
.reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }

@media (max-width: 1050px) {
  .container, .container.wide { width: calc(100% - 56px); }
  .brand-logo { width: 205px; flex-basis: 205px; }
  .site-nav { gap: 20px; }
  .site-nav a { font-size: 1rem; }
  .intro-section .split { gap: 38px; }
  .agape-section .copy-block { gap: 0 44px; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); }
  .support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; }
  .support-item:first-child { grid-row: span 2; }
}
@media (max-width: 800px) {
  html { scroll-padding-top: 104px; }
  .site-header { padding: 14px 0; }
  .header-inner { flex-wrap: wrap; gap: 0; }
  .brand-logo { width: 190px; flex-basis: 190px; }
  .site-nav { width: 100%; flex-wrap: wrap; gap: 16px 24px; padding-top: 22px; }
  .navigation-ready .menu-toggle { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px; width: 46px; height: 46px; padding: 12px; border: 1px solid #cbb789; border-radius: 50%; background: #f5efe3; color: var(--color-accent); cursor: pointer; transition: background-color 180ms ease; }
  .menu-toggle span { display: block; flex-shrink: 0; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transform-origin: center; transition: transform 220ms ease, width 220ms ease; }
  .menu-toggle span:last-child { width: 14px; }
  .menu-toggle:hover, .menu-toggle[aria-expanded="true"] { background: #ead9b6; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { width: 20px; transform: translateY(-4px) rotate(-45deg); }
  .navigation-ready .site-nav { display: none; }
  .navigation-ready .site-nav.is-open { display: flex; }
  .site-nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .section { padding: 64px 0; }
  .intro-section { padding: 48px 0 72px; }
  .intro-section .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .intro-section .copy-block { max-width: 620px; }
  .intro-section .media-block { max-width: 620px; width: 100%; justify-self: center; transform: none; }
  .welcome-photo { aspect-ratio: 4 / 3; }
  .intro-section .media-block::after { right: 12px; bottom: -26px; }
  .agape-section .copy-block { display: block; }
  .agape-section h2 { max-width: none; }
  .gallery-agape { gap: 12px; margin-top: 32px; }
  .foundation-title { grid-template-columns: 110px minmax(0, 1fr); gap: 26px; }
  .foundation-logo { width: 110px; }
  .foundation-copy { gap: 36px; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; }
  .foundation-text p:first-child { font-size: 1.15rem; }
  .gallery-life { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .life-section { padding-bottom: 0; }
  .contact-section { margin-top: 64px; }
  .contact-inner { gap: 36px; padding-block: 56px; }
}
@media (max-width: 600px) {
  .container, .container.wide { width: calc(100% - 40px); }
  body { font-size: 16px; }
  .section { padding: 52px 0; }
  .intro-section { padding: 38px 0 60px; }
  .woven-mark { width: 82px; height: 26px; margin-bottom: 20px; }
  h1 { font-size: 3.5rem; margin-bottom: 22px; }
  h2, .display-title { font-size: 2.25rem; }
  .intro-section p { font-size: 1rem; }
  .intro-actions { gap: 18px; margin-top: 26px; }
  .primary-action { min-height: 52px; padding-right: 18px; font-size: 1rem; }
  .text-action { font-size: .85rem; gap: 8px; }
  .section-icon { width: 32px; height: 32px; margin-bottom: 18px; }
  .gallery-agape { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-agape .gallery-tile:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  .gallery-agape .gallery-tile { aspect-ratio: 1 / 1; }
  .foundation-title { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .foundation-logo { width: 140px; }
  .foundation-grid { gap: 32px; }
  .foundation-copy { display: flex; flex-direction: column; gap: 36px; padding: 0; }
  .profile-photo { max-width: 420px; aspect-ratio: auto; align-self: center; }
  .profile-photo img { object-position: 50% 42%; }
  .profile-photo::before { inset: 12px -8px -12px 12px; }
  .foundation-text p:first-child { font-size: 1.25rem; }
  .beleid-disclosure { margin-top: 36px; padding: 0; }
  .beleid-toggle { padding: 18px; }
  .beleid-content { margin: 0 18px 18px; padding-top: 20px; }
  .beleid-toggle { font-size: 1.25rem; }
  .support-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .support-item:first-child { grid-row: auto; padding: 24px; }
  .support-item h3 { font-size: 1.6rem; }
  .support-heading { flex-direction: row; align-items: center; }
  .support-icon { flex: 0 0 48px; }
  .gallery-life { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gallery-life > .gallery-tile:first-child { aspect-ratio: 4 / 3; grid-row: auto; }
  .gallery-life-rows { --row-height: 155px; gap: 12px; }
  .life-title { font-size: 2.5rem; margin-bottom: 28px; }
  .life-section { padding-bottom: 0; }
  .contact-inner { grid-template-columns: minmax(0, 1fr); padding-block: 48px; gap: 32px; }
  .contact-info::after { margin-top: 20px; }
  .contact-map iframe { height: 270px; }
  .lightbox-actions { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header { position: static; }
  .site-nav, .menu-toggle, .intro-actions, .skip-link { display: none !important; }
  .section { padding-block: 30px; }
  .container, .container.wide { width: 100%; }
  .contact-section { background: white; color: #343b32; }
  .contact-section h2, .contact-info p, .contact-links a { color: #343b32; }
}

/* Small, accessible actions alongside each bank-detail value. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.support-details p { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
.support-details strong { grid-column: 1 / -1; }
.support-details p > span { grid-column: 1; }
.copy-detail { display: none; }
.copy-ready .copy-detail { display: inline-grid; place-items: center; grid-column: 2; grid-row: 2; width: 36px; height: 36px; padding: 8px; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--color-accent); cursor: pointer; }
.copy-detail .ui-icon { width: 18px; height: 18px; }
.copy-detail:hover, .copy-detail:focus-visible { background: #eee2c8; border-color: #d8c6a1; }
.copy-detail .copied-symbol, .copy-detail.is-copied .copy-symbol { display: none; }
.copy-detail.is-copied .copied-symbol { display: block; }
.copy-detail.is-copied { background: #e5ecd9; color: #3d5735; }
@media (pointer: coarse) { .copy-ready .copy-detail { width: 44px; height: 44px; } }
