/* =========================================================================
   CCVC refresh — proof-of-concept theme layer (Option A)
   Loads AFTER bootstrap + styles.css + site.css and overrides the
   "Grayscale" look with the logo's navy + gold, accessible, token-based design.
   Self-contained: delete this file + revert the markup to undo.
   ========================================================================= */

/* ----- Design tokens --------------------------------------------------- */
:root {
    /* Brand — sampled from the CCVC logo: deep navy + warm copper/gold */
    --navy-900: #0a1424;
    --navy-800: #112037; /* exact logo navy */
    --navy-700: #1b2f4d;
    --navy-600: #284b75;
    --gold-700: #6f4a1d; /* strong gold for icons/text */
    --gold-600: #8a5e26; /* gold link/text on white — passes AA (~5.7:1) */
    --gold-500: #b88140; /* exact logo gold — fills/accents */
    --gold-400: #cda06a; /* light accent on dark — eyebrow, glow */
    --gold-300: #e7cca6;

    /* Neutrals */
    --ink: #10212f; /* primary body text */
    --ink-soft: #46586a; /* secondary text — ~6.6:1 on white (AA) */
    --surface: #ffffff;
    --surface-muted: #f4f7f9;
    --border: #e2e8ee;

    /* Effects */
    --ring: 0 0 0 3px rgba(184, 129, 64, .50);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(16,33,47,.06), 0 2px 6px rgba(16,33,47,.07);
    --shadow-md: 0 12px 32px -14px rgba(10,29,48,.40);
    --shadow-lg: 0 28px 64px -24px rgba(10,29,48,.50);

    --content-max: 1140px;

    /* Type — fluid scale via clamp() */
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --step--1: clamp(.85rem, .82rem + .15vw, .95rem);
    --step-0: clamp(1rem, .96rem + .2vw, 1.075rem);
    --step-1: clamp(1.15rem, 1.05rem + .4vw, 1.35rem);
    --step-2: clamp(1.4rem, 1.2rem + .9vw, 1.9rem);
    --step-3: clamp(2rem, 1.5rem + 2.2vw, 3rem);
}

/* ----- Base ------------------------------------------------------------ */
body {
    /* override the dark hands-photo background from styles.css */
    background: var(--surface-muted) !important;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
    font-family: var(--font-sans);
    color: var(--ink);
    letter-spacing: -0.015em;
    text-transform: none; /* kill the all-caps theme look */
}

a {
    color: var(--gold-600);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
a:hover { color: var(--gold-700); }

/* Accessible focus ring for keyboard users */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: var(--radius-sm);
}

/* Fix low-contrast theme utilities (WCAG) */
.text-black-50 { color: var(--ink-soft) !important; }
.text-white-50 { color: rgba(255,255,255,.82) !important; }

/* Skip link for screen-reader / keyboard users */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 1100;
    background: var(--navy-800);
    color: #fff;
    padding: .6rem 1rem;
    border-radius: var(--radius-sm);
    transition: top .15s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ----- Buttons --------------------------------------------------------- */
.btn {
    font-weight: 600;
    border-radius: 999px;
    padding: .7rem 1.4rem;
    border: 1px solid transparent;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: .45rem 1rem; font-size: var(--step--1); }

.btn-accent {
    background: var(--gold-500);
    color: var(--navy-900); /* navy on gold — ~4.9:1, AA */
    box-shadow: var(--shadow-sm);
}
.btn-accent:hover { background: var(--gold-400); color: var(--navy-900); }

.btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.45);
}
.btn-ghost:hover { background: rgba(255,255,255,.10); color: #fff; }

.btn-navy { background: var(--navy-700); color: #fff; }
.btn-navy:hover { background: var(--navy-600); color: #fff; }

.btn svg { width: 1.05em; height: 1.05em; vertical-align: -2px; margin-right: .45rem; }

/* ----- Site header ----------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .65rem;
    padding-bottom: .65rem;
}
.site-brand { display: inline-flex; align-items: center; }
.site-brand img { height: 42px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a:not(.btn) {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--step--1);
}
.site-nav a:not(.btn):hover { color: var(--gold-700); }
@media (max-width: 575.98px) {
    .site-nav { gap: .8rem; }
    .site-nav .nav-text-hide { display: none; }
}

/* ----- Hero ------------------------------------------------------------ */
.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 45%, var(--navy-700) 100%);
    padding: clamp(3.5rem, 2rem + 8vw, 7.5rem) 0 clamp(4.5rem, 2rem + 10vw, 9rem);
}
/* soft gold glow, no stock photo */
.hero__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(42rem 28rem at 78% 18%, rgba(184,129,64,.28), transparent 60%),
        radial-gradient(36rem 30rem at 8% 92%, rgba(40,75,117,.55), transparent 55%);
    pointer-events: none;
}
.hero__inner { position: relative; max-width: 820px; }
.hero__eyebrow {
    display: inline-block;
    font-size: var(--step--1);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-400);
    margin-bottom: 1rem;
}
.hero__title {
    color: #fff;
    font-size: var(--step-3);
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 1.1rem;
}
.hero__lead {
    color: rgba(255,255,255,.82);
    font-size: var(--step-1);
    line-height: 1.6;
    max-width: 62ch;
    margin: 0 0 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* ----- Sections / cards ------------------------------------------------ */
.section { padding: clamp(3rem, 1.5rem + 6vw, 5.5rem) 0; }
.section--cards {
    /* pull the cards up so they overlap the hero edge */
    margin-top: clamp(-5rem, -3vw, -3rem);
    position: relative;
    z-index: 2;
    padding-top: 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1.25rem, 1rem + 1vw, 2rem);
    max-width: 880px;
    margin-inline: auto;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: clamp(1.6rem, 1.2rem + 1vw, 2.2rem);
    display: flex;
    flex-direction: column;
    gap: .65rem;
    transition: transform .15s ease, box-shadow .15s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card__icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(184,129,64,.20), rgba(231,200,166,.14));
    color: var(--gold-700);
    margin-bottom: .35rem;
}
.feature-card__icon svg { width: 26px; height: 26px; }
.feature-card__title { font-size: var(--step-1); font-weight: 700; margin: 0; }
.feature-card__text { color: var(--ink-soft); margin: 0; }
.feature-card__links { list-style: none; padding: 0; margin: .25rem 0 0; display: grid; gap: .3rem; }
.feature-card__links a { font-weight: 600; text-decoration: none; }
.feature-card__links a:hover { text-decoration: underline; }
.feature-card__cta { align-self: flex-start; margin-top: .5rem; }

/* ----- Interior page hero (About, etc.) -------------------------------- */
.page-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
    padding: clamp(2.5rem, 1.5rem + 5vw, 4.5rem) 0;
}
.page-hero .hero__title { margin: 0; }

/* ----- About page ------------------------------------------------------ */
/* Single left-aligned column so the logo, copy and version info all share
   one edge (aligned with the page-hero title above). */
/* Centered 820px box to match the home hero/cards rhythm */
.about-page { max-width: 820px; margin-inline: auto; }
.about-page__logo {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.1rem 1.35rem;
    margin-bottom: 2rem;
}
.about-page h2 { font-size: var(--step-1); font-weight: 700; margin: 1.6rem 0 .6rem; }
.about-page p { color: var(--ink-soft); margin: 0 0 1rem; max-width: 65ch; }

/* Version / build info panel — constrained to the same column, aligned left */
.version-info {
    margin: clamp(2rem, 1rem + 3vw, 3rem) 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.5rem;
}
@media (max-width: 480px) {
    .version-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.version-info dt {
    font-size: var(--step--1);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--ink-soft);
    margin: 0;
}
.version-info dd { margin: .2rem 0 0; font-weight: 600; color: var(--ink); }

/* Offset anchor targets so the sticky header doesn't hide them */
[id] { scroll-margin-top: 88px; }

/* ----- Secure file upload ---------------------------------------------- */
.upload-card { max-width: 640px; margin-inline: auto; }
.upload-card .card-body { padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); }
.upload-card__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
#successText:empty { display: none; }

/* ----- Generic Bootstrap card (used by FileUpload page) ---------------- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Re-skin the FileUpload masthead to match (navy hero, not full-viewport) */
.masthead {
    min-height: auto !important;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%) !important;
    padding: clamp(3rem, 2rem + 6vw, 6rem) 0;
}

/* ----- Footer ---------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.7); margin-top: auto; }
.site-footer a { color: rgba(255,255,255,.9); text-decoration: none; }
.site-footer a:hover { color: var(--gold-400); }
.site-footer__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .35rem .75rem;
    padding: 1.1rem 0;
    font-size: var(--step--1);
}
.site-footer__copy { color: rgba(255,255,255,.6); }
.site-footer__sep { color: rgba(255,255,255,.3); }

/* ----- Motion preference ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .btn, .feature-card { transition: none; }
    .btn:hover, .feature-card:hover { transform: none; }
}
