/* ============================================================
   Πάππα Φθιώτιδας — "Living Topography / Σχεδιάζοντας το Χωριό"
   Award-grade scroll experience. Static, bilingual, no build step.
   ============================================================ */

:root {
  /* Palette drawn from real photos of Πάππα — forest, stone, terracotta, golden hour */
  /* Forest & mountain greens (the lush hills) */
  --green-950: #14241c;
  --green-900: #213f2a;
  --green-700: #356043;
  --green-500: #5c8a55;
  --green-300: #93b98f;
  /* Limestone & stone (the stone school, dry-stone walls, flagstone square) */
  --cream:     #f5f0e4;
  --cream-dark:#e9e0cd;
  --stone:     #b8a684;
  --stone-deep:#8a7a5c;
  /* Brass & golden hour (the zinnias, the sunsets, autumn leaves) */
  --gold:      #c89233;
  --gold-soft: #e6c478;
  --lamp:      #f3c873;
  --brass-text:#7a5c1c;   /* darker brass for small text on cream (WCAG AA ≥4.5 even on the warm arc) */
  /* Terracotta (the clay roof tiles) */
  --terracotta:#b05433;
  --clay-soft: #cf8a5e;
  /* Sky & dusk (azure days, blue-purple sunset ridges) */
  --sky:       #4a86b4;
  --ridge:     #6f7c96;
  --dusk:      #1b2430;

  --ink: #213f2a;
  --ink-soft: #4a544a;
  --white: #ffffff;

  /* JS-driven color-arc variables (cool morning -> warm golden hour) */
  --page-bg: #f5f0e4;
  --haze-warm: 0;          /* 0..1 progress toward golden hour */
  --footer-bg: #1b2430;

  --shadow: 0 12px 34px rgba(20, 42, 29, 0.12);
  --shadow-lg: 0 26px 60px rgba(20, 42, 29, 0.20);
  --radius: 16px;
  --maxw: 1180px;

  /* Type system — every face ships full Greek (incl. tonos/diaeresis) */
  --font-display: 'Literata', 'Alegreya', Georgia, serif;
  --font-body: 'Manrope', 'Alegreya Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-instrument: 'GFS Didot', Georgia, serif;

  /* House easing (heritage / Locomotive discipline) */
  --ease: cubic-bezier(0, 0.55, 0.45, 1);
  --ease-inout: cubic-bezier(0.85, 0, 0.15, 1);

  --hair: rgba(33, 63, 42, 0.20);
  --vill-h: clamp(230px, 21.7vw, 500px);   /* village silhouette height = width x 260/1200 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 17px; }   /* a touch larger everywhere (rem-based type scales) */          /* used by the no-enhance tier; JS sets 'auto' when enhanced */

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--page-bg);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--gold-soft); color: var(--green-950); }
::-moz-selection { background: var(--gold-soft); color: var(--green-950); }
p { text-wrap: pretty; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.04;
  color: var(--green-900);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Keyboard focus visibility (WCAG 2.4.7) */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--gold); outline-offset: 3px; border-radius: 4px;
}
.btn:focus-visible { outline-color: var(--green-900); outline-offset: 4px; }
.lang-toggle:focus-visible, .menu-btn:focus-visible, .hud-node:focus-visible { outline-color: var(--gold); outline-offset: 2px; }

/* Skip link */
.skip-link {
  position: fixed; top: 12px; left: 12px; transform: translateY(-160%);
  background: var(--green-900); color: var(--cream); padding: 10px 18px; border-radius: 8px;
  font-weight: 700; z-index: 10000; box-shadow: var(--shadow); transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* Instrument readouts — authentic Greek Didone (GFS Didot), tabular numerals */
.hud-alt, .plate-no, .plate-coord, .hud-folio, .era-stamp, .cursor-readout {
  font-family: var(--font-instrument);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

/* ============ INTRO VEIL ============ */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--cream);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
html.is-booting .preloader { opacity: 1; visibility: visible; }
.preloader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: transform 0.9s var(--ease), opacity 0.6s var(--ease);
}
/* the readout drifts up and dissolves as the veil lifts — like cresting into the village */
html:not(.is-booting) .preloader-inner { transform: translateY(-14px); opacity: 0; }

.loader-label {
  font-family: var(--font-body);
  text-transform: uppercase; letter-spacing: 0.42em;
  font-size: 0.62rem; color: var(--brass-text);
  padding-left: 0.42em; margin-top: 6px;
}
.loader-readout { display: flex; align-items: baseline; gap: 0.1em; color: var(--green-900); }
.loader-num {
  font-family: var(--font-instrument);
  font-size: clamp(3.2rem, 9vw, 5.4rem); line-height: 0.95;
  font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.loader-unit { font-family: var(--font-instrument); font-size: clamp(1.1rem, 3vw, 1.7rem); color: var(--brass-text); }
.loader-bar { width: clamp(140px, 30vw, 200px); height: 2px; background: var(--hair); overflow: hidden; border-radius: 2px; }
.loader-bar-fill { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); }
.preloader-word { font-family: var(--font-display); letter-spacing: 0.08em; font-size: 0.98rem; color: var(--stone-deep); margin-top: 2px; }

/* ============ SCROLL PROGRESS ============ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  z-index: 200; transition: width 0.1s linear;
}

/* ============ FIXED CONTOUR MAP ============ */
.map-layer { position: fixed; inset: 0; z-index: 0; background: var(--page-bg); pointer-events: none; }
.contour-svg { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
.contours path {
  fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-grid line { stroke: var(--green-300); stroke-width: 0.5; opacity: 0.10; }
.compass { opacity: 0.16; }
.compass-ring { fill: none; stroke: var(--green-500); stroke-width: 1; }
.compass-ring-2 { stroke-dasharray: 3 5; }
.compass-needle-n { fill: var(--gold); }
.compass-needle-s { fill: var(--green-500); }
.compass-n { fill: var(--green-700); font-family: var(--font-display); font-size: 16px; font-style: italic; }
.map-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 30%, transparent 55%, rgba(20, 42, 29, 0.10) 100%);
}

/* ============ CUSTOM CURSOR PROBE ============ */
.cursor-probe {
  position: fixed; top: 0; left: 0; z-index: 400;
  pointer-events: none; transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.3s ease;
}
.cursor-ring {
  display: block; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--gold); position: relative;
}
.cursor-ring::before,
.cursor-ring::after {
  content: ''; position: absolute; background: var(--gold); opacity: 0.8;
}
.cursor-ring::before { width: 1px; height: 10px; left: 50%; top: -6px; transform: translateX(-50%); }
.cursor-ring::after  { width: 10px; height: 1px; top: 50%; left: -6px; transform: translateY(-50%); }
.cursor-readout {
  position: absolute; left: 26px; top: 14px; white-space: nowrap;
  font-size: 0.66rem; letter-spacing: 0.1em; color: var(--green-700);
  font-variant-numeric: tabular-nums; opacity: 0;
}
body.enhanced.cursor-on .cursor-probe { opacity: 1; }
body.cursor-on.cursor-over-map .cursor-readout { opacity: 0.85; }
body.cursor-on.cursor-hover .cursor-ring { transform: scale(1.7); transition: transform 0.3s var(--ease); }

/* ============ ALTIMETER / FOLIO HUD ============ */
.hud {
  position: fixed; top: 50%; right: 26px; transform: translateY(-50%);
  z-index: 150; display: flex; flex-direction: column; align-items: flex-end; gap: 18px;
  opacity: 0; transition: opacity 0.6s ease, filter 0.35s ease;
}
body.hud-ready .hud { opacity: 1; }
.hud-altimeter { text-align: right; line-height: 1; }
.hud-alt { font-size: 1.9rem; font-weight: 600; color: var(--green-900); }
.hud-unit { font-size: 0.9rem; color: var(--brass-text); margin-left: 2px; }
.hud-alt-label {
  display: block; font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.22em; color: var(--ink-soft); margin-top: 4px;
}
.hud-rail { position: relative; padding-right: 10px; }
.hud-rail::before {
  content: ''; position: absolute; right: 4px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(var(--green-300), var(--green-500));
}
.hud-needle {
  position: absolute; right: 0; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 4px rgba(200, 155, 60, 0.18);
  transform: translateY(0); will-change: transform; z-index: 2;
}
.hud-nodes { list-style: none; display: flex; flex-direction: column; gap: 22px; }
.hud-node {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: var(--ink-soft); padding: 0; transition: color 0.25s ease;
}
.hud-node:hover { color: var(--green-700); }
.hud-folio { font-size: 0.6rem; color: var(--brass-text); opacity: 0.85; }
.hud-label {
  font-size: 0.72rem; letter-spacing: 0.04em; max-width: 0; overflow: hidden;
  white-space: nowrap; opacity: 0; transition: max-width 0.4s var(--ease), opacity 0.3s ease;
}
.hud-node:hover .hud-label,
.hud-node.is-active .hud-label { max-width: 120px; opacity: 1; }
.hud-node.is-active { color: var(--green-900); font-weight: 600; }
.hud-node.is-active .hud-folio { opacity: 1; }
.hud-node .hud-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green-300);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em; cursor: pointer;
  border: 1.5px solid transparent; will-change: transform;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary { background: var(--white); color: var(--green-900); border-color: rgba(20, 36, 28, 0.06); box-shadow: 0 8px 22px rgba(20, 36, 28, 0.16); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(20, 36, 28, 0.28); }
.btn-ghost { background: transparent; border-color: var(--green-500); color: var(--green-700); }
.btn-ghost:hover { background: var(--green-700); color: var(--white); border-color: var(--green-700); }
/* playful hover: a little forest RISES INSIDE the button and fills it (clipped by the pill) */
.btn { position: relative; overflow: hidden; z-index: 0; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 26'%3E%3Cg fill='%2314241c' fill-opacity='0.55'%3E%3Crect x='13' y='14' width='2.2' height='12' rx='1'/%3E%3Ccircle cx='14.1' cy='10' r='5.6'/%3E%3Ccircle cx='10' cy='12.6' r='3.6'/%3E%3Ccircle cx='18.2' cy='12.6' r='3.6'/%3E%3Crect x='45' y='10' width='2.6' height='16' rx='1.2'/%3E%3Ccircle cx='46.3' cy='6.4' r='6.6'/%3E%3Ccircle cx='41.4' cy='9.6' r='4.2'/%3E%3Ccircle cx='51.2' cy='9.6' r='4.2'/%3E%3Crect x='77' y='15' width='2' height='11' rx='1'/%3E%3Ccircle cx='78' cy='11.4' r='4.8'/%3E%3Ccircle cx='74.4' cy='13.6' r='3.1'/%3E%3Ccircle cx='81.6' cy='13.6' r='3.1'/%3E%3C/g%3E%3C/svg%3E") left bottom / auto 24px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='4' fill='%23e6c478'/%3E%3Cg stroke='%23e6c478' stroke-width='1.2' stroke-linecap='round'%3E%3Cline x1='8' y1='1' x2='8' y2='2.6'/%3E%3Cline x1='8' y1='13.4' x2='8' y2='15'/%3E%3Cline x1='1' y1='8' x2='2.6' y2='8'/%3E%3Cline x1='13.4' y1='8' x2='15' y2='8'/%3E%3Cline x1='3' y1='3' x2='4.2' y2='4.2'/%3E%3Cline x1='11.8' y1='11.8' x2='13' y2='13'/%3E%3Cline x1='13' y1='3' x2='11.8' y2='4.2'/%3E%3Cline x1='4.2' y1='11.8' x2='3' y2='13'/%3E%3C/g%3E%3C/svg%3E") right 14px top 5px / 13px 13px no-repeat,
    linear-gradient(var(--green-700), var(--green-700));
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.22, 1.2, 0.36, 1);
}
body:not(.no-enhance) .btn:hover::before,
body:not(.no-enhance) .btn:focus-visible::before {
  transform: translateY(0);
  animation: forestBreeze 7s linear 0.45s infinite;
}
@keyframes forestBreeze {
  from { background-position: 0 bottom, right 14px top 5px, 0 0; }
  to   { background-position: -96px bottom, right 14px top 5px, 0 0; }
}
/* the forest layer IS the hover fill now — the ghost keeps only text/border changes (no-enhance keeps the flat fill) */
body:not(.no-enhance) .btn-ghost:hover { background: transparent; }
body:not(.no-enhance) .btn-primary:hover, body:not(.no-enhance) .btn-primary:focus-visible { color: var(--cream); }
@media (prefers-reduced-motion: reduce) { .btn::before { display: none; } .btn-ghost:hover { background: var(--green-700); } }

/* ============ HEADER / NAV ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 160;
  transition: background 0.4s ease, box-shadow 0.4s ease, height 0.4s ease, backdrop-filter 0.4s ease;
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; height: 88px; transition: height 0.4s ease; }
.site-header.is-condensed { background: rgba(247, 244, 236, 0.95); box-shadow: 0 1px 0 rgba(200, 155, 60, 0.35); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.is-condensed { background: rgba(247, 244, 236, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.site-header.is-condensed .nav-bar { height: 66px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 34px; height: auto; display: block; flex-shrink: 0; color: var(--green-900); }
.footer-brand .brand-icon { width: 30px; color: var(--cream); }
.preloader-inner .brand-icon { width: 50px; color: var(--green-700); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--green-900); }
.brand-text small { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-weight: 500; font-size: 0.95rem; color: var(--ink-soft); position: relative; padding: 4px 0; }
.main-nav a:hover { color: var(--green-700); }
.main-nav a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--gold); transition: width 0.25s ease; }
.main-nav a:hover::after { width: 100%; }

.lang-toggle {
  background: transparent; color: var(--green-900); border: 1px solid var(--hair); border-radius: 999px;
  padding: 7px 15px; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; font-family: var(--font-body); transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.lang-toggle:hover { background: var(--green-900); color: var(--cream); }

.menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; z-index: 161; }
.menu-btn span { width: 26px; height: 2.5px; background: var(--green-900); border-radius: 2px; transition: 0.3s; }
.menu-btn.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---- Accessibility: over the DARK particle hero the header + HUD go light ----
   (while the hero dominates the view and the header bar is still transparent) */
.brand-icon, .brand-text strong, .brand-text small, .main-nav a, .lang-toggle,
.hud-alt, .hud-unit, .hud-alt-label, .hud-node, .hud-node .hud-dot, .hud-rail::before, .hud-folio {
  transition: color 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}
/* literal creams here (NOT var(--cream)) — over the dark hero these must stay light in night mode too */
body.over-hero .site-header:not(.is-condensed) .brand-icon { color: #f5f0e4; }
body.over-hero .site-header:not(.is-condensed) .brand-text strong { color: #f5f0e4; }
body.over-hero .site-header:not(.is-condensed) .brand-text small { color: rgba(245, 240, 228, 0.72); }
body.over-hero .site-header:not(.is-condensed) .main-nav a { color: rgba(245, 240, 228, 0.86); }
body.over-hero .site-header:not(.is-condensed) .main-nav a:hover { color: #fff; }
body.over-hero .site-header:not(.is-condensed) .lang-toggle { color: #f5f0e4; border-color: rgba(245, 240, 228, 0.45); }
body.over-hero .site-header:not(.is-condensed) .lang-toggle:hover { background: #f5f0e4; color: #213f2a; }
body.over-hero .site-header:not(.is-condensed) .menu-btn span { background: #f5f0e4; }

body.over-hero .hud-alt { color: #f5f0e4; }
body.over-hero .hud-unit { color: #e6c478; }
body.over-hero .hud-alt-label { color: rgba(245, 240, 228, 0.72); }
body.over-hero .hud-node { color: rgba(245, 240, 228, 0.7); }
body.over-hero .hud-node:hover, body.over-hero .hud-node.is-active { color: #f5f0e4; }
body.over-hero .hud-rail::before { background: linear-gradient(rgba(245, 240, 228, 0.5), rgba(230, 196, 120, 0.65)); }
body.over-hero .hud-node .hud-dot { background: rgba(245, 240, 228, 0.6); }

/* HUD over the full-bleed history photos: light like over-hero + a drop-shadow halo, so the
   altimeter/folio rail stays legible over BOTH bright autumn foliage and the dark scrim
   (a colour swap alone isn't enough on a varied photo — the halo guarantees contrast). */
body.over-media .hud-alt { color: #f5f0e4; }
body.over-media .hud-unit { color: #e6c478; }
body.over-media .hud-alt-label { color: rgba(245, 240, 228, 0.82); }
body.over-media .hud-node { color: rgba(245, 240, 228, 0.82); }
body.over-media .hud-node:hover, body.over-media .hud-node.is-active { color: #f5f0e4; }
body.over-media .hud-folio { color: #e6c478; opacity: 1; }
body.over-media .hud-rail::before { background: linear-gradient(rgba(245, 240, 228, 0.65), rgba(230, 196, 120, 0.8)); }
body.over-media .hud-node .hud-dot { background: rgba(245, 240, 228, 0.78); }
body.over-media .hud { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 8px rgba(0, 0, 0, 0.5)); }

/* ============ HERO — THE SUMMIT ============ */
/* Dark hero so the particle "plane tree of light" glows; title sits below it */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end;
  padding-top: 88px; overflow: hidden;
  background: radial-gradient(120% 95% at 50% 34%, #1d3528 0%, #122a1f 55%, #0b1611 100%);
}
/* Particle canvas fills the hero (Three.js sizes it; classes toggled by hero-particles.js) */
.hero-particles { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; }

/* ===== HERO AMBIENCE — atmosphere layers BEHIND the tree (hero-ambience.js builds them) ===== */
.hero-ambience { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ha-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(58% 46% at 50% 40%, rgba(96, 138, 108, 0.30) 0%, rgba(96, 138, 108, 0.10) 55%, transparent 78%);
}
html.night .ha-vignette { background: radial-gradient(58% 46% at 50% 40%, rgba(84, 112, 150, 0.16) 0%, rgba(84, 112, 150, 0.05) 55%, transparent 78%); }
.ha-drift, .ha-ridgewrap { position: absolute; inset: -30px; will-change: transform; }
.ha-contours, .ha-marks, .ha-ridges { position: absolute; inset: 0; width: 100%; height: 100%; }
.ha-contours path { fill: none; stroke: #c89233; stroke-width: 1; opacity: 0.08; }
html.night .ha-contours path { opacity: 0.11; }
.ha-marks .ha-cross path { fill: none; stroke: #c89233; stroke-width: 1.2; opacity: 0.14; }
.ha-marks .ha-coord text { font-family: var(--font-instrument); font-size: 12px; letter-spacing: 0.1em; fill: #c89233; opacity: 0.2; }
.ha-ridgewrap { top: auto; height: 30vh; bottom: -12px; }
.ha-ridges .ha-r1 { fill: #24402e; opacity: 0.45; }
.ha-ridges .ha-r2 { fill: #1a3123; opacity: 0.55; }
.ha-ridges .ha-r3 { fill: #10231a; opacity: 0.65; }
html.night .ha-ridges .ha-r1 { fill: #1a2c38; opacity: 0.4; }
html.night .ha-ridges .ha-r2 { fill: #14232e; opacity: 0.5; }
html.night .ha-ridges .ha-r3 { fill: #0e1a24; opacity: 0.6; }
.ha-motes { position: absolute; inset: 0; width: 100%; height: 100%; }
.ha-grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E") repeat;
}
@media (prefers-reduced-motion: reduce) { .ha-drift, .ha-ridgewrap { transform: none !important; } }

/* ===== PODIUM-STYLE PORTAL INTRO v2 — dive through the hollow (opt-in behind html.js; degrades to a plain hero) ===== */
#heroPortal { height: auto; }                                   /* DEFAULT (covers no-JS): plain hero, content below, no trap */
#heroPortalStage { position: static; height: auto; }
html.js #heroPortal.portal-armed { height: 320vh; }             /* OPT-IN: tall + sticky only once portal.js armed it */
html.js #heroPortal.portal-armed #heroPortalStage { position: sticky; top: 0; height: 100svh; overflow: hidden; perspective: 1100px; perspective-origin: 50% 56%; }
@media (max-width: 820px) { html.js #heroPortal.portal-armed { height: 240vh; } }

/* THE OTHER DIMENSION wrapped in .portal-world (z3 over the tree), MASKED to a tree-hollow (κουφάλα)
   shape — the mask image is built + scaled by portal.js, so you see the dark world THROUGH the hollow
   from the first frame and it grows as you scroll in. Inside: backdrop(0) < DOM photos(1) < sundial(2). */
#heroPortalStage .portal-world {
  position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none;   /* tree(0) < HOLE(1) < title+buttons(2) → text stays in front */
  -webkit-mask-position: 50% 62%; mask-position: 50% 62%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: calc(var(--mscale, 0.32) * 100%); mask-size: calc(var(--mscale, 0.32) * 100%);
}
#heroPortalStage .portal-world .portal-veil { position: absolute; inset: 0; z-index: 0; background: #05060a; }
#heroPortalStage .portal-photos { position: absolute; inset: 0; z-index: 1; opacity: 1; perspective: 1100px; perspective-origin: 50% 46%; }
#heroPortalStage .pf-field { position: absolute; inset: 0; transform-style: preserve-3d; }
#heroPortalStage .pf {
  position: absolute; left: 50%; top: 50%; margin: 0;
  width: 34vmin; max-width: 460px; aspect-ratio: 4 / 3; will-change: transform, opacity, filter;
  transform: translate(-50%, -50%) translateZ(var(--z, -3000px)) translate(var(--ox, 0px), var(--oy, 0px)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  opacity: var(--o, 0); filter: brightness(var(--b, 1)) saturate(0.92);
  border-radius: 10px; overflow: hidden; background: #0b0e14;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(210, 220, 235, 0.10);
}
#heroPortalStage .pf img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 820px) { #heroPortalStage .pf { width: 46vmin; } }
#heroPortalStage .portal-canvas { position: absolute; inset: 0; z-index: 2; opacity: 1; pointer-events: none; }

/* entry choreography: the hero text flies AT the viewer & clears FIRST (armed only; portal.js writes --fly/--flyOp) */
html.js #heroPortal.portal-armed .hero-content {
  transform-style: preserve-3d; will-change: transform, opacity, filter;
  --fly: 0; --flyOp: 1;
  transform: translateZ(calc(var(--fly) * 260px)) scale(calc(1 + var(--fly) * 1.35));
  opacity: var(--flyOp); filter: blur(calc(var(--fly) * 6px));
}
html.js #heroPortal.portal-armed .hero-content > .hero-eyebrow { transform: translateZ(calc(var(--fly) * 90px)); }
html.js #heroPortal.portal-armed .hero-content > h1            { transform: translateZ(calc(var(--fly) * 30px)); }
html.js #heroPortal.portal-armed .hero-content > .hero-intro   { transform: translateZ(calc(var(--fly) * -20px)); }
html.js #heroPortal.portal-armed .hero-content > .hero-actions { transform: translateZ(calc(var(--fly) * -60px)); }

/* disabled (reduced-motion / no-WebGL with JS on): collapse back + hide GL layers */
#heroPortal.portal-disabled { height: auto; }
#heroPortal.portal-disabled #heroPortalStage { position: static; height: auto; perspective: none; }
#heroPortal.portal-disabled .portal-world { display: none; }

/* ===== "Λίγα λόγια για την Πάππα" — the landing the portal dive resolves into ===== */
.pappa-landing {
  position: relative; overflow: clip; text-align: center;
  padding-block: clamp(4rem, 9vh, 6.5rem) clamp(2.5rem, 5vh, 4rem);
  /* transparent → the fixed contour map (cream + gold curves) shows through, SAME as the rest of the site */
  background: transparent;
}
/* don't force the landing to full viewport height (the .panel rule does) → trims the big empty space below */
.pappa-landing.panel { min-height: auto; }
html.js .pappa-landing { --portal-land: 0; }   /* portal.js pre-warms the dawn band as you surface; no-JS default = full warmth */
.pappa-landing-dawn {
  display: none;   /* removed so the landing background matches the rest of the site (contour map shows through) */
  position: absolute; inset: 0 0 auto 0; height: 42vh; pointer-events: none; mix-blend-mode: screen; opacity: 0.9;
  background: radial-gradient(60% 120% at 50% 0%,
      rgba(243, 200, 115, calc(0.36 + 0.22 * var(--portal-land, 1))) 0%,
      rgba(232, 196, 120, 0.16) 38%, transparent 72%);
}
.pappa-landing-inner { position: relative; z-index: 1; max-width: 760px; }
.pappa-landing .section-eyebrow { margin-left: auto; margin-right: auto; text-align: center; }
.pappa-landing-title { font-family: var(--font-display); font-size: clamp(2.2rem, 5.2vw, 3.8rem); line-height: 1.05; color: var(--green-900); margin: 0.35em auto 0.5em; text-align: center; }
.pappa-landing-lede { font-family: var(--font-display); font-style: italic; font-size: clamp(1.12rem, 2.1vw, 1.5rem); line-height: 1.62; color: var(--ink-soft); max-width: 640px; margin: 0 auto; }
.pappa-landing-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.4em; margin-top: clamp(2rem, 5vh, 3.2rem);
  font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.74rem; font-weight: 700;
  color: var(--brass-text); text-decoration: none;
}
.pappa-landing-cue-arrow { font-size: 1.3rem; animation: landingNudge 2.2s var(--ease) infinite; }
@keyframes landingNudge { 0%, 100% { transform: translateY(0); opacity: 0.55; } 50% { transform: translateY(7px); opacity: 1; } }

/* hide the page chrome (header / HUD / sound) while you are INSIDE the other dimension (portal.js toggles .portal-immersed) */
body.portal-immersed .site-header, body.tunnel-immersed .site-header, body.church-immersed .site-header,
body.portal-immersed .hud, body.tunnel-immersed .hud, body.church-immersed .hud,
body.portal-immersed .sound-cta, body.tunnel-immersed .sound-cta, body.church-immersed .sound-cta,
body.church-immersed .night-cta { opacity: 0 !important; pointer-events: none !important; transition: opacity 0.45s ease; }

/* Hero content centred, anchored toward the lower third, light text over the dark scene */
.hero-content {
  position: relative; z-index: 2; width: 100%; max-width: none;
  padding: 0 clamp(20px, 5vw, 70px) clamp(70px, 13vh, 130px); text-align: center;
  text-shadow: 0 2px 26px rgba(8, 16, 12, 0.6);
}
.hero-intro {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem); color: rgba(245, 240, 228, 0.92); line-height: 1.4;
  margin: 0 auto 34px; max-width: 34ch;
}
.lower-third {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.3em;
  font-family: var(--font-body); font-size: 0.78rem; color: var(--gold-soft); font-weight: 700;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(3.2rem, 8.5vw, 6.6rem); font-weight: 800; line-height: 0.95;
  letter-spacing: -0.035em; color: #f5f0e4; margin: 0 0 20px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
/* Ghost button must read on the dark hero */
/* literal creams: these sit over the DARK hollow window in both day and night modes */
.hero .btn-ghost { border-color: rgba(245, 240, 228, 0.5); color: #f5f0e4; }
.hero .btn-ghost:hover { background: #f5f0e4; color: #213f2a; border-color: #f5f0e4; }

.scroll-cue {
  position: absolute; bottom: 30px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(245, 240, 228, 0.8); z-index: 3;
}
.scroll-cue-text { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }
.scroll-cue-arrow { font-size: 1.4rem; animation: bobArrow 2s var(--ease) infinite; }
@keyframes bobArrow { 0%, 100% { transform: translateY(0); opacity: 0.7; } 50% { transform: translateY(8px); opacity: 1; } }

/* ============ SECTIONS ============ */
.section { padding: 110px 0; position: relative; z-index: 2; }
.section-alt::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgba(239, 233, 218, 0.0), rgba(239, 233, 218, 0.55) 12%, rgba(239, 233, 218, 0.55) 88%, rgba(239, 233, 218, 0.0));
  pointer-events: none;
}
.section-eyebrow { font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.78rem; color: var(--brass-text); font-weight: 700; margin-bottom: 14px; }
.section h2 { font-size: clamp(2.6rem, 6vw, 4.8rem); margin-bottom: 18px; letter-spacing: -0.025em; }
.section-lead { color: var(--ink-soft); max-width: 660px; margin-bottom: 40px; font-size: 1.08rem; }
/* poetic portal-arrival lead-in, now the opening line of the merged "Λίγα λόγια για την Πάππα" section */
.about-lede { font-family: var(--font-display); font-style: italic; font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.55; color: var(--green-700); margin-bottom: 1.1em; }
.section-note { margin-top: 28px; color: var(--ink-soft); font-style: italic; font-family: var(--font-display); font-size: 1.05rem; }

/* Split-heading reveal scaffolding (enhanced tier only) */
.split-head .word { display: inline-block; overflow: hidden; padding-top: 0.16em; margin-top: -0.16em; }
.split-head .char { display: inline-block; will-change: transform; }
body.enhanced .split-head { opacity: 0; }   /* unhidden by JS once split */

/* Generic reveal — hidden only when JS is in control; fully visible with no JS */
body.enhanced .reveal,
body.no-enhance .reveal { opacity: 0; visibility: hidden; }
body.no-enhance .reveal { transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), visibility 0.8s; }
body.no-enhance .reveal.in { opacity: 1; visibility: visible; transform: none; }

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 52px; align-items: stretch; margin-top: 30px; }
.about-text p { margin-bottom: 20px; color: var(--ink-soft); font-size: 1.06rem; max-width: 62ch; }
.about-text .section-eyebrow { font-size: 0.78rem; color: var(--brass-text); max-width: none; margin-bottom: 14px; }
.about-text h2 { margin-bottom: 24px; }
.facts-card {
  background: transparent; border-radius: 0; padding: 0; box-shadow: none;
  border-top: none;   /* align "Με μια ματιά" with the left column's eyebrow (same start height) */
  display: flex; flex-direction: column;   /* align-items:stretch on the grid gives it the left column's height */
}
.facts-card h3 { font-size: 1.5rem; margin-bottom: 18px; }
/* the facts fill the remaining height in 4 EQUAL bands → the right column matches the left's height */
.facts-list { list-style: none; flex: 1; display: flex; flex-direction: column; }
.facts-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: 1; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.facts-list li:last-child { border-bottom: none; }
.fact-label { color: var(--ink-soft); font-weight: 500; font-size: 1.4rem; }
.fact-value { font-weight: 600; color: var(--green-900); text-align: right; font-size: 1.4rem; }
.fact-alt { font-variant-numeric: tabular-nums; color: var(--gold); }
.facts-note { margin-top: 18px; font-size: 0.85rem; color: var(--ink-soft); font-style: italic; }

/* ===== ABOUT ALIVE: word-portals, photo peek, elevation cross-section ===== */
.word-portal {
  color: inherit; text-decoration: none; cursor: pointer;
  border-bottom: 2px solid rgba(200, 146, 51, 0.55);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.word-portal:hover { color: var(--brass-text); border-bottom-color: var(--gold); }
.peek-img {
  position: fixed; z-index: 500; width: 160px; height: 110px; object-fit: cover;
  border-radius: 10px; border: 2px solid rgba(200, 146, 51, 0.7);
  box-shadow: 0 18px 40px rgba(10, 20, 14, 0.4);
  opacity: 0; transform: translateY(6px) scale(0.96); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.peek-img.on { opacity: 1; transform: translateY(0) scale(1); }
.elev { margin-top: 22px; }
.elev svg { width: 100%; height: auto; display: block; overflow: visible; }
.elev-line {
  fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 620; stroke-dashoffset: 620;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.5, 0, 0.2, 1);
}
.elev.in .elev-line { stroke-dashoffset: 0; }
.elev-area { fill: rgba(200, 146, 51, 0.13); opacity: 0; transition: opacity 0.9s ease 0.9s; }
.elev.in .elev-area { opacity: 1; }
.elev-dot { fill: var(--green-700); opacity: 0; transition: opacity 0.4s ease; }
.elev.in .elev-dot { opacity: 1; }
.elev.in circle.elev-dot:nth-of-type(3) { transition-delay: 0.25s; }
.elev.in circle.elev-dot:nth-of-type(4) { transition-delay: 0.6s; }
.elev.in circle.elev-dot:nth-of-type(5) { transition-delay: 1.05s; }
.elev.in circle.elev-dot:nth-of-type(6) { transition-delay: 1.5s; }
.elev-dot-papa { fill: var(--gold); }
.elev.in .elev-dot-papa { animation: elevPulse 2.6s ease-in-out 2s infinite; }
@keyframes elevPulse { 0%, 100% { r: 5; } 50% { r: 6.5; } }
.elev-lbl {
  font-family: var(--font-instrument); font-size: 9.5px; letter-spacing: 0.06em;
  fill: var(--ink-soft); opacity: 0; transition: opacity 0.7s ease 1.3s;
}
.elev.in .elev-lbl { opacity: 1; }
.elev-lbl-papa { font-size: 10.5px; font-weight: 700; fill: var(--brass-text); }
@media (prefers-reduced-motion: reduce) {
  .elev-line { stroke-dashoffset: 0; transition: none; }
  .elev-area, .elev-dot, .elev-lbl { opacity: 1; transition: none; }
  .elev-dot-papa { animation: none; }
}

/* Full-bleed mosaic feature in "The Village" */
.about-feature {
  position: relative; width: 100vw; margin: 76px 0 0 calc(50% - 50vw);
  aspect-ratio: 16 / 9; max-height: 70vh; overflow: hidden; background: var(--cream-dark);
}
.about-feature img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.about-feature-cap {
  position: absolute; left: clamp(20px, 5vw, 70px); bottom: 18px; z-index: 2;
  font-family: var(--font-instrument); font-size: 0.8rem; letter-spacing: 0.06em; color: #f5f0e4;
  background: rgba(27, 36, 48, 0.62); padding: 7px 15px; border-radius: 999px;
}
/* the mosaic assembles from its tiles on a 2D canvas; the <img> is the fallback */
.mosaic-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: none; }
.mosaic-on .mosaic-canvas { display: block; }
.mosaic-on .about-feature img { visibility: hidden; }

/* ============ HISTORY — A DESCENT THROUGH TIME ============ */
.history-section { padding-bottom: 130px; }
/* Intro is a CENTRED column on the page (eyebrow + title centred; the long
   paragraphs stay left-aligned for readability, but the block sits in the middle) */
#history-intro { text-align: center; }
.history-intro { max-width: 760px; margin: 26px auto 0; text-align: left; }
.history-intro .lead-quote {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.5; color: var(--green-900); margin-bottom: 22px;
}
.history-intro p { color: var(--ink-soft); }

.timeline-track { position: relative; margin: 0; padding: 0; max-width: none; }
/* the gold thread of time — a faint spine running down through the chapters */
.timeline-track::before {
  content: none;   /* gold "thread of time" vertical spine removed per user request */
}
.trail-svg { display: none; }

/* CINEMATIC FULL-BLEED CHAPTERS — each era fills the screen: photo + slow Ken Burns,
   a giant chronological number drifting on parallax, text on a scrim. No L/R alternation. */
.era { position: relative; display: block; min-height: 100vh; min-height: 100svh; overflow: hidden; margin: 0; }   /* 100vh fallback: svh is unknown below iOS 15.4 / Chrome 108 → without it the whole era collapses to 0 height */
.era-media { position: absolute; inset: 0; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; border-radius: 0; box-shadow: none; background: #0f1812; aspect-ratio: auto; }   /* explicit sides: `inset` shorthand is ignored below iOS 14.1 / Chrome 87 */
.era-media img { width: 100%; height: 100%; object-fit: cover; display: block; animation: eraKen 28s ease-in-out infinite alternate; will-change: transform; }
.era-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,22,16,0.5) 0%, rgba(13,22,16,0.12) 32%, rgba(13,22,16,0.48) 72%, rgba(13,22,16,0.85) 100%);
}
@keyframes eraKen { 0% { transform: scale(1.06); } 100% { transform: scale(1.16) translate(-1.6%, -1.4%); } }
.era-body {
  position: absolute; inset: 0; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(92px, 15vh, 160px) clamp(24px, 6vw, 90px) clamp(56px, 12vh, 120px);
  text-align: left; pointer-events: none;
}
.era-year {
  margin: 0 0 0.05em; align-self: flex-start; font-family: var(--font-instrument); font-weight: 400;
  font-size: clamp(3rem, 10vw, 9rem); line-height: 0.82; letter-spacing: -0.02em;
  color: rgba(245, 240, 228, 0.34); white-space: nowrap; will-change: transform;
}
.era-title {
  font-family: var(--font-display); font-weight: 800; color: #f5f0e4;
  font-size: clamp(1.9rem, 4.4vw, 3.3rem); line-height: 1.05; margin: 0 0 14px; max-width: 20ch;
  text-shadow: 0 2px 24px rgba(8, 14, 10, 0.5);
}
.era-text {
  color: rgba(245, 240, 228, 0.92); font-size: clamp(1rem, 1.25vw, 1.14rem); line-height: 1.6; max-width: 50ch;
  text-shadow: 0 1px 16px rgba(8, 14, 10, 0.5); pointer-events: auto;
}
.era-stamp {
  position: absolute; left: clamp(24px, 6vw, 90px); top: clamp(92px, 15vh, 160px); bottom: auto; z-index: 3;
  background: rgba(13, 22, 16, 0.6); color: #f5f0e4;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(230, 196, 120, 0.5);
}

@media (max-width: 900px) {
  .era-body { padding: clamp(78px, 13vh, 120px) 22px clamp(46px, 10vh, 84px); }
  .era-text { max-width: none; }
}

/* ============ GALLERY — SURVEY PLATES ============ */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; perspective: 1400px; }
@media (min-width: 901px) {
  .gallery-grid { grid-template-columns: repeat(6, 1fr); gap: 20px; }
  .gallery-item { grid-column: span 2; }
  .gallery-item:nth-child(1) { grid-column: span 4; aspect-ratio: 16 / 9; }
  .gallery-item:nth-child(6) { grid-column: span 6; aspect-ratio: 24 / 9; }
}
.gallery-item {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; align-items: flex-end; cursor: pointer;
  transform-style: preserve-3d; transition: box-shadow 0.4s var(--ease);
}
body:not(.no-enhance) .gallery-item:hover { box-shadow: var(--shadow-lg); }
.gallery-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plate-pin {
  position: absolute; top: 12px; left: 12px; width: 12px; height: 12px; z-index: 3;
}
.plate-pin::before, .plate-pin::after { content: ''; position: absolute; background: var(--gold-soft); }
.plate-pin::before { width: 12px; height: 1.5px; top: 5px; }
.plate-pin::after  { width: 1.5px; height: 12px; left: 5px; }
.plate-no {
  position: absolute; top: 12px; right: 14px; z-index: 3;
  font-size: 0.72rem; color: rgba(255, 255, 255, 0.85); font-weight: 600;
}
.gallery-item figcaption {
  position: relative; z-index: 2; width: 100%; padding: 18px 18px 16px;
  color: var(--white); background: linear-gradient(transparent, rgba(20, 42, 29, 0.82));
}
.plate-title { display: block; font-weight: 600; font-size: 1.08rem; font-family: var(--font-display); }
.plate-coord { display: block; font-size: 0.64rem; color: rgba(255, 255, 255, 0.88); margin-top: 3px; }
.leaflet-container .leaflet-control-attribution a { color: #005a80; }
/* Placeholder gradients — tinted to the village's real tones (until photos replace them) */
.ph-1 { background: linear-gradient(135deg, #b8a684, #8a7a5c); }  /* flagstone square */
.ph-2 { background: linear-gradient(135deg, #cf8a5e, #b05433); }  /* terracotta roofs / church */
.ph-3 { background: linear-gradient(160deg, #7fb0d4, #4a86b4); }  /* azure view */
.ph-4 { background: linear-gradient(135deg, #5c8a55, #356043); }  /* forest trail */
.ph-5 { background: linear-gradient(135deg, #b8a684, #8a7a5c); }  /* stone (school fallback) */
.ph-6 { background: linear-gradient(135deg, #f3c873, #c89233); }  /* golden hour festival */

/* ---- curated photo masonry: seasonal gallery + church section ---- */
.season-group { margin-top: 50px; }
.season-group:first-of-type { margin-top: 30px; }
.season-band {
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.01em;
  font-size: clamp(1.35rem, 2.4vw, 2rem); color: var(--green-900);
  display: flex; align-items: center; gap: 18px; margin-bottom: 20px;
}
.season-band::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.photo-masonry { column-count: 4; column-gap: 14px; }
.church-masonry { column-count: 3; column-gap: 16px; margin-top: 30px; }
.pm-item {
  break-inside: avoid; margin: 0 0 14px; border-radius: 10px; overflow: hidden;
  position: relative; box-shadow: 0 8px 20px rgba(20, 36, 28, 0.12); background: var(--cream);
}
.pm-item img { width: 100%; height: auto; display: block; transition: transform 0.7s var(--ease); }
body:not(.no-enhance) .pm-item:hover img { transform: scale(1.045); }
.church-masonry .pm-item { box-shadow: 0 10px 26px rgba(20, 36, 28, 0.16); }
@media (max-width: 1100px) { .photo-masonry { column-count: 3; } .church-masonry { column-count: 3; } }
@media (max-width: 700px)  { .photo-masonry { column-count: 2; } .church-masonry { column-count: 2; } }
@media (max-width: 430px)  { .photo-masonry, .church-masonry { column-count: 1; } }
@media (prefers-reduced-motion: reduce) { .pm-item img { transition: none; } }

/* ---- ΤΟ ΤΟΥΝΕΛ ΤΟΥ ΧΡΟΝΟΥ: the gallery as a scroll-pinned journey through a year
       (tunnel.js arms it; no-JS / reduced-motion keeps the seasonal masonry above) ---- */
html.js #gallery.tunnel-armed { height: 560vh; padding: 0; display: block; }
html.js #gallery.tunnel-armed .container { display: none; }
.tunnel-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--cream); }
.tunnel-scene { position: absolute; inset: 0; perspective: 1150px; overflow: hidden; z-index: 1; }
.tunnel-drift { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.tn-ring {
  position: absolute; left: 50%; top: 50%; width: 168vmin; height: 120vmin;
  border: 1.5px solid rgba(200, 146, 51, 0.6); pointer-events: none;
  will-change: transform, opacity; opacity: 0;
}
.tn-card {
  position: absolute; left: 50%; top: 50%; width: clamp(250px, 30vw, 450px); aspect-ratio: 4 / 3;
  margin: 0; border-radius: 12px; overflow: hidden; cursor: pointer; opacity: 0;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55); border: 1px solid rgba(200, 155, 60, 0.5);
  background: #10150f; will-change: transform, opacity;
}
.tn-card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tn-card.tn-detail { filter: brightness(0.82) saturate(0.88); }
.tn-label {
  position: absolute; left: 50%; top: 50%; z-index: 3; pointer-events: none; opacity: 0;
  font-family: var(--font-display); font-weight: 600; font-style: italic;
  font-size: clamp(3rem, 9vw, 7.5rem); letter-spacing: 0.14em; white-space: nowrap;
  will-change: transform, opacity;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.85), 0 0 60px rgba(0, 0, 0, 0.55);
}
.tunnel-weather { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.tunnel-title {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center;
}
.tunnel-title .tt-eyebrow { font-size: 0.78rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--brass-text); font-weight: 700; }
.tunnel-title .tt-head { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--green-900); line-height: 1.05; }
.tunnel-title .tt-hint { font-size: 0.92rem; color: var(--ink-soft); }
.tunnel-dial { position: absolute; right: 26px; bottom: 20px; z-index: 6; width: 96px; height: 113px; opacity: 0; }
.tunnel-dial .dot { cursor: pointer; transition: r 0.2s ease; pointer-events: auto; }
.tunnel-dial .dot:hover { r: 8; }
@media (max-width: 900px) {
  html.js #gallery.tunnel-armed { height: 430vh; }
  .tn-card { width: clamp(210px, 54vw, 320px); }
  .tunnel-dial { width: 72px; height: 85px; right: 14px; bottom: 10px; }
}

/* ============ ΝΥΧΤΑ ΣΤΗΝ ΠΑΠΠΑ — night mode (night.js toggles html.night) ============
   The whole palette flips via the CSS variables; lamps glow at the page edges;
   descent.js dims its sun and lights the village windows (window.__descentNight). */
html.night {
  --cream:      #0d1712;
  --cream-dark: #0a120e;
  --white:      #14201a;
  --green-950:  #f3f7ef;
  --green-900:  #e9f0e4;
  --green-700:  #a8c7ad;
  --green-500:  #6f9a72;
  --green-300:  #45624a;
  --ink:        #e9f0e4;
  --ink-soft:   #a9b5a7;
  --stone:      #7d7159;
  --stone-deep: #a4977c;
  --brass-text: #d9b45e;
  --page-bg:    #0d1712;
  --hair: rgba(233, 240, 228, 0.18);
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.6);
}
html.night body { background: var(--page-bg); }
.map-layer { transition: background 1.1s ease; }
html.night .site-header.is-condensed { background: rgba(13, 23, 18, 0.92); box-shadow: 0 1px 0 rgba(200, 155, 60, 0.28); }
html.night .btn-primary { background: var(--green-900); color: #14241c; }
/* night safety net: GSAP split-heading chars must never keep a stale day colour
   (the tweens also clearProps, but chars mid-animation obey this) */
html.night .split-head .char, html.night .split-head .word { color: inherit !important; }

/* ============ MINIMAL CHROME (user): no top navigation, no logo — only the LANGUAGE
   toggle stays, pinned top-right on the same axis as the altimeter (.hud right: 26px) ============ */
.site-header .brand, .site-header .main-nav, .site-header .menu-btn { display: none !important; }
.site-header, .site-header.is-condensed {
  background: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  pointer-events: none;
}
.site-header .lang-toggle { position: fixed; top: 24px; right: 26px; margin: 0; pointer-events: auto; }
@media (max-width: 1080px) { .site-header .lang-toggle { right: 14px; } }

/* --- the day/night SWITCH (bottom-left): gold sun in a blue sky with drifting clouds
       ↔ cratered moon among twinkling stars; the knob slides with a springy ease --- */
.night-cta.nc-switch {
  position: fixed; right: 20px; bottom: 84px; z-index: 150;   /* at the edge, stacked right above the sound pill */
  width: 190px; height: 46px; padding: 0; border-radius: 999px; overflow: hidden;   /* same length as the «Άκου την Πάππα» pill */
  border: 1px solid rgba(20, 36, 28, 0.28); cursor: pointer; background: #6fa8d8;
  box-shadow: inset 0 2px 7px rgba(10, 20, 30, 0.35), 0 8px 24px rgba(20, 36, 28, 0.25);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  /* --- mobile anti-flicker: pre-promote to a stable compositor layer so the
         rounded clip + animated children don't strobe on budget Android GPUs,
         and kill the grey tap-highlight flash in in-app WebViews (Instagram) --- */
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  isolation: isolate; contain: paint;
}
.night-cta.nc-switch:hover { transform: translateY(-2px) translateZ(0); box-shadow: inset 0 2px 7px rgba(10, 20, 30, 0.35), 0 12px 30px rgba(20, 36, 28, 0.32); }
/* the season label inside the switch (opposite the sliding knob) */
.sw-label {
  position: absolute; top: 0; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.01em; white-space: nowrap;
  pointer-events: none; transition: opacity 0.9s ease;
}
.sw-label-day { left: 50px; right: 14px; color: #10243a; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4); opacity: 1; }
.sw-label-night { left: 14px; right: 50px; color: #eef2fb; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65); opacity: 0; }
html.night .sw-label-day { opacity: 0; }
html.night .sw-label-night { opacity: 1; }
.sw-day, .sw-night { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; transition: opacity 1.3s ease; }
.sw-day { background: linear-gradient(180deg, #5f9bd0 0%, #8fc0e6 70%, #b7d9ef 100%); opacity: 1; }
html.night .sw-day { opacity: 0; }
.sw-night { background: linear-gradient(180deg, #12141f 0%, #1c2030 100%); opacity: 0; }
html.night .sw-night { opacity: 1; }
/* concentric rings — hidden now that a text label fills the pill */
.sw-ring, .sw-ringn { display: none; }
/* drifting clouds (day) */
.sw-cloud { position: absolute; background: #ffffff; border-radius: 999px; }
.sw-cloud::before, .sw-cloud::after { content: ""; position: absolute; background: #ffffff; border-radius: 50%; }
.swc-1 { width: 30px; height: 11px; right: 8px; bottom: 7px; animation: swDrift 7s ease-in-out infinite alternate; }
.swc-1::before { width: 13px; height: 13px; left: 5px; top: -7px; }
.swc-1::after { width: 9px; height: 9px; left: 15px; top: -5px; }
.swc-2 { width: 22px; height: 8px; right: 30px; top: 7px; opacity: 0.9; animation: swDrift 9s ease-in-out 0.8s infinite alternate-reverse; }
.swc-2::before { width: 9px; height: 9px; left: 4px; top: -5px; }
.swc-2::after { width: 7px; height: 7px; left: 11px; top: -4px; }
.swc-3 { width: 16px; height: 6px; right: 12px; top: 20px; opacity: 0.75; animation: swDrift 6s ease-in-out 1.6s infinite alternate; }
.swc-3::before { width: 7px; height: 7px; left: 3px; top: -4px; }
.swc-3::after { content: none; }
@keyframes swDrift { from { transform: translateX(0); } to { transform: translateX(-7px); } }
/* twinkling stars (night) */
.sw-star { position: absolute; width: 2.5px; height: 2.5px; border-radius: 50%; background: #ffffff; animation: swTwinkle 2.6s ease-in-out infinite alternate; }
.sws-1 { left: 12px; top: 10px; }
.sws-2 { left: 24px; top: 26px; width: 2px; height: 2px; animation-delay: 0.5s; }
.sws-3 { left: 36px; top: 8px; width: 3px; height: 3px; animation-delay: 1.1s; }
.sws-4 { left: 46px; top: 30px; animation-delay: 0.2s; }
.sws-5 { left: 56px; top: 14px; width: 2px; height: 2px; animation-delay: 1.6s; }
.sws-6 { left: 18px; top: 34px; width: 2px; height: 2px; animation-delay: 0.9s; }
.sws-7 { left: 64px; top: 33px; animation-delay: 1.3s; }
@keyframes swTwinkle { from { opacity: 0.25; transform: scale(0.8); } to { opacity: 1; transform: scale(1.15); } }
/* the knob: sun ↔ moon */
.sw-knob {
  position: absolute; top: 5px; left: 5px; width: 36px; height: 36px; border-radius: 50%; z-index: 4;
  transition: transform 1.2s cubic-bezier(0.5, 0.05, 0.2, 1);   /* the sun/moon glides slowly across */
}
html.night .sw-knob { transform: translateX(144px); }
.sw-sun, .sw-moon { position: absolute; inset: 0; border-radius: 50%; transition: opacity 1s ease; }
.sw-sun {
  background: radial-gradient(circle at 38% 34%, #ffd35c, #f2b71c 68%);
  box-shadow: 0 0 14px 2px rgba(242, 183, 28, 0.65), inset 0 -2px 4px rgba(160, 105, 10, 0.35);
  opacity: 1; animation: swSunBreathe 3.6s ease-in-out infinite alternate;
}
html.night .sw-sun { opacity: 0; }
@keyframes swSunBreathe {
  from { box-shadow: 0 0 10px 1px rgba(242, 183, 28, 0.5), inset 0 -2px 4px rgba(160, 105, 10, 0.35); }
  to   { box-shadow: 0 0 18px 4px rgba(242, 183, 28, 0.8), inset 0 -2px 4px rgba(160, 105, 10, 0.35); }
}
.sw-moon { background: radial-gradient(circle at 40% 35%, #dfe3ea, #b9bfca 70%); box-shadow: 0 0 12px 1px rgba(200, 210, 230, 0.35), inset 0 -2px 4px rgba(70, 76, 92, 0.4); opacity: 0; }
html.night .sw-moon { opacity: 1; animation: swMoonBreathe 4.4s ease-in-out infinite alternate; }
@keyframes swMoonBreathe {
  from { box-shadow: 0 0 8px 1px rgba(200, 210, 230, 0.25), inset 0 -2px 4px rgba(70, 76, 92, 0.4); }
  to   { box-shadow: 0 0 15px 3px rgba(200, 210, 230, 0.5), inset 0 -2px 4px rgba(70, 76, 92, 0.4); }
}
.sw-moon i { position: absolute; border-radius: 50%; background: #9aa1af; box-shadow: inset 0 1px 2px rgba(60, 66, 80, 0.55); }
.swm-c1 { width: 11px; height: 11px; left: 7px; top: 8px; }
.swm-c2 { width: 7px; height: 7px; right: 7px; top: 17px; }
.swm-c3 { width: 5px; height: 5px; left: 16px; bottom: 5px; }
/* the little hint label next to the switch (visible until first use) */


body.portal-immersed .night-cta, body.tunnel-immersed .night-cta { opacity: 0 !important; pointer-events: none !important; transition: opacity 0.45s ease; }
@media (max-width: 640px) {
  .night-cta.nc-switch { right: 12px; left: auto; bottom: 72px; width: 172px; height: 42px; }
  .sw-knob { width: 32px; height: 32px; top: 5px; }
  html.night .sw-knob { transform: translateX(130px); }
  .sw-label { font-size: 0.72rem; }
  .sw-label-day { left: 44px; }
  .sw-label-night { right: 44px; }
}
@media (prefers-reduced-motion: reduce) { .sw-cloud, .sw-star, .sw-sun, html.night .sw-moon { animation: none; } }
/* Touch devices (phones/tablets): stop the perpetual box-shadow "breathing" + cloud/star
   ambient animations on the two fixed pills — on budget Android GPUs their per-frame repaint
   inside a rounded, clipped, fixed layer is what makes the buttons strobe/τρεμοπαίζει.
   The buttons stay fully functional (knob slides, labels swap, pulse ring is just static). */
@media (pointer: coarse) {
  .sw-cloud, .sw-star, .sw-sun, html.night .sw-moon { animation: none !important; }
  .sound-cta { animation: none !important; }
}

/* --- ΤΟ ΒΡΑΔΙΑΣΜΑ — a twilight veil that slowly falls when you flip the switch, so the
       change day↔night is a gentle dusk, not an instant jump (night.js drives it) --- */
.dusk-veil {
  position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 100% at 50% 18%, #24344e 0%, #131d2e 55%, #0b1119 100%);
  transition: opacity 0.85s ease;
}
.dusk-veil.on { opacity: 0.95; }
@media (prefers-reduced-motion: reduce) { .dusk-veil { display: none; } }

/* ============ ΑΝΟΙΞΕ ΤΙΣ ΠΟΡΤΕΣ — the church pilgrimage (church.js arms it) ============ */
html.js #church.church-armed { height: 520vh; padding: 0; display: block; }
@media (max-width: 900px) { html.js #church.church-armed { height: 420vh; } }
html.js #church.church-armed .container { display: none; }
.church-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #0b0704; }
.church-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.church-title {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 13vh; gap: 12px; text-align: center;
  /* white text over the 3D scene → a soft dark halo keeps it legible on both the blue sky and the green hill */
  text-shadow: 0 2px 16px rgba(8, 16, 24, 0.6), 0 1px 3px rgba(8, 16, 24, 0.55);
}
.church-title .ct-eyebrow { font-size: 0.78rem; letter-spacing: 0.34em; text-transform: uppercase; color: #f4efe3; font-weight: 700; }
.church-title .ct-head { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.2rem, 5vw, 4rem); color: #fbf8f1; line-height: 1.05; }
.church-title .ct-hint { font-size: 0.92rem; color: #eef1ea; }
/* --- inside: the iconostasis --- */
.church-interior {
  position: absolute; inset: 0; z-index: 3; opacity: 0; visibility: hidden;
  /* the REAL interior photo behind (drop it at images/Ο ΑΓΙΟΣ ΝΙΚΟΛΑΟΣ/interior.jpg) with a dark
     candle-lit wash for legibility; if the file is missing, the gradient wash alone still works */
  background:
    radial-gradient(120% 95% at 50% 82%, rgba(42, 26, 9, 0.72) 0%, rgba(23, 15, 6, 0.8) 55%, rgba(11, 7, 4, 0.9) 100%),
    url("images/Ο ΑΓΙΟΣ ΝΙΚΟΛΑΟΣ/interior.jpg") center / cover no-repeat,
    #0b0704;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  will-change: opacity, transform;
}
.iconostasis {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end;
  gap: 26px 22px; max-width: 1260px; padding: 34px 26px;
}
.icon-cell { display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; }
.icon {
  width: clamp(140px, 15.5vw, 192px); aspect-ratio: 3 / 4; margin: 0;
  border-radius: 999px 999px 10px 10px / 46% 46% 10px 10px; overflow: hidden;
  border: 3px solid #c89233; box-shadow: 0 0 0 2px #6f5117, 0 16px 34px rgba(0, 0, 0, 0.65);
  filter: brightness(0.18) saturate(0.5); transition: filter 1.1s ease, box-shadow 1.1s ease;
  background: #0e0a05;
}
.icon img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.icon-cell.lit .icon { filter: brightness(1) saturate(1); box-shadow: 0 0 0 2px #6f5117, 0 16px 34px rgba(0, 0, 0, 0.65), 0 0 34px rgba(255, 196, 106, 0.22); }
/* the candle under each icon */
.candle { position: relative; width: 5px; height: 24px; border-radius: 2.5px; background: linear-gradient(#f2e6cd, #d4c39e); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); }
.flame {
  position: absolute; left: 50%; top: -12px; width: 8px; height: 13px; transform: translateX(-50%);
  background: radial-gradient(circle at 50% 72%, #fff0b8 0%, #ffcf6a 40%, #f7961b 68%, rgba(247, 150, 27, 0) 88%);
  border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%;
  opacity: 0; transition: opacity 0.5s ease;
}
.icon-cell.lit .flame { opacity: 1; animation: candleFlick 0.34s ease-in-out infinite alternate; }
.icon-cell.lit .candle::after {
  content: ""; position: absolute; left: 50%; top: -22px; width: 56px; height: 56px; border-radius: 50%;
  transform: translate(-50%, -30%); pointer-events: none;
  background: radial-gradient(circle, rgba(255, 205, 120, 0.30) 0%, rgba(255, 205, 120, 0.1) 45%, transparent 70%);
}
@keyframes candleFlick {
  from { transform: translateX(-50%) scale(1) rotate(-3.5deg); }
  to   { transform: translateX(-54%) scale(1.14) rotate(3.5deg); }
}
@media (max-width: 700px) { .iconostasis { gap: 14px 10px; padding: 20px 12px; } .icon { width: clamp(74px, 21vw, 96px); border-width: 2px; } .candle { height: 18px; } }
@media (max-height: 820px) and (min-width: 701px) { .icon { width: clamp(118px, 12.5vw, 156px); } .iconostasis { gap: 20px 18px; } }

/* ============ EVENTS ============ */
.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 30px; }
.events-grid { display: block; margin-top: 30px; }
.event-card {
  background: transparent; border-radius: 0; padding: 28px 0;
  border-top: 1px solid var(--hair); display: flex; gap: 32px; align-items: baseline;
  transition: transform 0.4s var(--ease);
}
.event-card:last-child { border-bottom: 1px solid var(--hair); }
body:not(.no-enhance) .event-card:hover { transform: translateX(8px); }
.event-date {
  flex-shrink: 0; width: clamp(90px, 12vw, 150px);
  display: flex; flex-direction: column; align-items: flex-start; line-height: 0.9;
}
.event-day { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 800; font-family: var(--font-display); line-height: 0.9; color: var(--green-900); letter-spacing: -0.03em; }
.event-month { font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass-text); font-weight: 700; margin-top: 6px; }
.event-info { padding-top: 6px; }
.event-info h4 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin-bottom: 6px; }
.event-info p { color: var(--ink-soft); font-size: 1rem; max-width: 60ch; }
body:not(.no-enhance) .event-card:hover .event-day { color: var(--terracotta); }

/* ============ ΤΑ ΠΑΠΠΙΩΤΙΚΑ 2026 — "editorial-calendar": a compact 2-col programme ============ */
/* header: printed-programme masthead with a CSS-only contour-peak crest (altitude/mountain motif) */
#events .container { position: relative; }
#events .container::before {
  content: ""; display: block;
  width: clamp(48px, 7vw, 74px); height: clamp(22px, 3vw, 30px);
  margin: 0 auto clamp(14px, 2.2vw, 22px);
  background:
    linear-gradient(var(--gold) 0 100%) 50% 0 / 2px 42% no-repeat,
    repeating-linear-gradient(var(--hair) 0 1px, transparent 1px 5px);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  opacity: 0.85;
}
#events .section-eyebrow { display: flex; justify-content: center; align-items: center; gap: 16px; color: var(--brass-text); }
#events .section-eyebrow::before, #events .section-eyebrow::after {
  content: ""; height: 1px; width: clamp(24px, 5vw, 54px); background: var(--hair); flex: 0 0 auto;
}
#events .section-lead { max-width: 60ch; text-align: center; margin-left: auto; margin-right: auto; }
.prog-range {
  display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  max-width: 640px; margin: clamp(18px, 2.4vw, 26px) auto 0; padding-top: 14px; border-top: 1px solid var(--hair);
  font-family: var(--font-instrument); color: var(--ink-soft);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem); letter-spacing: 0.02em;
}
.prog-range span:first-child { color: var(--brass-text); }
.prog-range .prog-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--brass-text); opacity: 0.7; }
.prog-range::after {   /* small rotated-square brass diamond — a printed-programme ornament */
  content: ""; width: 7px; height: 7px; margin-left: 4px;
  border: 1px solid var(--brass-text); transform: rotate(45deg); opacity: 0.55;
}

/* the calendar grid: cells joined by one internal hairline system (no gaps, no shadows = compact & quiet) */
.program {
  margin-top: clamp(34px, 5vw, 54px); text-align: left;
  display: grid; grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--hair); border-radius: var(--radius); overflow: hidden;
}
.prog-aside { text-align: left; }
.prog-day {
  display: flex; flex-direction: column; padding: clamp(22px, 2.8vw, 34px);
  border-top: 1px solid var(--hair); border-left: 1px solid var(--hair);
  transition: background 0.4s var(--ease);
}
.prog-day:nth-child(1), .prog-day:nth-child(2) { border-top: 0; }   /* top row */
.prog-day:nth-child(odd) { border-left: 0; }                        /* left column */
body:not(.no-enhance) .prog-day:hover { background: rgba(200, 146, 51, 0.06); }

/* the date is the hero: oversized serif number, brass weekday, quiet month */
.prog-date { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.prog-num {
  grid-row: 1 / span 2; grid-column: 1;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3rem, 6vw, 4.9rem); line-height: 0.82; color: var(--green-900); letter-spacing: -0.03em;
}
.prog-dow {
  grid-column: 2; grid-row: 1; align-self: end;
  font-family: var(--font-body); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 0.72rem; color: var(--brass-text);
}
.prog-mon {
  grid-column: 2; grid-row: 2; align-self: start; margin-top: 4px;
  font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 0.64rem; color: var(--ink-soft);
}

/* the day's activities, under a hairline divider */
.prog-items {
  display: flex; flex-direction: column; gap: clamp(16px, 2vw, 22px);
  margin-top: clamp(18px, 2.4vw, 24px); padding-top: clamp(18px, 2.4vw, 24px); border-top: 1px solid var(--hair);
}
.prog-item { display: grid; grid-template-columns: max-content 1fr; gap: 16px; align-items: baseline; }
.prog-time {
  min-width: 46px; font-family: var(--font-instrument); font-size: 0.9rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--terracotta); white-space: nowrap;
}
.prog-item h4 { font-family: var(--font-display); font-size: clamp(1.12rem, 1.8vw, 1.42rem); margin-bottom: 5px; line-height: 1.22; color: var(--ink); }
.prog-item p { color: var(--ink-soft); font-size: 0.95rem; max-width: 46ch; line-height: 1.55; }

/* Δεκαπενταύγουστος (15): the festival's peak, highlighted with restraint */
.prog-day.prog-feast { background: rgba(176, 84, 51, 0.06); box-shadow: inset 0 2px 0 0 var(--terracotta); }
body:not(.no-enhance) .prog-day.prog-feast:hover { background: rgba(176, 84, 51, 0.09); }
.prog-day.prog-feast .prog-num { color: var(--terracotta); }
.prog-day.prog-feast .prog-items { border-top-color: rgba(176, 84, 51, 0.42); }

/* parallel exhibitions + the tsipouro announcement (below) */
.prog-aside { margin-top: 54px; display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.prog-exhib h3, .prog-note h3 { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.85rem); color: var(--green-900); margin-bottom: 16px; }
.prog-exhib ul { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
.prog-exhib li { position: relative; padding-left: 22px; color: var(--ink-soft); font-size: 0.97rem; line-height: 1.5; max-width: 60ch; }
.prog-exhib li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brass-text); }
.prog-note { background: rgba(200, 146, 51, 0.08); border: 1px solid var(--hair); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); }
.prog-note-tag { display: inline-block; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.7rem; font-weight: 700; color: var(--brass-text); margin-bottom: 12px; }
.prog-note p { color: var(--ink); font-family: var(--font-display); font-size: 1.14rem; line-height: 1.5; }
.prog-support { margin-top: 42px; text-align: center; color: var(--ink-soft); font-style: italic; font-family: var(--font-display); font-size: 0.98rem; max-width: 70ch; margin-left: auto; margin-right: auto; }

@media (max-width: 720px) { .prog-aside { grid-template-columns: 1fr; gap: 34px; } }
@media (max-width: 640px) {
  .program { grid-template-columns: 1fr; }
  .prog-day { border-left: 0; border-top: 1px solid var(--hair); }
  .prog-day:nth-child(1) { border-top: 0; }
  .prog-day:nth-child(2) { border-top: 1px solid var(--hair); }
  .prog-num { font-size: clamp(2.8rem, 12vw, 3.6rem); }
  .prog-item { grid-template-columns: max-content 1fr; gap: 12px; }
  #events .section-eyebrow::before, #events .section-eyebrow::after { width: clamp(16px, 8vw, 32px); }
}

/* ============ CONTACT — THE ARRIVAL ============ */
.section-arrival { padding-bottom: 200px; overflow: hidden; }
.village-silhouette {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%;
  height: var(--vill-h);   /* proportional to the width so the roofline is NEVER cropped on wide screens */
  z-index: 1; opacity: 0.92;
}
/* literal dark greens — the silhouette must STAY dark in night mode too (vars would flip it light) */
.village-silhouette .house { fill: #213f2a; }
.village-silhouette .church { fill: #14241c; }
html.night .village-silhouette .house { fill: #15242c; }
html.night .village-silhouette .church { fill: #0f1a21; }
.church-cross { fill: var(--gold); }
.window-rect { fill: var(--lamp); transition: opacity 0.7s ease; }   /* lit by default (no-enhance safe) */
body.enhanced .window-rect { opacity: 0; }          /* JS lights them one by one */
html.night .window-rect { fill: #ffd27a; }

/* ===== ΤΟ ΧΩΡΙΟ ΖΕΙ — the living silhouette (village-live.js builds these) ===== */
.v-backrow polygon, .v-backrow path { fill: #38553f; opacity: 0.55; }
html.night .v-backrow polygon, html.night .v-backrow path { fill: #1c2c37; opacity: 0.6; }
.v-smoke .v-puff { fill: #c3cdbf; opacity: 0; animation: vPuff 6.2s ease-out infinite; }
.v-smoke .v-puff:nth-child(2) { animation-delay: 2.1s; animation-duration: 6.8s; }
.v-smoke .v-puff:nth-child(3) { animation-delay: 4.2s; animation-duration: 7.5s; }
html.night .v-smoke .v-puff { fill: #aebfd2; }
@keyframes vPuff {
  0%   { transform: translate(0, 0) scale(0.5); opacity: 0; }
  14%  { opacity: 0.34; }
  100% { transform: translate(9px, -46px) scale(1.8); opacity: 0; }
}
.v-arch { fill: #0d1811; }
.village-silhouette .house.hh { fill: #2a4a33; }
html.night .village-silhouette .house.hh { fill: #1a2b35; }
.v-tree path, .v-tree circle { fill: #1a3626; }
html.night .v-tree path, html.night .v-tree circle { fill: #111f29; }
.v-wire { fill: none; stroke: #2c4635; stroke-width: 1.6; opacity: 0.8; }
html.night .v-wire { stroke: #1b2b36; }
.v-perch { fill: #16281c; }
html.night .v-perch { fill: #0d161d; }
.v-bell { fill: #caa24a; stroke: #caa24a; transform-box: fill-box; transform-origin: 50% 0; animation: vBell 3.8s ease-in-out infinite alternate; }
@keyframes vBell { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.v-stars { display: none; }
html.night .v-stars { display: block; }
.v-star { fill: #eef2fa; animation: vTwinkle 3s ease-in-out infinite alternate; }
@keyframes vTwinkle { from { opacity: 0.15; } to { opacity: 0.9; } }
.v-cat { fill: #101c14; stroke: #101c14; }
html.night .v-cat { fill: #0a1410; stroke: #0a1410; }
.v-birds path { stroke: #2c4635; stroke-width: 2; stroke-linecap: round; }
html.night .v-birds { display: none; }              /* the birds sleep at night */
/* the dusk horizon + the setting sun / rising moon + window-light pools */
.v-sky-day { display: block; }
html.night .v-sky-day { display: none; }
.v-sky-night { display: none; }
html.night .v-sky-night { display: block; }
.v-sun { fill: #f5b93e; }
.v-sun-halo { fill: #f5b93e; opacity: 0.2; }
html.night .v-sun { fill: #e9edf5; }
html.night .v-sun-halo { fill: #c9d6ee; opacity: 0.16; }
.v-pool { fill: #ffcf7d; opacity: 0; transition: opacity 1.2s ease; }
html.night .v-pool { opacity: 0.3; animation: vPool 3.2s ease-in-out infinite alternate; }
@keyframes vPool { from { opacity: 0.2; } to { opacity: 0.38; } }
@media (prefers-reduced-motion: reduce) { html.night .v-pool { animation: none; opacity: 0.26; } }
@media (prefers-reduced-motion: reduce) {
  .v-puff, .v-bell, .v-star { animation: none; }
  .v-puff { opacity: 0.22; }
}
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 44px; margin-top: 40px; }
.arrival-line { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--green-700); margin-bottom: 20px; }
.contact-card {
  background: transparent; border-radius: 0; padding: 28px 0 0; text-align: center;
  border-top: 1px solid var(--hair); transition: transform 0.4s var(--ease);
  display: flex; flex-direction: column;   /* push each button to the card bottom → all 3 buttons align in one row */
}
.contact-card .btn { margin-top: auto; align-self: center; }
body:not(.no-enhance) .contact-card:hover { transform: translateX(6px); }
.contact-icon { display: none; }
.contact-card h4 { font-size: 1.5rem; margin-bottom: 10px; }
.contact-card p { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 20px; }

/* ============ FOOTER — DUSK ============ */
.site-footer { position: relative; background: var(--dusk); color: var(--cream); padding: 56px 0; overflow: hidden; z-index: 2; }
.footer-bloom {
  position: absolute; left: 50%; top: 35%; width: 520px; height: 520px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(240, 217, 138, 0.42) 0%, rgba(240, 217, 138, 0) 68%);
  opacity: 0; pointer-events: none;
}
.footer-signoff {
  position: relative; z-index: 2; text-align: center;
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.4rem); color: var(--cream); letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; position: relative; z-index: 2; border-top: 1px solid rgba(245,240,228,0.14); padding-top: 22px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.35rem; color: var(--cream); }
.footer-brand .brand-mark { width: 38px; height: 38px; font-size: 1.3rem; }
.footer-copy { font-size: 0.88rem; color: rgba(247, 244, 236, 0.72); }
.footer-top { color: var(--gold-soft); font-weight: 600; font-size: 0.9rem; }
.footer-top:hover { color: var(--white); }

/* ============ GALLERY LIGHTBOX ============ */
.lightbox { position: fixed; inset: 0; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(20, 30, 22, 0.93); }
.lightbox.open { display: flex; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-figure img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.lb-figure figcaption { font-family: var(--font-instrument); color: #f5f0e4; letter-spacing: 0.1em; font-size: 0.9rem; }
.lb-close, .lb-prev, .lb-next { position: absolute; background: none; border: none; color: #f5f0e4; cursor: pointer; font-family: var(--font-display); line-height: 1; opacity: 0.7; transition: opacity 0.2s ease; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 22px; right: 30px; font-size: 2.6rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 3.4rem; padding: 0 18px; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
@media (max-width: 600px) { .lb-prev, .lb-next { font-size: 2.2rem; padding: 0 8px; } }

/* ============ POPULATION CHART (history · today) ============ */
.pop-chart { width: 100%; max-width: 46ch; margin-top: 24px; }
.pop-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.pop-axis { stroke: var(--hair); stroke-width: 1; }
.pop-area { fill: var(--terracotta); opacity: 0.08; }
.pop-line { fill: none; stroke: var(--terracotta); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pop-dot { fill: var(--cream); stroke: var(--terracotta); stroke-width: 2; cursor: pointer; transition: r 0.2s var(--ease), fill 0.2s var(--ease); }
.pop-dot:hover, .pop-dot:focus { fill: var(--terracotta); r: 5; outline: none; }
.pop-val { font-family: var(--font-instrument); font-size: 10px; fill: var(--brass-text); }
.pop-yr { font-family: var(--font-instrument); font-size: 9px; fill: var(--ink-soft); letter-spacing: 0.04em; }
.pop-dot, .pop-val { opacity: 0; transition: opacity 0.5s var(--ease) 0.7s, r 0.2s var(--ease), fill 0.2s var(--ease); }
.pop-chart.in .pop-dot, .pop-chart.in .pop-val { opacity: 1; }

/* ============ CONTACT — MAP + VILLAGE CLOCK ============ */
.village-clock { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 14px; }
.village-clock .clock-time { font-family: var(--font-instrument); color: var(--brass-text); letter-spacing: 0.08em; }

/* A quiet maker's credit, last thing before the village silhouette closes the page.
   Vars (not literals) so it flips correctly in night mode with the rest of the section. */
.site-credit {
  margin-top: clamp(44px, 6vh, 72px); text-align: center;
  font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--ink-soft); opacity: 0.8;
}
.site-credit a {
  color: var(--brass-text); text-decoration: none; margin-left: 4px;
  border-bottom: 1px solid rgba(122, 92, 28, 0.35); padding-bottom: 1px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.site-credit a:hover, .site-credit a:focus-visible { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.site-credit .credit-sep { margin: 0 7px; opacity: 0.45; }
.site-credit a.credit-secondary { font-size: 0.94em; opacity: 0.85; }

/* ============ BEFORE / AFTER (winter ↔ summer) ============ */
.ba { position: relative; width: 100%; max-width: 1100px; margin: 44px auto 0; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); --pos: 50%; user-select: none; cursor: ew-resize; touch-action: pan-y; }   /* vertical scroll passes through on touch */
/* aspect-ratio is unknown below iOS 15 / Chrome 88 → the all-absolute children give .ba no height and both photos vanish. Give it height the old way when aspect-ratio is unsupported. */
@supports not (aspect-ratio: 1 / 1) { .ba { height: 0; padding-bottom: 56.25%; } }
.ba .ba-img { position: absolute; inset: 0; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-before { position: absolute; inset: 0; top: 0; right: 0; bottom: 0; left: 0; -webkit-clip-path: inset(0 calc(100% - var(--pos)) 0 0); clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-divider { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #f5f0e4; transform: translateX(-1px); pointer-events: none; box-shadow: 0 0 0 1px rgba(27,36,48,0.25); }
.ba-grip { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #f5f0e4; border: 2px solid var(--gold); box-shadow: var(--shadow); }
.ba-tag { position: absolute; bottom: 14px; z-index: 2; font-family: var(--font-instrument); font-size: 0.78rem; letter-spacing: 0.1em; color: #f5f0e4; background: rgba(27,36,48,0.62); padding: 5px 12px; border-radius: 999px; }
.ba-weather { position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; }
.ba-tag-l { left: 14px; } .ba-tag-r { right: 14px; }
.ba:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 3px; }

/* ============ GALLERY SEASON FILTERS ============ */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.g-chip { font-family: var(--font-body); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); background: transparent; border: 1px solid var(--hair); border-radius: 999px; padding: 7px 15px; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.g-chip:hover { color: var(--green-900); }
.g-chip.active { background: var(--green-900); color: var(--cream); border-color: var(--green-900); }
.gallery-item.g-hidden, .season-group.g-hidden { display: none !important; }

/* ============ AMBIENT SOUND — "Άκου την Πάππα" CTA ============ */
.sound-cta {
  position: fixed; right: 20px; bottom: 20px; z-index: 150;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 17px 10px 14px; border-radius: 999px;
  background: var(--cream); color: var(--green-900);
  border: 1px solid rgba(200, 155, 60, 0.5);
  box-shadow: 0 8px 24px rgba(20, 36, 28, 0.22);
  font-family: var(--font-body); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  animation: soundPulse 2.8s ease-out infinite;   /* draws the eye while off */
  /* mobile anti-flicker: stable compositor layer + no tap-highlight flash
     (no overflow/contain here — that would clip the outward pulse ring on desktop) */
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.sound-cta:hover { transform: translateY(-2px) translateZ(0); box-shadow: 0 12px 30px rgba(20, 36, 28, 0.30); }
.sound-cta.on { background: var(--green-900); color: var(--cream); border-color: var(--green-900); animation: none; }
@keyframes soundPulse {
  0%   { box-shadow: 0 8px 24px rgba(20,36,28,0.22), 0 0 0 0 rgba(200,155,60,0.55); }
  70%, 100% { box-shadow: 0 8px 24px rgba(20,36,28,0.22), 0 0 0 15px rgba(200,155,60,0); }
}
.sound-cta-icon { display: inline-flex; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.eq i { width: 2.6px; height: 5px; background: currentColor; border-radius: 2px; }
.sound-cta.on .eq i { animation: eqBounce 0.9s ease-in-out infinite; }
.sound-cta.on .eq i:nth-child(2) { animation-delay: .15s; }
.sound-cta.on .eq i:nth-child(3) { animation-delay: .3s; }
.sound-cta.on .eq i:nth-child(4) { animation-delay: .45s; }
@keyframes eqBounce { 0%, 100% { height: 5px; } 50% { height: 15px; } }
.sound-cta .lbl-on { display: none; }
.sound-cta.on .lbl-off { display: none; }
.sound-cta.on .lbl-on { display: inline; }

/* ============ Η ΚΑΤΑΒΑΣΗ — 3D descent section ============ */
.descent-section { position: relative; height: 240vh; background: var(--page-bg); }
.descent-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.descent-canvas { position: absolute; inset: 0; display: block; z-index: 0; }
.descent-hud {
  position: absolute; z-index: 2; left: 0; right: 0; top: clamp(96px, 15vh, 168px);
  text-align: center; pointer-events: none; padding: 0 20px;
  text-shadow: 0 1px 20px rgba(245, 240, 228, 0.75);
}
.descent-eyebrow { text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.78rem; font-weight: 700; color: var(--brass-text); margin-bottom: 14px; }
.descent-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.04; color: var(--green-900); margin: 0 0 16px;
}
.descent-alt { font-family: var(--font-instrument); line-height: 1; color: var(--brass-text); font-variant-numeric: tabular-nums; font-size: clamp(3rem, 8vw, 5.6rem); }
.descent-alt-u { font-size: 0.4em; margin-left: 0.08em; }
.descent-hint { margin-top: 22px; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); transition: opacity 0.4s ease; }
/* over the 3D terrain the text must read on GREEN: light text + a dark halo so it's legible on both the green hills AND the cream sky */
.descent-gl-on .descent-hud { color: #f5f0e4; text-shadow: 0 1px 2px rgba(6, 14, 10, 0.78), 0 2px 14px rgba(6, 14, 10, 0.55), 0 0 28px rgba(6, 14, 10, 0.42); }
.descent-gl-on .descent-title { color: #f5f0e4; }
.descent-gl-on .descent-eyebrow { color: var(--gold-soft); }
.descent-gl-on .descent-alt { color: var(--gold-soft); }
.descent-gl-on .descent-hint { color: rgba(245, 240, 228, 0.9); }

/* Fallback (no WebGL / reduced motion): a calm static alpine gradient, no long scroll */
.descent-section.descent-fallback { height: auto; }
.descent-section.descent-fallback .descent-stage {
  position: relative; height: auto; min-height: 78vh; display: grid; place-items: center;
  background: linear-gradient(180deg, #cdd9e6 0%, #b7c2ac 42%, #5c8a55 74%, #2f5236 100%);
}
.descent-section.descent-fallback .descent-hud { position: static; text-shadow: none; }

/* ============ ΑΤΕΛΕΙΩΤΗ ΜΝΗΜΗ — draggable photo ribbon ============ */
.memories-section { padding-bottom: clamp(60px, 9vh, 110px); overflow: hidden; }
.memories-section .container { text-align: center; }
.memories-section .section-eyebrow { margin-left: auto; margin-right: auto; }

/* Centre the section headers (eyebrow + title + lead) for consistency across the site */
#seasons .section-eyebrow, #seasons .container > h2, #seasons .section-lead,
#events .section-eyebrow, #events .container > h2,
#gallery .section-eyebrow, #gallery .container > h2, #gallery .section-lead { text-align: center; }
#seasons .section-eyebrow, #seasons .section-lead,
#events .section-eyebrow,
#gallery .section-eyebrow, #gallery .section-lead { margin-left: auto; margin-right: auto; }
#gallery .gallery-filters { justify-content: center; }

/* #events: bring the title closer to the list + centre the content (each event a centred column) */
#events .container > h2 { margin-bottom: 14px; }
#events .events-grid { margin-top: 6px; max-width: 720px; margin-left: auto; margin-right: auto; }
#events .event-card { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 22px 0; }
#events .event-date { width: auto; align-items: center; }
#events .event-info { padding-top: 0; }
#events .event-info h4 { margin-bottom: 4px; }
#events .event-info p { max-width: 56ch; margin-left: auto; margin-right: auto; }
body:not(.no-enhance) #events .event-card:hover { transform: translateY(-4px); }
#events .section-note { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }

/* #contact: centre the header (eyebrow + title + lead) too */
#contact .section-eyebrow, #contact .container > h2, #contact .arrival-line { text-align: center; }
#contact .section-eyebrow, #contact .arrival-line { margin-left: auto; margin-right: auto; }

.memories-stage { position: relative; height: clamp(420px, 56vh, 580px); margin-top: 10px; overflow: hidden; cursor: grab; touch-action: pan-y; }
.memories-stage.grabbing { cursor: grabbing; }
.memories-canvas { position: absolute; inset: 0; display: block; }
/* fallback (no WebGL / reduced motion): a horizontally swipeable photo strip */
.memories-strip { display: flex; gap: 18px; height: 100%; align-items: center; overflow-x: auto; padding: 0 clamp(20px, 5vw, 70px); scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.memories-strip::-webkit-scrollbar { display: none; }
.memories-strip img { height: clamp(260px, 70%, 480px); width: auto; flex: 0 0 auto; border-radius: 14px; object-fit: cover; box-shadow: 0 16px 38px rgba(20, 36, 28, 0.22); border: 1px solid rgba(200, 155, 60, 0.45); scroll-snap-align: center; }
.memories-gl-on .memories-strip { display: none; }
/* drag affordance — a brass pill that fades on first interaction */
.memories-hint {
  position: absolute; z-index: 3; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 999px;
  background: rgba(245, 240, 228, 0.92); color: var(--brass-text);
  border: 1px solid rgba(200, 155, 60, 0.5); box-shadow: 0 6px 18px rgba(20, 36, 28, 0.18);
  font-family: var(--font-body); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  pointer-events: none; transition: opacity 0.5s ease;
}
.memories-hint .mem-arrow { font-size: 1.1em; animation: memNudge 2.4s ease-in-out infinite; }
html.night .memories-hint { background: rgba(18, 30, 24, 0.92); border-color: rgba(230, 196, 120, 0.4); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
@keyframes memNudge { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
.memories-stage.dragged .memories-hint { opacity: 0; }

/* ===== obys-style tilted 360° carousel ring (works everywhere, incl. file://) ===== */
.memories-stage { perspective: 880px; perspective-origin: 50% 50%; }
.ribbon-track { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; will-change: transform; }
.ribbon-card {
  position: absolute; top: 50%; left: 50%; pointer-events: auto;
  width: clamp(225px, 25vw, 360px); height: clamp(290px, 32vw, 470px);
  margin: 0; padding: 0; background: none; cursor: pointer;
  border-radius: 14px; overflow: hidden; will-change: transform, opacity;
  box-shadow: 0 24px 56px rgba(20, 36, 28, 0.30);
  border: 1px solid rgba(200, 155, 60, 0.4); backface-visibility: visible;
}
.ribbon-card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; filter: grayscale(0.18) brightness(0.97); transition: filter 0.5s ease; }
.ribbon-card:hover img { filter: none; }
.ribbon-on .memories-strip { display: none; }
.memories-stage.grabbing, .memories-stage.grabbing .ribbon-card { cursor: grabbing; }

.ribbon-lb { position: fixed; inset: 0; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000; display: none; place-items: center; background: rgba(13, 22, 16, 0.93); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 5vh 5vw; }
.ribbon-lb.open { display: grid; }
.ribbon-lb img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55); }
.ribbon-lb-close { position: fixed; top: 22px; right: 26px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(245, 240, 228, 0.4); background: rgba(245, 240, 228, 0.12); color: #f5f0e4; font-size: 1.7rem; line-height: 1; cursor: pointer; }

/* ============ FULL-PAGE SNAP PANELS (desktop only; mobile keeps natural flow) ============ */
@media (min-width: 901px) {
  .panel { min-height: 100vh; min-height: 100svh; position: relative; }
  .panel:not(.era) { display: flex; flex-direction: column; justify-content: center; }
  /* Eras are now full-bleed cinematic chapters (styled in the base .era rules above) */

  /* Content sections start at the SAME offset from the top → uniform gaps section-to-section
     (flex-center made the gap depend on content height, so it looked cramped on full sections). */
  body.enhanced .section.panel { justify-content: flex-start; padding-top: clamp(104px, 13vh, 148px); padding-bottom: clamp(48px, 7vh, 88px); }
  body.enhanced #about .about-grid { align-items: stretch; }
  body.enhanced .history-section { padding: 0; }
  body.enhanced .timeline-track { margin: 0; padding: 0; max-width: none; }
  body.enhanced .era.panel { margin-bottom: 0; }
  body.enhanced #trailSvg { display: none; }
  body.enhanced .era.panel::before, body.enhanced .era.panel::after { display: none; }

  /* The mosaic becomes its own full-bleed panel */
  .panel-bleed { padding: 0; }
  .panel-bleed .about-feature { width: 100vw; margin: 0; max-height: none; height: 100svh; aspect-ratio: auto; }
  .panel-bleed .about-feature img { height: 100svh; }

  /* Gallery collapses to a single-screen 3×2 grid */
  #gallery.panel .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 920px; margin: 0 auto; }
  #gallery.panel .gallery-item { grid-column: auto; aspect-ratio: 4 / 3; }

  /* Seasons before/after lives on its own screen — keep it within the viewport */
  #seasons .ba { max-height: 50vh; margin-top: 26px; }

  /* Contact keeps room for the village silhouette */
  #contact.section.panel { padding-bottom: calc(var(--vill-h) + 30px); }

  /* «Τα Παππιώτικα» sits right before the full-bleed church scene, which has padding:0 — so it
     carries the church's missing top-padding in its own bottom-padding → the cream gap before the
     church matches every other section-to-section gap (top-pad + bottom-pad). */
  #events.section.panel { padding-bottom: calc(clamp(104px, 13vh, 148px) + clamp(48px, 7vh, 88px)); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) { .hud { right: 14px; } }

@media (max-width: 900px) {
  .hud { display: none; }                 /* altimeter rail is a desktop delight */
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .events-grid, .contact-grid { grid-template-columns: 1fr; }

  .menu-btn { display: flex; }
  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(80vw, 340px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px;
    background: var(--cream); padding: 40px 36px; box-shadow: var(--shadow-lg);
    transform: translateX(110%); transition: transform 0.45s var(--ease); z-index: 159;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { width: 100%; padding: 16px 0; border-bottom: 1px solid var(--cream-dark); font-size: 1.1rem; }
  .lang-toggle { margin-top: 20px; }
}

@media (max-width: 650px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .section { padding: 76px 0; }
  .container { padding: 0 20px; }
  .section-arrival { padding-bottom: max(160px, 22vh); }
}

/* Sticky-offset for anchor jumps (no-enhance tier) */
section[id] { scroll-margin-top: 90px; }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue-arrow, .sound-cta, .sound-cta.on .eq i, .memories-hint .mem-arrow, .era-media img { animation: none; }
  .gallery-item, .event-card, .contact-card, .btn { transition: none; }
  body.no-enhance .reveal { transition: opacity 0.4s linear; transform: none; }
}
