/* ============================================================
   KNOVA THEME LAYER
   Loaded AFTER assets/css/style.css. Overrides only what has
   to change. Delete this one <link> tag and the site returns
   to the cream original.

   Light page surface, dark furniture:
     page   #FFFFFF · panel #F4F5F7 · ink  #141821
     muted  #5C6675 · line  rgba(20,24,33,.14) · accent #2C4A73
   Dark sections (nav, image heroes, accent cards, closing
   bands) keep the night palette sampled from the photography:
     base #080B14 · panel #0D1220 · body #C4CCD8
     dim  #8391A6 · bright #EDF0F4 · accent #7FA2CE
   ============================================================ */

/* ---- Bank Gothic, used for display headings only ---------------- */
@font-face {
    font-family: 'Bank Gothic';
    src: url('../fonts/bankgothic-medium.ttf') format('truetype');
    font-weight: 400 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Bank Gothic';
    src: url('../fonts/bankgothic-bold.ttf') format('truetype');
    font-weight: 600 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* headings switch to Bank Gothic; body stays Nunito for readability */
    --font-heading: 'Bank Gothic', 'Playfair Display', Georgia, serif;

    /* --- light page surface --- */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F4F5F7;
    --text-primary: #141821;
    --text-secondary: #5C6675;
    --accent-dark: #141821;
    --accent-light: #F4F5F7;
    --accent-blue: #2C4A73;
    --border-color: rgba(20, 24, 33, 0.14);

    /* --- the header stays dark --- */
    --nav-bg: #05070E;

    /* --- night palette, reused by the dark sections below --- */
    --dark-bg: #080B14;
    --dark-panel: #0D1220;
    --dark-body: #C4CCD8;
    --dark-dim: #8391A6;
    --dark-bright: #EDF0F4;
    --dark-accent: #7FA2CE;
}

/* ============================================================
   DARK SECTIONS
   Each one re-scopes the text tokens, so every descendant
   inherits the right colours without per-element overrides.
   ============================================================ */
.hero--fullwidth,
.programs-hero,
.closing-band,
.card--dark,
.card--image,
.service-card--featured,
.g-hero,
.g-cta {
    --text-primary: var(--dark-bright);
    --text-secondary: var(--dark-dim);
    --accent-blue: var(--dark-accent);
    --border-color: rgba(196, 204, 216, 0.18);
    color: var(--dark-body);
}

/* style.css paints this card with a blue linear-gradient (a background
   IMAGE), so background-color alone is hidden behind it — the shorthand
   is required to actually replace it. */
.card--dark {
    background: var(--dark-panel);
}
/* the studio shot is full-body portrait in a landscape card; anchor
   near the top so the crop keeps the head and hoodie rather than
   landing on a headless mid-section */
.card--image .card__bg-image {
    object-position: center 10%;
}

.card--dark .card__label { color: var(--dark-dim); }
.card--dark .card__body  { color: var(--dark-body); }
.card--dark:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }

/* filled buttons sit on the light-blue accent inside dark sections,
   so they need dark ink rather than white */
.hero--fullwidth .btn--filled,
.programs-hero .btn--filled,
.closing-band .btn--filled,
.card--dark .btn--filled,
.card--image .btn--filled,
.service-card--featured .btn--filled {
    color: #071019;
}
/* same gradient trap as .card--dark above */
.service-card--featured {
    background: var(--dark-panel);
    border-color: rgba(127, 162, 206, 0.35);
}
.service-card--featured .service-card__label { color: var(--dark-dim); }

/* ---- home hero: flat overlay, no gradient. The sprint photo is
        sunlit, so a flat scrim has to be heavy to keep white text
        legible over the highlights — measured across the headline
        area, 0.62 left 18.9% failing, 0.72 left 5.6%, 0.78 clears it.
        Scoped to #hero so the coaching video hero is untouched. ---- */
#hero .hero__overlay {
    background: rgba(0, 0, 0, 0.70);
}

/* Phones get their own portrait frame via <picture> in index.html.
   It is still wider than a phone viewport, and the subject sits right
   of centre — anchor right so the crop keeps him whole instead of
   slicing the trailing arm and spikes. */
@media (max-width: 900px) {
    #hero .hero__bg {
        object-position: 88% center;
    }
    /* the mobile frame is darker behind the text, so it needs less */
    #hero .hero__overlay {
        background: rgba(0, 0, 0, 0.38);
    }

    /* ---- Nav on mobile: no dropdown. The four links sit inline and
            spread across the header. ---- */
    .nav__hamburger {
        display: none;
    }
    .nav__inner {
        justify-content: space-between;
        padding: 0 16px;
    }
    .nav__links {
        position: static;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex: 1 1 auto;
        min-width: 0;
        max-height: none;
        overflow: visible;
        background-color: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        gap: 0;
        transition: none;
    }
    .nav__links li { flex: 0 0 auto; }
    .nav__link {
        display: inline-flex;
        align-items: center;
        padding: 0;
        min-height: 0;
        border-bottom: none;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .nav__links li:last-child .nav__link { border-bottom: none; }
}

/* ---- imagery sits in the dark rather than on top of it ---- */
.hero__img,
.about-full__img {
    filter: brightness(0.98) saturate(0.9);
}
.hero__image::after,
.about-full__image::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,
        rgba(8, 11, 20, 0.30) 0%,
        rgba(8, 11, 20, 0.00) 34%,
        rgba(8, 11, 20, 0.55) 100%);
}
.about-full__image { position: relative; }

/* ============================================================
   FREE PROGRAMS PAGE
   ============================================================ */
.programs-hero {
    position: relative;
    min-height: 62vh;
    display: flex;
    align-items: flex-end;
    background: var(--dark-bg);
    overflow: hidden;
}
.programs-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* fades to dark, not to the page — the white section starts cleanly below */
.programs-hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(8, 11, 20, 0.72) 0%,
        rgba(8, 11, 20, 0.34) 34%,
        rgba(8, 11, 20, 0.90) 82%,
        rgba(8, 11, 20, 0.96) 100%);
}
.programs-hero__inner {
    position: relative;
    z-index: 2;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 40px 90px;
    width: 100%;
}
.programs-hero__eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 20px;
}
.programs-hero__heading {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.12;
    color: var(--text-primary);
    margin-bottom: 18px;
}
.programs-hero__body {
    max-width: 34rem;
    color: var(--dark-body);
    font-size: 1.05rem;
    line-height: 1.7;
}

.programs { padding: 100px 0 40px; background: var(--bg-primary); }
.programs__inner { max-width: var(--container-max); margin: 0 auto; padding: 0 40px; }

.program {
    display: grid;
    grid-template-columns: 0.72fr 1fr;
    gap: 52px;
    align-items: center;
    padding: 54px 0;
    border-top: 1px solid var(--border-color);
}
.program__thumb {
    width: 100%;
    border-radius: 6px;
    display: block;
    box-shadow: 0 18px 40px rgba(20, 24, 33, 0.18);
}
.program__tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 14px;
}
.program__title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.2;
}
.program__body { color: var(--text-secondary); margin-bottom: 22px; line-height: 1.7; }
.program__list {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: grid;
    gap: 9px;
}
.program__list li {
    position: relative;
    padding-left: 22px;
    color: var(--text-primary);
    font-size: 0.95rem;
}
.program__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.66em;
    width: 9px;
    height: 1px;
    background: var(--accent-blue);
}
.program__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.program__meta {
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* pill buttons for the programs page */
.pbtn {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.93rem;
    letter-spacing: 0.02em;
    padding: 16px 32px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    background: var(--accent-blue);
    color: #fff;
    border: 1px solid transparent;
    transition: transform 0.4s var(--ease-spring), background 0.3s ease;
}
.pbtn:hover { transform: translateY(-2px); background: #3A6096; }
.pbtn--ghost {
    background: transparent;
    color: var(--text-primary);
    border-color: rgba(20, 24, 33, 0.24);
}
.pbtn--ghost:hover { background: rgba(20, 24, 33, 0.05); }

/* on dark sections the pills flip back to the night palette */
.closing-band .pbtn,
.programs-hero .pbtn {
    color: #071019;
}
.closing-band .pbtn:hover,
.programs-hero .pbtn:hover { background: #9BB8DC; }
.closing-band .pbtn--ghost,
.programs-hero .pbtn--ghost {
    color: var(--dark-bright);
    border-color: rgba(196, 204, 216, 0.32);
}
.closing-band .pbtn--ghost:hover,
.programs-hero .pbtn--ghost:hover { background: rgba(196, 204, 216, 0.08); }

/* "more coming" placeholder */
.program--soon { opacity: 0.72; }
.program--soon .program__thumb-empty {
    width: 100%;
    aspect-ratio: 3 / 4;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* closing band — white page fades down into the photograph */
.closing-band {
    position: relative;
    margin-top: 60px;
    min-height: 46vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--dark-bg);
}
.closing-band__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.closing-band__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        #FFFFFF 0%,
        rgba(8, 11, 20, 0.62) 26%,
        rgba(8, 11, 20, 0.82) 100%);
}
.closing-band__inner {
    position: relative;
    z-index: 2;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 70px 40px;
    text-align: center;
    width: 100%;
}
.closing-band__heading {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    color: var(--text-primary);
    margin-bottom: 14px;
}
.closing-band__body { color: var(--text-secondary); max-width: 32rem; margin: 0 auto; }

@media (max-width: 860px) {
    .program { grid-template-columns: 1fr; gap: 28px; padding: 42px 0; }
    .program__thumb { max-width: 300px; }
    .programs__inner,
    .programs-hero__inner,
    .closing-band__inner { padding-left: 24px; padding-right: 24px; }
    .programs { padding-top: 64px; }
}

/* ---- "Built for Athletes" band was 100/56 tall; tighten it ------- */
.cards__header {
    padding: 56px 40px 34px;
}
@media (max-width: 900px) {
    .cards__header { padding: 44px 24px 26px; }
}

/* ---- Nav: links far left, Knova mark far right ------------------- */
.nav__inner {
    justify-content: space-between;
}
.nav__brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 24px;
    opacity: 0.92;
    transition: opacity 0.3s var(--ease-smooth);
}
.nav__brand:hover { opacity: 1; }
.nav__brand-img {
    display: block;
    height: 26px;
    width: auto;
}

/* must come after the rules above, not in the earlier @media block,
   or source order lets the 26px desktop size win on phones too */
@media (max-width: 900px) {
    .nav__brand { margin-left: 18px; }
    .nav__brand-img { height: 20px; }
}

/* below 900px the links collapse into the dropdown and the hamburger
   is the only item in flow — keep it on the right where it belongs */
@media (max-width: 900px) {
    .nav__inner {
        justify-content: flex-end;
    }
}
