/* ===== Custom Properties ===== */
:root {
    --navy:       #1e2a6b;
    --navy-deep:  #141d4a;
    --sky:        #29ABE2;
    --white:      #ffffff;
    --bg-light:   #f4f6fa;
    --text:       #0f1530;
    --text-muted: #4a4f66;
    --status-planned:     #D6E4F0;
    --status-confirmed:   #D6F0D6;
    --status-opportunity: #FFF9D6;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(15, 21, 48, 0.12);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: 1.65;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ===== Header / Nav ===== */
header {
    background: rgba(20, 29, 74, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.85rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.nav-title {
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); text-decoration: none; }

/* ===== Hero ===== */
.hero {
    position: relative;
    color: var(--white);
    padding: clamp(6rem, 14vh, 10rem) 1.5rem clamp(5rem, 12vh, 8rem);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    min-height: min(82vh, 780px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('images/hero-lake-michigan.jpg');
    background-size: cover;
    background-position: center 35%;
    z-index: -2;
    transform: scale(1.02);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(10, 16, 45, 0.35) 0%,
            rgba(10, 16, 45, 0.20) 40%,
            rgba(10, 16, 45, 0.55) 85%,
            rgba(10, 16, 45, 0.75) 100%),
        linear-gradient(135deg,
            rgba(20, 29, 74, 0.35) 0%,
            rgba(41, 171, 226, 0.10) 100%);
    z-index: -1;
}
.hero-content {
    max-width: 780px;
    margin: 0 auto;
    text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.hero-heading {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}
/*
 * Logo sizing math (SVG proportions, system-font Arial-family metrics):
 *   MCA top = 45.5% of SVG height; slogan bottom = 92.8%; bottom pad = 7.2%.
 *   Text block (MCA top → slogan bottom) = 47.3% of logo height.
 *   Target: align MCA cap-top with h1 cap-top, slogan baseline with h1 baseline.
 *   Cap-height of system sans-serif ≈ 0.716 × font-size (F).
 *   logo-height = cap-height / 0.473 ≈ 1.514 × F
 *   margin-bottom (positive = shift logo up) = 1.15F − 0.109F − 0.922F ≈ 0.119 × F
 *     where 0.109F = 0.072 × logo-height (bottom pad), 0.922F = baseline position in line-box.
 *   With F = clamp(2rem, 5vw, 3.5rem):
 *     logo-height ≈ clamp(3rem, 7.6vw, 5.3rem)
 *     margin-bottom ≈ clamp(0.24rem, 0.60vw, 0.42rem)
 */
.hero-logo {
    height: clamp(3rem, 7.6vw, 5.3rem);
    width: auto;
    flex-shrink: 0;
    margin-bottom: clamp(0.12rem, 0.30vw, 0.21rem);
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    white-space: nowrap;
    margin-bottom: 0;
}
.hero-tagline {
    font-size: clamp(1.05rem, 2.1vw, 1.3rem);
    font-weight: 400;
    color: rgba(255,255,255,0.92);
    line-height: 1.55;
    margin: 1.5rem auto 2.5rem;
    max-width: 620px;
}

/* ===== Button ===== */
.btn {
    display: inline-block;
    background: var(--navy-deep);
    color: var(--white);
    padding: 0.95rem 2.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
    box-shadow: 0 4px 14px rgba(15, 21, 48, 0.22);
    border: 1px solid transparent;
}
.btn:hover {
    background: var(--sky);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(15, 21, 48, 0.28);
}
/* Hero override: light button over dark photo reads stronger */
.hero .btn {
    background: var(--white);
    color: var(--navy-deep);
    box-shadow: 0 4px 20px rgba(0,0,0,0.22);
}
.hero .btn:hover {
    background: var(--sky);
    color: var(--white);
}

/* ===== Sections ===== */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 1.5rem; }
.section-alt { background: var(--bg-light); }
.container { max-width: 1100px; margin: 0 auto; }

h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.4rem);
    color: var(--navy-deep);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
}
h3 {
    font-size: 1.15rem;
    color: var(--navy-deep);
    margin: 1.75rem 0 0.75rem;
    font-weight: 600;
    letter-spacing: -0.005em;
}
.section-intro {
    font-size: clamp(1.05rem, 1.6vw, 1.15rem);
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}
p { margin-bottom: 1rem; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

/* ===== Activities List ===== */
.activities-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.activities-list li {
    padding: 0.65rem 1rem 0.65rem 1.1rem;
    background: var(--white);
    border-left: 4px solid var(--sky);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-muted);
    font-size: 0.97rem;
}
.section-alt .activities-list li { background: var(--white); }

/* ===== Photo Grid (Club Life) ===== */
.gallery-section h2 { margin-bottom: 0.5rem; }
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.photo-grid-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    background: var(--navy-deep);
}
.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
                filter 0.4s ease;
    display: block;
}
.photo-grid-item:hover img {
    transform: scale(1.04);
    filter: brightness(1.03);
}
.photo-grid-item::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    border-radius: inherit;
    pointer-events: none;
}
@media (max-width: 768px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}
@media (max-width: 480px) {
    .photo-grid { grid-template-columns: 1fr; }
}

/* ===== Events ===== */
.events-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.legend-item {
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(0,0,0,0.13);
    color: var(--text);
}
.legend-planned     { background: var(--status-planned); }
.legend-confirmed   { background: var(--status-confirmed); }
.legend-opportunity { background: var(--status-opportunity); }

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.events-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 0.93rem;
    min-width: 500px;
}
.events-table th {
    background: var(--navy-deep);
    color: var(--white);
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.events-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    vertical-align: top;
}
.events-table tr:last-child td { border-bottom: none; }
.events-table tbody tr:hover { filter: brightness(0.96); }
.events-table tr.status-planned     { background: var(--status-planned); }
.events-table tr.status-confirmed   { background: var(--status-confirmed); }
.events-table tr.status-opportunity { background: var(--status-opportunity); }
.events-table td:first-child { white-space: nowrap; }

.events-caveat {
    margin-top: 1rem;
    font-size: 0.88rem;
    font-style: italic;
    color: var(--text-muted);
}
.loading  { color: var(--text-muted); font-style: italic; padding: 1rem 0; }
.no-events { color: var(--text-muted); font-style: italic; padding: 1rem 0; }

/* ===== Join ===== */
.join-flex {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}
.qr-placeholder {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--sky);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--sky);
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
    line-height: 1.5;
}

/* ===== Contact ===== */
.contact-list { display: grid; gap: 1.25rem; }
.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 1.05rem;
    color: var(--text-muted);
}
.contact-icon {
    font-size: 1.2rem;
    color: var(--sky);
    flex-shrink: 0;
    margin-top: 0.1em;
}
.contact-list a { color: var(--navy-deep); font-weight: 500; }
.contact-list a:hover { color: var(--sky); }

/* ===== Footer ===== */
footer {
    background: var(--navy-deep);
    padding: 2.5rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.footer-logo { height: 44px; width: auto; }
.footer-copy { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin: 0; letter-spacing: 0.01em; }

/* ===== Responsive ===== */
@media (max-width: 639px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--navy-deep);
        padding: 0.5rem 0 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.25);
        z-index: 99;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.75rem 1.5rem; display: block; }

    .hero { padding: 4rem 1.25rem 3.5rem; min-height: 70vh; }
    .section { padding: 3rem 1.25rem; }
    .join-flex { flex-direction: column; align-items: flex-start; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (min-width: 640px) {
    .activities-list { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1025px) {
    .activities-list { grid-template-columns: 1fr 1fr 1fr; }
}
