/* =========================================================================
   Granite Lodge #272 - public site stylesheet
   -------------------------------------------------------------------------
   Plain CSS, no build step. Edit and push.
   Palette follows momason.org (Grand Lodge of Missouri): navy, medium blue, greys.
   ========================================================================= */

:root {
    /* Palette borrowed from momason.org (Grand Lodge of Missouri) */
    --navy: #0c2e4e;           /* dark blue: buttons, nav, page headers, CTA */
    --blue: #084c7f;           /* medium blue: hover / active state */
    --grey-dark: #696969;      /* dark grey section background */
    --grey: #858585;           /* mid grey section background */
    --grey-light: #f0f0f0;     /* light grey section background */
    --gold: #c79a3f;           /* Grand Lodge accent, available if wanted */

    --brand: var(--navy);      /* links, headings accents */
    --brand-dark: var(--blue); /* hover */
    --brand-darker: #08213a;
    --brand-light: #e7f4fd;

    --ink: #333333;            /* darkest text */
    --ink-700: #43484d;        /* headings */
    --ink-600: #666d70;        /* body copy */
    --ink-500: #86939e;        /* muted text, labels */

    --mist-100: var(--grey-light); /* light panel background */
    --mist-200: #e1e8ee;       /* borders */
    --mist-300: #d3dce4;

    --white: #ffffff;
    --danger: #dc2626;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --success-text: #166534;

    --font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --header-height: 80px;
    --container: 1280px;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-700);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink-700); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 640px) { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

.site-main { flex: 1; padding-top: var(--header-height); }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn--primary { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn--primary:hover, .btn--primary:focus, .btn--primary:active, .btn--primary.is-active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn--outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn--outline:hover, .btn--outline:focus, .btn--outline:active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn--outline-brand { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn--outline-brand:hover, .btn--outline-brand:focus, .btn--outline-brand:active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Header / navigation ---------- */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    height: var(--header-height);
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand-mark { width: 44px; height: 44px; }
.brand-name { display: block; font-size: 20px; font-weight: 700; color: var(--white); letter-spacing: -0.01em; line-height: 1.1; }
.brand-name span { color: var(--white); opacity: 0.85; }
.brand-sub { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.brand:hover .brand-name { color: var(--white); }

.nav-toggle {
    display: inline-flex;
    padding: 8px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--white);
    cursor: pointer;
}
.nav-toggle:hover { background: var(--blue); }
.nav-toggle svg { width: 24px; height: 24px; }

.site-nav {
    display: none;
    position: absolute;
    top: var(--header-height); left: 0; right: 0;
    padding: 16px;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow);
}
.site-nav.is-open { display: block; }

.nav-link {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--white);
    background: transparent;
    border: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}
.nav-link:hover, .nav-link:focus-visible, .nav-link.is-active { background: var(--blue); color: var(--white); }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.nav-dropdown-toggle svg { width: 16px; height: 16px; }
.nav-dropdown-menu { padding-left: 16px; }
.nav-dropdown-menu a { display: block; padding: 8px 16px; font-size: 14px; color: var(--white); }
.nav-dropdown-menu a:hover { background: var(--blue); color: var(--white); }

@media (min-width: 1024px) {
    .nav-toggle { display: none; }
    .site-nav {
        display: flex;
        align-items: center;
        gap: 4px;
        position: static;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }
    .nav-link { width: auto; display: inline-block; }
    .nav-dropdown-menu {
        display: none;
        position: absolute;
        right: 0; top: 100%;
        min-width: 240px;
        padding: 8px 0;
        background: var(--navy);
        border-radius: var(--radius);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
}

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section--muted { background: var(--grey-light); }
/* Solid colour sections (white text). Swap the class on any section to recolour it. */
.section--navy { background: var(--navy); color: var(--white); }
.section--blue { background: var(--blue); color: var(--white); }
.section--grey { background: var(--grey); color: var(--white); }
.section--grey-dark { background: var(--grey-dark); color: var(--white); }
.section--brand { background: var(--navy); color: var(--white); }
.section--navy h1, .section--navy h2, .section--navy h3,
.section--blue h1, .section--blue h2, .section--blue h3,
.section--grey h1, .section--grey h2, .section--grey h3,
.section--grey-dark h1, .section--grey-dark h2, .section--grey-dark h3,
.section--brand h1, .section--brand h2, .section--brand h3 { color: var(--white); }
.section--navy .prose, .section--blue .prose, .section--grey .prose, .section--grey-dark .prose { color: rgba(255, 255, 255, 0.9); }
.section--navy a, .section--blue a, .section--grey a, .section--grey-dark a { color: var(--white); text-decoration: underline; }
.section--narrow { max-width: 900px; margin: 0 auto; text-align: center; }
@media (min-width: 640px) { .section { padding: 80px 0; } }

.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; }
.section-title { font-size: 30px; }
@media (min-width: 640px) { .section-title { font-size: 36px; } }

.prose { font-size: 18px; line-height: 1.75; color: var(--ink-600); }
.prose > * + * { margin-top: 20px; }
.prose a { font-weight: 600; }

/* ---------- Home: hero ---------- */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--header-height));
    background: var(--ink) url('../images/lodge_header.webp') center / cover no-repeat;
    /* Parallax: the photo stays put while the page scrolls over it. */
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
}
/* iOS Safari can't do fixed backgrounds with cover sizing; fall back to a normal scroll there. */
@media (hover: none) and (pointer: coarse) {
    .hero { background-attachment: scroll; }
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.7));
}
.hero-content { position: relative; padding: 96px 0; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.8); }
.hero-title { margin-top: 16px; font-size: 36px; font-weight: 700; color: var(--white); line-height: 1.15; }
.hero-subtitle { margin-top: 16px; font-size: 20px; color: rgba(255, 255, 255, 0.9); }
.hero-meta { margin-top: 8px; color: rgba(255, 255, 255, 0.8); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 40px; }
@media (min-width: 640px) { .hero-title { font-size: 48px; } .hero-subtitle { font-size: 24px; } }
@media (min-width: 1024px) { .hero-title { font-size: 60px; } }

/* ---------- Home: about ---------- */

.about-grid { display: grid; gap: 48px; align-items: center; }
.about-image { display: flex; justify-content: center; }
.about-image img { width: 256px; }
@media (min-width: 1024px) {
    .about-grid { grid-template-columns: 1fr 2fr; }
}

/* ---------- Home: meeting info strip ---------- */

.info-strip { background: var(--grey-dark); color: var(--white); }
.info-strip .container { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 32px; text-align: center; }
.info-label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.info-value { margin-top: 4px; font-weight: 600; color: var(--white); }
@media (min-width: 640px) { .info-strip .container { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Home: Missouri facts + stats ---------- */

.facts-grid { display: grid; gap: 48px; align-items: center; }
.facts-logo { display: inline-block; }
.facts-logo img { height: 80px; width: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.stat { padding: 24px; border-radius: 8px; background: var(--blue); color: var(--white); text-align: center; }
.stat-value { font-size: 36px; font-weight: 700; color: var(--white); line-height: 1.1; }
.stat-label { margin-top: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
@media (min-width: 1024px) { .facts-grid { grid-template-columns: 1fr 1fr; } }
.facts-map { grid-column: 1 / -1; margin: 16px 0 0; text-align: center; }
.facts-map img { margin: 0 auto; border-radius: 8px; box-shadow: var(--shadow); }
.facts-map figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-500); }

/* ---------- Home: Masonic Home CTA ---------- */

.section.cta { background: #4b5563; }  /* "We Are Where You Are" block */
.cta .eyebrow { color: rgba(255, 255, 255, 0.8); }
.cta-title { margin-top: 12px; font-size: 30px; font-weight: 700; }
.cta-text { margin-top: 24px; font-size: 18px; line-height: 1.75; color: rgba(255, 255, 255, 0.9); }
.cta-note { margin-top: 16px; color: rgba(255, 255, 255, 0.8); }
.cta .btn { margin-top: 32px; }
@media (min-width: 640px) { .cta-title { font-size: 36px; } }

/* ---------- Inner page header ---------- */

.page-header { padding: 56px 0; background: var(--navy); color: var(--white); text-align: center; }
.page-title { font-size: 36px; font-weight: 700; color: var(--white); }
@media (min-width: 640px) { .page-title { font-size: 48px; } }

/* ---------- Officers ---------- */

.officers-grid { display: grid; gap: 40px; }
.officer-card { overflow: hidden; border-radius: 8px; background: var(--white); box-shadow: var(--shadow); border: 1px solid var(--mist-200); }
/* Photos are shown whole at their own proportions - never cropped. */
.officer-photo { background: var(--grey-light); display: flex; align-items: flex-start; justify-content: center; }
.officer-photo img { width: 100%; height: auto; }
.officer-photo .placeholder { width: 96px; margin: 48px auto; opacity: 0.3; }
.officer-body { padding: 20px; text-align: center; }
.officer-title { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.officer-name { margin-top: 4px; font-size: 20px; font-weight: 600; color: var(--ink); }
.empty-note { text-align: center; font-size: 18px; color: var(--ink-500); }
@media (min-width: 640px) { .officers-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .officers-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 48px; }
@media (min-width: 1024px) {
    .contact-grid { grid-template-columns: 3fr 2fr; }
}

.alert { padding: 16px; border-radius: var(--radius); margin-bottom: 24px; }
.alert--success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success-text); }

.form > * + * { margin-top: 20px; }
.form-row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 600; color: var(--ink-700); }
.required { color: var(--danger); }
.form-input {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--mist-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    font: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.form-input::placeholder { color: var(--ink-500); }
.form-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--brand-light); }
textarea.form-input { resize: vertical; }
.form-error { margin-top: 4px; font-size: 14px; color: var(--danger); }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.radio-group { display: flex; gap: 24px; }
.radio-group label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-700); }
.radio-group input { accent-color: var(--brand); }

.honeypot { position: absolute; left: -9999px; }

.aside > * + * { margin-top: 32px; }
.aside-card { padding: 24px; border-radius: 8px; background: var(--grey-light); }
.aside-card h2 { font-size: 18px; font-weight: 700; color: var(--ink); }
.aside-card p, .aside-card address { margin-top: 8px; color: var(--ink-600); line-height: 1.6; }
.aside-card ul { margin-top: 8px; }
.aside-card li + li { margin-top: 8px; }
.aside-card a { font-weight: 600; }
.aside-card .link { display: inline-block; margin-top: 16px; }

/* ---------- Footer ---------- */

.site-footer { background-color: var(--navy); color: var(--white); }
.site-footer a { color: rgba(255, 255, 255, 0.9); }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; gap: 40px; padding: 56px 0; }
.footer-brand { font-size: 18px; font-weight: 700; }
.footer-heading { font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
.footer-grid address, .footer-grid p:not(.footer-heading):not(.footer-brand) { margin-top: 12px; color: rgba(255, 255, 255, 0.9); }
.footer-links { margin-top: 12px; }
.footer-links li + li { margin-top: 8px; }
.footer-bottom { background-color: var(--grey-dark); border-top: 1px solid rgba(255, 255, 255, 0.2); }
.footer-bottom .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 20px;
    padding-bottom: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}
@media (min-width: 640px) { .footer-bottom .container { flex-direction: row; } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- hCaptcha ---------- */

.h-captcha { margin-top: 20px; }

/* ---------- Pay dues ---------- */

.dues-grid { display: grid; gap: 48px; }
@media (min-width: 1024px) { .dues-grid { grid-template-columns: 3fr 2fr; } }

.form-section-title { font-size: 20px; font-weight: 700; color: var(--ink); padding-top: 8px; border-top: 1px solid var(--mist-200); margin-top: 32px !important; padding-top: 24px; }
.form-section-title:first-of-type { border-top: 0; margin-top: 0 !important; padding-top: 0; }
.form-hint { margin-top: 4px; font-size: 14px; color: var(--ink-500); }
.optional { font-weight: 400; color: var(--ink-500); }
.alert--error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

.dues-item { padding: 20px; border: 1px solid var(--mist-300); border-left: 5px solid var(--navy); border-radius: 8px; background: var(--white); box-shadow: var(--shadow); }
.dues-item-head { display: flex; align-items: center; gap: 12px; }
.dues-required-mark { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 6px; background: var(--navy); color: var(--white); }
.dues-required-mark svg { width: 14px; height: 14px; }
.dues-required-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--brand-light); color: var(--navy); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle; }
.dues-item-name { font-weight: 600; color: var(--ink); }
.dues-item-head .dues-item-amount { margin-left: auto; font-weight: 700; color: var(--navy); font-size: 20px; }
.dues-item-desc { display: block; margin-top: 8px; font-size: 14px; color: var(--ink-500); }

.dues-breakdown { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 14px; }
.dues-breakdown td { padding: 4px 0; color: var(--ink-700); }
.dues-breakdown td:last-child { text-align: right; white-space: nowrap; }
.dues-breakdown tr.is-subline td { padding-left: 24px; color: var(--ink-600); font-size: 13px; }
.dues-breakdown tr.is-subline td:last-child { padding-left: 0; }

.donation-list { display: grid; gap: 12px; }
.donation-item { display: grid; grid-template-columns: 1fr 140px; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--mist-200); border-radius: 8px; }
.donation-label { cursor: pointer; }
.donation-input { position: relative; }
.donation-currency { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-500); }
.donation-input .form-input { padding-left: 26px; text-align: right; }
.donation-item .form-error { grid-column: 1 / -1; }
@media (max-width: 480px) { .donation-item { grid-template-columns: 1fr; } }

.dues-summary { padding: 20px; border-radius: 8px; background: var(--grey-light); border: 1px solid var(--mist-200); }
.dues-summary-row { display: flex; justify-content: space-between; padding: 6px 0; color: var(--ink-600); }
.dues-summary-total { border-top: 1px solid var(--mist-300); margin-top: 6px; padding-top: 12px; font-size: 20px; font-weight: 700; color: var(--ink); }

/* ---------- Contact map ---------- */

.lodge-map { width: 100%; height: 260px; margin: 12px 0 16px; border-radius: var(--radius); background: var(--mist-200); overflow: hidden; }
@media (min-width: 640px) { .lodge-map { height: 320px; } }
