
/*
 * Joshua Cole for Virginia Senate
 * Hanukkah palette
 *
 * Activation:
 *   <html data-palette="hanukkah">
 *
 * Midnight and dusk blue, candlelight gold and warm parchment.
 * Preserves the established blue-and-gold design.
 * This is a standalone Hanukkah theme.
 */

:root {
    --palette-hanukkah-midnight: #142640;
    --palette-hanukkah-dusk: #203a5c;
    --palette-hanukkah-gold: #e8ae42;
    --palette-hanukkah-gold-light: #f6d787;
    --palette-hanukkah-parchment: #f0d7a3;
    --palette-hanukkah-ivory: #fff6e7;
    --palette-hanukkah-white: var(--color-white);
    --palette-hanukkah-ink: var(--palette-hanukkah-midnight);
    --palette-hanukkah-muted: #344b66;
    --palette-hanukkah-bronze: #624015;
    --palette-hanukkah-blue-light: #d8e5f3;

    --palette-hanukkah-dusk-hover:
        color-mix(
            in srgb,
            var(--palette-hanukkah-dusk) 88%,
            var(--palette-hanukkah-blue-light) 12%
        );

    --palette-hanukkah-gold-hover:
        var(--palette-hanukkah-gold-light);
}

:root[data-palette="hanukkah"] {
    /* Surfaces */
    --color-surface-primary: var(--palette-hanukkah-parchment);
    --color-surface-secondary: var(--palette-hanukkah-parchment);
    --color-surface-contrast: var(--palette-hanukkah-midnight);
    --color-surface-contrast-hover: var(--palette-hanukkah-dusk);
    --color-surface-accent: var(--palette-hanukkah-gold);
    --color-surface-accent-hover: var(--palette-hanukkah-gold-hover);
    --color-surface-highlight: var(--palette-hanukkah-gold-light);
    --color-cream-highlight: var(--palette-hanukkah-gold-light);

    /* Text */
    --color-text-primary: var(--palette-hanukkah-ink);
    --color-text-secondary: var(--palette-hanukkah-muted);
    --color-text-on-contrast: var(--palette-hanukkah-gold-light);
    --color-text-on-accent: var(--palette-hanukkah-ink);
    --color-text-on-secondary: var(--palette-hanukkah-ink);

    /* Borders */
    --color-border:
        color-mix(
            in srgb,
            var(--palette-hanukkah-midnight) 28%,
            transparent
        );
    --color-border-on-contrast:
        color-mix(
            in srgb,
            var(--palette-hanukkah-gold-light) 50%,
            transparent
        );

    /* Actions */
    --color-action: var(--palette-hanukkah-gold);
    --color-action-hover: var(--palette-hanukkah-gold-hover);
    --color-action-bright: var(--palette-hanukkah-gold-light);
    --color-action-text: var(--palette-hanukkah-midnight);

    /* Links */
    --color-link: var(--palette-hanukkah-bronze);
    --color-link-on-contrast: var(--palette-hanukkah-gold-light);

    /* Navigation donate button */
    --color-button-primary-bg: var(--palette-hanukkah-midnight);
    --color-button-primary-text: var(--palette-hanukkah-gold-light);
    --color-button-primary-bg-hover: var(--palette-hanukkah-dusk);

    /* Shared filled buttons */
    --color-button-solid-bg: var(--palette-hanukkah-midnight);
    --color-button-solid-text: var(--palette-hanukkah-gold-light);
    --color-button-solid-hover-bg: var(--palette-hanukkah-gold);
    --color-button-solid-hover-text: var(--palette-hanukkah-midnight);

    /* Focus and actions on dark backgrounds */
    --color-focus-ring: var(--palette-hanukkah-midnight);
    --color-focus-ring-on-contrast: var(--palette-hanukkah-gold-light);
    --color-action-on-contrast: var(--palette-hanukkah-gold-light);
    --color-button-on-contrast-hover-bg: var(--palette-hanukkah-gold);
    --color-button-on-contrast-hover-text: var(--palette-hanukkah-midnight);
    --color-text-on-action-emphasis: var(--palette-hanukkah-midnight);

    /* Media */
    --color-media-placeholder: var(--palette-hanukkah-dusk);
    --color-media-overlay: var(--palette-hanukkah-midnight);
    --color-photo-text: var(--palette-hanukkah-white);
    --color-photo-scrim: var(--palette-hanukkah-midnight);
    --color-modal-backdrop:
        color-mix(
            in srgb,
            var(--palette-hanukkah-midnight) 92%,
            transparent
        );

    /* Compatibility aliases */
    --color-background: var(--color-surface-primary);
    --color-paper: var(--color-surface-primary);
    --color-surface: var(--color-surface-primary);
    --color-text: var(--color-text-primary);
    --color-muted: var(--color-text-secondary);
}

/*
 * Logos: midnight blue on parchment, candlelight gold on midnight.
 * Retain the original SVG without editing its artwork.
 */
:root[data-palette="hanukkah"] .site-brand,
:root[data-palette="hanukkah"] .site-footer__name {
    position: relative;
}

:root[data-palette="hanukkah"] .site-brand__logo,
:root[data-palette="hanukkah"] .site-footer__logo {
    opacity: 0;
}

:root[data-palette="hanukkah"] .site-brand::after,
:root[data-palette="hanukkah"] .site-footer__name::after {
    position: absolute;
    inset: 0;

    -webkit-mask-image:
        url("../../../images/branding/logo-purple-mono.svg");
    mask-image:
        url("../../../images/branding/logo-purple-mono.svg");
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    content: "";
    pointer-events: none;
}

:root[data-palette="hanukkah"] .site-brand::after {
    background-color: var(--palette-hanukkah-midnight);
}

:root[data-palette="hanukkah"] .site-footer__name::after {
    background-color: var(--palette-hanukkah-gold-light);
}

/* Navigation underline */
:root[data-palette="hanukkah"]
.site-nav__link:not(.site-nav__link--donate)::after {
    background: var(--palette-hanukkah-midnight);
}

/* Dusk-blue homepage biography, with candlelight-gold heading */
:root[data-palette="hanukkah"]
.page-home .home-story {
    background: var(--palette-hanukkah-dusk);
    color: var(--palette-hanukkah-gold-light);
}

:root[data-palette="hanukkah"]
.page-home .home-story__heading {
    color: var(--palette-hanukkah-gold-light);
}

:root[data-palette="hanukkah"]
.page-home .home-story__copy {
    color: var(--palette-hanukkah-blue-light);
}

:root[data-palette="hanukkah"]
.page-home .home-story__link:nth-child(2) {
    border-color: var(--palette-hanukkah-gold);
    background: var(--palette-hanukkah-gold);
    color: var(--palette-hanukkah-midnight);
}

:root[data-palette="hanukkah"]
.page-home .home-story__link:nth-child(2):hover,
:root[data-palette="hanukkah"]
.page-home .home-story__link:nth-child(2):focus-visible {
    border-color: var(--palette-hanukkah-gold-light);
    background: var(--palette-hanukkah-gold-light);
    color: var(--palette-hanukkah-midnight);
}

/* Candlelight-gold details and pale-blue copy on midnight */
:root[data-palette="hanukkah"]
.page-meet .meet-hero__eyebrow,
:root[data-palette="hanukkah"]
.page-why-running .why-running__eyebrow,
:root[data-palette="hanukkah"]
.home-record__eyebrow,
:root[data-palette="hanukkah"]
.section-heading--dark .section-heading__eyebrow,
:root[data-palette="hanukkah"]
.interior-section--dark .interior-eyebrow,
:root[data-palette="hanukkah"]
.interior-section--dark .interior-list__number,
:root[data-palette="hanukkah"]
.interior-section--dark
.interior-panel:not(.interior-panel--featured)
.interior-panel__number {
    color: var(--palette-hanukkah-gold-light);
}

:root[data-palette="hanukkah"]
.home-record__body,
:root[data-palette="hanukkah"]
.section-heading--dark .section-heading__body,
:root[data-palette="hanukkah"]
.interior-section--dark .interior-copy {
    color: var(--palette-hanukkah-blue-light);
}

/* Gold accent panels use midnight-blue lettering */
:root[data-palette="hanukkah"]
.record-card--featured .record-card__body,
:root[data-palette="hanukkah"]
.interior-panel--featured .interior-panel__body,
:root[data-palette="hanukkah"]
.home-support__body,
:root[data-palette="hanukkah"]
.signup-band__body,
:root[data-palette="hanukkah"]
.page-meet .meet-ending .meet-article__copy {
    color: var(--palette-hanukkah-midnight);
}

:root[data-palette="hanukkah"]
.home-support__eyebrow,
:root[data-palette="hanukkah"]
.signup-band__eyebrow,
:root[data-palette="hanukkah"]
.page-meet .meet-ending .interior-eyebrow,
:root[data-palette="hanukkah"]
.record-card--featured .record-card__number,
:root[data-palette="hanukkah"]
.interior-panel--featured .interior-panel__number {
    color: var(--palette-hanukkah-midnight);
}

/* Midnight donation panel beside gold volunteer panel */
:root[data-palette="hanukkah"]
.page-home .home-support .donation-band__eyebrow,
:root[data-palette="hanukkah"]
.page-home .home-support .donation-band__heading {
    color: var(--palette-hanukkah-gold-light);
}

:root[data-palette="hanukkah"]
.page-home .home-support .donation-band__body {
    color: var(--palette-hanukkah-blue-light);
}

:root[data-palette="hanukkah"]
.home-support__cta {
    background: var(--palette-hanukkah-midnight);
    color: var(--palette-hanukkah-gold-light);
}

:root[data-palette="hanukkah"]
.home-support__cta:hover,
:root[data-palette="hanukkah"]
.home-support__cta:focus-visible {
    background: var(--palette-hanukkah-dusk);
    color: var(--palette-hanukkah-gold-light);
}

/* Standalone donation bands are gold, except dark homepage panel */
:root[data-palette="hanukkah"]
.donation-band__eyebrow,
:root[data-palette="hanukkah"]
.donation-band__heading,
:root[data-palette="hanukkah"]
.donation-band__body {
    color: var(--palette-hanukkah-midnight);
}

/* Homepage signup has an explicit midnight-blue surface */
:root[data-palette="hanukkah"]
.page-home .signup-band__eyebrow,
:root[data-palette="hanukkah"]
.page-home .signup-band__heading {
    color: var(--palette-hanukkah-gold-light);
}

:root[data-palette="hanukkah"]
.page-home .signup-band__body {
    color: var(--palette-hanukkah-blue-light);
}

/* Endorsements: midnight organizations; gold state/national */
:root[data-palette="hanukkah"]
.endorsements-section--organizations
.endorsement-name__detail {
    color: var(--palette-hanukkah-blue-light);
}

:root[data-palette="hanukkah"]
.endorsements-section--state-national {
    color: var(--palette-hanukkah-midnight);
}

:root[data-palette="hanukkah"]
.endorsements-section--state-national
.endorsements-section__description,
:root[data-palette="hanukkah"]
.endorsements-section--state-national
.endorsement-name__detail,
:root[data-palette="hanukkah"]
.endorsements-section--state-national
.endorsement-photo--logo .endorsement-photo__detail {
    color: var(--palette-hanukkah-midnight);
}

/* Readable informational cards on pale-gold surfaces */
:root[data-palette="hanukkah"]
.news-card,
:root[data-palette="hanukkah"]
.page-events .events-empty {
    color: var(--palette-hanukkah-midnight);
}

/* Footer: gold accents and pale-blue secondary copy */
:root[data-palette="hanukkah"]
.site-footer__official p {
    color: var(--palette-hanukkah-blue-light);
}

:root[data-palette="hanukkah"]
.site-footer__links a:hover,
:root[data-palette="hanukkah"]
.site-footer__links a:focus-visible,
:root[data-palette="hanukkah"]
.site-footer__official a:hover,
:root[data-palette="hanukkah"]
.site-footer__official a:focus-visible {
    color: var(--palette-hanukkah-gold-light);
}

/* Visible focus outlines on dark sections */
:root[data-palette="hanukkah"]
.site-footer a:focus-visible,
:root[data-palette="hanukkah"]
.home-record a:focus-visible,
:root[data-palette="hanukkah"]
.page-meet .meet-hero a:focus-visible,
:root[data-palette="hanukkah"]
.page-home .home-story a:focus-visible {
    outline-color: var(--palette-hanukkah-gold-light);
}
