:root {
    color-scheme: dark;
    --bg: #0d0d0d;
    --surface: #141414;
    --surface-alt: #1c1c1c;
    --text: #f2f2f2;
    --muted: #a0a0a0;
    --gold: #c6a15b;
    --border: rgba(242,242,242,0.08);
    --shadow: 0 40px 120px rgba(0,0,0,0.4);
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
}
body {
    margin: 0;
    min-height: 100vh;
    font: 16px/1.75 'Inter', sans-serif;
    background: radial-gradient(circle at top, rgba(198,161,91,0.08), transparent 22%), var(--bg);
    color: var(--text);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}
img {
    max-width: 100%;
    display: block;
}
button,
a {
    font: inherit;
}
button {
    cursor: pointer;
}
.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}
.container.wide {
    width: min(1320px, calc(100% - 2rem));
}
.grid {
    display: grid;
    gap: 1.5rem;
}
.header-inner,
.footer-inner,
.membership-grid,
.dashboard-grid,
.contact-grid,
.split,
.story-grid {
    display: grid;
    gap: 1.65rem;
}
.site-header,
.site-footer {
    position: relative;
    z-index: 10;
}
.site-header {
    padding: 1.25rem 0;
    background: rgba(13,13,13,0.86);
    backdrop-filter: blur(12px);
}
.site-footer {
    background: transparent;
}
.header-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    position: relative;
}
.nav-toggle {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
}
.brand {
    color: var(--text);
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.35rem;
    width: auto;
    height: auto;
    padding: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 30;
}
.nav-toggle svg,
.nav-toggle i {
    display: block;
}
.site-nav ul {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.15rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
}
.site-nav a:hover,
.site-nav a.active {
    color: var(--gold);
}
.nav-group {
    position: relative;
}
.nav-group-toggle {
    border: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0;
}
.nav-group .caret {
    display: inline-block;
    transition: transform 0.2s ease;
}
.nav-group.open .caret {
    transform: rotate(180deg);
}
.nav-group-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    min-width: 12rem;
    background: rgba(13,13,13,0.95);
    border: 1px solid rgba(242,242,242,0.08);
    border-radius: 1rem;
    padding: 0.75rem 0;
    display: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.32);
    z-index: 20;
}
.nav-group.open .nav-group-menu,
.nav-group:hover .nav-group-menu {
    display: block;
}
.nav-group-menu li {
    list-style: none;
}
.nav-group-menu a {
    display: block;
    padding: 0.85rem 1.2rem;
    color: var(--text);
}
.nav-group-menu a:hover,
.nav-group-menu a.active {
    color: var(--gold);
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    padding: 0.95rem 1.75rem;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.13);
}
.button:hover {
    transform: translateY(-1px);
}
.button-primary {
    background: var(--gold);
    color: var(--bg);
    border-color: transparent;
}
.button-secondary,
.button-outline {
    background: rgba(255,255,255,0.05);
    color: var(--text);
    border-color: rgba(242,242,242,0.14);
}
.button-secondary:hover,
.button-outline:hover {
    background: rgba(255,255,255,0.08);
}
.button-success {
    background: #3f5e2a;
    color: var(--text);
}
.hero {
    position: relative;
    min-height: calc(100vh - 7rem);
    display: grid;
    align-items: center;
    padding: clamp(4rem, 8vw, 6rem) 0;
}
.hero-media {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1517836357463-d25dfeac3438?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    filter: saturate(0.55) brightness(0.55);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13,13,13,0.5), rgba(13,13,13,0.95));
}
.hero-copy {
    position: relative;
    color: var(--text);
    max-width: 760px;
    z-index: 1;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.5rem;
    backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.hero-copy .eyebrow,
.section .eyebrow {
    display: inline-block;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 1rem;
}
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(4rem, 6vw, 7rem);
    line-height: 0.9;
    margin: 0;
    letter-spacing: -0.05em;
}
.hero-subtitle {
    font-size: 1.1rem;
    margin: 1.25rem 0 0.75rem;
    color: var(--gold);
}
.hero-text {
    font-size: 1.05rem;
    max-width: 44rem;
    color: var(--muted);
}
.hero-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-hero {
    position: relative;
    border-radius: 1.75rem;
    overflow: hidden;
    padding: clamp(4rem, 8vw, 6rem) 0;
    margin-bottom: clamp(2rem, 4vw, 3rem);
    display: grid;
    align-items: center;
    min-height: 36rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(198,161,91,0.16), transparent 28%), linear-gradient(180deg, rgba(13,13,13,0.55), rgba(13,13,13,0.92));
}
.page-hero .hero-copy {
    position: relative;
    z-index: 1;
    max-width: 680px;
    padding: 0 1rem;
}
.page-hero h1,
.page-hero h2 {
    margin: 0;
    color: var(--text);
}
.page-hero p {
    color: rgba(242,242,242,0.82);
    max-width: 44rem;
}
.page-hero .eyebrow {
    color: rgba(242,242,242,0.64);
}
.page-hero--membership { background-image: url('https://images.unsplash.com/photo-1500534623283-312aade485b7?auto=format&fit=crop&w=1400&q=80'); }
.page-hero--manifesto { background-image: url('https://images.unsplash.com/photo-1508606572321-901ea4437077?auto=format&fit=crop&w=1400&q=80'); }
.page-hero--events { background-image: url('https://images.unsplash.com/photo-1508609349937-5ec4ae374ebf?auto=format&fit=crop&w=1400&q=80'); }
.page-hero--gallery { background-image: url('https://images.unsplash.com/photo-1469474968028-56623f02e42e?auto=format&fit=crop&w=1400&q=80'); }
.page-hero--contact { background-image: url('https://images.unsplash.com/photo-1454023492550-5696f8ff10e1?auto=format&fit=crop&w=1400&q=80'); }
.page-hero--login { background-image: url('https://images.unsplash.com/photo-1517836357463-d25dfeac3438?auto=format&fit=crop&w=1400&q=80'); }
.page-hero--dashboard { background-image: url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=1400&q=80'); }
.section {
    padding: clamp(3rem, 6vw, 5.5rem) 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.section .section-text,
.copy-block {
    max-width: 58rem;
}
.copy-block p {
    margin: 0 0 1.4rem;
}
.copy-block p:last-child {
    margin-bottom: 0;
}
.manifesto-block blockquote {
    border-left: 3px solid var(--gold);
    padding-left: 1.5rem;
    color: var(--text);
    font-size: 1.3rem;
    line-height: 1.8;
    max-width: 780px;
}
.pillars .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pillars article {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1rem;
}
.stats {
    background: rgba(255,255,255,0.03);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    text-align: center;
}
.stats-grid div {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
}
.stats-grid span {
    display: block;
    font-size: 2.5rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.75rem;
}
.why-stay .split {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
}
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.feature-list li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.75rem;
}
.feature-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--gold);
}
.feature-copy {
    color: var(--muted);
    font-size: 1.02rem;
}
.featured-runs .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.run-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1.25rem;
    min-height: 260px;
    display: grid;
    gap: 1rem;
}
.run-card h3 {
    margin-top: 0;
    letter-spacing: 0.01em;
}
.run-card .distance {
    color: var(--gold);
    margin: 0.75rem 0 0;
}
.membership-benefits {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.membership-benefits article {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 1.75rem;
    border-radius: 1rem;
}
.membership-benefits article h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}
.membership-panel {
    align-self: start;
}
.join-section {
    padding-top: 0;
}
.join-panel {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1.25rem;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}
.join-panel h2 {
    margin-top: 0;
}
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 0 1rem;
}
.section-text {
    color: var(--muted);
}
.story-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
}
.story h2,
.manifesto-page h1,
.events-page h1,
.gallery-page h1,
.contact-page h1,
.auth-page h1,
.dashboard-page h1 {
    font-family: 'Playfair Display', serif;
    margin: 0 0 1rem;
    font-size: clamp(2.5rem, 4vw, 4rem);
}
.story-detail {
    display: grid;
    align-content: center;
    color: var(--muted);
}
.final-panel {
    text-align: center;
    display: grid;
    gap: 1rem;
}
.notice {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 0.85rem;
}
.notice-success {
    background: rgba(62, 100, 42, 0.16);
    border: 1px solid rgba(62, 100, 42, 0.32);
    color: #eaf5d5;
}
.notice-error {
    background: rgba(180, 55, 55, 0.18);
    border: 1px solid rgba(180, 55, 55, 0.3);
    color: #f4d2d2;
}
.events-list {
    display: grid;
    gap: 1.5rem;
}
.event-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
}
.event-card .meta {
    display: flex;
    gap: 1rem;
    color: var(--muted);
    margin: 0.5rem 0 0;
}
.gallery-page .masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.gallery-page figure {
    margin: 0;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--surface);
}
.gallery-page img {
    width: 100%;
    min-height: 260px;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.gallery-page figure:hover img {
    transform: scale(1.03);
}
.gallery-page figcaption {
    padding: 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}
.contact-grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
    gap: 2rem;
}
.contact-left {
    display: grid;
    gap: 1.5rem;
}
.contact-panel {
    display: grid;
    gap: 1.25rem;
    justify-self: end;
    width: 100%;
    max-width: 640px;
}
.contact-info {
    display: grid;
    gap: 1.2rem;
    border: 1px solid rgba(242,242,242,0.08);
    background: rgba(255,255,255,0.03);
    padding: 2rem;
    border-radius: 1.25rem;
}
.contact-info h3 {
    margin: 0 0 0.9rem;
    font-size: 1.25rem;
}
.contact-info p,
.contact-info li {
    color: var(--muted);
}
.contact-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.85rem;
}
.contact-info li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.contact-info i {
    color: var(--gold);
    min-width: 1.3rem;
}
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    color: var(--text);
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.social-links a:hover {
    transform: translateY(-2px);
    background: rgba(198,161,91,0.17);
}
.contact-form,
.auth-form {
    display: grid;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1rem;
}
.contact-form label,
.auth-form label {
    display: grid;
    gap: 0.55rem;
    font-size: 0.94rem;
    color: var(--muted);
}
.contact-form input,
.contact-form textarea,
.contact-form select,
.auth-form input {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(242,242,242,0.1);
    background: #111;
    color: var(--text);
}
.contact-form textarea {
    resize: vertical;
}
.auth-panel {
    max-width: 760px;
    margin: 0 auto;
}
.auth-note {
    color: var(--muted);
    font-size: 0.95rem;
}
.auth-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.auth-preview .panel-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
}
.dashboard-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
}
.dashboard-panels {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.panel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1rem;
}
.panel-card h2 {
    margin: 1rem 0 0.5rem;
    font-size: 2.4rem;
}
.list-plain {
    list-style: none;
    padding: 0;
    margin: 0;
}
.list-plain li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(242,242,242,0.08);
    padding: 0.85rem 0;
}
.leaderboard {
    list-style: decimal inside;
    padding: 0;
    margin: 1rem 0 0;
}
.leaderboard li {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    padding: 0.75rem 0;
}
.strava-note {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}
.site-footer {
    padding: 3rem 0 2.5rem;
    border-top: 1px solid rgba(242,242,242,0.12);
    background: rgba(7,7,7,0.96);
    margin-top: 3rem;
}
.footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(242,242,242,0.08);
}
.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--muted);
}
.footer-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 2rem 0 1.5rem;
}
.footer-col h3 {
    margin: 0 0 1rem;
    color: var(--text);
    font-size: 1rem;
}
.footer-col a {
    display: block;
    color: var(--muted);
    margin-bottom: 0.85rem;
}
.footer-col a:hover {
    color: var(--gold);
}
.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}
.footer-legal a {
    color: var(--gold);
    text-decoration: none;
}
.footer-legal a:hover {
    text-decoration: underline;
}
@media (max-width: 900px) {
    .footer-panels {
        grid-template-columns: 1fr;
    }
    .footer-legal {
        flex-direction: column;
        align-items: flex-start;
    }
}
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
@media (max-width: 900px) {
    .header-inner,
    .footer-inner,
    .why-stay .split,
    .story-grid,
    .contact-grid,
    .membership-grid,
    .dashboard-grid,
    .membership-benefits,
    .auth-preview,
    .dashboard-panels {
        grid-template-columns: 1fr;
    }
    .hero h1,
    .page-hero h1,
    .page-hero h2 {
        font-size: clamp(2.8rem, 10vw, 4rem);
    }
    .hero-copy,
    .page-hero .hero-copy {
        padding: 1.75rem 1.2rem;
    }
    .site-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: rgba(13,13,13,0.98);
        border-top: 1px solid rgba(242,242,242,0.08);
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.25s ease;
    }
    .site-nav.open {
        max-height: 420px;
    }
    .site-nav ul {
        flex-direction: column;
        padding: 1.5rem;
    }
    .site-nav a {
        padding: 0.75rem 0;
    }
    .nav-toggle {
        display: inline-flex;
    }
    .events-page .event-card,
    .panel-card,
    .run-card,
    .contact-form,
    .auth-form {
        padding: 1.5rem;
    }
    .gallery-page .masonry-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .site-nav {
        max-height: 0;
    }
    .site-nav.open {
        max-height: 999px;
    }
    .site-nav ul,
    .featured-runs .cards-grid,
    .dashboard-panels,
    .stats-grid,
    .membership-benefits,
    .auth-preview {
        grid-template-columns: 1fr;
    }
    .footer-panels {
        grid-template-columns: 1fr;
    }
    .footer-col:nth-child(3) {
        display: none;
    }
    .footer-col:nth-child(2) {
        display: block;
    }
    .footer-legal {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    .button,
    button {
        width: 100%;
    }
    .auth-panel {
        max-width: 100%;
    }
    .event-card,
    .run-card,
    .panel-card,
    .contact-form,
    .auth-form,
    .join-panel,
    .contact-info {
        padding: 1.4rem;
    }
    .run-card {
        min-height: auto;
    }
    .page-hero {
        min-height: 28rem;
        padding: 3rem 0;
    }
    .site-nav.open {
        position: fixed;
        inset: 5rem 0 auto 0;
        z-index: 25;
    }
}
@media (max-width: 540px) {
    .footer-col:nth-child(2) {
        display: none;
    }
    .footer-links {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-header {
        padding: 1rem 0;
    }
    .hero-copy,
    .page-hero .hero-copy,
    .contact-info,
    .join-panel {
        padding: 1.25rem;
    }
}
