/* Mobile-first styles */
:root {
    /* Dark page background */
    --bg: #1a1a1a;
    /* Text colors: keep a dark --text for light surfaces, and a light text for dark page background */
    --text: #0a0a0a;
    --text-light: #f3f3f3;
    --muted: #bdbdbd;
    --muted-light: #bdbdbd;
    --accent: #f3f3f3;
    --max-width: 1100px;
    /* high-contrast focus ring used across light/dark surfaces */
    --focus: #ffd54f;
    /* primary link color on dark background (site theme) */
    --link: #CBAF7C;
    --link-hover: #E3D8A1;
    /* Accessible CTA colors: darker gold for good contrast with white text */
    --cta-bg: #7f5318; /* dark gold */
    --cta-bg-hover: #9b6526; /* lighter gold for hover but still accessible */
    /* dark surface used for cards so they sit on the dark page */
    --surface: #242424;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: var(--bg);
    /* page-level text should be light on the dark background */
    color: var(--text-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0.5rem; }

/* Links: default to themed link color on the dark page and visibly underlined */
a:link, a:visited, a:active, a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: rgba(255,213,79,0.18);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover, a:focus {
    color: var(--link-hover);
    text-decoration-color: rgba(255,227,138,0.28);
}

/* Header-specific links: use the theme link color (visible on dark header) */
header a, .hero a, .tagline a { color: var(--link); }

/* Hero / Founder Club (TopShelf.jpg) */
.hero {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    min-height: 3vh;
    padding: 0.04rem 0.25rem 0.06rem;
    /* subtle light band against dark page */
    background: rgba(255,255,255,0.03);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0.04rem;
    border-radius: 3px;
    /* hero content sits on a light surface for readability */
}

/* Use dark background for header area so header matches page background */
.hero {
    /* make header match the page background explicitly */
    background: var(--bg);
    color: var(--text-light);
}

.hero-content {
    background: transparent;
    color: var(--text-light);
}

.logo {
    display: block;
    margin: 0 auto 0;
    height: 18vh;
    max-height: 220px;
    width: auto;
}

.header-logo { height: 40px; width: auto; display: block; }

@media(min-width:768px) {
    .header-logo { height: 48px; }
}

/* ensure logo image doesn't carry a white background visually via CSS */
.logo, .logo img { background: transparent; }

.coming-soon { margin: 0.02rem 0 0.01rem; font-size: 1.6rem; letter-spacing: 0.02em; }

.tagline { margin: 0.06rem 0; color: var(--muted); font-size: 1rem; line-height: 1.35; }

.cta {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.35rem 0.6rem;
    /* make CTA border visible on dark header */
    border: 1px solid var(--text-light);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
}

/* About / Clubs */
.about { padding: 0.5rem 0; }

.lead { font-size: 1.02rem; color: var(--muted); margin-bottom: 0.5rem; }

/* Use the site's system sans-serif stack for lead copy and apply same face to header/nav and footer contact */
.lead, .site-header, .site-primary-nav, .site-primary-list a, .reservations-cta, .site-footer .contact {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.clubs { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }

.club {
    background: var(--surface);
    color: var(--text-light);
    padding: 0.4rem;
    border-radius: 6px;
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
}

.club img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    /* let the parent (.club) provide the border-radius/clipping */
    border-radius: 0;
    transition: transform .25s ease, opacity .25s ease;
    display: block;
    transform-origin: center;
    will-change: transform;
    transform: none;
}

.club h3 { margin: 0.25rem 0; font-family: inherit; font-weight: 600; }

.club a { color: var(--link); text-decoration: none; font-family: inherit; }

/* Links inside light surfaces (modal) should be dark; links inside dark cards use themed link */
.modal-card a { color: var(--text); }
.team-card a { color: var(--link); }

.club:hover { transform: translateY(-6px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.club:hover img { transform: none; }
.team-card:hover .team-media { transform: none; }

/* Make clubs keyboard-focusable like team cards */
.club:focus { outline: 1.5px solid var(--muted); outline-offset:3px; }

.muted { /* muted text on the dark page */ color: var(--muted); font-size: 0.9rem; }

.footer-inner { display: flex; flex-direction: column; gap: 0.25rem; align-items: center; padding: 1.25rem 0; }

.socials { display: flex; gap: 0.5rem; align-items: center; }

.socials a { /* social links sit on the dark footer background; make them light */ color: var(--text-light); text-decoration: none; font-weight: 600; padding: 0.25rem; }
.socials a:hover { text-decoration: underline; }

.social-icon { width: 24px; height: 24px; display: inline-block; filter: grayscale(100%) invert(1); opacity: 0.95; }

/* Desktop adjustments */
@media(min-width:768px) {
    .hero { min-height: 30vh; padding: 0.25rem 0.5rem 0.25rem; }
    .logo { height: 30vh; max-height: none; margin-top: 0; }
    .hero-content { background: transparent; color: var(--text-light); }
    .clubs { grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
    .club img { height: 170px; }
    .coming-soon { font-size: 2.15rem; }
}

@media(min-width:1100px) {
    .container { padding: 1rem; }
    .hero-content { padding: 1rem; }
}

/* Accessibility & focus */
a:focus { outline: 1.5px solid var(--muted); outline-offset: 3px; }
a:focus-visible { outline: 1.5px solid var(--muted); outline-offset: 3px; }

/* Small tweaks for very small screens */
@media(max-width:420px) {
    html, body { font-size: 15px; }
    .logo { width: min(60vw, 88%); height: auto; max-height: none; }
    .club img { height: 110px; }
    .coming-soon { font-size: 1.25rem; }
    .tagline { font-size: 0.95rem; }
    .cta { padding: 0.3rem 0.5rem; font-size: 0.95rem; }
}

@media(max-width:767px) {
    html, body { font-size: 15.5px; }
    .logo { width: min(65vw, 90%); height: auto; max-height: none; }
    .coming-soon { font-size: 1.4rem; }
    .tagline { font-size: 0.98rem; }
    .club img { height: 120px; }
    .container { padding: 0.5rem; }
}

/* Hamburger menu - mobile-first */
.hamburger {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 11000;
    background: transparent;
    border: 0;
    color: var(--text-light);
    font-size: 1.6rem;
    padding: 0.4rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.hamburger:focus { outline: 1.5px solid var(--muted); outline-offset: 3px; }

.menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 10990; display: none; }
.menu-overlay[aria-hidden="false"] { display: block; }

.site-menu { position: fixed; top: 0; left: 0; height: 100%; width: 84%; max-width: 320px; background: var(--bg); color: var(--text-light); z-index: 11000; transform: translateX(-110%); transition: transform .32s cubic-bezier(.2,.9,.2,1); box-shadow: 4px 0 24px rgba(0,0,0,0.4); padding: 1rem; }
.site-menu[aria-hidden="false"] { transform: translateX(0); }
.site-menu-header { display:flex; justify-content:flex-end; }
.menu-close { background:none; border:0; color:var(--text-light); font-size:1.2rem; padding:0.5rem; }
.site-menu-list { list-style:none; margin:1rem 0 0; padding:0; display:flex; flex-direction:column; gap:0.5rem; }
.site-menu-list a { color:var(--text-light); text-decoration:none; font-size:1.05rem; padding:0.75rem 0.5rem; display:block; border-radius:6px; }
.site-menu-list a:focus, .site-menu-list a:hover { background: rgba(255,255,255,0.03); outline: none; }

/* Desktop: hide hamburger and ensure menu is hidden off-screen */
@media(min-width:768px) {
    .hamburger { display: none; }
    .site-menu { display: none; }
    .menu-overlay { display: none; }
}

.reveal { opacity: 1; transform: none; font-family: inherit; font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }

@media (prefers-reduced-motion: reduce) { .club, .team-card { transition: none !important; transform: none !important; } }

/* Team page and modal styles (consolidated from inline team.html) */
:root { --space-xxs: 0.25rem; --space-xs: 0.5rem; --space-sm: 0.75rem; --radius: 6px; }

.sr-only { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

.team-hero { padding: 1.25rem 0 0.5rem; }

.team-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media(min-width:768px) { .team-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.team-grid {
    display: grid;
    /* mobile: single column */
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

@media(min-width:480px) {
    /* create responsive tiles that wrap and center; min width ensures readable cards */
    .team-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); justify-content: center; gap: 1rem; }
}

@media(min-width:768px) {
    /* keep columns sized responsively but allow up to three columns comfortably and center any partial row */
    .team-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); gap: 1.25rem; justify-content: center; }
}

.team-card { background: var(--surface); color: var(--text-light); padding: 0.4rem; border-radius: 6px; text-align: center; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.team-card:hover { transform: translateY(-6px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.team-media { width: 100%; height: 120px; object-fit: cover; border-radius: 0; display: block; transform-origin: center; will-change: transform; transition: transform .25s ease, opacity .25s ease; }
/* ensure team-media has no transform by default */
.team-media { transform: none; }
.team-body { padding: 0.4rem; }
.team-body h3 { margin: 0.25rem 0; font-family: inherit; font-weight: 600; }
.team-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media(min-width:768px) { .team-media { height: 170px; } }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 10000; }
.modal[aria-hidden="false"] { display: flex; }
.modal-card { position: relative; z-index: 10001; background: var(--accent); color: var(--text); max-width: 720px; width: 100%; border-radius: 8px; overflow: auto; /* allow internal scrolling */
    /* keep modal card within viewport so top is reachable on short windows */
    max-height: calc(100vh - 4rem);
}

/* On short viewports, pin modal to the top (below header) so users can reach the top of the card */
@media (max-height: 700px) {
    .modal { align-items: flex-start; padding-top: 84px; }
    .modal-card { max-height: calc(100vh - 6rem); border-radius: 8px 8px 0 0; }
}
.modal-header { display:flex; align-items:center; justify-content:space-between; padding:1rem; border-bottom:1px solid rgba(0,0,0,0.08); gap:0.5rem; }
.modal-header h3 { flex:1 1 auto; margin:0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:1.1rem; }
.modal-close { background:none; border:0; padding:0.375rem 0.5rem; font-size:1.05rem; line-height:1; cursor:pointer; color:inherit; }
.modal-close:focus-visible { outline: 1.5px solid var(--muted); outline-offset:3px; border-radius:4px; }
.modal-body { padding:1rem; }

/* Improve contrast inside the modal (light surface) */
.modal-card h3,
.modal-card p,
.modal-card a,
.modal-card .muted {
    color: var(--text);
}

/* slightly darker muted copy for the light modal surface */
.modal-card .muted { color: #6b6b6b; }

/* ensure links inside the modal are clearly visible */
.modal-card a { color: var(--text); text-decoration: underline; }

/* Accessibility focus tweaks */
.team-card:focus { outline: 1.5px solid var(--muted); outline-offset:3px; }

@media (prefers-reduced-motion: reduce) { .club, .team-card { transition: none !important; transform: none !important; } }

/* ==========================
   Site header & mobile nav
   ========================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    background: rgba(26,26,26,0.98);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    z-index: 12000;
    backdrop-filter: blur(4px);
}
.site-header-inner { display:flex; align-items:center; justify-content:space-between; width:100%; padding: 0 0.5rem; }
.site-left, .site-right { display:flex; align-items:center; gap:0.5rem; }
.site-primary-nav { display:none; }
.site-primary-list { list-style:none; margin:0; padding:0; display:flex; gap:1rem; align-items:center; }
.site-primary-list a { color: var(--text-light); text-decoration:none; font-family: inherit; font-size:0.98rem; padding: 0.18rem 0.35rem; }
.site-primary-list a:hover, .site-primary-list a:focus { color: var(--link-hover); text-decoration: underline; }

.site-nav-toggle {
    background: transparent;
    border: 0;
    color: var(--text-light);
    font-size: 1.15rem;
    padding: 0.45rem;
    border-radius: 6px;
    cursor: pointer;
}
.site-nav-toggle:focus { outline: 1.5px solid var(--muted); outline-offset: 3px; }

.site-header .reservations-cta,
.site-header .reservations-cta:link,
.site-header .reservations-cta:visited,
.site-header .reservations-cta:active {
    display: inline-block;
    background: var(--cta-bg);
    color: #ffffff !important;
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    font-family: inherit;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(127,83,24,0.16);
    transition: background-color .18s ease, box-shadow .18s ease;
}
.site-header .reservations-cta:hover { background: var(--cta-bg-hover); }
.site-header .reservations-cta:focus { outline: 3px solid rgba(255,255,255,0.18); outline-offset: 3px; }

/* Mobile off-canvas nav (slides from right) */
.site-mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 11990; opacity: 0; pointer-events: none; transition: opacity .28s ease; }
.site-mobile-overlay[aria-hidden="false"] { opacity: 1; pointer-events: auto; }

.site-mobile-nav { position: fixed; top: 0; right: 0; height: 100%; width: 86%; max-width: 360px; background: var(--bg); color: var(--text-light); z-index: 12010; transform: translateX(110%); transition: transform .32s cubic-bezier(.2,.9,.2,1); box-shadow: -8px 0 36px rgba(0,0,0,0.5); padding: 1rem; display:flex; }
.site-mobile-nav[aria-hidden="false"] { transform: translateX(0); }
.site-mobile-inner { width:100%; display:flex; flex-direction:column; gap:1rem; }
.site-mobile-close { margin-left: auto; background: transparent; border:0; color:var(--text-light); font-size:1.25rem; padding:0.5rem; cursor:pointer; }
.site-mobile-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:0.5rem; }
.site-mobile-list a { color: var(--text-light); text-decoration:none; padding:0.75rem 0.4rem; display:block; border-radius:6px; }
.site-mobile-list a:focus, .site-mobile-list a:hover { background: rgba(255,255,255,0.03); }
.mobile-socials { margin-top: auto; display:flex; gap:0.5rem; }
.mobile-socials .social-icon { width:28px; height:28px; filter:grayscale(100%) invert(1); }

/* Prevent body scroll when menu is open */
body.menu-open { overflow: hidden; }

/* Prevent background scroll when modal is open but allow modal internal scrolling */
body.modal-open { overflow: hidden; }

/* Adjust content spacing so hero isn't hidden under the fixed header */
.hero { padding-top: 84px; }

/* Desktop layout: show full nav and hide mobile toggle */
@media(min-width:768px) {
    .site-primary-nav { display:block; }
    .site-nav-toggle { display: none; }
    .site-mobile-nav { display: none; }
    .site-mobile-overlay { display: none; }
    .hero { padding-top: 94px; }
    /* increase horizontal spacing between header nav items on desktop */
    .site-primary-list { gap: 2rem; }
    .site-primary-list a { padding: 0.25rem 0.6rem; }
}

/* Team page: ensure main content sits below the fixed header */
.team-page main { padding-top: 84px; }
@media(min-width:768px) { .team-page main { padding-top: 94px; } }

/* ==========================
   Footer (desktop-only extra layout)
   ========================== */
.site-footer { background: var(--bg); color: var(--text-light); border-top: 1px solid rgba(255,255,255,0.03); padding: 1.25rem 0; }
.site-footer .footer-grid { display:flex; flex-direction:column; gap:0.75rem; align-items:center; }
.site-footer .contact { text-align:center; color: var(--text-light); }
.site-footer .contact p { margin:0; }
.site-footer .contact .muted { color: var(--muted); }
.site-footer .socials { order: 3; }

@media(min-width:768px) {
    .site-footer .footer-grid { flex-direction:row; justify-content:space-between; align-items:flex-start; }
    .site-footer .contact { text-align:left; }
    .site-footer .socials { order: 2; }
    .site-footer .parking { align-self: flex-start; }
    .site-footer .parking p { margin: 0; }
}

/* hide footer social icons on small screens (they appear in mobile nav) */
@media(max-width:767px) {
    .site-footer .socials { display: none; }
    .site-footer .parking { display: none; }
}

/* Hero: split layout and slideshow styles */
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; padding: 1rem 0; }
.hero-text { text-align: left; }
.hero-text .logo { margin: 0 0 0.5rem 0; height: 18vh; }

.hero-slideshow { width: 100%; }
.slideshow { position: relative; background: var(--surface); border-radius: 8px; overflow: hidden; }
.slideshow .slides { position: relative; display: block; }
.slideshow img.slide { display: none; width: 100%; height: 260px; object-fit: cover; }
.slideshow img.slide.active { display: block; }

.slideshow-prev, .slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: var(--text-light);
    border: 0;
    padding: 0.5rem 0.7rem;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}
.slideshow-prev { left: 0.5rem; }
.slideshow-next { right: 0.5rem; }

.slideshow-indicators { position: absolute; left: 50%; transform: translateX(-50%); bottom: 0.5rem; display:flex; gap:0.4rem; }
.slideshow-indicators .indicator { width: 10px; height: 10px; border-radius: 999px; background: rgba(255,255,255,0.25); border:0; cursor:pointer; }
.slideshow-indicators .indicator.active { background: var(--cta-bg); }

/* Responsive: two-column layout on wider screens */
@media(min-width:900px) {
    .hero-inner { grid-template-columns: 1fr 560px; align-items: center; }
    .slideshow img.slide { height: 360px; }
    .hero { padding-top: 94px; }
}

@media(min-width:1100px) {
    .slideshow img.slide { height: 420px; }
}
