:root {
    color-scheme: light;
    --white: #FFFFFF;
    --ivory: #FDFBF7;
    --paper: #FFFFFF;
    --soft-gray: #F5F5F5;
    --charcoal: #333333;
    --cool-gray: #7C7C7C;
    --burgundy: #3A0B6E;
    --burgundy-hover: #52188F;
    --burgundy-dark: #24103D;
    --gold: #D5961B;
    --gold-hover: #B97B0F;
    --warm-gold: #F1D28A;
    --brown: #E3D7C2;
    --card-border: #EFE7D4;
    --sage: #EDE4F7;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    min-width: 320px;
    font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(213, 150, 27, 0.11), transparent 30rem),
        linear-gradient(180deg, var(--paper) 0%, #FFF8F1 38%, var(--ivory) 72%, #fff 100%);
    color: var(--charcoal);
    line-height: 1.65;
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
}

a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button,
a {
    transition-property: color, background-color, border-color, box-shadow, transform, opacity;
    transition-duration: 220ms;
    transition-timing-function: ease;
}

button.is-loading {
    pointer-events: none;
    opacity: 0.72;
}

button.is-loading::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.65rem;
    vertical-align: middle;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(213, 150, 27, 0.45);
    outline-offset: 3px;
}

::selection {
    background: rgba(58, 11, 110, 0.18);
}

.font-heading {
    font-family: 'Fraunces', Georgia, serif;
}

.font-body,
.font-ui {
    font-family: 'Nunito Sans', system-ui, sans-serif;
}

.container {
    width: min(100% - 2rem, 1180px);
}

header[data-header] {
    background: rgba(255, 253, 248, 0.96);
    box-shadow: 0 14px 40px rgba(58, 11, 110, 0.10);
    backdrop-filter: blur(18px);
    padding-bottom: 0.9rem !important;
    padding-top: 0.9rem !important;
}

.site-logo {
    display: inline-grid;
    grid-template-areas: "logo";
    width: clamp(8.5rem, 13vw, 10rem);
}

.site-logo__mark {
    grid-area: logo;
    height: auto;
    width: 100%;
}

.mobile-donate-link {
    display: none;
}

header[data-header] nav a {
    position: relative;
}

header[data-header] nav {
    gap: clamp(1.1rem, 1.7vw, 2rem) !important;
}

header[data-header] nav a:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.45rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0;
    transform: scaleX(0.65);
}

header[data-header] nav a:hover::after,
header[data-header] nav a[aria-current='page']::after {
    background: var(--gold);
    opacity: 1;
    transform: scaleX(1);
}

header[data-header] nav a[aria-current='page']:not(:last-child) {
    color: var(--gold);
}

header[data-header] nav a,
header[data-header] button,
body[data-scrolled='true'] header[data-header] nav a,
body[data-scrolled='true'] header[data-header] button,
body:not([data-home='true']) header[data-header] nav a,
body:not([data-home='true']) header[data-header] button {
    color: var(--burgundy);
}

body[data-home='true']:not([data-scrolled='true']) header[data-header] nav a[aria-current='page']:not(:last-child) {
    color: var(--gold);
}

header[data-header] nav a:last-child,
body[data-scrolled='true'] header[data-header] nav a:last-child,
body:not([data-home='true']) header[data-header] nav a:last-child {
    color: #fff;
}

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-carousel__slide {
    animation: heroFade 30s infinite;
    height: 100%;
    inset: 0;
    object-fit: cover;
    opacity: 0;
    position: absolute;
    transform: scale(1.04);
    width: 100%;
}

.hero-carousel__slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-carousel__slide:nth-child(2) {
    animation-delay: 6s;
}

.hero-carousel__slide:nth-child(3) {
    animation-delay: 12s;
}

.hero-carousel__slide:nth-child(4) {
    animation-delay: 18s;
}

.hero-carousel__slide:nth-child(5) {
    animation-delay: 24s;
}

@keyframes heroFade {

    0%,
    16% {
        opacity: 1;
        transform: scale(1);
    }

    22%,
    100% {
        opacity: 0;
        transform: scale(1.04);
    }
}

body[data-menu-open='true'] {
    overflow: hidden;
}

body[data-modal-open='true'] {
    overflow: hidden;
}

body[data-menu-open='true'] [data-mobile-menu] {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
}

body[data-menu-open='true'] [data-menu-toggle] {
    background: var(--burgundy);
    border-color: var(--burgundy);
    color: #fff;
}

[data-mobile-menu] {
    background: var(--burgundy-dark);
    display: none;
}

@media (min-width: 1024px) {
    body[data-menu-open='true'] {
        overflow: auto;
    }

    [data-mobile-menu],
    body[data-menu-open='true'] [data-mobile-menu] {
        display: none !important;
    }
}

main section {
    position: relative;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

h1,
h2,
h3,
h4 {
    letter-spacing: 0;
}

h1,
h2 {
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

.rounded-2xl,
.rounded-3xl {
    border-radius: 1rem;
}

article,
.shadow-lg,
.shadow-xl,
.shadow-2xl {
    box-shadow: 0 18px 45px rgba(51, 51, 51, 0.10);
}

article,
.bg-white.rounded-2xl,
.bg-white.rounded-3xl,
.bg-ivory.rounded-2xl,
.bg-ivory.rounded-3xl {
    border: 1px solid var(--card-border);
}

article:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(51, 51, 51, 0.14);
}

input,
select,
textarea {
    font: inherit;
}

input::placeholder,
textarea::placeholder {
    opacity: 0.7;
}

footer {
    background:
        linear-gradient(135deg, rgba(36, 16, 61, 0.99), rgba(58, 11, 110, 0.97)),
        radial-gradient(circle at top left, rgba(213, 150, 27, 0.22), transparent 28rem) !important;
}

.footer-logo {
    height: auto;
    width: min(12rem, 72vw);
}

footer input {
    color: #fff;
}

.gallery-grid {
    display: grid;
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    box-shadow: 0 18px 45px rgba(51, 51, 51, 0.10);
    aspect-ratio: 4 / 5;
    background: var(--brown);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

.gallery-grid>img {
    width: 100%;
    aspect-ratio: 4 / 5;
    display: block;
    object-fit: cover;
    border-radius: 1.25rem;
    box-shadow: 0 18px 45px rgba(51, 51, 51, 0.10);
}

.gallery-grid--landing {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.gallery-grid--landing .gallery-item {
    aspect-ratio: 1 / 1;
}

.gallery-grid--wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.gallery-grid--wide .gallery-item {
    aspect-ratio: 4 / 5;
}

.gallery-grid--wide .gallery-item--span-2 {
    grid-column: span 2;
    aspect-ratio: 8 / 5;
}

@media (max-width: 1023px) {
    .gallery-grid--landing {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-grid--wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-grid--wide .gallery-item--span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 767px) {
    .gallery-grid--wide {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .gallery-grid--wide .gallery-item--span-2 {
        grid-column: span 2;
        grid-row: span 1;
        aspect-ratio: 16 / 10;
    }
}

.modal-shell {
    align-items: center;
    background: rgba(36, 16, 61, 0.64);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 1.25rem;
    position: fixed;
    z-index: 80;
}

.modal-shell.is-open {
    display: flex;
}

.modal-panel {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 30px 90px rgba(36, 16, 61, 0.28);
    max-height: min(86dvh, 780px);
    overflow-y: auto;
    padding: 1.5rem;
    transform: translateY(0.75rem) scale(0.98);
    transition: transform 240ms ease;
    width: min(100%, 720px);
}

.modal-shell.is-open .modal-panel {
    transform: translateY(0) scale(1);
}

@media (max-width: 1023px) {
    header[data-header] {
        background: rgba(255, 253, 248, 0.94);
        box-shadow: 0 14px 40px rgba(58, 11, 110, 0.10);
        backdrop-filter: blur(18px);
        padding-top: 0.85rem !important;
        padding-bottom: 0.85rem !important;
    }

    header[data-header] .container {
        display: block !important;
        min-height: 3.75rem;
        position: relative;
        width: 100%;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .site-logo {
        display: block;
        left: 0.75rem;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: none;
        min-width: 0;
        overflow: visible;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: clamp(7.25rem, 34vw, 8.75rem);
        z-index: 55;
    }

    .site-logo__mark {
        display: block;
        height: auto;
        max-width: none;
        object-fit: contain;
        object-position: left center;
        transform: none;
        width: 100%;
    }

    [data-menu-toggle] {
        align-items: center;
        background: rgba(58, 11, 110, 0.08);
        border: 1px solid rgba(58, 11, 110, 0.18);
        border-radius: 999px;
        box-shadow: 0 10px 24px rgba(58, 11, 110, 0.10);
        color: var(--burgundy) !important;
        display: inline-flex;
        height: 3rem;
        justify-content: center;
        position: absolute;
        right: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 3rem;
        z-index: 60;
    }

    .mobile-donate-link {
        align-items: center;
        align-self: center;
        background: var(--gold);
        border-radius: 999px;
        box-shadow: 0 10px 22px rgba(213, 150, 27, 0.24);
        color: #fff !important;
        display: inline-flex;
        font-family: 'Nunito Sans', system-ui, sans-serif;
        font-size: 0.8rem;
        font-weight: 900;
        justify-content: center;
        line-height: 1;
        min-height: 2.45rem;
        padding: 0 0.72rem;
        position: absolute;
        right: 4.15rem;
        top: 50%;
        transform: translateY(-50%);
        white-space: nowrap;
        z-index: 60;
    }

    .mobile-donate-link:hover {
        background: var(--gold-hover);
        transform: translateY(calc(-50% - 1px));
    }

    [data-menu-toggle]:hover {
        background: rgba(58, 11, 110, 0.12);
        transform: translateY(calc(-50% - 1px));
    }

    body[data-menu-open='true'] [data-menu-toggle] {
        background: var(--burgundy);
        border-color: var(--burgundy);
        color: #fff !important;
    }

    [data-menu-toggle] svg {
        height: 1.55rem;
        stroke-width: 2.4;
        width: 1.55rem;
    }

    [data-mobile-menu] {
        background: var(--burgundy-dark);
        border: 1px solid rgba(255, 255, 255, 0.24);
        border-radius: 1.25rem;
        box-shadow: 0 24px 70px rgba(36, 16, 61, 0.30);
        display: flex;
        flex-direction: column;
        inset: 4.85rem 0.75rem auto 0.75rem;
        max-height: calc(100dvh - 6.25rem);
        opacity: 0;
        overflow-y: auto;
        padding: 0.75rem;
        pointer-events: none;
        position: fixed;
        transform: translate3d(0, -0.75rem, 0) scale(0.98);
        transition: opacity 220ms ease, transform 220ms ease;
        z-index: 40;
    }

    body[data-menu-open='true'] [data-mobile-menu] {
        opacity: 1;
        pointer-events: auto;
        transform: translate3d(0, 0, 0) scale(1);
    }

    [data-mobile-menu]>div {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        height: auto;
        justify-content: flex-start;
        padding: 0.5rem;
    }

    [data-mobile-menu] a {
        border-radius: 0.85rem;
        color: #fff !important;
        display: flex;
        justify-content: center;
        padding: 0.85rem 1rem;
        text-shadow: 0 1px 10px rgba(36, 16, 61, 0.22);
        width: 100%;
    }

    [data-mobile-menu] a:last-child {
        background: var(--gold);
        box-shadow: 0 12px 28px rgba(213, 150, 27, 0.24);
        color: #fff !important;
        font-family: 'Nunito Sans', system-ui, sans-serif;
        font-weight: 900;
        margin-top: 0.35rem;
    }

    [data-mobile-menu] a:not(:last-child) {
        font-family: 'Nunito Sans', system-ui, sans-serif;
        font-size: 1rem;
        font-weight: 800;
    }

    [data-mobile-menu] a:not(:last-child):hover {
        background: rgba(255, 255, 255, 0.12);
    }

    [data-mobile-menu] a[aria-current='page']:not(:last-child) {
        background: rgba(255, 255, 255, 0.18);
        color: var(--warm-gold) !important;
    }

    header[data-header] [data-menu-toggle] {
        color: var(--burgundy);
    }
}

@media (max-width: 767px) {
    body {
        line-height: 1.6;
    }

    main.pt-20 {
        padding-top: 5.25rem;
    }

    section {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    #home {
        min-height: 760px;
        height: auto;
        align-items: flex-end;
        padding-bottom: 5rem !important;
    }

    h1,
    .text-4xl,
    .text-5xl,
    .text-6xl,
    .text-7xl {
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .grid {
        gap: 1.25rem;
    }

    .p-8,
    .md\:p-10,
    .md\:p-12 {
        padding: 1.35rem;
    }

    footer .grid {
        text-align: left;
    }

    .modal-shell {
        align-items: flex-end;
        padding: 0;
    }

    .modal-panel {
        border-radius: 1.25rem 1.25rem 0 0;
        max-height: 88dvh;
        padding: 1.25rem;
        transform: translateY(100%);
        width: 100%;
    }
}


/* FAQ Accordion - Prevent expanded items from affecting row height */
details {
    align-self: start;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .hero-carousel__slide:first-child {
        opacity: 1;
    }
}