/*
 * Greenspirit Yoga — main stylesheet.
 *
 * Design (2026): editorial and calm. Deep forest sidebar, warm cream pages, Cormorant Garamond
 * for display type, Manrope for reading, sand as the fine accent, brand teal kept for links.
 *
 *   0. Fonts        self-hosted, SIL Open Font License
 *   1. Tokens
 *   2. Base
 *   3. Shell        sidebar, mobile top bar + drawer, main column, footer
 *   4. Hero         page opening, built by inc/hero.php
 *   5. Content      the gsy- vocabulary used by content/converted/*.html
 *   6. Motion
 *   7. Timer
 */

/* 0. Fonts --------------------------------------------------------------------------- */

@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap;
    src: url('../fonts/cormorant-garamond-500-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap;
    src: url('../fonts/cormorant-garamond-500-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap;
    src: url('../fonts/cormorant-garamond-500-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap;
    src: url('../fonts/cormorant-garamond-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap;
    src: url('../fonts/cormorant-garamond-600-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap;
    src: url('../fonts/cormorant-garamond-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url('../fonts/manrope-400-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url('../fonts/manrope-400-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Zeyada'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('../fonts/zeyada-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Zeyada'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('../fonts/zeyada-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* 1. Tokens -------------------------------------------------------------------------- */

:root {
    --gsy-forest: #1c3531;
    --gsy-forest-2: #264541;
    --gsy-cream: #f5f0e8;
    --gsy-paper: #fbf8f2;
    --gsy-card: #fffdf9;
    --gsy-ink: #1f2926;
    --gsy-ink-soft: #5a6561;
    --gsy-line: #e3dacb;
    --gsy-sand: #b8946a;
    --gsy-sand-deep: #7a5c38;     /* sand as text: 5.4:1 on cream */
    --gsy-sand-light: #dcc4a0;    /* sand on forest */
    --gsy-teal: #479ead;
    --gsy-teal-deep: #2a6c76;     /* links: 5.3:1 on cream */
    --gsy-on-dark: #efe9df;
    --gsy-on-dark-soft: rgba(239, 233, 223, 0.68);
    --gsy-script: #633928;

    --gsy-display: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
    --gsy-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --gsy-sidebar-w: 300px;
    --gsy-wide: 76rem;
    --gsy-measure: 50rem;         /* ≈ 75 characters at 18px */
    --gsy-gutter: clamp(1rem, 2.6vw, 2.75rem);
    --gsy-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 2. Base ---------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
    margin: 0;
    background: var(--gsy-cream);
    color: var(--gsy-ink);
    font-family: var(--gsy-sans);
    font-size: 1.0625rem;
    line-height: 1.78;
    font-feature-settings: 'kern', 'liga';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--gsy-display);
    font-weight: 500;
    color: var(--gsy-forest);
    line-height: 1.15;
    text-wrap: balance;
}
p { margin: 0 0 1.1em; }
strong, b { font-weight: 650; color: var(--gsy-ink); }
em, i { font-style: italic; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: 0.4em; }
li::marker { color: var(--gsy-sand); }
table { border-collapse: collapse; margin: 0 0 1.2em; }
td, th { padding: 0.35em 1.25em 0.35em 0; vertical-align: top; text-align: left; }

a {
    color: var(--gsy-teal-deep);
    text-decoration: underline;
    text-decoration-color: rgba(184, 148, 106, 0.6);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a:hover { color: var(--gsy-forest); text-decoration-color: var(--gsy-sand); }
:focus-visible { outline: 2px solid var(--gsy-teal); outline-offset: 3px; }
::selection { background: rgba(184, 148, 106, 0.28); color: var(--gsy-ink); }

.screen-reader-text {
    border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
    padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.gsy-skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 1000;
    padding: 0.7rem 1.1rem; background: var(--gsy-forest); color: var(--gsy-on-dark);
    font-weight: 600; text-decoration: none;
}
.gsy-skip:focus { top: 1rem; }

.gsy-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0 0 1.5rem;
    color: var(--gsy-sand-deep);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    line-height: 1.4;
    text-transform: uppercase;
}
.gsy-eyebrow::before {
    content: "";
    flex: 0 0 2.5rem;
    height: 1px;
    background: var(--gsy-sand);
}

/* 3. Shell --------------------------------------------------------------------------- */

.gsy-shell { min-height: 100vh; }

.gsy-sidebar {
    background:
        radial-gradient(120% 60% at 0% 0%, rgba(71, 158, 173, 0.16), transparent 60%),
        var(--gsy-forest);
    color: var(--gsy-on-dark);
}
.gsy-sidebar__inner {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
    min-height: 100%;
    padding: 2.75rem 2.25rem 2.25rem;
}
.gsy-sidebar__close { display: none; }

.gsy-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    color: inherit;
    text-align: center;
    text-decoration: none;
}
.gsy-brand:hover { color: inherit; }
/* logo-light.png: cream, strokes thickened (tools/visual/make-light-logo.mjs). */
.gsy-brand__logo { width: 150px; height: auto; }
.gsy-brand__tagline {
    max-width: 14rem;
    font-family: var(--gsy-display);
    font-size: 1.28rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: var(--gsy-on-dark);
}
.gsy-brand__tagline::before {
    content: "";
    display: block;
    width: 2rem;
    height: 1px;
    margin: 0 auto 1.1rem;
    background: var(--gsy-sand-light);
}

.gsy-nav__list,
.gsy-nav__list ul { list-style: none; margin: 0; padding: 0; }
.gsy-nav__list li { margin: 0; }
.gsy-nav__list a {
    position: relative;
    display: block;
    padding: 0.55rem 0 0.55rem 1.1rem;
    color: var(--gsy-on-dark);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    line-height: 1.5;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s ease, padding-left 0.25s var(--gsy-ease);
}
.gsy-nav__list a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gsy-sand-light);
    opacity: 0;
    transform: translateY(-50%) scale(0.4);
    transition: opacity 0.2s ease, transform 0.25s var(--gsy-ease);
}
.gsy-nav__list a[href]:hover { color: #fff; padding-left: 1.35rem; }
.gsy-nav__list a[href]:hover::before { opacity: 0.6; transform: translateY(-50%) scale(1); }
.gsy-nav__list .current-menu-item > a,
.gsy-nav__list .current_page_item > a { color: var(--gsy-sand-light); }
.gsy-nav__list .current-menu-item > a::before,
.gsy-nav__list .current_page_item > a::before { opacity: 1; transform: translateY(-50%) scale(1); }

/* A menu entry without a URL is a group label ("Kurse & Yogastunden"). */
.gsy-nav__list a:not([href]) {
    margin-top: 1rem;
    padding-left: 0;
    color: var(--gsy-on-dark-soft);
    font-size: 0.66rem;
    letter-spacing: 0.24em;
    cursor: default;
}
.gsy-nav__list a:not([href])::before { display: none; }
.gsy-nav__list .sub-menu {
    margin: 0.2rem 0 1rem;
    border-left: 1px solid rgba(220, 196, 160, 0.28);
}
.gsy-nav__list .sub-menu a {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--gsy-on-dark-soft);
}
.gsy-nav__list .sub-menu a::before { left: -3px; }

.gsy-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--gsy-sand-light);
    white-space: nowrap;
    color: var(--gsy-forest);
    background: var(--gsy-sand-light);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.gsy-cta:hover { background: transparent; color: var(--gsy-sand-light); }

.gsy-contact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(239, 233, 223, 0.14);
    font-size: 0.82rem;
    font-style: normal;
    line-height: 1.6;
    color: var(--gsy-on-dark-soft);
}
.gsy-contact span { margin-bottom: 0.5rem; }
.gsy-contact a { color: var(--gsy-on-dark); text-decoration: none; }
.gsy-contact a:hover { color: var(--gsy-sand-light); }

/* Main column and footer. */
.gsy-main { display: block; min-width: 0; outline: none; }

.gsy-footer {
    margin-top: 5rem;
    padding: 4rem var(--gsy-gutter) 2.5rem;
    border-top: 1px solid var(--gsy-line);
    background: var(--gsy-paper);
    font-size: 0.9rem;
    color: var(--gsy-ink-soft);
}
.gsy-footer__grid {
    display: grid;
    gap: 2.5rem;
    max-width: var(--gsy-wide);
    margin: 0 auto;
}
.gsy-footer__name {
    margin-bottom: 0.4rem;
    font-family: var(--gsy-display);
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--gsy-forest);
}
.gsy-footer__heading {
    margin-bottom: 1rem;
    font-family: var(--gsy-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gsy-sand-deep);
}
.gsy-footer ul { list-style: none; padding: 0; margin: 0; }
.gsy-footer a { color: var(--gsy-ink); text-decoration: none; }
.gsy-footer a:hover { color: var(--gsy-teal-deep); text-decoration: underline; }
.gsy-footer__legal {
    max-width: var(--gsy-wide);
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gsy-line);
    font-size: 0.8rem;
}
@media (min-width: 760px) {
    .gsy-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* Mobile top bar + drawer (below 1024px). */
.gsy-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem var(--gsy-gutter);
    background: var(--gsy-forest);
    color: var(--gsy-on-dark);
}
.gsy-topbar__brand {
    display: flex; align-items: center; gap: 0.75rem;
    color: var(--gsy-on-dark); text-decoration: none;
    font-family: var(--gsy-display); font-size: 1.3rem; font-weight: 500; letter-spacing: 0.02em;
}
.gsy-topbar__brand:hover { color: #fff; }
.gsy-topbar__brand img { width: 40px; height: auto; }
.gsy-menu-toggle {
    display: inline-flex; align-items: center; gap: 0.6rem;
    min-height: 44px; padding: 0.4rem 1rem;
    border: 1px solid rgba(239, 233, 223, 0.35);
    background: transparent; color: var(--gsy-on-dark);
    font: 600 0.7rem/1 var(--gsy-sans); letter-spacing: 0.18em; text-transform: uppercase;
    cursor: pointer;
}
.gsy-menu-toggle__icon { display: grid; gap: 5px; width: 18px; }
.gsy-menu-toggle__icon span { display: block; height: 1px; background: currentColor; }

@media (max-width: 1023.98px) {
    .gsy-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 100;
        width: min(88vw, 360px);
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.35s var(--gsy-ease), visibility 0s linear 0.35s;
    }
    .gsy-menu-open .gsy-sidebar {
        transform: none;
        visibility: visible;
        transition: transform 0.35s var(--gsy-ease);
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.3);
    }
    .gsy-sidebar__close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(239, 233, 223, 0.25);
        border-radius: 50%;
        background: transparent;
        color: var(--gsy-on-dark);
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
    }
    .gsy-backdrop {
        position: fixed;
        inset: 0;
        z-index: 90;
        background: rgba(20, 30, 28, 0.5);
    }
    .gsy-menu-open { overflow: hidden; }
}

@media (min-width: 1024px) {
    .gsy-topbar,
    .gsy-backdrop { display: none !important; }
    .gsy-shell {
        display: grid;
        grid-template-columns: var(--gsy-sidebar-w) minmax(0, 1fr);
    }
    .gsy-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(239, 233, 223, 0.2) transparent;
    }
}

/* 4. Hero ------------------------------------------------------------------------------ */

.gsy-page { padding: 0 var(--gsy-gutter); overflow-x: clip; }

.gsy-hero {
    position: relative;
    display: grid;
    gap: 3rem;
    align-items: center;
    max-width: var(--gsy-wide);
    margin: 0 auto;
    padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
    border-bottom: 1px solid var(--gsy-line);
}
/* Pages without a photo: the brand's ensō circle, very faint, behind the title. */
.gsy-hero:not(.gsy-hero--image)::after {
    content: "";
    position: absolute;
    right: -2rem;
    top: 50%;
    width: clamp(12rem, 26vw, 22rem);
    aspect-ratio: 889 / 910;
    background: url('../img/logo.png') center / contain no-repeat;
    opacity: 0.05;
    transform: translateY(-50%);
    pointer-events: none;
}
.gsy-hero__text { position: relative; z-index: 1; max-width: 40rem; }
.gsy-hero:not(.gsy-hero--image) .gsy-hero__text { max-width: 58rem; }
.gsy-hero__title {
    font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.6rem);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: 0.015em;
    overflow-wrap: break-word;
    hyphens: auto;
}
.gsy-hero__lead {
    max-width: 34rem;
    margin: 1.6rem 0 0;
    font-family: var(--gsy-display);
    font-style: italic;
    font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.65rem);
    line-height: 1.4;
    color: var(--gsy-ink-soft);
}
.gsy-hero__lead strong { font-weight: 500; color: inherit; }
.gsy-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 2rem;
    margin-top: 2.5rem;
}

/* Photo in an arch — the doorway motif, with a sand outline set behind it. */
/* Square box with a semicircular top: the images are ~400px tall, so the arch stays ≤ 28rem. */
.gsy-hero__media { position: relative; margin: 0 1.25rem 1.25rem auto; width: 100%; max-width: 28rem; }
.gsy-hero__media::before {
    content: "";
    position: absolute;
    inset: 1.25rem -1.25rem -1.25rem 1.25rem;
    border: 1px solid var(--gsy-sand);
    border-radius: 50% 50% 3px 3px / 50% 50% 3px 3px;
    pointer-events: none;
}
.gsy-hero__media img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50% 50% 3px 3px / 50% 50% 3px 3px;
}

.gsy-hero--front { min-height: min(46rem, calc(100vh - 4rem)); }
.gsy-hero--front .gsy-hero__title { font-size: clamp(3.2rem, 2rem + 5vw, 6.5rem); letter-spacing: 0.03em; }

@media (max-width: 599.98px) {
    .gsy-hero__media { margin: 0 0.75rem 0.75rem 0; }
    .gsy-hero__media::before { inset: 0.75rem -0.75rem -0.75rem 0.75rem; }
}
@media (min-width: 900px) {
    .gsy-hero--image { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 4.5rem; }
}

/* 5. Content: core blocks from the block editor ---------------------------------------------
 *
 * Pages are edited as normal Gutenberg blocks (paragraph, heading, image, buttons, columns,
 * separator, list, table). Everything here targets those blocks, so anything an editor adds
 * later looks right without extra classes.
 */

.gsy-body {
    max-width: var(--gsy-wide);
    font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
    margin: 0 auto;
    padding-top: clamp(2.5rem, 5vw, 4.5rem);
    overflow-wrap: break-word;
}
.gsy-body > * { max-width: var(--gsy-measure); margin-left: auto; margin-right: auto; }
.gsy-body a { overflow-wrap: anywhere; }
.gsy-body > p,
.wp-block-column > p { margin-top: 0; margin-bottom: 1.1em; }

.gsy-body h2,
.gsy-body h3,
.gsy-body h4 { margin-bottom: 0.9rem; }
.gsy-body h2 { font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem); }
.gsy-body h3 { font-size: clamp(1.45rem, 1.3rem + 0.6vw, 1.8rem); font-weight: 600; }
.gsy-body h4 { font-size: 1.3rem; font-weight: 600; }
.gsy-body h2 strong, .gsy-body h3 strong, .gsy-body h4 strong { font-weight: inherit; color: inherit; }

/* Section headings: a short sand rule above, and room to breathe. */
.gsy-body > :is(h2, h3),
.wp-block-column > :is(h2, h3) { margin-top: 3rem; }
.gsy-body > :is(h2, h3)::before,
.wp-block-column > :is(h2, h3)::before {
    content: "";
    display: block;
    width: 2.5rem;
    height: 1px;
    margin-bottom: 1.1rem;
    background: var(--gsy-sand);
}
.gsy-body > :is(h2, h3):first-child,
.wp-block-column > :is(h2, h3):first-child,
.wp-block-separator + :is(h2, h3) { margin-top: 0; }
.gsy-body h4 { margin-top: 2rem; }

/* Separator: a hairline with a small sand diamond. Doubles, openers and closers are dropped. */
.wp-block-separator {
    position: relative;
    height: 1px;
    margin: 4rem auto;
    border: 0;
    background: linear-gradient(to right, transparent, var(--gsy-line) 18%, var(--gsy-line) 82%, transparent);
    overflow: visible;
    opacity: 1;
}
.wp-block-separator::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    border: 1px solid var(--gsy-sand);
    background: var(--gsy-cream);
    transform: translate(-50%, -50%) rotate(45deg);
}
.wp-block-separator + .wp-block-separator,
.gsy-body > .wp-block-separator:first-child,
.gsy-body > .wp-block-separator:last-child,
.wp-block-column > .wp-block-separator:last-child { display: none; }
.wp-block-column .wp-block-separator::after { background: var(--gsy-card); }

/* Image: natural size (never stretched), centred, soft frame; click opens the large view. */
.wp-block-image { margin: 0.75rem auto 2.5rem; text-align: center; }
.wp-block-image figure { display: inline-block; max-width: 100%; margin: 0; vertical-align: top; }
.wp-block-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(28, 53, 49, 0.08), 0 22px 44px -22px rgba(28, 53, 49, 0.4);
    cursor: zoom-in;
    transition: transform 0.35s var(--gsy-ease), box-shadow 0.35s var(--gsy-ease);
}
.wp-block-image img:hover {
    transform: translateY(-2px);
    box-shadow: 0 1px 2px rgba(28, 53, 49, 0.08), 0 28px 52px -22px rgba(28, 53, 49, 0.45);
}
.wp-block-image a img { cursor: pointer; }
.wp-block-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--gsy-ink-soft);
}
.wp-block-image .alignleft { float: left; margin: 0.3rem 1.75rem 1rem 0; }
.wp-block-image .alignright { float: right; margin: 0.3rem 0 1rem 1.75rem; }
.wp-block-column .wp-block-image { margin: 0 0 1.75rem; }

/* Video (the former animated GIFs): same frame as images, no controls, loops silently. */
.wp-block-video { margin: 0.75rem auto 2.5rem; text-align: center; }
.wp-block-video video {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(28, 53, 49, 0.08), 0 22px 44px -22px rgba(28, 53, 49, 0.4);
}
.wp-block-column .wp-block-video { margin: 0 0 1.75rem; }

/* Click-to-enlarge view (main.js). */
.gsy-lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: clamp(1rem, 4vw, 3rem);
    border: 0;
    background: transparent;
}
.gsy-lightbox::backdrop { background: rgba(18, 30, 28, 0.88); backdrop-filter: blur(4px); }
.gsy-lightbox[open] { display: grid; place-items: center; }
.gsy-lightbox img {
    max-width: 100%;
    max-height: calc(100vh - 6rem);
    border-radius: 4px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    cursor: zoom-out;
}
.gsy-lightbox__close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(239, 233, 223, 0.35);
    border-radius: 50%;
    background: transparent;
    color: var(--gsy-on-dark);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

/* Columns: paired cards on wide screens, stacked on phones. */
.gsy-body .wp-block-columns {
    display: grid;
    gap: 1.5rem;
    max-width: var(--gsy-wide);
    margin: 1rem auto 2.5rem;
}
.wp-block-column {
    min-width: 0;
    display: flow-root;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: var(--gsy-card);
    border: 1px solid var(--gsy-line);
}
.wp-block-column > :last-child { margin-bottom: 0; }
.wp-block-column:empty { display: none; }
.wp-block-column .wp-block-separator { margin: 2.5rem 0; }
@media (min-width: 900px) {
    .gsy-body .wp-block-columns { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
}

/* Lists and tables. */
.gsy-body ul, .gsy-body ol { padding-left: 1.3em; }
.wp-block-table { margin: 0 auto 1.5rem; overflow-x: auto; }
.wp-block-table table { width: auto; }

/* Buttons: quiet, rectangular, with an arrow that moves on hover. Outline style = secondary. */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2.25rem auto; }
.wp-block-buttons.is-content-justification-center { justify-content: center; }
.wp-block-button { margin: 0; }
.gsy-btn,
.wp-block-button__link,
.gsy-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    max-width: 100%;
    font-family: var(--gsy-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
}
.gsy-btn,
.wp-block-button__link {
    padding: 1.1rem 1.75rem;
    border: 1px solid var(--gsy-forest);
    border-radius: 0;
    background: var(--gsy-forest);
    color: var(--gsy-on-dark);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.gsy-btn::after,
.wp-block-button__link::after,
.gsy-link-arrow::after {
    content: "→";
    flex: none;
    font-size: 1rem;
    letter-spacing: 0;
    transition: transform 0.25s var(--gsy-ease);
}
.gsy-btn:hover,
.gsy-btn:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible { background: var(--gsy-teal-deep); border-color: var(--gsy-teal-deep); color: #fff; }
.gsy-btn:hover::after,
.wp-block-button__link:hover::after,
.gsy-link-arrow:hover::after { transform: translateX(4px); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--gsy-forest); }
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
    background: var(--gsy-forest);
    border-color: var(--gsy-forest);
    color: var(--gsy-on-dark);
}
.gsy-link-arrow { color: var(--gsy-forest); padding: 0.4rem 0; border-bottom: 1px solid var(--gsy-sand); }
.gsy-link-arrow:hover { color: var(--gsy-teal-deep); }

/* Paragraph style "Handschrift" (registered in inc/editor.php). */
.is-style-script {
    margin-bottom: 0.5rem;
    font-family: 'Zeyada', cursive;
    font-size: 2rem;
    line-height: 1.35;
    color: var(--gsy-script);
}

/* Alignment and colour classes the editor can add. */
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.has-text-align-left { text-align: left; }
.has-forest-color { color: var(--gsy-forest); }
.has-teal-color { color: var(--gsy-teal-deep); }
.has-sand-color { color: var(--gsy-sand-deep); }
.has-ink-color { color: var(--gsy-ink); }
.has-forest-background-color { background-color: var(--gsy-forest); color: var(--gsy-on-dark); }
.has-cream-background-color { background-color: var(--gsy-cream); }
.has-card-background-color { background-color: var(--gsy-card); }
.has-background { padding: 1.5rem 1.75rem; }
.has-small-font-size { font-size: 0.9rem; }
.has-large-font-size { font-size: 1.3rem; }

@media (max-width: 767.98px) {
    .wp-block-separator { margin: 2.5rem auto; }
    .gsy-body > :is(h2, h3), .wp-block-column > :is(h2, h3) { margin-top: 2rem; }
}

/* 6. Motion: one short rise per block as it scrolls in; none when reduced motion is preferred.
 * main.js adds .gsy-anim only to blocks below the fold, so nothing visible ever blinks. */

@media (prefers-reduced-motion: no-preference) {
    .gsy-anim:not(.is-visible) { opacity: 0; }
    .gsy-anim.is-visible { animation: gsy-rise 0.8s var(--gsy-ease) both; }
    .gsy-hero__text > *,
    .gsy-hero__media { animation: gsy-rise 0.9s var(--gsy-ease) both; }
    .gsy-hero__title { animation-delay: 0.08s; }
    .gsy-hero__lead { animation-delay: 0.16s; }
    .gsy-hero__actions { animation-delay: 0.24s; }
    .gsy-hero__media { animation-delay: 0.12s; }
}
@keyframes gsy-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

/* 7. Class timer ----------------------------------------------------------------------- */

.gsy-timer {
    margin: 2rem 0;
    padding: 2rem;
    border: 1px solid var(--gsy-line);
    background: var(--gsy-card);
    text-align: center;
    line-height: 1.3;
}
.gsy-timer__status,
.gsy-timer__class { font-size: 1rem; margin-top: 0.4rem; }
.gsy-timer__countdown {
    display: inline-block;
    margin-top: 0.4rem;
    font-family: var(--gsy-display);
    font-size: 2.6rem;
    font-variant-numeric: tabular-nums;
    color: var(--gsy-forest);
}
