/* =======================================================================
   JARMARK FRANCISZKAŃSKI — style.css
   One family (Fraunces, variable) carries both display and text duty,
   distinguished by optical size + weight rather than a second typeface.
   ======================================================================= */

:root {
  --ink:        #1c2a10;   /* near-black forest, primary text on light */
  --forest:     #21400f;   /* deep green, primary dark surface */
  --forest-2:   #2c5015;   /* secondary green, gradients */
  --moss:       #6b8a49;   /* muted sage accent */
  --parchment:  #f6efd8;   /* paper background */
  --parchment-2:#ecdfb4;   /* aged paper, deeper */
  --gold:       #a97917;   /* antique gold */
  --gold-light: #d1a53f;   /* pale gold, on dark */
  --brick:      #a8442b;   /* terracotta accent — the one bold color */
  --brick-dark: #833423;
  --umber:      #4a2e1c;   /* wood/leather */
  --cream:      #fbf6e8;
  --line:       rgba(28,42,16,0.14);
  --line-light: rgba(246,239,216,0.24);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; font-size:18px; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

body{
  font-family:'Fraunces', Georgia, serif;
  font-optical-sizing:auto;
  font-variation-settings:'opsz' 12, 'SOFT' 0;
  font-weight:380;
  color:var(--ink);
  background:var(--parchment);
  line-height:1.7;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; -webkit-tap-highlight-color:transparent; }
button{ -webkit-tap-highlight-color:transparent; }
ul{ list-style:none; }
input, textarea, select, button{ font-size:16px; font-family:inherit; -webkit-appearance:none; appearance:none; border-radius:0; }
:focus-visible{ outline:2px solid var(--brick); outline-offset:3px; }

.skip-link{ position:absolute; left:-999px; top:0; background:var(--ink); color:var(--cream); padding:12px 20px; z-index:2000; }
.skip-link:focus{ left:12px; top:12px; }

.container{ max-width:1120px; margin:0 auto; padding:0 24px; padding-left:max(24px,var(--safe-left)); padding-right:max(24px,var(--safe-right)); }
.container-narrow{ max-width:760px; }

.ic{ display:inline-block; vertical-align:-3px; }

/* ---------- Type roles ---------- */
.eyebrow{ font-size:0.92rem; font-style:italic; color:var(--moss); margin-bottom:10px; font-variation-settings:'opsz' 14; }
.eyebrow-dark{ color:var(--brick); }
.eyebrow-light{ color:var(--gold-light); }

.section-title{
  font-size:clamp(1.9rem,4vw,2.7rem);
  font-weight:560;
  font-variation-settings:'opsz' 60;
  letter-spacing:-0.01em;
  line-height:1.15;
  margin-bottom:28px;
  color:var(--ink);
}
.section-title.light{ color:var(--cream); }

/* ---------- Buttons & links ---------- */
.btn{
  display:inline-block; padding:15px 34px; border-radius:2px;
  font-family:'Fraunces',Georgia,serif; font-weight:560; font-size:1rem;
  letter-spacing:0.01em; cursor:pointer; border:1px solid transparent;
  transition:transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  min-height:44px; touch-action:manipulation;
}
.btn-brick{ background:var(--brick); color:var(--cream); box-shadow:0 6px 18px rgba(168,68,43,0.35); }
.btn-brick:hover{ background:var(--brick-dark); transform:translateY(-2px); box-shadow:0 8px 22px rgba(168,68,43,0.42); }
.btn-outline-dark{ background:transparent; color:var(--ink); border:1px solid var(--ink); }
.btn-outline-dark:hover{ background:var(--ink); color:var(--cream); }
.btn-small{ padding:10px 20px; font-size:0.9rem; margin-top:6px; }

.hero-link-btn{
  background:none; border:none; padding:10px 2px; cursor:pointer;
  font-family:'Fraunces',Georgia,serif; font-style:italic; font-size:0.98rem;
  color:var(--cream); border-bottom:1px solid var(--line-light); min-height:44px;
  display:inline-flex; align-items:center; gap:8px; touch-action:manipulation;
}
.hero-link-btn:hover{ border-bottom-color:var(--gold-light); color:var(--gold-light); }
.hero-link-light{ color:var(--ink); border-bottom:1px solid var(--line); }
.hero-link-light:hover{ color:var(--brick); border-bottom-color:var(--brick); }

/* ---------- Nav ---------- */
.main-nav{ position:fixed; inset:0 0 auto 0; z-index:1000; background:transparent; transition:background 0.4s, box-shadow 0.4s; padding-top:var(--safe-top); }
.main-nav.scrolled{ background:rgba(28,42,16,0.94); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); box-shadow:0 4px 20px rgba(0,0,0,0.2); }
.nav-container{ max-width:1120px; margin:0 auto; padding:16px 24px; display:flex; align-items:center; justify-content:space-between; }
.nav-logo{ display:flex; align-items:center; gap:10px; color:var(--cream); min-height:44px; }
.nav-tau{ font-size:1.9rem; color:var(--gold-light); line-height:1; }
.nav-logo-text{ font-size:1.02rem; font-style:italic; color:var(--cream); display:none; }
@media (min-width:600px){ .nav-logo-text{ display:block; } }
.nav-links{ display:flex; gap:30px; }
.nav-links a{ color:var(--cream); font-size:0.95rem; position:relative; min-height:44px; display:flex; align-items:center; }
.nav-links a::after{ content:''; position:absolute; bottom:8px; left:0; width:0; height:1px; background:var(--gold-light); transition:width 0.3s; }
.nav-links a:hover::after{ width:100%; }
.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding:10px; min-width:44px; min-height:44px; justify-content:center; align-items:center; touch-action:manipulation; }
.nav-toggle span{ display:block; width:24px; height:1.5px; background:var(--cream); }

/* ---------- Hero ---------- */
.hero{
  position:relative; min-height:100vh; min-height:100dvh;
  background:var(--forest); color:var(--cream);
  display:flex; align-items:flex-end;
  padding:calc(110px + var(--safe-top)) 0 0;
  overflow:hidden;
}
.hero-media{
  position:absolute; inset:0; z-index:0;
  background-image:
    linear-gradient(to top, rgba(15,22,8,0.94) 0%, rgba(20,30,10,0.62) 42%, rgba(20,30,10,0.22) 68%, rgba(20,30,10,0.15) 100%),
    url('../hero-bg.png');
  background-size:cover; background-position:center 32%; background-repeat:no-repeat;
  transform:translateZ(0);
}
.hero-grain{
  position:absolute; inset:0; z-index:1; opacity:0.35; pointer-events:none; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
.hero-frame{ position:relative; z-index:2; width:100%; max-width:1120px; margin:0 auto; padding:0 24px calc(64px + var(--safe-bottom)); padding-left:max(24px,var(--safe-left)); padding-right:max(24px,var(--safe-right)); }

.hero-seal{ position:relative; width:112px; height:112px; flex-shrink:0; color:var(--gold-light); }
.seal-ring{ width:112px; height:112px; animation:spin 32s linear infinite; }
@media (prefers-reduced-motion: reduce){ .seal-ring{ animation:none; } }
@keyframes spin{ to{ transform:rotate(360deg); } }
.seal-center{
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-size:1.4rem; font-weight:560; line-height:1.05; text-align:center; color:var(--cream);
}
.seal-center em{ font-style:italic; font-size:0.8rem; letter-spacing:0.14em; color:var(--gold-light); font-weight:400; }

.hero-title{ font-weight:620; font-variation-settings:'opsz' 144, 'SOFT' 40; line-height:0.98; letter-spacing:-0.01em; margin:6px 0 22px; }
.hero-title .line-1{ display:block; font-size:clamp(2.9rem,9.8vw,5.1rem); font-style:italic; color:var(--cream); }
.hero-title .line-2{ display:block; font-size:clamp(3.3rem,12vw,7rem); color:var(--cream); margin-top:-0.06em; }

.hero-place{ font-size:1.14rem; color:rgba(246,239,216,0.82); margin-bottom:8px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.hero-place .ic{ color:var(--gold-light); }
.hero-date{ font-size:1.35rem; font-weight:620; color:var(--gold-light); margin-bottom:34px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; letter-spacing:0.01em; font-variation-settings:'opsz' 40; }
.hero-date .ic{ color:var(--gold-light); }

.hero-countdown-row{ display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:36px; flex-wrap:wrap; }
.hero-countdown{ display:flex; align-items:baseline; gap:16px; flex-wrap:wrap; }
.cd-unit{ display:flex; flex-direction:column; align-items:flex-start; }
.cd-unit span{ font-size:clamp(1.8rem,4.5vw,2.6rem); font-weight:560; color:var(--gold-light); line-height:1; font-variation-settings:'opsz' 40; }
.cd-unit label{ font-size:0.78rem; font-style:italic; color:rgba(246,239,216,0.62); margin-top:4px; }
.cd-rule{ width:1px; height:34px; background:var(--line-light); align-self:center; }
@media (max-width:560px){
  .hero-seal, .seal-ring{ width:82px; height:82px; }
  .seal-center{ font-size:1.05rem; }
  .seal-center em{ font-size:0.62rem; }
}

.hero-actions{ display:flex; align-items:center; gap:30px; flex-wrap:wrap; }
.cal-wrap{ position:relative; }
.cal-dropdown{ position:absolute; top:calc(100% + 10px); left:0; background:var(--cream); border-radius:8px; box-shadow:0 12px 34px rgba(0,0,0,0.3); padding:6px; z-index:200; min-width:250px; }
.cal-dropdown a{ display:flex; align-items:center; gap:10px; padding:12px 16px; color:var(--ink); font-size:0.95rem; font-style:normal; border-radius:5px; min-height:44px; }
.cal-dropdown a:hover{ background:var(--parchment-2); }

.scroll-cue{ position:absolute; right:26px; bottom:22px; z-index:2; display:flex; flex-direction:column; align-items:center; gap:8px; color:rgba(246,239,216,0.55); font-size:0.72rem; font-style:italic; letter-spacing:0.04em; }
.scroll-cue span{ width:1px; height:34px; background:linear-gradient(to bottom, rgba(246,239,216,0.7), transparent); animation:cueMove 2.2s ease-in-out infinite; }
@keyframes cueMove{ 0%,100%{ opacity:0.3; } 50%{ opacity:1; } }
@media (max-width:600px){ .scroll-cue{ display:none; } }

/* hero load sequence — the one orchestrated motion moment */
.hero-title .line-1, .hero-title .line-2, .hero-place, .hero-date, .hero-countdown, .hero-seal, .hero-actions{
  opacity:0; animation:riseIn 0.9s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero-title .line-1{ animation-delay:0.1s; }
.hero-title .line-2{ animation-delay:0.3s; }
.hero-place{ animation-delay:0.46s; }
.hero-date{ animation-delay:0.52s; }
.hero-countdown{ animation-delay:0.58s; }
.hero-seal{ animation-delay:0.62s; }
.hero-actions{ animation-delay:0.74s; }
@keyframes riseIn{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:translateY(0); } }
@media (prefers-reduced-motion: reduce){
  .hero-seal, .hero-title .line-1, .hero-title .line-2, .hero-place, .hero-date, .hero-countdown, .hero-actions{ opacity:1; animation:none; transform:none; }
}

/* ---------- Torn paper divider ---------- */
.torn-edge{ height:26px; background:var(--forest); clip-path:polygon(0% 0%,4% 60%,8% 10%,12% 70%,16% 5%,20% 55%,24% 15%,28% 65%,32% 10%,36% 60%,40% 5%,44% 70%,48% 15%,52% 60%,56% 10%,60% 65%,64% 5%,68% 55%,72% 15%,76% 65%,80% 10%,84% 60%,88% 5%,92% 70%,96% 15%,100% 60%,100% 100%,0 100%); }

/* ---------- Invitation ---------- */
/* ---------- Poster showcase ---------- */
.section-poster{ background:var(--parchment); padding:56px 24px 8px; text-align:center; }
.poster-wrap{ display:flex; flex-direction:column; align-items:center; gap:18px; }
.poster-frame{ display:block; width:100%; max-width:280px; transform:rotate(-1.5deg); transition:transform 0.3s ease; }
.poster-frame:hover{ transform:rotate(0deg) scale(1.02); }
.poster-frame img{ width:100%; height:auto; border:6px solid var(--cream); box-shadow:0 18px 40px rgba(28,42,16,0.32); }
.poster-download{ margin-top:0; }

.section-invitation{ background:var(--parchment); padding:96px 24px 40px; position:relative; }
.invite-greeting{ font-size:1.4rem; font-weight:560; color:var(--brick); font-variation-settings:'opsz' 40; margin-bottom:6px; }
.lead-para{ font-size:1.2rem; line-height:1.85; color:var(--ink); margin-bottom:34px; }
.dropcap{ float:left; font-size:4.4rem; line-height:0.78; font-style:italic; font-weight:620; color:var(--brick); padding-right:10px; padding-top:6px; font-variation-settings:'opsz' 100; }
.pull-quote{ font-size:clamp(1.4rem,3vw,1.9rem); font-style:italic; color:var(--forest); line-height:1.5; margin:8px 0 18px; border-left:2px solid var(--gold); padding-left:22px; }
.sign-off{ font-size:0.98rem; font-style:italic; color:var(--umber); }

/* ---------- Jubilee ---------- */
.section-jubilee{ background:linear-gradient(160deg,var(--forest) 0%,var(--forest-2) 100%); color:var(--cream); padding:90px 24px; position:relative; overflow:hidden; }
.jubilee-grain{ position:absolute; inset:0; opacity:0.5; mix-blend-mode:overlay; pointer-events:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E"); }
.jubilee-inner{ position:relative; z-index:1; border:1px solid rgba(209,165,63,0.4); padding:48px 40px; }
.jubilee-tau{ display:block; font-size:3.6rem; color:var(--gold-light); margin-bottom:8px; line-height:1; }
.jubilee-title{ font-size:clamp(1.7rem,3.6vw,2.4rem); font-weight:560; font-variation-settings:'opsz' 60; line-height:1.3; margin-bottom:22px; }
.jubilee-text{ font-size:1.06rem; line-height:1.85; color:rgba(246,239,216,0.86); margin-bottom:14px; }
.jubilee-text strong{ color:var(--gold-light); font-weight:560; }
@media (max-width:600px){ .jubilee-inner{ padding:34px 22px; } }

.jubilee-with-image{ display:grid; grid-template-columns:1fr 200px; gap:40px; align-items:start; }
.jubilee-figure{ text-align:center; }
.jubilee-figure img{ width:100%; aspect-ratio:3/4; object-fit:cover; border:1px solid rgba(209,165,63,0.5); box-shadow:0 14px 34px rgba(0,0,0,0.4); }
.jubilee-figure figcaption{ margin-top:10px; font-size:0.85rem; font-style:italic; color:rgba(246,239,216,0.6); }
@media (max-width:760px){
  .jubilee-with-image{ grid-template-columns:1fr; }
  .jubilee-figure{ max-width:200px; margin:0 auto; order:-1; }
}

/* ---------- Program / chronicle ---------- */
.section-program{ background:var(--parchment); padding:96px 24px; }
.program-masses{ font-size:1.15rem; color:var(--umber); margin-bottom:52px; font-style:italic; }
.program-masses strong{ color:var(--brick); font-style:normal; }
.program-note{ font-size:1.05rem; color:var(--umber); line-height:1.8; margin-top:44px; padding-left:18px; border-left:2px solid var(--gold); }

.chronicle{ position:relative; padding-left:30px; }
.chronicle-spine{ position:absolute; left:6px; top:6px; bottom:6px; width:1px; background:var(--line); }
.chronicle-fill{ position:absolute; left:0; top:0; width:100%; height:0%; background:var(--brick); transition:height 0.1s linear; }
.chronicle-part{ font-style:italic; font-size:1.28rem; color:var(--moss); margin:44px 0 18px; }
.chronicle-part:first-child{ margin-top:0; }

.chron-item{ position:relative; padding-bottom:26px; display:grid; grid-template-columns:74px 1fr; gap:4px 16px; }
.chron-item:last-child{ padding-bottom:0; }
.chron-time{ font-size:1.2rem; font-weight:560; color:var(--brick); font-style:normal; white-space:nowrap; padding-top:1px; }
.chron-dot{ position:absolute; left:-30px; top:9px; width:9px; height:9px; border-radius:50%; background:var(--parchment); border:1.5px solid var(--brick); }
.chron-body{ grid-column:2; }
.chron-body h4{ font-size:1.22rem; font-weight:560; color:var(--ink); margin-bottom:4px; }
.chron-body p{ font-size:1.08rem; color:var(--umber); line-height:1.65; }
.chron-tag{ font-size:0.72rem; font-style:italic; color:var(--moss); font-weight:400; }
.chron-psalm{ font-style:italic; font-size:0.9rem; color:var(--moss); margin-top:4px; }
.chron-food .chron-dot{ background:var(--brick); }
.chron-food h4{ color:var(--brick); }

.program-actions{ margin-top:50px; display:flex; justify-content:center; }
.program-actions .hero-link-btn{ color:var(--ink); border-bottom-color:var(--line); }
.program-actions .hero-link-btn:hover{ color:var(--brick); border-bottom-color:var(--brick); }

/* ---------- Performers / playbill ---------- */
.section-performers{ background:var(--cream); padding:96px 24px; }
.playbill-row{ display:grid; grid-template-columns:1fr 1.6fr; gap:8px 30px; padding:26px 0; border-top:1px solid var(--line); align-items:baseline; }
.playbill-row:last-child{ border-bottom:1px solid var(--line); }
.playbill-name{ font-size:1.5rem; font-style:italic; font-weight:560; color:var(--forest); font-variation-settings:'opsz' 40; }
.playbill-role{ display:block; font-size:0.86rem; color:var(--brick); font-style:italic; margin-bottom:4px; }
.playbill-desc p{ font-size:0.98rem; color:var(--umber); line-height:1.65; }
@media (max-width:640px){ .playbill-row{ grid-template-columns:1fr; gap:6px; } }

.playbill-name-wrap{ display:flex; align-items:center; gap:14px; align-self:start; }
.performer-photo{ display:inline-block; width:64px; height:64px; border-radius:10px; overflow:hidden; flex-shrink:0; box-shadow:0 6px 16px rgba(28,42,16,0.22); }
.performer-photo img{ width:100%; height:100%; object-fit:cover; }
.friend-logo{ display:inline-flex; align-items:center; justify-content:center; width:52px; height:52px; border-radius:50%; background:var(--cream); border:1px solid var(--line); flex-shrink:0; overflow:hidden; }
.friend-logo img{ width:100%; height:100%; object-fit:cover; }

/* ---------- Food & kids stalls ---------- */
.section-food{ background:linear-gradient(160deg,var(--umber) 0%,#331d10 100%); padding:96px 24px; position:relative; overflow:hidden; }
.food-grain{ position:absolute; inset:0; opacity:0.4; mix-blend-mode:overlay; pointer-events:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E"); }
.food-kids-grid{ display:grid; grid-template-columns:1fr 1fr; gap:64px; max-width:960px; margin:0 auto; position:relative; z-index:1; }
.food-highlight{ font-size:1.4rem; font-style:italic; color:var(--gold-light); margin-bottom:30px; }
.stall{ display:flex; flex-wrap:wrap; gap:26px 22px; border-top:1px solid rgba(246,239,216,0.18); padding-top:28px; }
.stall figure{ width:calc(50% - 11px); text-align:center; }
.stall img{ width:100%; aspect-ratio:1; object-fit:cover; border-radius:6px; margin-bottom:10px; box-shadow:0 10px 26px rgba(0,0,0,0.35); }
.stall figcaption{ font-size:0.92rem; font-style:italic; color:rgba(246,239,216,0.86); }
@media (max-width:820px){ .food-kids-grid{ grid-template-columns:1fr; gap:56px; } }
@media (max-width:420px){ .stall figure{ width:calc(50% - 8px); } .stall{ gap:18px; } }

/* ---------- Gallery ---------- */
.section-gallery{ background:var(--parchment); padding:96px 24px; }
.gallery-container{ max-width:980px; }
.gallery-intro{ font-size:1.08rem; color:var(--umber); font-style:italic; margin:-14px 0 36px; max-width:560px; }

/* Mosaic: 3 columns on desktop, 2 on phones. Single tiles are 3:4 portraits
   and set the row height; the feature tile spans 2x2, the wide tile 2x1.
   Uses only grid + aspect-ratio (no container queries) for broad support. */
.mosaic{
  list-style:none; margin:0 0 64px; padding:0;
  display:grid; gap:14px;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-auto-flow:row dense;
}
.mosaic-tile{ position:relative; overflow:hidden; border-radius:3px; background:var(--parchment-2); box-shadow:0 8px 22px rgba(28,42,16,0.16); aspect-ratio:3/4; min-width:0; }
.mosaic-feature{ grid-column:span 2; grid-row:span 2; aspect-ratio:auto; }
.mosaic-wide{ grid-column:span 2; aspect-ratio:auto; }
.mosaic-tile a{ display:block; position:absolute; inset:0; cursor:zoom-in; }
.mosaic-tile img{ width:100%; height:100%; max-width:none; object-fit:cover; transition:transform 0.5s cubic-bezier(.2,.7,.2,1); }
.mosaic-tile a::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  box-shadow:inset 0 0 0 0 var(--gold-light); transition:box-shadow 0.3s;
}
.mosaic-tile a:hover img, .mosaic-tile a:focus-visible img{ transform:scale(1.035); }
.mosaic-tile a:hover::after, .mosaic-tile a:focus-visible::after{ box-shadow:inset 0 0 0 3px var(--gold-light); }
.mosaic-tile a:focus-visible{ outline:none; }
@media (max-width:600px){
  .mosaic{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  /* on phones the feature tile sits alone in its rows, so it sets its own height */
  .mosaic-feature{ aspect-ratio:3/4; }
  .mosaic-wide{ aspect-ratio:3/2; }
  /* 2 columns leave the last single tile alone in its row — widen it */
  .mosaic-tile:last-child{ grid-column:span 2; aspect-ratio:3/2; }
  .mosaic-tile:last-child img{ object-position:center 35%; }
}
@media (prefers-reduced-motion: reduce){ .mosaic-tile img{ transition:none; } }

.gallery-subtitle{ font-size:1.28rem; font-style:italic; font-weight:500; color:var(--moss); margin-bottom:18px; }
.gallery-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.gallery-grid figure{ margin:0; border:1px solid var(--line); border-radius:4px; overflow:hidden; box-shadow:0 10px 26px rgba(28,42,16,0.16); }
.gallery-grid img{ width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
@media (max-width:560px){ .gallery-grid{ grid-template-columns:1fr; } }

/* ---------- Lightbox ---------- */
.lightbox{
  position:fixed; inset:0; z-index:3000; background:rgba(15,22,8,0.95);
  display:flex; align-items:center; justify-content:center;
  padding:calc(56px + var(--safe-top)) 64px calc(24px + var(--safe-bottom));
  animation:lbIn 0.25s ease;
}
.lightbox[hidden]{ display:none; }
@keyframes lbIn{ from{ opacity:0; } to{ opacity:1; } }
.lb-figure{ margin:0; display:flex; flex-direction:column; align-items:center; max-width:100%; max-height:100%; }
.lb-img{ max-width:100%; max-height:calc(100dvh - 150px - var(--safe-top) - var(--safe-bottom)); width:auto; height:auto; object-fit:contain; box-shadow:0 20px 60px rgba(0,0,0,0.5); border:5px solid var(--cream); background:var(--cream); }
.lb-caption{ margin-top:14px; display:flex; gap:18px; align-items:baseline; justify-content:center; flex-wrap:wrap; color:var(--cream); font-style:italic; font-size:1rem; text-align:center; }
.lb-count{ color:var(--gold-light); font-size:0.85rem; font-style:normal; font-variant-numeric:tabular-nums; }
.lb-btn{
  position:absolute; background:none; border:none; cursor:pointer; color:var(--cream);
  width:52px; height:52px; display:flex; align-items:center; justify-content:center;
  font-family:'Fraunces',Georgia,serif; line-height:1; border-radius:50%;
  transition:background-color 0.2s, color 0.2s; touch-action:manipulation;
}
.lb-btn:hover{ background:rgba(246,239,216,0.1); color:var(--gold-light); }
.lb-close{ top:calc(8px + var(--safe-top)); right:max(10px,var(--safe-right)); font-size:2.4rem; }
.lb-prev, .lb-next{ top:50%; transform:translateY(-50%); font-size:3rem; padding-bottom:6px; }
.lb-prev{ left:max(6px,var(--safe-left)); }
.lb-next{ right:max(6px,var(--safe-right)); }
@media (max-width:600px){
  .lightbox{ padding-left:8px; padding-right:8px; }
  .lb-prev, .lb-next{ top:auto; bottom:calc(10px + var(--safe-bottom)); transform:none; }
  .lb-prev{ left:12px; } .lb-next{ right:12px; }
  .lb-img{ max-height:calc(100dvh - 190px - var(--safe-top) - var(--safe-bottom)); border-width:3px; }
  .lb-caption{ padding:0 56px; font-size:0.92rem; }
}
body.lb-open{ overflow:hidden; }

/* ---------- Post-event thank-you (replaces the countdown) ---------- */
.hero-thanks{ max-width:520px; }
.hero-thanks p{ font-size:clamp(1.2rem,2.6vw,1.45rem); font-style:italic; line-height:1.5; color:var(--gold-light); font-variation-settings:'opsz' 40; }
.hero-thanks p + p{ margin-top:6px; font-size:1rem; color:rgba(246,239,216,0.8); }
.hero-thanks a{ border-bottom:1px solid var(--line-light); color:var(--cream); }
.hero-thanks a:hover{ border-bottom-color:var(--gold-light); color:var(--gold-light); }

/* ---------- Map ---------- */
.section-map{ background:var(--parchment-2); padding:96px 24px; }
.map-grid{ display:grid; grid-template-columns:1fr 1.25fr; gap:44px; align-items:start; }
.map-info{ display:flex; flex-direction:column; gap:26px; }
.info-block h3{ font-size:1.08rem; font-weight:560; color:var(--forest); margin-bottom:9px; display:flex; align-items:center; gap:8px; }
.info-block p{ font-size:1rem; color:var(--umber); line-height:1.75; }
.map-embed{ overflow:hidden; border:1px solid var(--line); }
.map-embed iframe{ width:100%; height:390px; display:block; }
@media (max-width:860px){ .map-grid{ grid-template-columns:1fr; } }

/* ---------- Support ---------- */
.section-support{ background:linear-gradient(160deg,var(--forest) 0%,var(--forest-2) 100%); padding:96px 24px; color:var(--cream); }
.support-intro{ color:rgba(246,239,216,0.82); font-size:1.06rem; margin-bottom:40px; max-width:560px; }
.support-grid{ display:grid; grid-template-columns:1fr 1fr; gap:34px; max-width:840px; }
.bank-block, .qr-block{ border:1px solid rgba(209,165,63,0.35); padding:32px 28px; }
.bank-block h3, .qr-block h3{ font-size:1.2rem; font-style:italic; color:var(--gold-light); margin-bottom:18px; font-weight:500; }
.bank-name{ font-size:0.95rem; color:rgba(246,239,216,0.72); margin-bottom:16px; line-height:1.65; }
.bank-label{ font-size:0.85rem; color:rgba(246,239,216,0.58); margin-bottom:8px; font-style:italic; }
.account-num{
  font-family:'Courier New',monospace; font-weight:700; color:var(--gold-light);
  background:rgba(0,0,0,0.22); padding:14px 16px; letter-spacing:0.01em;
  margin-bottom:14px; -webkit-user-select:all; user-select:all;
  white-space:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch;
  font-size:clamp(0.78rem,3.4vw,1.06rem);
}
.qr-img{ margin:0 auto 14px; border:1px solid var(--gold); background:var(--cream); }
.qr-desc{ font-size:0.92rem; color:rgba(246,239,216,0.68); }
.qr-block{ text-align:center; }
.bank-phone{ display:flex; align-items:center; gap:8px; margin-top:16px; font-size:0.95rem; color:rgba(246,239,216,0.82); }
.bank-phone .ic{ color:var(--gold-light); }
.bank-phone a{ color:rgba(246,239,216,0.82); }
.bank-phone a:hover{ color:var(--gold-light); }
@media (max-width:640px){ .support-grid{ grid-template-columns:1fr; } }

/* ---------- Friends / partners ---------- */
.section-friends{ background:var(--parchment-2); padding:96px 24px; }
.friends-intro{ font-size:1.06rem; }
.friends-grid{ display:grid; grid-template-columns:1fr 1fr; gap:22px; margin-top:18px; }
.friend-card{ display:flex; align-items:center; gap:16px; padding:20px 22px; background:var(--cream); border:1px solid var(--line); border-radius:6px; }
.friend-name{ font-size:1.1rem; font-style:italic; font-weight:560; color:var(--forest); font-variation-settings:'opsz' 40; line-height:1.35; }
.friends-outro{ font-size:0.98rem; font-style:italic; color:var(--umber); margin-top:30px; }
@media (max-width:560px){ .friends-grid{ grid-template-columns:1fr; } }

/* ---------- Contact ---------- */
.section-contact{ background:var(--cream); padding:96px 24px; }
.contact-item{ display:flex; align-items:center; gap:14px; margin-bottom:18px; font-size:1rem; min-height:44px; }
.contact-item .ic{ color:var(--brick); flex-shrink:0; }
.contact-item a{ color:var(--forest); font-weight:500; }
.contact-item a:hover{ color:var(--brick); }
.share-block{ margin-top:32px; }
.share-block h3{ font-size:1.05rem; font-style:italic; margin-bottom:12px; color:var(--forest); font-weight:500; }
.contact-info-solo{ max-width:420px; }

/* ---------- Footer ---------- */
.footer{ background:var(--ink); color:var(--cream); padding:64px 24px 28px; padding-bottom:max(28px,var(--safe-bottom)); }
.footer-grid{ display:grid; grid-template-columns:1.3fr 1fr 1.3fr; gap:44px; max-width:1120px; margin:0 auto; padding-bottom:44px; border-bottom:1px solid rgba(246,239,216,0.12); }
.footer-tau{ display:block; font-size:2.6rem; color:var(--gold-light); margin-bottom:8px; }
.footer-name{ font-size:1.08rem; margin-bottom:10px; line-height:1.5; font-style:italic; }
.footer-motto{ font-style:italic; font-size:0.92rem; color:rgba(246,239,216,0.55); line-height:1.7; }
.footer-nav h4, .footer-contact h4{ color:var(--gold-light); margin-bottom:16px; font-size:0.92rem; font-style:italic; font-weight:400; }
.footer-nav ul{ display:flex; flex-direction:column; gap:11px; }
.footer-nav a{ color:rgba(246,239,216,0.68); font-size:0.96rem; min-height:44px; display:flex; align-items:center; }
.footer-nav a:hover{ color:var(--gold-light); }
.footer-contact p{ font-size:0.92rem; color:rgba(246,239,216,0.68); margin-bottom:9px; line-height:1.6; }
.footer-contact a{ color:rgba(246,239,216,0.75); }
.footer-contact a:hover{ color:var(--gold-light); }
.footer-fb-link{ display:inline-flex; align-items:center; gap:8px; margin-top:6px; color:var(--gold-light) !important; font-style:italic; min-height:44px; }
.footer-bottom{ text-align:center; padding-top:26px; max-width:1120px; margin:0 auto; }
.footer-bottom p{ font-size:0.85rem; color:rgba(246,239,216,0.4); }
.footer-bottom a{ color:rgba(246,239,216,0.55); }
@media (max-width:820px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:480px){ .footer-grid{ grid-template-columns:1fr; } }

/* ---------- Back to top ---------- */
.back-top{
  position:fixed; bottom:max(26px,calc(var(--safe-bottom) + 10px)); right:max(24px,calc(var(--safe-right) + 8px));
  width:46px; height:46px; background:var(--ink); color:var(--cream); border:none; border-radius:50%;
  cursor:pointer; box-shadow:0 6px 18px rgba(0,0,0,0.3); opacity:0; transform:translateY(16px);
  transition:opacity 0.3s, transform 0.3s; z-index:998; display:flex; align-items:center; justify-content:center;
  touch-action:manipulation;
}
.back-top.visible{ opacity:1; transform:translateY(0); }
.back-top:hover{ background:var(--brick); }

/* ---------- Print ---------- */
@media print{
  .main-nav, .hero-actions, .back-top, .lightbox, .section-poster, .section-food, .section-gallery, .section-map, .section-support, .section-contact, .footer, .scroll-cue, .hero-countdown, .hero-seal, .program-actions, .section-jubilee, .section-performers, .torn-edge{ display:none !important; }
  .hero{ min-height:auto; padding:20px; background:none !important; color:#000; }
  .hero-media, .hero-grain{ display:none !important; }
  .hero-title .line-1, .hero-title .line-2{ color:#000; opacity:1; animation:none; }
  .hero-place, .hero-date{ color:#000; }
  .section-program{ background:#fff; padding:20px 0; }
  .chronicle-spine{ background:#ccc; }
  body{ font-size:14px; }
}

/* ---------- Responsive ---------- */
@media (max-width:768px){
  .nav-toggle{ display:flex; }
  .nav-links{ display:none; position:absolute; top:100%; left:0; right:0; background:rgba(28,42,16,0.98); flex-direction:column; align-items:stretch; padding:8px 0; box-shadow:0 8px 28px rgba(0,0,0,0.35); }
  .nav-links.open{ display:flex; }
  .nav-links a{ justify-content:center; padding:14px 24px; text-align:center; }
  .nav-links a::after{ display:none; }
}
@media (max-width:480px){
  html{ font-size:16px; }
  .hero-frame{ padding-bottom:calc(48px + var(--safe-bottom)); }
  .section-invitation, .section-program, .section-performers, .section-map, .section-support, .section-contact, .section-food, .section-gallery, .section-jubilee{ padding-left:16px; padding-right:16px; }
  .container{ padding-left:max(16px,var(--safe-left)); padding-right:max(16px,var(--safe-right)); }
  .dropcap{ font-size:3.4rem; }
}
