/* ============================================================
   THE TAPTASTICS — style.css
   Black & Gold theme  |  WCAG AA 4.5:1+ throughout
   ============================================================ */

/* ── 1. Design Tokens ─────────────────────────────────────── */
:root {
    /* Core palette */
    --bg:            #0a0a0a;
    --surface:       #141414;   /* contrast vs --bg: 1.22:1 visual sep. */
    --surface-2:     #1c1c1c;
    --text:          #E8E8E8;   /* 14.7:1 vs --bg */
    --text-muted:    #BDBDBD;   /* 10.2:1 vs --bg */
    --accent:        #F5C22D;
    --accent-2:      #E6B83B;
    --accent-dim:    rgba(245,194,45,0.16);
    --gold-glow:     rgba(245,194,45,0.28);
    --border:        rgba(245,194,45,0.22);
    --border-subtle: rgba(255,255,255,0.10);
    --shadow:        0 8px 28px rgba(0,0,0,0.55);
    --shadow-lg:     0 18px 48px rgba(0,0,0,0.65);

    /* Gradients */
    --grad-gold:     linear-gradient(135deg, var(--accent), var(--accent-2));
    --grad-surface:  linear-gradient(180deg, var(--surface), var(--surface-2));
    --grad-bg:       linear-gradient(180deg, #070707 0%, var(--bg) 100%);

    /* Typography */
    --font-sans:     'Inter', system-ui, -apple-system, 'Segoe UI', Roboto,
                     'Helvetica Neue', Arial, sans-serif;
    --font-serif:    'Playfair Display', Georgia, serif;

    /* Layout */
    --max-width:     1100px;
    --radius:        0.75rem;
    --radius-sm:     0.45rem;
    --radius-lg:     1rem;

    /* Bootstrap variable overrides — keeps Bootstrap components in theme */
    --bs-body-color:              var(--text);
    --bs-body-bg:                 var(--bg);
    --bs-secondary-color:         var(--text-muted);
    --bs-border-color:            var(--border-subtle);
    --bs-card-bg:                 var(--surface);
    --bs-card-border-color:       var(--border);
    --bs-list-group-bg:           var(--surface);
    --bs-list-group-border-color: var(--border-subtle);
    --bs-link-color:              var(--accent);
    --bs-link-hover-color:        #fff;
    --bs-alert-bg:                var(--surface-2);
    --bs-alert-border-color:      var(--border-subtle);
    --bs-alert-color:             var(--text-muted);
}

/* ── 2. Reset / Box Model ─────────────────────────────────── */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
html, body { height: 100%; }

/* ── 3. Base ──────────────────────────────────────────────── */
body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    background: var(--grad-bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 72px;
    overflow-wrap: anywhere;
}

img, picture, video, embed, object { max-width: 100%; height: auto; display: block; }
pre, code { white-space: pre-wrap; overflow-wrap: break-word; }

/* ── 4. Links ─────────────────────────────────────────────── */
a, button { touch-action: manipulation; }
a { color: var(--accent); transition: color .15s ease, opacity .12s ease; }
a:hover { color: #fff; text-decoration: none; }

/* ── 5. Focus — WCAG 2.2 solid 2 px gold, visible on all bg ─ */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* ── 6. Semantic Utility Classes ──────────────────────────── */
.text-muted    { color: var(--text-muted) !important; }   /* 10.2:1 vs --bg */
.text-gold     { color: var(--accent) !important; }
.bg-surface    { background: var(--surface) !important; }
.bg-surface-2  { background: var(--surface-2) !important; }

/* ── 7. Site Brand — gold gradient text ───────────────────── */
.site-brand {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.2vw, 2.6rem);
    letter-spacing: 0.02em;
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── 8. Navbar ────────────────────────────────────────────── */
.navbar {
    background: linear-gradient(180deg, rgba(0,0,0,0.75), rgba(0,0,0,0.88));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.55);
    border-bottom: 1px solid rgba(245,194,45,0.14);
}
.navbar .nav-link {
    color: rgba(255,255,255,0.88);
    padding: .45rem .9rem;
    border-radius: var(--radius-sm);
    transition: color .15s ease, background .15s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #fff;
    background: rgba(245,194,45,0.10);
}

/* ── 9. Hero ──────────────────────────────────────────────── */
.hero {
    position: relative;
    background: linear-gradient(180deg, rgba(6,6,6,0.65), rgba(10,10,10,0.72)),
                url('../images/mug.jpg') center/cover no-repeat;
    min-height: clamp(55vh, 70vh, 80vh);
    display: flex;
    align-items: center;
    padding: clamp(3rem, 6vw, 6rem) 0;
}
/* Gold shimmer overlay — behind content via z-index */
.hero::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(245,194,45,0.06) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .4rem;
}
/* Utility classes used in index.php to replace inline styles */
.hero-title-responsive { font-size: clamp(2rem, 5vw, 3.8rem) !important; }
.hero-subtitle         { max-width: 680px; }

.hero p { color: var(--text); max-width: 720px; margin: 0 auto; }
.hero .hero-left  { padding: 1rem 1.25rem; }
.hero .hero-right { display: flex; align-items: center; justify-content: center; padding: 1rem; }

.hero-card {
    width: 100%; max-width: 420px;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: var(--grad-surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.hero .brand-logo             { text-align: center; padding: 1.6rem 0; }
.hero .brand-logo .site-brand { font-size: 2rem; }

/* ── 10. Buttons — 44 px min tap target ──────────────────── */
.btn-custom {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--grad-gold);
    color: #111;
    font-weight: 600;
    border: none;
    padding: .65rem 1.25rem;
    min-height: 44px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px var(--accent-dim);
    transition: transform .12s ease, box-shadow .12s ease;
    cursor: pointer;
    text-decoration: none;
}
.btn-custom:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px var(--gold-glow); color: #111; }
.btn-custom:active { transform: translateY(0); }

.btn-outline-custom {
    display: inline-flex; align-items: center; gap: .5rem;
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(245,194,45,0.50);   /* was 0.14 — now visible */
    padding: .6rem 1.1rem;
    min-height: 44px;
    border-radius: 999px;
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
    cursor: pointer;
    text-decoration: none;
}
.btn-outline-custom:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* ── 11. Cards ────────────────────────────────────────────── */
.card {
    background: var(--grad-surface);      /* opaque surface, not transparent */
    border: 1px solid var(--border);      /* was rgba(245,194,45,0.06) */
    border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: var(--shadow);
}
.card-title, .card-subtitle, .card-text, .form-label { color: var(--text); }

/* Feature cards */
.feature-cards { margin-top: 1.5rem; display: flex; gap: 1rem; }
.feature-card {
    background: var(--grad-surface);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    flex: 1;
    box-shadow: var(--shadow);
    transition: border-color .2s ease, transform .2s ease;
}
.feature-card:hover { border-color: var(--border); transform: translateY(-3px); }
.feature-card h6 { color: var(--accent); margin-bottom: .5rem; }
.feature-card p  { color: var(--text-muted); font-size: .95rem; margin-bottom: 0; }

/* ── 12. Section Titles — gold gradient ───────────────────── */
.section-title {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: .75rem;
}

/* ── 13. Forms ────────────────────────────────────────────── */
.form-text, small { color: var(--text-muted); }

.form-control, .form-select {
    background-color: var(--surface-2);
    border-color: var(--border-subtle);
    color: var(--text);
    border-radius: var(--radius-sm);
}
.form-control:focus, .form-select:focus {
    background-color: var(--surface-2);
    border-color: var(--accent);
    color: var(--text);
    box-shadow: 0 0 0 3px var(--accent-dim);
    outline: none;
}
.form-control::placeholder, .form-select::placeholder { color: rgba(255,255,255,0.35); }

/* ── 14. Footer ───────────────────────────────────────────── */
footer {
    background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0.88));
    border-top: 1px solid rgba(245,194,45,0.14);
    padding: 2rem 0;
    color: var(--text-muted);
}

/* ── 15. Gallery ──────────────────────────────────────────── */
.gallery-item {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.65);
    border-color: var(--border);
}
.gallery-item img {
    width: 100%; height: auto;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    display: block;
    background: var(--surface);
}
/* Caption bar replacing Bootstrap bg-dark in gallery items */
.gallery-caption {
    background: var(--surface-2);
    padding: .75rem 1rem;
    border-top: 1px solid var(--border-subtle);
}
.gallery-caption h6 { color: var(--text); margin-bottom: 0; }

/* ── 16. Member Photos ────────────────────────────────────── */
.member-photo {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
    margin-bottom: .75rem;
}

/* ── 17. Flash Messages ───────────────────────────────────── */
.flash         { padding: .9rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.flash-success { background: rgba(245,194,45,0.12); border: 1px solid rgba(245,194,45,0.40); color: var(--text); }
.flash-error   { background: rgba(220,53,69,0.12);  border: 1px solid rgba(220,53,69,0.42);  color: var(--text); }

/* ── 18. Bootstrap alert override ────────────────────────── */
.alert-secondary {
    background: var(--surface-2);
    border-color: var(--border-subtle);
    color: var(--text-muted);
}
.alert-danger {
    background: rgba(220,53,69,0.14);
    border-color: rgba(220,53,69,0.42);
    color: var(--text);
}

/* ── 19. Responsive ───────────────────────────────────────── */
@media (max-width: 991px) {
    .gallery-item img { aspect-ratio: 4 / 3; }
}

@media (max-width: 767px) {
    body     { padding-top: 66px; }
    .hero    { min-height: 60vh; padding: 3.25rem 0; }
    .hero h1 { font-size: clamp(1.6rem, 6vw, 2.25rem); }
    .navbar  { padding: .5rem 1rem; }

    .navbar-toggler {
        width: 48px; height: 48px;
        padding: .25rem;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border-subtle);
        background: rgba(255,255,255,0.04);
        display: flex; align-items: center; justify-content: center;
        transition: background .12s ease, transform .12s ease;
    }
    .navbar-toggler:hover,
    .navbar-toggler:focus { background: rgba(255,255,255,0.10); transform: translateY(-2px); }

    .navbar-collapse {
        position: absolute; top: 100%; left: 0; right: 0;
        background: linear-gradient(180deg, rgba(8,8,8,0.97), rgba(6,6,6,0.99));
        padding: .75rem 1rem;
        border-top: 1px solid var(--border-subtle);
        z-index: 1050;
        box-shadow: var(--shadow-lg);
        border-bottom-left-radius: var(--radius-sm);
        border-bottom-right-radius: var(--radius-sm);
    }
    .navbar-nav             { flex-direction: column; gap: .25rem; }
    .navbar .nav-link       { display: block; padding: .9rem 1rem; font-size: 1.05rem; }
    .navbar .nav-link + .nav-link { margin-top: .125rem; }

    /* 44 px min tap targets */
    .btn-custom      { padding: .85rem 1.25rem; font-size: 1rem; width: 100%; justify-content: center; }
    .form-control    { padding: .7rem .85rem; font-size: .98rem; }
    .list-group-item { padding: .9rem 1rem; }
    .gallery-item img { aspect-ratio: 3 / 2; }

    /* Collapse slide-in animation */
    .navbar-collapse.collapse      { transform-origin: top; transition: transform .18s ease, opacity .15s ease; transform: translateY(-6px); opacity: 0; }
    .navbar-collapse.collapse.show { transform: translateY(0); opacity: 1; }
}

@media (max-width: 420px) {
    .hero p { padding: 0 1rem; }
}
