/* ============================================================
   DESIGN TOKENS — one warm, committed light world.
   Warmth drawn from the congregation's own materials:
   hanji-stone ground, a cool khaki-blue brand green, a persimmon
   (kaki) accent from the Kaki-Butter-Band, light motif
   from Psalm 118,24.

   Two fixed tint scales carry every color variation below —
   don't introduce new one-off color-mix() percentages:
     soft tint (14%)     — resting accent-tinted surfaces (buttons, pills)
     hover tint (24%)    — interactive fill on hover
     glow shadow (68%)   — drop shadow under a solid accent pill/button
     frosted glass (52%) — translucency of floating cards over the hero
   ============================================================ */
:root {
    --paper:      #F0EADD;
    --paper-2:    #E7DFCE;
    --paper-deep: color-mix(in srgb, var(--sage) 14%, var(--paper));
    --surface:    #FAF6EE;
    --ink:        #000000;
    --muted:      #6E6A5E;
    --white:      #FFFFFF;
    --ivory:      #F3EEE4;

    --sage:       #5C6E75;
    --sage-deep:  #414C50;
    --kaki:       #CF5A28;
    --kaki-soft:  #E17E43;

    --line:       #D8CFBD;
    --line-soft:  #E4DCCB;

    --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
    --font-sans:    'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-ko:      'Noto Sans KR', 'Noto Sans', sans-serif;
    --font-ui:      'Nunito', var(--font-sans);

    --wrap:        1140px;
    --wrap-text:   720px;
    --pad:         clamp(1.25rem, 4vw, 2.5rem);
    --section-y:   clamp(3rem, 7vw, 5.5rem);

    --radius:      14px;
    --radius-sm:   10px;
    --transition:  0.2s ease;
    --spring:      cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[lang="ko"] {
    --font-sans: 'Noto Sans KR', 'Noto Sans', sans-serif;
    /* Fraunces has no Hangul glyphs: fall back to Noto Sans KR per character
       instead of a system serif that may lack Korean entirely (□□□). */
    --font-display: 'Fraunces', 'Noto Sans KR', serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 17px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Lenis drives scroll itself — native smooth-scroll would fight it and stutter. */
html.lenis, html.lenis body { scroll-behavior: auto; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
    text-wrap: balance;
}
html[lang="ko"] h1,
html[lang="ko"] h2,
html[lang="ko"] h3,
html[lang="ko"] h4 { font-family: var(--font-ko); font-weight: 700; letter-spacing: -0.02em; word-break: keep-all; }

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; letter-spacing: 0; margin-top: 1.6em; }

p { margin: 0 0 1.2em; }
a { color: var(--kaki); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--kaki-soft); }
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
strong { font-weight: 600; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

blockquote {
    margin: 2em 0;
    padding-left: 1.2rem;
    border-left: 2px solid var(--kaki);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--ink);
}
blockquote p:last-child { margin-bottom: 0; }

hr { border: none; border-top: 1px solid var(--line); margin: 2.5em 0; }

::selection { background: var(--kaki); color: var(--white); }

:focus-visible { outline: 2px solid var(--kaki); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-family: var(--font-sans);
    font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--kaki);
}
.eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: currentColor; opacity: 0.6; }

/* ============================================================
   FRIENDLY UI — soft, cushioned interactive atoms.
   Rounded UI font + a springy press. Warmth lives in the
   controls; the layout and palette stay calm and earthy.
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 0.5em; line-height: 1;
    font-family: var(--font-ui); font-weight: 700; font-size: 0.92rem; letter-spacing: 0.01em;
    padding: 0.74em 1.45em; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
    transition: transform 0.16s var(--spring), background var(--transition), color var(--transition), box-shadow var(--transition);
}
.btn:active { transform: translateY(2px) scale(0.98); }
.btn-primary {
    background: var(--kaki); color: var(--white);
    box-shadow: 0 12px 22px -12px color-mix(in srgb, var(--kaki) 68%, transparent),
                inset 0 -2px 0 rgba(0,0,0,0.10), inset 0 2px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover { background: var(--kaki-soft); color: var(--white); transform: translateY(-2px); }
.btn-soft {
    background: color-mix(in srgb, var(--sage) 14%, var(--surface)); color: var(--sage-deep);
}
.btn-soft:hover { background: color-mix(in srgb, var(--sage) 24%, var(--surface)); transform: translateY(-2px); }
.btn-ghost {
    background: transparent; color: var(--kaki);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--kaki) 42%, transparent);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--kaki); transform: translateY(-2px); }

/* ============================================================
   NAV STRIP — a floating pill capsule straddling the seam between
   the hero (or subpage header) and the section that follows it.
   ============================================================ */
.nav-strip {
    position: relative; z-index: 5;
    height: 0; background: transparent;
}
.nav-strip-inner {
    max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad);
    display: flex; justify-content: center;
}

/* One rounded capsule holding the links; each link is its own smaller
   pill that fills in solid on hover/active — echoes .btn's friendly press.
   Pulled up by half its own height so it sits half in the header above,
   half in the content below. */
.nav-links {
    display: inline-flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 0.25rem; max-width: 100%;
    transform: translateY(-50%);
    background: color-mix(in srgb, color-mix(in srgb, var(--sage) 14%, var(--surface)) 52%, transparent);
    backdrop-filter: blur(6px);
    border: none;
    border-radius: 999px;
    padding: 0.4rem;
    box-shadow: 0 16px 32px -22px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.5);
}
.nav-links a {
    font-family: var(--font-ui); font-weight: 700; font-size: 0.88rem; letter-spacing: 0.01em;
    color: var(--sage-deep); text-decoration: none;
    padding: 0.55em 1.15em; border-radius: 999px;
    transition: color var(--transition), background var(--transition), transform 0.16s var(--spring);
}
.nav-links a:hover {
    color: var(--sage-deep); background: color-mix(in srgb, var(--sage) 24%, transparent);
    transform: translateY(-1px);
}
.nav-links a.is-active {
    color: var(--white); background: var(--sage);
    box-shadow: 0 8px 16px -10px color-mix(in srgb, var(--sage) 68%, transparent);
}
.nav-links a.is-active:hover { color: var(--white); background: var(--sage-deep); }
.nav-links a:active { transform: translateY(1px) scale(0.97); }

/* One button, not a pill-in-a-pill: .hero-lang supplies the single
   capsule, and only the text color marks which language is active. */
.lang-switch {
    display: inline-flex; align-items: center; gap: 0.4rem; line-height: 1; text-decoration: none;
    font-family: var(--font-ui); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted);
    transition: color var(--transition), transform 0.16s var(--spring);
}
.lang-switch:hover { color: var(--ink); }
.lang-switch:active { transform: scale(0.97); }
.lang-switch span { transition: color var(--transition); }
.lang-switch span.is-active { color: var(--kaki); }
.lang-switch .sep { opacity: 0.4; }

/* ============================================================
   HERO (home / showHero pages)
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(1.2rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-up { animation: none !important; } }

.page-header {
    position: relative; overflow: hidden;
    min-height: min(78vh, 740px);
    display: flex; flex-direction: column; justify-content: center;
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 9vw, 6.5rem);
    background: color-mix(in srgb, var(--kaki) 8%, color-mix(in srgb, var(--sage) 14%, var(--paper)));
}
.page-header .sun { display: none; }

/* Background video fills the hero; a light scrim keeps the dark hero text legible. */
.page-header .hero-video {
    position: absolute; inset: 0; z-index: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.page-header .hero-scrim {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: color-mix(in srgb, color-mix(in srgb, var(--kaki) 10%, var(--paper)) 68%, transparent);
}
/* Lift all foreground content above the video + scrim. */
.page-header > .wrap { position: relative; z-index: 2; }

/* The muted subline loses contrast over a video; darken it to ink there. */
.page-header:has(.hero-video) .subheadline { color: var(--ink); }

/* Language switch pinned to the hero's top-right, aligned to the content gutter. */
.page-header .hero-lang {
    position: absolute; z-index: 5;
    top: clamp(1.4rem, 3vw, 2rem);
    right: max(var(--pad), calc((100% - var(--wrap)) / 2));
    padding: 0.6rem 1.2rem;
    background: color-mix(in srgb, var(--surface) 52%, transparent);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    box-shadow: 0 10px 24px -18px rgba(0,0,0,0.4);
    backdrop-filter: blur(6px);
}

.page-header .hero-body { position: relative; max-width: 46rem; }
.page-header h1 { margin: 1rem 0 0; font-size: clamp(1.9rem, 5vw + 1rem, 4.2rem); animation: fadeUp 0.8s ease-out both; }
.page-header h1 .accent { color: var(--sage); }
.page-header .subheadline {
    margin: 1.2rem 0 0; max-width: 44ch; font-size: 1.15rem; color: var(--muted);
    animation: fadeUp 0.8s ease-out 0.12s both;
}
/* A cute little card tucked into the hero's bottom-right corner (text stays left-aligned). */
.page-header .bible-verse {
    position: absolute; z-index: 4;
    bottom: clamp(3rem, 6vw, 4.4rem);
    right: max(var(--pad), calc((100% - var(--wrap)) / 2));
    max-width: min(24rem, calc(100% - 2 * var(--pad)));
    margin: 0; padding: 1.1rem 1.35rem;
    background: color-mix(in srgb, var(--surface) 52%, transparent);
    border: 1px solid var(--line-soft);
    border-radius: 1.15rem;
    box-shadow: 0 18px 40px -28px rgba(0,0,0,0.42);
    backdrop-filter: blur(6px);
    font-size: 1rem; font-style: italic; text-align: left;
    animation: fadeUp 0.8s ease-out 0.24s both;
}
.page-header .bible-verse cite {
    display: block; margin-top: 0.6rem; font-style: normal; font-family: var(--font-sans);
    font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
/* On narrow screens drop it back into flow so it can't cover the headline.
   It shrinks to its content and only grows toward full width if the text needs it. */
@media (max-width: 720px) {
    .page-header .bible-verse {
        position: static;
        width: fit-content; max-width: calc(100% - 2 * var(--pad));
        margin: 2rem var(--pad) 0 auto;
    }
    /* The lang switch is pinned top-right; on narrow screens the
       vertically-centered headline can rise high enough to crowd it,
       so reserve clear space above the headline. */
    .page-header .hero-body { margin-top: 4.5rem; }
}
/* ============================================================
   SUBPAGE HEADER (non-hero pages)
   ============================================================ */
.subpage-header {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
    background: linear-gradient(160deg, var(--paper), var(--paper-2));
    border-bottom: 1px solid var(--line-soft);
}
.breadcrumbs {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0.9rem;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs a::after { content: '/'; margin-left: 0.5rem; opacity: 0.4; color: var(--muted); }
.breadcrumbs span { color: var(--ink); }
.subpage-header h1 { margin: 0; }

/* ============================================================
   PAGE CONTENT — layout sections / columns / blocks
   ============================================================ */
.page-content { display: flex; flex-direction: column; }

.layout-section { padding: var(--section-y) 0; background: var(--paper); }
.layout-section .container { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

.layout-section.bg-secondary { background: var(--paper); color: var(--ink); }
.layout-section.bg-primary { background: var(--sage); color: var(--white); }
.layout-section.bg-dark { background: var(--sage-deep); color: var(--ivory); }

/* readable link/heading colors on colored bands */
.layout-section.bg-primary h1, .layout-section.bg-primary h2,
.layout-section.bg-primary h3, .layout-section.bg-primary h4,
.layout-section.bg-dark h1, .layout-section.bg-dark h2,
.layout-section.bg-dark h3, .layout-section.bg-dark h4 { color: var(--white); }
.layout-section.bg-primary a, .layout-section.bg-dark a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.layout-section.bg-primary a:hover, .layout-section.bg-dark a:hover { text-decoration-color: currentColor; }
.layout-section.bg-primary .eyebrow, .layout-section.bg-dark .eyebrow { color: var(--kaki-soft); }
.layout-section.bg-primary blockquote, .layout-section.bg-dark blockquote { border-color: var(--kaki-soft); color: var(--white); }

/* Columns grow in a ~2:1 ratio from a min-width floor and wrap to their
   own full-width line as soon as both no longer fit — no hard breakpoint. */
.layout-columns {
    display: flex; flex-wrap: wrap;
    gap: clamp(1.6rem, 4vw, 3.5rem); align-items: start;
}
.layout-column { min-width: 0; }
.layout-column[style*="--span: 1/1"] { flex: 1 1 100%; }
.layout-column[style*="--span: 2/3"] { flex: 1 1 18rem; min-width: min(18rem, 100%); }
/* Capped near a third so the wide layout reads 2/3–1/3; as space tightens the
   cap releases and both even out to 1/2–1/2 before wrapping at the 18rem floor. */
.layout-column[style*="--span: 1/3"] { flex: 1 1 18rem; min-width: min(18rem, 100%); max-width: 22rem; }

/* Full-width single-column text stays comfortably readable */
.layout-column[style*="--span: 1/1"] .block-type-text { max-width: var(--wrap-text); }

/* Reversed side-by-side; when wrapped each column stacks in natural order. */
[data-order="reversed"] .layout-columns { flex-direction: row-reverse; }

.blocks { display: flex; flex-direction: column; gap: 1.2rem; height: 100%; }
.block { width: 100%; }

/* ---- Text ---- */
.block-type-text h2 { color: var(--ink); }
.block-type-text h2:first-child,
.block-type-text h3:first-child,
.block-type-text h4:first-child { margin-top: 0; }
.block-type-text p:last-child, .block-type-text ul:last-child { margin-bottom: 0; }
.block-type-text ul { list-style: none; padding-left: 0; }
.block-type-text ul li {
    position: relative; padding-left: 1.2rem; margin-bottom: 0.85em; line-height: 1.5;
}
.block-type-text ul li::before {
    content: ""; position: absolute; left: 0; top: 0.62em;
    width: 7px; height: 7px; border-radius: 50%; background: var(--kaki);
}
.block-type-text ul li strong {
    font-family: var(--font-sans); font-size: 0.82rem; letter-spacing: 0.04em;
    color: var(--kaki); font-weight: 600;
}
.layout-section.bg-primary .block-type-text ul li strong,
.layout-section.bg-dark .block-type-text ul li strong { color: var(--kaki-soft); }

/* ---- Image ---- */
.block-type-image, .block-image { height: 100%; }
.block-image { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.block-image img { width: 100%; height: 100%; min-height: 260px; max-height: 78vh; object-fit: cover; }
.block-image figcaption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 1.4rem 1rem 0.7rem; font-size: 0.7rem; letter-spacing: 0.02em; line-height: 1.4;
    color: rgba(255,255,255,0.85);
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
.block-image figcaption a { color: var(--white); text-decoration: underline; }

/* ---- Events ---- */
/* Same cute card language as .block-map: soft radius, low-slung
   shadow — but always a dark green surface with bright ivory text,
   regardless of which Hell/Dunkel/Schwarz section it sits on.
   Real content here is usually a single recurring service ("jeden
   Sonntag", no fixed date) with several time slots — not a list of
   distinct dated events — so the layout is a plain vertical agenda
   rather than a two-column date-badge/time-column split, which left
   an awkward empty gap whenever no date was set. A date chip and a
   "next up" tag still appear when a block actually holds more than
   one dated entry.
   The card's own tone shifts with the section's Hell/Dunkel/Schwarz
   background option, and Hell and Schwarz deliberately share the
   same card treatment (sage card, sage-deep pill, ivory text) even
   though their section backgrounds differ — Dunkel borrows the
   Schwarz section's own sage-deep for its card, one tick darker
   than the other two — all with bright ivory body text since the
   card itself is dark in every variant.
   The block's own title lives outside the card as a plain big
   heading (.events-heading) rather than a bar on the card itself,
   so it just picks up the ordinary h1-h4 rules — including the
   site-wide bg-primary/bg-dark "force white" override — for free,
   the same as every other block title on a colored section. */
.block-events {
    height: 100%; box-sizing: border-box; color: var(--events-ink, var(--ink));
    background: var(--surface); border-radius: var(--radius);
    box-shadow: 0 20px 40px -30px rgba(0,0,0,0.4);
    padding: 0.6rem 0.7rem;
}
.layout-section.bg-primary .block-events {
    --events-ink: var(--ivory);
    background: var(--sage-deep);
}
.layout-section.bg-secondary .block-events {
    background: var(--paper-deep);
}
.layout-section.bg-dark .block-events {
    --events-ink: var(--ivory);
    background: var(--sage);
}
/* Dunkel and Schwarz both put the card itself on a dark green, so
   their secondary text drops the usual opacity-fade there in favor
   of staying the same bright ivory as everything else on the card.
   Hell's card stays light (paper-deep), so it keeps the normal
   ink + fade treatment. */
.layout-section.bg-primary .block-events .event-desc,
.layout-section.bg-primary .block-events .time-desc,
.layout-section.bg-dark .block-events .event-desc,
.layout-section.bg-dark .block-events .time-desc { opacity: 1; }
.events-heading { font-size: clamp(1.4rem, 1.4vw + 1.1rem, 1.9rem); margin: 0 0 1rem; }

.events-list { list-style: none; margin: 0; padding: 0; }
.event-row + .event-row { margin-top: 1.3rem; padding-top: 1.3rem; border-top: 1px solid var(--line-soft); }

/* Title + description are grouped into a pill on top of the card.
   Dunkel's pill matches its own section bg (sage); Schwarz's
   matches its own section bg (sage-deep); Hell's goes light
   (plain paper) with dark sage-deep text, one tick lighter than
   its own card (paper-deep) the same way Dunkel/Schwarz's pills
   relate to their own cards. Every variant wides the pill out to
   the full row, with corners settling for --radius-sm instead of a
   true stadium pill — the same "fits the card's own silhouette"
   call made earlier for the block title bar, since a wide bar
   reads the outer radius much more literally than a small
   content-hugging pill does. */
.event-header {
    display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between;
    gap: 0.4rem 0.7rem;
    width: 100%; box-sizing: border-box;
    padding: 0.55rem 1.1rem; border-radius: var(--radius-sm);
    background: var(--sage-deep); color: var(--ivory);
    box-shadow: 0 8px 16px -10px color-mix(in srgb, var(--sage-deep) 68%, transparent);
}
.layout-section.bg-primary .block-events .event-header {
    background: var(--sage); color: var(--ivory);
    box-shadow: 0 8px 16px -10px color-mix(in srgb, var(--sage) 68%, transparent);
}
.layout-section.bg-secondary .block-events .event-header {
    background: var(--paper); color: var(--ink);
    box-shadow: 0 8px 16px -10px color-mix(in srgb, var(--sage) 68%, transparent);
}
/* A real heading (not a styled <p>) so Korean pages pick up the
   site-wide lang="ko" font/weight swap for headings automatically. */
.block-events .event-header .event-title { margin: 0; font-size: 1.22rem; color: var(--ivory); }
.layout-section.bg-secondary .block-events .event-header .event-title { color: var(--ink); }
.event-date-chip {
    font-family: var(--font-ui); font-weight: 700; font-size: 0.66rem;
    letter-spacing: 0.03em; text-transform: uppercase; color: var(--kaki);
    background: color-mix(in srgb, var(--kaki) 12%, transparent);
    padding: 0.25em 0.65em; border-radius: 999px;
}
.event-desc { font-family: var(--font-sans); font-size: 0.9rem; opacity: 0.62; margin: 0; }
.event-desc p { margin: 0; }

.event-times { list-style: none; margin: 0.85rem 0 0; padding: 0 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; }
.time-entry { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.65rem; }
.time-entry .time-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.time-entry .time-desc { font-size: 0.88rem; opacity: 0.68; }
.time-entry .time-desc p { margin: 0; }

/* ---- Timeline / History ---- */
/* Container query drives the layout off the block's own available width,
   so the same block reflows correctly whether it sits in a full-width row
   or a narrower column. Base = single left axis; wide = centered zig-zag. */
.block-timeline { height: 100%; container-type: inline-size; }
.block-timeline > h3 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 0 0 2.4rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-entry {
    position: relative; padding: 0 0 1.7rem 1.9rem;
    border-left: 2px solid color-mix(in srgb, currentColor 40%, transparent);
}
.timeline-entry:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-marker {
    /* Single-column fallback has no gutter to scatter into, so the
       jitter (tuned for the wide two-column spread) is dampened
       here to stay a subtle hand-placed wobble on the line. */
    position: absolute; left: calc(-13px + var(--marker-jitter, 0px) * 0.35); top: 0.05rem;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--sage); box-shadow: 0 0 0 6px var(--paper);
    transform: scale(var(--proximity-scale, 1));
    transition: transform 0.15s ease-out;
}
.timeline-entry:last-child .timeline-marker {
    background: var(--sage);
    box-shadow: 0 0 0 6px var(--paper), 0 0 0 9px color-mix(in srgb, var(--sage) 38%, transparent);
}
.timeline-date {
    font-family: var(--font-ui); font-weight: 700; font-size: 1.4rem;
    color: var(--ink); margin: 0 0 0.2rem; letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}
.timeline-text { font-size: 0.98rem; line-height: 1.55; opacity: 0.9; }
.timeline-text p { margin: 0; }
/* On dark section backgrounds ink/sage would vanish into the fill, so
   markers, dates and the zigzag line all swap to ivory there. */
.layout-section.bg-primary .timeline-marker,
.layout-section.bg-dark .timeline-marker { background: var(--ivory); }
.layout-section.bg-primary .timeline-marker { box-shadow: 0 0 0 6px var(--sage); }
.layout-section.bg-dark .timeline-marker { box-shadow: 0 0 0 6px var(--sage-deep); }
.layout-section.bg-primary .timeline-entry:last-child .timeline-marker { box-shadow: 0 0 0 6px var(--sage); background: var(--ivory); }
.layout-section.bg-dark .timeline-entry:last-child .timeline-marker { box-shadow: 0 0 0 6px var(--sage-deep); background: var(--ivory); }
.layout-section.bg-primary .timeline-date,
.layout-section.bg-dark .timeline-date { color: var(--ivory); }

/* Wide: entries alternate left / right around a shared centre axis —
   markers sit close to that axis (nearly a straight pinned line,
   like a hand-strung thread) rather than swinging out to each
   entry's own edge; it's the connecting arc (.timeline-zigzag) that
   does the bulging, not the marker position. The gutter between
   the two text columns grows with available width so the arcs get
   more room to bow out on wide screens. */
@container (min-width: 40rem) {
    .block-timeline > h3 { text-align: center; }
    .timeline {
        position: relative; padding-top: 0.5rem;
        --timeline-gutter: clamp(5rem, 18vw, 13rem);
    }
    .timeline-entry {
        width: calc(50% - var(--timeline-gutter) / 2); box-sizing: border-box;
        padding: 0 0 4.5rem; border-left: 0;
    }
    .timeline-entry:nth-child(odd) {
        margin-left: 0; padding-right: 4.5rem; text-align: right;
    }
    .timeline-entry:nth-child(even) {
        margin-left: calc(50% + var(--timeline-gutter) / 2); padding-left: 4.5rem; text-align: left;
    }
    .timeline-entry:last-child { padding-bottom: 0; }
    /* Markers sit near the outer edge of the gutter (not near
       centre) so they're the wave's own peaks — the curve is drawn
       straight through them with no added amplitude of its own.
       --drift (set by main.ts, a slow "floating on water" sway kept
       in sync with the connecting curve) only applies here, where
       the curve itself is visible — the narrow layout has no curve
       to stay attached to, so its marker/date/text stay put. */
    .timeline-marker {
        top: 0.1rem;
        transform: translateX(var(--drift, 0px)) scale(var(--proximity-scale, 1));
    }
    .timeline-entry:nth-child(odd) .timeline-marker { left: auto; right: calc(var(--timeline-gutter) * 0.015 + var(--marker-jitter, 0px)); }
    .timeline-entry:nth-child(even) .timeline-marker { left: calc(var(--timeline-gutter) * 0.015 + var(--marker-jitter, 0px)); right: auto; }
    .timeline-date, .timeline-text { transform: translateX(var(--drift, 0px)); transition: transform 1.4s ease-out; }
}

/* Zigzag connector: an SVG line traced straight through each
   marker's actual position (initTimeline, main.ts measures them,
   since entry heights vary with content). Drawn fully by default;
   when motion is allowed the draw is scrubbed to scroll and a
   travelling dot rides it, matching the reveal below. */
.timeline-zigzag { display: none; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
@container (min-width: 40rem) {
    .block-timeline.has-zigzag .timeline-zigzag { display: block; }
}
.timeline-zigzag .zigzag-track { fill: none; stroke: color-mix(in srgb, currentColor 16%, transparent); stroke-width: 9; stroke-linecap: round; }
.timeline-zigzag .zigzag-progress { fill: none; stroke: var(--sage); stroke-width: 9; stroke-linecap: round; }
.timeline-zigzag .zigzag-runner { display: none; fill: var(--sage); stroke: var(--paper); stroke-width: 6; }
.block-timeline.has-runner .timeline-zigzag .zigzag-runner { display: block; }
.layout-section.bg-primary .timeline-zigzag .zigzag-progress,
.layout-section.bg-dark .timeline-zigzag .zigzag-progress { stroke: var(--ivory); }
.layout-section.bg-primary .timeline-zigzag .zigzag-runner { fill: var(--ivory); stroke: var(--sage); }
.layout-section.bg-dark .timeline-zigzag .zigzag-runner { fill: var(--ivory); stroke: var(--sage-deep); }

/* Cards fade in (no rise) as the runner dot reaches their marker.
   Only the wide alternating layout runs this; reduced-motion opts
   out entirely (JS never adds .has-runner, so the plain
   fully-drawn line + list stay). Fade-only, not translateY, keeps
   this from ever nudging a marker's own measured position. */
@container (min-width: 40rem) {
    .block-timeline.has-runner .timeline-entry {
        opacity: 0;
        transition: opacity 0.55s ease;
    }
    .block-timeline.has-runner .timeline-entry.is-visible {
        opacity: 1;
    }
}

/* ---- Map ---- */
.block-map { border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 40px -30px rgba(0,0,0,0.4); }
.map-embed { min-height: 320px; aspect-ratio: 4/3; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-info {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.1rem 1.4rem; background: var(--sage-deep); color: var(--ivory);
}
.map-address { font-size: 0.9rem; line-height: 1.5; }
.map-address p { margin: 0; }
.map-link {
    flex: none; font-family: var(--font-ui); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.01em;
    color: var(--white); text-decoration: none;
    background: var(--kaki); padding: 0.6em 1.2em; border-radius: 999px;
    box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--kaki) 68%, transparent), inset 0 -2px 0 rgba(0,0,0,0.10);
    transition: transform 0.16s var(--spring), background var(--transition);
}
.map-link:hover { color: var(--white); background: var(--kaki-soft); transform: translateY(-2px); }
.map-link:active { transform: translateY(1px) scale(0.98); }

/* ---- Gallery ---- */
.block-gallery { columns: 3; column-gap: 0.6rem; }
.block-gallery figure { margin: 0 0 0.6rem; break-inside: avoid; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2); }
.block-gallery figure img { width: 100%; height: auto; display: block; }
.block-gallery-slider { display: none; position: relative; border-radius: var(--radius); overflow: hidden; }
.block-gallery-slider .embla__viewport { overflow: hidden; }
.block-gallery-slider .embla__container { display: flex; touch-action: pan-y pinch-zoom; }
.block-gallery-slider .embla__slide { flex: 0 0 100%; min-width: 0; }
.block-gallery-slider .embla__slide img { width: 100%; height: 60vh; object-fit: cover; display: block; }
.embla__dots { position: absolute; left: 0; right: 0; bottom: 1rem; display: flex; justify-content: center; gap: 0.5rem; }
.embla__dot { width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; cursor: pointer; background: rgba(255,255,255,0.5); transition: background var(--transition); }
.embla__dot.is-selected { background: var(--white); }

/* ---- Video ---- */
.block-video { border-radius: var(--radius); overflow: hidden; background: #000; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16/9; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.block-video video { width: 100%; height: auto; display: block; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 50;
    width: 2.6rem; height: 2.6rem; display: flex; align-items: center; justify-content: center;
    background: var(--sage); color: var(--white); border-radius: 50%; text-decoration: none; font-size: 1rem;
    box-shadow: 0 10px 24px -12px rgba(0,0,0,0.5);
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease, background var(--transition), transform 0.2s var(--spring);
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--kaki); color: var(--white); transform: translateY(-3px) scale(1.06); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: color-mix(in srgb, var(--paper) 78%, transparent); padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; }
.site-footer .container { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; } }
.footer-brand b { font-family: var(--font-display); font-size: 1.25rem; color: var(--paper); }
.footer-brand p { margin: 0.6rem 0 0; font-size: 0.9rem; max-width: 34ch; }
.site-footer .footer-heading { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: color-mix(in srgb, var(--paper) 55%, transparent); margin: 0 0 0.9rem; }
.footer-nav, .social-links, .footer-legal { display: flex; flex-direction: column; gap: 0.55rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: color-mix(in srgb, var(--paper) 78%, transparent); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: var(--kaki-soft); }
.social-links { flex-direction: row; gap: 1rem; }
.footer-bottom {
    margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
    font-size: 0.78rem; color: color-mix(in srgb, var(--paper) 45%, transparent);
}
.footer-legal { flex-direction: row; gap: 1.2rem; }
.footer-legal a { font-size: 0.78rem; }
.site-footer p { margin: 0; }

/* ============================================================
   SUBPAGE LANGUAGE SWITCH
   ============================================================ */
.subpage-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.subpage-header-top .breadcrumbs { margin-bottom: 0; }
.subpage-lang { flex: none; }

/* ============================================================
   EMBEDS — Google Maps / YouTube only load after consent
   (site/snippets/embed.php + assets/ts/consent.ts)
   ============================================================ */
.embed-blocked { position: relative; display: flex; align-items: center; justify-content: center; background: var(--paper-2); }
.map-embed.embed-blocked, .video-embed.embed-blocked { min-height: 260px; }
.embed-placeholder {
    max-width: 30rem; padding: 1.5rem; text-align: center;
    color: var(--ink); font-size: 0.86rem; line-height: 1.5;
}
.embed-placeholder p { margin: 0 0 1rem; color: var(--muted); }
.embed-loaded .embed-placeholder { display: none; }
.embed-accept {
    font-family: var(--font-ui); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.01em;
    color: var(--white); background: var(--kaki); border: none; cursor: pointer;
    padding: 0.6em 1.2em; border-radius: 999px;
    box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--kaki) 68%, transparent), inset 0 -2px 0 rgba(0,0,0,0.10);
    transition: transform 0.16s var(--spring), background var(--transition);
}
.embed-accept:hover { background: var(--kaki-soft); transform: translateY(-2px); }
.embed-accept:active { transform: translateY(1px) scale(0.98); }
.embed-privacy { display: block; margin-top: 0.8rem; font-size: 0.78rem; }
/* Placeholder sits on a light card even inside dark sections. */
.embed-placeholder .embed-privacy, .layout-section .embed-placeholder .embed-privacy { color: var(--muted); }
.video-embed.embed-blocked .embed-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-body { max-width: var(--wrap-text); margin: 0 auto; }
.error-body .map-link { display: inline-block; }

/* ============================================================
   FOOTER CONSENT BUTTON (looks like the legal links next to it)
   ============================================================ */
.footer-consent {
    background: none; border: none; padding: 0; cursor: pointer; text-align: left;
    font: inherit; font-size: 0.78rem; color: color-mix(in srgb, var(--paper) 78%, transparent);
}
.footer-consent:hover { color: var(--kaki-soft); }

/* ============================================================
   COOKIE CONSENT DIALOG — vanilla-cookieconsent themed to the site
   ============================================================ */
#cc-main {
    --cc-font-family: var(--font-sans);
    --cc-bg: var(--surface);
    --cc-primary-color: var(--ink);
    --cc-secondary-color: var(--muted);
    --cc-btn-primary-bg: var(--kaki);
    --cc-btn-primary-color: var(--white);
    --cc-btn-primary-border-color: var(--kaki);
    --cc-btn-primary-hover-bg: var(--kaki-soft);
    --cc-btn-primary-hover-color: var(--white);
    --cc-btn-primary-hover-border-color: var(--kaki-soft);
    --cc-btn-secondary-bg: var(--paper-2);
    --cc-btn-secondary-color: var(--ink);
    --cc-btn-secondary-border-color: var(--paper-2);
    --cc-btn-secondary-hover-bg: var(--line);
    --cc-btn-secondary-hover-color: var(--ink);
    --cc-btn-secondary-hover-border-color: var(--line);
    --cc-separator-border-color: var(--line-soft);
    --cc-toggle-on-bg: var(--sage);
    --cc-toggle-readonly-bg: var(--line);
    --cc-cookie-category-block-bg: var(--paper);
    --cc-cookie-category-block-border: var(--line-soft);
    --cc-cookie-category-block-hover-bg: var(--paper-2);
    --cc-cookie-category-block-hover-border: var(--line);
    --cc-footer-bg: var(--paper);
    --cc-footer-color: var(--muted);
    --cc-footer-border-color: var(--line-soft);
    --cc-link-color: var(--kaki);
    --cc-modal-border-radius: var(--radius);
    --cc-btn-border-radius: 999px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
    .block-gallery { display: none; }
    .block-gallery-slider { display: block; }
    /* Below the 2/3-emphasis range the cap only gets in the way — a wrapped
       1/3 column must be free to fill its full-width line. */
    .layout-column[style*="--span: 1/3"] { max-width: none; }
}

@media (max-width: 700px) {
    .map-info { flex-direction: column; align-items: flex-start; }
}
