:root {
    --sand: #f6efe2;
    --cream: #fffaf2;
    --ink: #1e1c17;
    --sage: #5f6b52;
    --clay: #9e5f3c;
    --rust: #7f3f24;
    --line: rgba(30, 28, 23, 0.12);
    --shadow: 0 24px 60px rgba(73, 47, 24, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 40%),
        linear-gradient(180deg, #f2e3c9 0%, #f9f4eb 28%, #fcfaf6 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
        'logo brand spacer'
        '. . nav';
    align-items: center;
    gap: 6px;
    min-height: 140px;
    padding: 12px 14px;
    z-index: 10;
    background: #738561;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.site-header::after {
    content: '';
    grid-area: spacer;
    width: 160px;
    height: 1px;
}

.brand-logo {
    grid-area: logo;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 100%;
    align-self: center;
    padding-top: 8px;
}

.brand-badge {
    width: 220px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 20px;
    margin-top: 8px;
}

.brand-info {
    grid-area: brand;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    text-align: center;
}

.brand-name {
    display: inline-block;
    font-size: 2.8rem;
    line-height: 1.05;
    font-weight: 800;
    margin: 0;
    text-align: center;
    color: #1e1c17;
    font-family: 'Manrope', sans-serif;
}

.brand-tagline {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
    color: #1e1c17;
    text-align: center;
    font-family: 'Manrope', sans-serif;
}

.site-nav {
    grid-area: nav;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 0;
    justify-self: end;
}

.site-nav a {
    padding: 6px 12px;
    border-radius: 999px;
    color: rgba(30, 28, 23, 0.72);
    transition: 180ms ease;
    font-size: 0.88rem;
    white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--ink);
    background: white;
}

.hero,
.page-hero,
.story-grid,
.news-layout,
.site-footer {
    margin-top: 28px;
}

.hero {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-layout {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

.page-hero,
.hero-copy,
.story-card,
.footer-card {
    background: rgba(255, 250, 242, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
}

.hero-copy,
.hero-media,
.page-hero,
.story-card,
.footer-card {
    border-radius: 32px;
}

.hero-copy,
.page-hero {
    padding: 38px;
}

.hero-copy h1,
.page-hero h1 {
    margin: 10px 0 18px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.page-hero-compact h1 {
    font-size: clamp(2.2rem, 3.2vw, 2.8rem);
    line-height: 1.05;
}

.lead {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(30, 28, 23, 0.84);
}

.eyebrow {
    margin: 0;
    color: var(--rust);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 800;
}

.button-primary {
    background: var(--ink);
    color: white;
}

.button-secondary {
    background: rgba(95, 107, 82, 0.12);
    color: var(--ink);
}

.hero-media {
    position: relative;
    padding: 28px;
    background: linear-gradient(180deg, rgba(126, 63, 36, 0.18), rgba(95, 107, 82, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
}

.photo-frame {
    overflow: hidden;
    border-radius: 26px;
    min-height: 100%;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stat-card {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: min(220px, calc(100% - 56px));
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(30, 28, 23, 0.88);
    color: white;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    font-family: 'Fraunces', serif;
}

.story-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.site-footer {
    display: block;
    width: 100%;
    margin: 28px auto 0;
    max-width: min(1180px, calc(100% - 32px));
}

.mission-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 10px 0 14px;
    font-size: 1.7rem;
}

.story-card p,
address,
.friend-links {
    line-height: 1.75;
    color: rgba(30, 28, 23, 0.78);
}

.news-card {
    min-width: 0;
}

.facebook-frame {
    margin: 22px 0 18px;
    padding: 12px;
    border-radius: 24px;
    background: white;
    border: 1px solid var(--line);
}

.facebook-frame iframe {
    width: 100%;
    max-width: 100%;
    border-radius: 18px;
}

.side-note {
    align-self: start;
}

.inline-link,
.footer-section a,
.friend-links a {
    color: var(--rust);
    font-weight: 700;
}

.footer-panel {
    width: 100%;
    margin: 0;
    padding: 36px 32px 32px;
    background: #738561;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 0;
    box-shadow: var(--shadow);
}

.footer-header {
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
}

.footer-header h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.05;
}

.footer-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    margin-top: 18px;
}

.footer-attribution {
    margin: 18px 0 0;
    text-align: center;
}

.footer-attribution a {
    color: var(--rust);
    font-weight: 700;
}

.footer-section {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.footer-section h3 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    font-family: 'Fraunces', serif;
}

.footer-section-support {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.support-layout {
    display: grid;
    gap: 14px;
    align-items: start;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.support-copy h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-family: 'Fraunces', serif;
}

.support-copy p {
    margin: 0;
    line-height: 1.55;
    color: rgba(30, 28, 23, 0.78);
}

.support-qr-column {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.support-qr-item {
    margin: 0;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
    display: grid;
    gap: 6px;
}

.support-link-card {
    display: grid;
    gap: 10px;
    align-items: center;
    justify-items: center;
    padding: 8px;
    color: inherit;
    text-decoration: none;
}

.payment-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 80px);
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    background: white;
    padding: 8px;
}

.payment-logo svg {
    width: 100%;
    height: 100%;
}

.payment-copy {
    display: grid;
    gap: 2px;
    text-align: center;
}

.payment-copy strong {
    font-size: 0.88rem;
}

.support-qr-item img {
    width: min(100%, 80px);
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 8px;
    background: white;
}

.support-qr-item figcaption {
    display: grid;
    gap: 2px;
    text-align: center;
}

.support-qr-item strong {
    font-size: 0.88rem;
}

address {
    font-style: normal;
}

address span {
    display: block;
}

.friend-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dot {
    margin: 0 6px;
}

.admin-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.admin-header,
.admin-card,
.admin-login-card {
    background: rgba(255, 250, 242, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    border-radius: 28px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px 28px;
    margin-bottom: 24px;
}

.admin-header h1,
.admin-card h2,
.admin-login-card h2 {
    margin: 10px 0 0;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-user-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--line);
    font-size: 0.92rem;
}

.admin-actions form {
    margin: 0;
}

.admin-card {
    padding: 28px;
}

.admin-login-card {
    max-width: 640px;
}

.status-banner {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(95, 107, 82, 0.16);
    border: 1px solid rgba(95, 107, 82, 0.24);
}

.status-banner-error {
    background: rgba(159, 62, 36, 0.14);
    border-color: rgba(159, 62, 36, 0.26);
}

.status-banner ul {
    margin: 10px 0 0;
}

.stacked-form {
    display: grid;
    gap: 18px;
}

.form-grid,
.page-list,
.repeater-grid {
    display: grid;
    gap: 18px;
}

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

.page-list,
.repeater-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 0.9rem;
    font-weight: 700;
}

.field input,
.field textarea {
    width: 100%;
    padding: 13px 15px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
    font: inherit;
}

.field textarea {
    resize: vertical;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
}

.visibility-section {
    padding: 18px;
    background: rgba(95, 107, 82, 0.08);
    border: 1px solid rgba(95, 107, 82, 0.16);
    border-radius: 16px;
    margin: 18px 0;
}

.visibility-section .eyebrow {
    grid-column: 1 / -1;
    margin-bottom: 6px;
}

.field-wide {
    grid-column: 1 / -1;
}

.admin-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

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

.image-upload-card {
    display: grid;
    gap: 16px;
}

.admin-image-preview {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: white;
}

.admin-qr-preview {
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

@media (max-width: 980px) {
    .hero,
    .news-layout,
    .story-grid,
    .mission-grid,
    .form-grid,
    .page-list,
    .repeater-grid {
        grid-template-columns: 1fr;
    }

    .site-header {
        display: flex;
        position: static;
        gap: 12px;
        padding: 12px 14px;
        flex-wrap: wrap;
    }

    .site-header::after {
        content: none;
    }

    .brand-logo {
        flex: 0 0 auto;
    }

    .brand-info {
        flex: 1 1 auto;
    }

    .site-nav {
        flex-basis: 100%;
        order: 3;
    }

    .brand-badge {
        width: 140px;
    }

    .admin-header,
    .admin-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand-badge {
        width: 120px;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 12px;
    }

    .hero-copy,
    .page-hero,
    .story-card,
    .footer-card,
    .hero-media,
    .admin-card,
    .admin-header {
        padding: 22px;
        border-radius: 24px;
    }

    .hero-copy h1,
    .page-hero h1 {
        font-size: 2.3rem;
    }

    .site-nav {
        gap: 6px;
    }

    .site-nav a {
        padding: 9px 14px;
        font-size: 0.9rem;
    }

    .footer-panel {
        width: 100%;
        padding: 24px 20px 22px;
        border-radius: 0;
    }

    .footer-section {
        padding: 18px;
    }

    .support-layout {
        padding: 18px;
    }

    .support-qr-item img {
        width: min(100%, 110px);
    }
}