/* ==========================================================================
   Alan Kelvin — site theme
   ========================================================================== */

:root {
    --gold: #D4AF37;
    --gold-bright: #f1c40f;
    --bg: #0a0a0a;
    --bg-alt: #121212;
    --bg-card: #161616;
    --border: #2a2a2a;
    --text: #e6e6e6;
    --text-muted: #9a9a9a;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*::selection { background: var(--gold); color: var(--bg); }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-display);
    letter-spacing: 0.01em;
}

.brand-gold { color: var(--gold); }
.bg-darker { background-color: var(--bg-alt); }

.section-eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.section-divider {
    width: 56px;
    height: 3px;
    background: var(--gold);
    border: none;
    margin: 0.5rem auto 0;
    opacity: 0.85;
}

.text-start .section-divider { margin-left: 0; }

/* ---------------------------------------------------------------------- */
/* Navbar                                                                  */
/* ---------------------------------------------------------------------- */
#mainNav {
    background-color: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: background-color 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

#mainNav.nav-scrolled {
    background-color: rgba(10, 10, 10, 0.92);
    border-bottom-color: var(--border);
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

#mainNav .navbar-brand {
    font-size: 1.15rem;
    transition: font-size 0.35s ease;
}

#mainNav .nav-link {
    position: relative;
    color: #cfcfcf;
    margin: 0 0.35rem;
    transition: color 0.25s ease;
}

#mainNav .nav-link::after {
    content: '';
    position: absolute;
    left: 0.75rem; right: 0.75rem; bottom: 0.15rem;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: #fff;
}

#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after {
    transform: scaleX(1);
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.parallax-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 60% 50% at 80% 15%, rgba(212, 175, 55, 0.16), transparent 60%),
        radial-gradient(ellipse 50% 40% at 10% 90%, rgba(212, 175, 55, 0.08), transparent 60%),
        linear-gradient(180deg, #0a0a0a 0%, #101010 60%, #0a0a0a 100%);
}

.parallax-hero.has-photo {
    background-image:
        linear-gradient(rgba(10, 10, 10, 0.82), rgba(10, 10, 10, 0.9)),
        var(--hero-photo);
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

.parallax-hero::before {
    /* faint grid texture for depth */
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 60% at 60% 30%, black, transparent 75%);
    pointer-events: none;
}

.parallax-hero .container { position: relative; z-index: 1; }

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.25rem;
}

.hero-kicker::before {
    content: '';
    width: 30px; height: 1px;
    background: var(--gold);
    display: inline-block;
}

.parallax-hero h1 {
    line-height: 1.08;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.parallax-hero .lead {
    color: #c9c9c9;
    max-width: 620px;
}

.hero-crest-wrap {
    position: relative;
    align-items: center;
    justify-content: center;
    min-height: 340px;
}

.hero-crest-wrap::before {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3), transparent 70%);
    filter: blur(6px);
    animation: crestPulse 6s ease-in-out infinite;
}

.hero-crest {
    position: relative;
    width: 300px;
    height: 300px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
    animation: crestFloat 5s ease-in-out infinite;
}

@keyframes crestFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@keyframes crestPulse {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 1.4rem;
    animation: scrollCueBounce 2.2s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes scrollCueBounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 10px); }
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn-custom {
    background-color: var(--gold);
    color: #0a0a0a;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn-custom:hover {
    background-color: var(--gold-bright);
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.25);
}

.btn-arrow { transition: transform 0.25s ease; display: inline-block; }
.btn-custom:hover .btn-arrow,
.link-gold:hover .btn-arrow { transform: translateX(4px); }

.link-gold {
    color: var(--gold);
    font-weight: 600;
    transition: color 0.2s ease;
}
.link-gold:hover { color: var(--gold-bright); }

/* ---------------------------------------------------------------------- */
/* Cards                                                                   */
/* ---------------------------------------------------------------------- */
.card-custom {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.embed-container {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    border-radius: 6px;
}
.embed-container iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* Credibility strip */
.stat-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.stat-item { padding: 2.25rem 1rem; }
.stat-item i { font-size: 1.6rem; color: var(--gold); margin-bottom: 0.75rem; display: block; }
.stat-item h6 { color: var(--text); margin-bottom: 0.25rem; }
.stat-item small { color: var(--text-muted); }

/* Alerts used for form feedback banners */
.alert-gold {
    background-color: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--gold);
}

/* ---------------------------------------------------------------------- */
/* Scroll reveal                                                          */
/* ---------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .scroll-cue { animation: none; }
    .hero-crest, .hero-crest-wrap::before { animation: none; }
    html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
footer.site-footer { border-top: 1px solid var(--border); }
footer.site-footer .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.15);
}
.social-links a {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-right: 1rem;
    transition: color 0.2s ease;
}
.social-links a:hover { color: var(--gold); }

/* Back to top */
#backToTop {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gold);
    color: #0a0a0a;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1030;
    text-decoration: none;
}
#backToTop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
#backToTop:hover { background: var(--gold-bright); }

/* ---------------------------------------------------------------------- */
/* Article page                                                           */
/* ---------------------------------------------------------------------- */
.article-hero {
    background: linear-gradient(180deg, #101010 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}
.article-body { font-size: 1.08rem; line-height: 1.85; color: #d8d8d8; }
.article-body img { max-width: 100%; border-radius: 6px; }
.article-body h2, .article-body h3 { margin-top: 2rem; }
.article-body a { color: var(--gold); }
