:root {
    --color-bg: #FAF8F5;
    --color-surface: #FFFFFF;
    --color-text: #2C1E1A;
    --color-muted: #665B56;
    --color-primary: #4A6B56;
    --color-primary-dark: #365040;
    --color-accent: #D4A373;
    --color-border: #E8E2D9;
    --font-title: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 12% 8%, rgba(212, 163, 115, 0.14), transparent 26rem),
        var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.55;
}

body.viewer-open {
    overflow: hidden;
}

button,
a {
    font: inherit;
}

button {
    color: inherit;
}

img {
    max-width: 100%;
}

.site-header {
    padding: 1.5rem 1rem 0.75rem;
    text-align: center;
}

.brand-link {
    display: inline-flex;
    border-radius: 10px;
}

.brand-link:focus-visible,
.carousel-viewport:focus-visible,
.carousel-arrow:focus-visible,
.slide-preview:focus-visible,
.slide-deep-link:focus-visible,
.primary-cta:focus-visible,
.viewer button:focus-visible,
.viewer a:focus-visible {
    outline: 3px solid rgba(74, 107, 86, 0.45);
    outline-offset: 3px;
}

.brand-logo {
    width: auto;
    max-height: 72px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.site-tagline {
    margin: 0.35rem 0 0;
    color: #7E6B62;
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-style: italic;
}

.page-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.page-intro {
    max-width: 760px;
    margin: 0 auto 2rem;
    text-align: center;
}

.eyebrow {
    margin: 0 0 0.4rem;
    color: var(--color-primary);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-intro h1,
.line-heading h2,
.slide-copy h3,
.viewer-title {
    font-family: var(--font-title);
    line-height: 1.15;
}

.page-intro h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 600;
}

.page-intro p:last-child {
    max-width: 640px;
    margin: 0.8rem auto 0;
    color: var(--color-muted);
}

.line-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.line-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 44px rgba(44, 30, 26, 0.08);
}

.line-heading {
    padding: 1.5rem 1.5rem 1rem;
    text-align: center;
}

.line-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.line-heading p:last-child {
    min-height: 3em;
    margin: 0.55rem auto 0;
    color: var(--color-muted);
    font-size: 0.92rem;
}

.carousel {
    padding: 0 1rem 1rem;
}

.carousel-stage {
    position: relative;
}

.carousel-viewport {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #F7F3EE;
    touch-action: pan-y;
}

.carousel-track {
    display: flex;
    transition: transform 320ms ease;
    will-change: transform;
}

.carousel-slide {
    display: flex;
    flex: 0 0 100%;
    min-width: 0;
    flex-direction: column;
    background: var(--color-surface);
}

.slide-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    background: #F7F3EE;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    cursor: zoom-in;
}

.slide-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #F7F3EE;
    transition: transform 220ms ease;
}
[data-gallery="mandalas"] .slide-preview img {
    opacity: 0;
}

.line-card > .primary-cta {
    margin-top: auto;
}


.slide-preview:hover img {
    transform: scale(1.018);
}

.preview-hint {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(44, 30, 26, 0.72);
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 700;
    pointer-events: none;
}

.slide-copy {
    display: flex;
    min-height: 12.5rem;
    padding: 1.2rem 1.25rem 1.3rem;
    flex-direction: column;
    align-items: flex-start;
}

.slide-copy h3 {
    margin: 0;
    font-size: 1.45rem;
}

.slide-description {
    margin: 0.55rem 0 1rem;
    color: var(--color-muted);
    font-size: 0.88rem;
}

.slide-deep-link {
    margin-top: auto;
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

.carousel-arrow {
    position: absolute;
    top: 38%;
    z-index: 3;
    display: inline-flex;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    background: rgba(44, 30, 26, 0.58);
    color: #FFFFFF;
    box-shadow: 0 6px 18px rgba(44, 30, 26, 0.16);
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
    opacity: 0.72;
    transition: opacity 160ms ease, background-color 160ms ease;
}

.carousel-arrow:hover,
.carousel-arrow:active {
    background: rgba(44, 30, 26, 0.84);
    opacity: 1;
}

.carousel-arrow.previous {
    left: 0.65rem;
}

.carousel-arrow.next {
    right: 0.65rem;
}

.carousel-meta {
    display: flex;
    min-height: 2.4rem;
    padding: 0.6rem 0.15rem 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--color-muted);
    font-size: 0.76rem;
}

.carousel-counter {
    color: var(--color-text);
    font-weight: 700;
}

.primary-cta {
    display: block;
    margin: 0 1rem 1.25rem;
    padding: 0.85rem 1.2rem;
    border-radius: 10px;
    background: var(--color-primary);
    color: #FFFFFF;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(74, 107, 86, 0.22);
    transition: background-color 180ms ease, transform 180ms ease;
}

.primary-cta:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.site-footer {
    padding: 1.6rem 1rem;
    border-top: 1px solid var(--color-border);
    color: #7A706B;
    font-size: 0.78rem;
    text-align: center;
}

.viewer[hidden] {
    display: none;
}

.viewer {
    position: fixed;
    z-index: 1000;
    inset: 0;
}

.viewer-backdrop {
    display: grid;
    width: 100%;
    height: 100%;
    padding: 1rem;
    overflow-y: auto;
    place-items: center;
    background: rgba(44, 30, 26, 0.78);
    backdrop-filter: blur(6px);
}

.viewer-dialog {
    position: relative;
    width: min(100%, 980px);
    overflow: hidden;
    border-radius: 20px;
    background: var(--color-surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.viewer-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 4;
    display: inline-flex;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    color: var(--color-text);
    cursor: pointer;
    font-size: 1.55rem;
}

.viewer-stage {
    position: relative;
    display: flex;
    min-height: 52vh;
    max-height: 72vh;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #F7F3EE;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    touch-action: pan-y;
}

.viewer-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 72vh;
    object-fit: contain;
}

.viewer-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    background: rgba(44, 30, 26, 0.58);
    color: #FFFFFF;
    cursor: pointer;
    font-size: 2rem;
    opacity: 0.72;
}

.viewer-arrow:hover,
.viewer-arrow:active {
    background: rgba(44, 30, 26, 0.84);
    opacity: 1;
}

.viewer-arrow.previous {
    left: 0.8rem;
}

.viewer-arrow.next {
    right: 0.8rem;
}

.viewer-copy {
    display: grid;
    padding: 1.15rem 1.3rem 1.3rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem 1.5rem;
}

.viewer-title {
    margin: 0;
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.viewer-description {
    margin: 0.45rem 0 0;
    color: var(--color-muted);
    font-size: 0.88rem;
}

.viewer-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.viewer-counter {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.viewer-link {
    display: inline-flex;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: 9px;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #FFFFFF;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.noscript-note {
    margin: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-muted);
    font-size: 0.85rem;
}

@media (min-width: 900px) {
    .line-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .page-shell {
        width: min(100% - 1rem, 1180px);
    }

    .page-intro {
        margin-bottom: 1.25rem;
        padding: 0 0.5rem;
    }

    .line-heading {
        padding: 1.25rem 1rem 0.85rem;
    }

    .carousel {
        padding-inline: 0.55rem;
    }
    .carousel-track {
        will-change: auto;
    }


    .slide-copy {
        min-height: 13rem;
        padding-inline: 1rem;
    }

    .carousel-arrow {
        top: 35%;
        width: 44px;
        height: 44px;
    }

    .carousel-meta span:last-child {
        display: none;
    }

    .viewer-backdrop {
        display: flex;
        padding: 0.75rem;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .staging-indicator ~ .viewer .viewer-backdrop {
        padding-bottom: 4.25rem;
    }

    .viewer-dialog {
        width: 100%;
        max-height: calc(100vh - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 18px;
    }

    .viewer-stage {
        min-height: 55vh;
        max-height: 68vh;
    }

    .viewer-copy {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .viewer-actions {
        width: 100%;
        align-items: stretch;
    }

    .viewer-link {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
