/* ============================================================
   Techalicious Club v2 — toned blue (not purple)
   Static site / Neocities-ready
   ============================================================ */

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

:root {
    --navy:        #1E3A5F;  /* deep blue navy - nav, headings */
    --navy-deep:   #152A45;  /* deeper blue - code / dark surfaces */
    --blue:        #2563EB;  /* clear blue - links, CTAs */
    --blue-bright: #93C5FD;  /* light blue - footer accents */
    --purple:      #1D4ED8;  /* was magenta spark; now strong blue accent */
    --green:       #059669;
    --amber:       #D97706;
    --red:         #DC2626;
    --ice:         #EFF6FF;  /* pale blue ice - cards */
    --ice-deep:    #DBEAFE;  /* blue section rules */
    --white:       #ffffff;
    --text:        #1F2937;
    --text-light:  #6B7280;
    --shadow:       rgba(30, 58, 95, 0.12);
    --shadow-heavy: rgba(30, 58, 95, 0.22);
    --radius:      10px;
    --radius-lg:   14px;
    --code-bg:     #152A45;
    --code-text:   #DBEAFE;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Equal top/bottom margin so headings do not crowd the line above */
h1, h2, h3, h4 {
    color: var(--navy);
    line-height: 1.3;
}
h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0.85rem 0;
}
h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0.85rem 0;
}
h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0.65rem 0;
}
h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.55rem 0;
}

a { color: var(--blue); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--navy); }

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

/*
 * Full-bleed navy bar + content-width rail (no extra HTML required).
 * Logo + links sit in a max 960px row; navy paints edge-to-edge via ::before.
 */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
    width: 100%;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.25rem;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 12px var(--shadow-heavy);
}

.top-nav::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: var(--navy);
    z-index: -1;
    pointer-events: none;
    box-shadow: 0 2px 12px var(--shadow-heavy);
}

/* Optional wrapper if present (same rail behaviour) */
.nav-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 56px;
    position: relative;
}

/* Keep logo + links above full-bleed navy paint */
.top-nav > a,
.top-nav > .logo,
.top-nav > .nav-toggle,
.top-nav > .nav-toggle-label,
.top-nav > .nav-links,
.top-nav > .nav-inner {
    position: relative;
    z-index: 1;
}

.top-nav a.logo,
.top-nav .logo {
    color: var(--white);
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0.15rem 0;
}
.top-nav a.logo:hover,
.top-nav .logo:hover {
    color: #fff;
    opacity: 0.92;
}
.top-nav .logo span { color: var(--blue-bright); font-weight: 600; }

/* Tight cluster on the right of the rail — never stretched across the viewport */
.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: #E0F2FE;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.nav-links a.club-cta {
    background: var(--blue);
    color: #fff !important;
    margin-left: 0.45rem;
    padding: 0.45rem 1.05rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}
.nav-links a.club-cta:hover {
    background: #1D4ED8;
    color: #fff !important;
}

.nav-toggle { display: none; }
.nav-toggle-label {
    display: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: #fff;
    height: 2px;
    width: 100%;
    position: absolute;
    left: 0;
    border-radius: 1px;
}
.nav-toggle-label span { top: 9px; }
.nav-toggle-label span::before { content: ""; top: -8px; }
.nav-toggle-label span::after { content: ""; top: 8px; }

/* Mobile: keep the hamburger drawer (full-bleed under bar) */
@media (max-width: 720px) {
    .nav-inner {
        padding: 0 1rem;
        min-height: 52px;
    }
    .nav-toggle-label { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        width: 100vw;
        transform: translateX(-50%);
        background: var(--navy-deep);
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        padding: 0.65rem 0.85rem 0.9rem;
        gap: 0.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 20px var(--shadow-heavy);
        z-index: 101;
    }
    .nav-toggle:checked ~ .nav-links { display: flex; }
    .nav-links a {
        padding: 0.7rem 0.9rem;
        border-radius: 8px;
        font-size: 0.98rem;
    }
    .nav-links a.club-cta {
        margin-left: 0;
        margin-top: 0.25rem;
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
    }
}

/* Mid widths: keep cluster tight, slightly smaller type */
@media (min-width: 721px) and (max-width: 900px) {
    .nav-links a { padding: 0.38rem 0.65rem; font-size: 0.88rem; }
    .nav-links a.club-cta { padding: 0.4rem 0.85rem; margin-left: 0.3rem; }
}

.page { flex: 1; width: 100%; }

.hero {
    text-align: center;
    padding: 2.5rem 1.25rem 1.5rem;
}
.hero-logo {
    /* slightly larger logo (was 420px) */
    width: min(500px, 90vw);
    margin: 0 auto 1.25rem;
}
.subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 40rem;
    margin: 0.75rem auto 0;
}
.event-line {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--navy);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 1.5rem;
}
.stat-card {
    background: var(--ice);
    border: 1px solid var(--ice-deep);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}
.stat-card .number {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--blue);
}
.stat-card .number.blue { color: var(--blue); }
.stat-card .number.purple { color: #1D4ED8; }
.stat-card .number.green { color: var(--green); }
.stat-card .number.amber { color: var(--amber); }
.stat-card .label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.section-header {
    max-width: 900px;
    margin: 2rem auto 1rem;
    padding: 0 1rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.section-header h2 { margin: 0; }
.section-header .meta { color: var(--text-light); font-size: 0.95rem; }

.feature-grid,
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    max-width: 960px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}
.presentation-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

.feature-card,
.tutorial-card,
.presentation-card {
    display: block;
    flex: 0 1 240px;
    width: 240px;
    background: var(--white);
    border: 1px solid var(--ice-deep);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem;
    /* weight the shadow under the card, not the side */
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
    color: inherit;
    text-align: center;
}
.feature-card:hover,
.tutorial-card:hover,
.presentation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-heavy);
    color: inherit;
}
.feature-card .card-icon,
.tutorial-card .card-icon,
.presentation-card .card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 2.4rem;
    line-height: 1;
    margin: 0 auto 0.65rem;
    text-align: center;
}
.feature-card h3,
.tutorial-card h3,
.presentation-card h3 {
    margin: 0.5rem 0;
}
.tag-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--blue);
}
.tag-row .date { color: var(--navy); }
.tag-row .files { color: var(--text-light); font-weight: 600; }
.read-arrow,
.feature-arrow {
    margin-top: 0.85rem;
    font-weight: 700;
    color: var(--blue);
    font-size: 0.95rem;
}

.time-notice {
    background: var(--ice);
    border: 1px solid var(--ice-deep);
    border-radius: var(--radius);
    max-width: 960px;
    margin: 0 auto 2rem;
    padding: 1rem 1.25rem;
    color: var(--text);
}
.time-notice-icon { margin-right: 0.35rem; }

.flash { padding: 0.75rem 1rem; text-align: center; }
.flash-ok { background: #D1FAE5; color: #065F46; }
.flash-err { background: #FEE2E2; color: #991B1B; }

.site-footer,
.footer-v2 {
    margin-top: auto;
    background: var(--navy);
    color: #BFDBFE;
    padding: 1.75rem 1.25rem;
    text-align: center;
    font-size: 0.9rem;
}
.site-footer a,
.footer-v2 a { color: var(--blue-bright); margin: 0 0.45rem; }
.site-footer a:hover,
.footer-v2 a:hover { color: #fff; }
.disclaimer { opacity: 0.8; margin-top: 0.75rem; font-size: 0.85rem; }

.cta-btn {
    display: inline-block;
    background: var(--blue);
    color: #fff !important;
    font-weight: 700;
    padding: 0.85rem 1.4rem;
    border-radius: 999px;
    box-shadow: 0 4px 14px var(--shadow);
}
.cta-btn:hover { background: var(--navy); color: #fff !important; }
.cta-btn.secondary {
    background: var(--white);
    color: var(--navy) !important;
    border: 2px solid var(--navy);
    box-shadow: none;
}
.cta-btn.secondary:hover { background: var(--ice); }
