/*
 * NH Golf Hall of Fame — site styles.
 * Reads the palette and type stack from tokens.css, which also carries the
 * brand rules. Load tokens.css first.
 */

/* ------------------------------------------------------------------ *
 * Bootstrap 5.3 re-keying
 *
 * Bootstrap 5.3 exposes its own custom properties, so the brand is applied
 * by re-pointing those rather than by fighting each component with
 * !important. Component-scoped --bs-btn-* overrides are required because the
 * button variants are emitted as literal hex, not as var(--bs-primary).
 * ------------------------------------------------------------------ */

:root {
    --bs-primary: var(--ink);
    --bs-primary-rgb: 12, 37, 55;
    --bs-secondary-color: var(--on-paper-quiet);
    --bs-light-rgb: 235, 233, 224;
    --bs-body-color: var(--on-paper);
    --bs-body-bg: var(--cream);
    --bs-body-bg-rgb: 246, 242, 232;
    --bs-white-rgb: 246, 242, 232;
    --bs-dark-rgb: 12, 37, 55;
    --bs-body-font-family: var(--body);
    --bs-body-font-size: 1.0625rem;
    --bs-body-line-height: 1.62;
    --bs-border-color: rgba(22, 40, 54, .16);
    --bs-link-color: var(--ink);
    --bs-link-color-rgb: 12, 37, 55;
    --bs-link-hover-color: var(--on-paper-gold);
    --bs-border-radius: 0;
    --bs-border-radius-sm: 0;
    --bs-border-radius-lg: 0;
}

body {
    font-family: var(--body);
    color: var(--on-paper);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ *
 * Type roles
 * Three roles, no more: display (Archivo, width axis open), label (Saira
 * Condensed, tracked out, uppercase) and body (Archivo).
 *
 * The "Hall of Fame" script inside the crest is drawn art, not a font. It is
 * never re-typeset in a webfont at any size.
 * ------------------------------------------------------------------ */

h1, h2, h3, h4, h5, h6,
.display {
    font-family: var(--display);
    font-weight: 600;
    font-variation-settings: "wdth" 108;
    line-height: 1.14;
    letter-spacing: -.014em;
    text-wrap: balance;
}

h1, .h-hero {
    font-weight: 700;
    font-variation-settings: "wdth" 112;
    line-height: 1.06;
    letter-spacing: -.019em;
}

.eyebrow,
.label {
    font-family: var(--label);
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.on-ink .eyebrow { color: var(--gold); }
.on-paper .eyebrow { color: var(--on-paper-gold); }

.lede {
    font-size: clamp(1.02rem, 1.4vw, 1.18rem);
    line-height: 1.58;
}

.read { max-width: var(--read); }

/* Long-form prose: inductee biographies, Joe Kane citations, dinner
 * descriptions and news posts all render the same shape. */
.prose {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: var(--read);
}

.prose p { margin-bottom: 1.5rem; }

.prose h2,
.prose h3,
.prose h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.prose blockquote {
    border-left: 2px solid var(--gold);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--on-paper-quiet);
}

/* ------------------------------------------------------------------ *
 * Header
 *
 * The horizontal wordmark, not the crest. The brand book puts the wordmark
 * anywhere height is the thing you do not have, and a site header is that
 * case exactly. Clear space around it satisfies rule 1.
 * ------------------------------------------------------------------ */

.site-header {
    background: var(--ink);
    padding: .5rem 0;
    border-bottom: 1px solid var(--ink-line);
}

.site-logo {
    display: flex;
    align-items: center;
    padding: .75rem 0;
    color: var(--cream);
    text-decoration: none;
}

.site-logo:hover { color: var(--cream); }

.site-logo img {
    height: 42px;
    width: auto;
    display: block;
}

.site-header .navbar-nav .nav-link {
    font-family: var(--label);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--on-ink);
    padding: .5rem .75rem;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}

.site-header .navbar-nav .nav-link:hover,
.site-header .navbar-nav .nav-link.active {
    color: var(--cream);
    border-bottom-color: var(--gold);
}

.site-header .navbar-toggler {
    border-color: var(--gold-dim);
    border-radius: 0;
}

.site-header .navbar-toggler:focus { box-shadow: none; }

.site-header .navbar-toggler:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.site-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28220, 225, 230, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ------------------------------------------------------------------ *
 * Plates
 *
 * One structure for every photographic header: the photo, a navy scrim over
 * it, a grain pass, then the content. Rule 3 rules out the two-navy diagonal
 * gradient the site used to run here; these scrims are all one hue.
 * ------------------------------------------------------------------ */

.plate {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    color: var(--on-ink);
    background: var(--ink-deep);
}

.plate__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.plate__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(6, 20, 31, .86) 0%,
            rgba(6, 20, 31, .42) 38%,
            rgba(6, 20, 31, .58) 64%,
            rgba(6, 20, 31, .94) 100%);
}

.plate__grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: var(--u-grain);
    opacity: .075;
    mix-blend-mode: overlay;
}

.plate__body {
    position: relative;
    z-index: 2;
    width: 100%;
}

.plate h1,
.plate h2 { color: var(--cream); }

.plate .lead { color: var(--on-ink); }

.plate--hero {
    min-height: 62vh;
    padding: 5rem 0;
    text-align: center;
}

.plate--hero h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }

.plate--hero .lead {
    font-size: clamp(1.02rem, 1.4vw, 1.18rem);
    max-width: 640px;
    margin: 1.25rem auto 0;
}

/* Slow drift on the hero photograph only. Interior banners hold still. */
.plate--hero .plate__bg { animation: hof-drift 26s ease-in-out infinite alternate; }

@keyframes hof-drift {
    from { transform: scale(1.02); }
    to   { transform: scale(1.09); }
}

.plate--banner {
    min-height: 42vh;
    padding: 4rem 0;
}

.plate--banner .plate__scrim {
    background:
        linear-gradient(96deg,
            rgba(6, 20, 31, .95) 0%,
            rgba(6, 20, 31, .82) 34%,
            rgba(6, 20, 31, .38) 64%,
            rgba(6, 20, 31, .18) 100%),
        linear-gradient(180deg, transparent 55%, rgba(6, 20, 31, .45) 100%);
}

.plate--banner h1 { margin-bottom: .5rem; }

/* Plain navy header for pages with no photograph. */
.plate--flat {
    min-height: 34vh;
    padding: 3rem 0;
    background: var(--ink);
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-family: var(--label);
    font-size: .74rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.breadcrumb-item a { color: var(--gold); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--gold-hi); }
.breadcrumb-item.active { color: var(--on-ink-quiet); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--on-ink-quiet); }

/* ------------------------------------------------------------------ *
 * Content
 * ------------------------------------------------------------------ */

.main-content {
    padding: 3.5rem 0;
    min-height: 60vh;
}

.section-rule {
    height: 1px;
    border: 0;
    margin: 0;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

/* A panel on paper, used where the old markup reached for .bg-light. */
.panel {
    background: var(--paper);
    padding: clamp(1.75rem, 4vw, 3rem);
}

.panel--ink {
    background: var(--ink);
    color: var(--on-ink);
}

.panel--ink h2 { color: var(--cream); }

/* Stat tiles on the homepage. */
.stat {
    background: var(--cream);
    border: 1px solid var(--bs-border-color);
    border-top: 2px solid var(--gold);
    padding: 1.5rem 1rem;
    text-align: center;
}

.stat__value {
    font-family: var(--display);
    font-weight: 700;
    font-variation-settings: "wdth" 110;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--ink);
}

.stat__label {
    font-family: var(--label);
    font-size: .72rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--on-paper-quiet);
    margin-top: .6rem;
}

/* ------------------------------------------------------------------ *
 * Bootstrap surfaces that do not inherit from body
 *
 * List groups and pagination default to --bs-body-bg via their own component
 * variables, so setting body alone leaves them painting white inside a cream
 * card. Brass is a rule and a border here, never a fill behind text.
 * ------------------------------------------------------------------ */

.list-group {
    --bs-list-group-bg: var(--cream);
    --bs-list-group-color: var(--on-paper);
    --bs-list-group-border-color: var(--bs-border-color);
    --bs-list-group-action-hover-bg: var(--paper);
    --bs-list-group-action-hover-color: var(--on-paper);
    --bs-list-group-action-active-bg: var(--paper-2);
    --bs-list-group-action-active-color: var(--on-paper);
}

.pagination {
    --bs-pagination-bg: var(--cream);
    --bs-pagination-color: var(--ink);
    --bs-pagination-border-color: var(--bs-border-color);
    --bs-pagination-border-radius: 0;
    --bs-pagination-hover-bg: var(--paper);
    --bs-pagination-hover-color: var(--ink);
    --bs-pagination-hover-border-color: var(--gold);
    --bs-pagination-focus-bg: var(--paper);
    --bs-pagination-focus-color: var(--ink);
    --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(175, 145, 99, .3);
    --bs-pagination-active-bg: var(--ink);
    --bs-pagination-active-color: var(--cream);
    --bs-pagination-active-border-color: var(--ink);
    --bs-pagination-disabled-bg: var(--paper);
    --bs-pagination-disabled-color: var(--on-paper-quiet);
    --bs-pagination-disabled-border-color: var(--bs-border-color);
    font-family: var(--label);
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* Brass background utility. Bootstrap has no .bg-gold, so the dinner
 * listing's "Upcoming Event" badge was painting transparent. */
.bg-gold {
    background-color: var(--gold) !important;
    color: var(--ink) !important;
}

/* ------------------------------------------------------------------ *
 * Cards
 *
 * Flat and ruled rather than rounded and shadowed. The hover lift stays:
 * it is interaction feedback on a UI element, not a drop shadow on the mark.
 * ------------------------------------------------------------------ */

.card {
    background: var(--cream);
    border: 1px solid var(--bs-border-color);
    border-top: 2px solid var(--gold);
    box-shadow: none;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -22px rgba(12, 37, 55, .45);
}

.card-title {
    font-family: var(--display);
    font-variation-settings: "wdth" 106;
    font-size: 1.12rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--bs-border-color);
}

.card-inductee { text-align: center; }

.card-inductee img,
.card-inductee .placeholder-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 1.5rem auto 1rem;
    border: 1px solid var(--gold);
}

.card-inductee img { object-fit: cover; }

.card-inductee .placeholder-photo {
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-inductee .placeholder-photo i {
    font-size: 4rem;
    color: var(--ink);
    opacity: .4;
}

/* Compact portraits in the dinner running order. */
.card-inductee--sm img,
.card-inductee--sm .placeholder-photo {
    width: 80px;
    height: 80px;
    margin: 1rem auto .5rem;
}

.card-inductee--sm .placeholder-photo i { font-size: 2.5rem; }

/* Fixed-height card media, and the empty-state box that stands in for it.
 * These replace a spread of inline height/object-fit pairs. */
.card-media {
    width: 100%;
    display: block;
    object-fit: cover;
}

.card-media-empty {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    color: var(--ink);
}

.card-media-empty i { opacity: .4; }

.card-media--sm,
.card-media-empty.card-media--sm { height: 200px; }

.card-media--md,
.card-media-empty.card-media--md { height: 250px; }

.card-media--lg,
.card-media-empty.card-media--lg { height: 300px; }

.icon-xl { font-size: 4rem; }

/* ------------------------------------------------------------------ *
 * Buttons
 *
 * Brass fill carries navy text (5.28), never white (2.98). See tokens.css.
 * ------------------------------------------------------------------ */

.btn {
    font-family: var(--label);
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    --bs-btn-border-radius: 0;
    --bs-btn-font-size: .8rem;
    --bs-btn-padding-x: 1.4rem;
    --bs-btn-padding-y: .6rem;
}

.btn-lg {
    --bs-btn-font-size: .88rem;
    --bs-btn-padding-x: 1.9rem;
    --bs-btn-padding-y: .8rem;
}

.btn-sm {
    --bs-btn-font-size: .72rem;
    --bs-btn-padding-x: 1rem;
    --bs-btn-padding-y: .45rem;
}

.btn-primary {
    --bs-btn-color: var(--cream);
    --bs-btn-bg: var(--ink);
    --bs-btn-border-color: var(--ink);
    --bs-btn-hover-color: var(--cream);
    --bs-btn-hover-bg: var(--ink-panel);
    --bs-btn-hover-border-color: var(--ink-panel);
    --bs-btn-active-color: var(--cream);
    --bs-btn-active-bg: var(--ink-deep);
    --bs-btn-active-border-color: var(--ink-deep);
}

.btn-outline-primary {
    --bs-btn-color: var(--ink);
    --bs-btn-border-color: var(--ink);
    --bs-btn-hover-color: var(--cream);
    --bs-btn-hover-bg: var(--ink);
    --bs-btn-hover-border-color: var(--ink);
    --bs-btn-active-color: var(--cream);
    --bs-btn-active-bg: var(--ink);
    --bs-btn-active-border-color: var(--ink);
}

/* Brass. The accent CTA, and the only place brass is a fill behind text. */
.btn-gold {
    --bs-btn-color: var(--ink);
    --bs-btn-bg: var(--gold);
    --bs-btn-border-color: var(--gold);
    --bs-btn-hover-color: var(--ink);
    --bs-btn-hover-bg: var(--gold-hi);
    --bs-btn-hover-border-color: var(--gold-hi);
    --bs-btn-active-color: var(--ink);
    --bs-btn-active-bg: var(--gold-hi);
    --bs-btn-active-border-color: var(--gold-hi);
}

/* Secondary action on a navy ground: brass hairline, cream label. */
.btn-outline-light {
    --bs-btn-color: var(--cream);
    --bs-btn-border-color: var(--gold);
    --bs-btn-hover-color: var(--ink);
    --bs-btn-hover-bg: var(--gold);
    --bs-btn-hover-border-color: var(--gold);
    --bs-btn-active-color: var(--ink);
    --bs-btn-active-bg: var(--gold);
    --bs-btn-active-border-color: var(--gold);
}

/* ------------------------------------------------------------------ *
 * Badges
 * ------------------------------------------------------------------ */

.badge {
    --bs-badge-color: var(--cream);
    font-family: var(--label);
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    border-radius: 0;
}

.badge.bg-success {
    background: transparent !important;
    color: var(--on-paper-gold);
    border: 1px solid rgba(126, 104, 60, .4);
}

/* ------------------------------------------------------------------ *
 * Footer
 *
 * The crest, at a size where the ridgeline and stars still read (rule 4).
 * ------------------------------------------------------------------ */

.site-footer {
    background: var(--ink);
    color: var(--on-ink);
    padding: 3.5rem 0 1.5rem;
    border-top: 2px solid var(--gold);
}

.site-footer h5 {
    font-family: var(--label);
    font-weight: 700;
    font-size: .76rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-crest {
    width: 240px;
    max-width: 100%;
    height: auto;
}

.site-footer a {
    color: var(--on-ink);
    text-decoration: none;
}

.site-footer a:hover { color: var(--gold-hi); }

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li { margin-bottom: .5rem; }

.footer-bottom {
    border-top: 1px solid var(--ink-line);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: .82rem;
    color: var(--on-ink-quiet);
}

/* ------------------------------------------------------------------ *
 * Gallery and lightbox
 * ------------------------------------------------------------------ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--bs-border-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.gallery-item:hover img { transform: scale(1.05); }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(6, 20, 31, .96);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--cream);
    font-size: 2rem;
    cursor: pointer;
    opacity: .7;
}

.lightbox-close:hover { opacity: 1; }

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 991.98px) {
    .site-header .navbar-collapse {
        background: var(--ink-panel);
        margin-top: .5rem;
        padding: .5rem;
    }

    .site-header .navbar-nav .nav-link {
        border-bottom: 0;
        border-left: 2px solid transparent;
    }

    .site-header .navbar-nav .nav-link:hover,
    .site-header .navbar-nav .nav-link.active {
        border-bottom: 0;
        border-left-color: var(--gold);
    }
}

@media (max-width: 767.98px) {
    .site-logo img { height: 34px; }
    .plate--hero { min-height: 56vh; }
    /* Rule 4's cutoff, not below it: under roughly 200px the ridgeline and
     * the three stars close up and the wordmark should take over instead. */
    .footer-crest { width: 200px; }
}

/* ------------------------------------------------------------------ *
 * Motion
 * ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
