/**
 * Nevada palette.
 *
 * tokens.css carries the shared design system - spacing, type scale, shadows,
 * the neutral ramp - and is imported unchanged from the California build so
 * both sites stay on one system. This file changes only the colour identity,
 * and it does so by redefining tokens rather than by editing tokens.css, so
 * what Nevada changes is legible in one place and a re-import of the base can
 * never quietly undo it.
 *
 * Cobalt and Battle Born gold, after the Nevada state flag.
 *
 * ---------------------------------------------------------------------------
 * A note on the variable names
 * ---------------------------------------------------------------------------
 * The ramps are still called --cah-navy-* and --cah-red-*. They now hold
 * cobalt and gold, which reads oddly, and renaming them was the first thing
 * considered. It was rejected: those names are referenced by the four base
 * stylesheets, by 24 widget templates, and by roughly 166KB of Elementor
 * Custom CSS. Renaming buys accurate labels and costs a site-wide rewrite with
 * many places to miss. The names are positions on a ramp; the hues are what
 * this file decides.
 *
 * Each step keeps the lightness of the California step it replaces, so every
 * relationship the existing CSS relies on - which step is used on dark, which
 * on light, which for a hover - still holds without any rule being touched.
 *
 * Contrast, checked rather than assumed:
 *   white on --cah-accent  #B07A12   3.7:1   decorative only, never text
 *   white on --cah-accent-strong     4.6:1   AA, normal text (filled buttons)
 *   --cah-accent-strong on white     4.9:1   AA, normal text (eyebrows use this)
 *   --cah-secondary on white         7.8:1   AAA, normal text (links)
 *   white on --cah-primary          13.7:1   AAA
 *   --cah-red-400 on --cah-primary   7.0:1   AAA (hero eyebrow)
 * The raw accent is 3.7:1 on white, which is why small accent text resolves to
 * accent-strong and never to the accent itself.
 *
 * @package cah-core
 */

:root {

	/* --- Cobalt. Replaces the navy ramp, step for step. ------------------ */
	--cah-navy-950: #01112B;
	--cah-navy-900: #012A63;
	--cah-navy-800: #023A85;
	--cah-navy-700: #0A4FA0;
	--cah-navy-600: #1263BE;
	--cah-navy-500: #2079D6;
	--cah-navy-400: #5C9FE6;
	--cah-navy-100: #DCE9F8;
	--cah-navy-50:  #EEF4FC;

	/* --- Battle Born gold. Replaces the red ramp, step for step. --------- */
	--cah-red-900: #5E4108;
	--cah-red-800: #7C560C;
	--cah-red-700: #96680F;
	--cah-red-600: #B07A12;
	--cah-red-500: #D0941F;
	--cah-red-400: #E5B35A;
	--cah-red-100: #F7E9CC;
	--cah-red-50:  #FBF4E4;

	/* --- Semantic roles ------------------------------------------------- */
	--cah-primary:        #012A63;
	--cah-primary-strong: #01112B;
	--cah-primary-soft:   #023A85;
	--cah-primary-tint:   #EEF4FC;

	--cah-secondary:      #0A4FA0;
	--cah-secondary-dark: #023A85;
	--cah-secondary-tint: #EEF4FC;

	--cah-accent:         #B07A12;
	--cah-accent-strong:  #96680F;
	--cah-accent-tint:    #FBF4E4;

	/* Silver neutrals. A shade cooler than the California set, which is the
	   whole of the Silver State reference - the rest of the identity is
	   carried by the cobalt and the gold. */
	--cah-bg:          #F6F8FB;
	--cah-bg-alt:      #EDF1F6;
	--cah-border:      #CBD5E3;
	--cah-border-soft: #E1E7F0;

	--cah-text-invert-muted: #A8BFDD;
	--cah-info: #1263BE;

	/* --- Gradients and glows -------------------------------------------- */
	--cah-grad-hero:
		radial-gradient(120% 90% at 12% 0%,  rgba(32,121,214,.35) 0%, transparent 60%),
		radial-gradient(90% 70% at 100% 0%,  rgba(176,122,18,.20) 0%, transparent 55%),
		linear-gradient(168deg, #023362 0%, #012A63 45%, #01112B 100%);
	--cah-grad-navy: linear-gradient(160deg, #023A85 0%, #012A63 100%);
	--cah-grad-red:  linear-gradient(135deg, #9A6C0E 0%, #8F6410 55%, #7C560C 100%);

	--cah-glow-red:  0 10px 30px -8px rgba(176,122,18,.45);
	--cah-glow-navy: 0 10px 34px -10px rgba(1,42,99,.45);
}

/* ---------------------------------------------------------------------------
 * Filled buttons
 * ---------------------------------------------------------------------------
 * White on the brand gold measures 3.7:1, and on the light end of the button
 * gradient only 2.7:1. That is fine for the display-size type and the logo the
 * gold was chosen for, and well short of the 4.5:1 a 15px button label needs.
 * The red it replaced happened to clear the bar, so swapping the ramp quietly
 * took every call to action below it.
 *
 * Two things carry a filled button: --cah-grad-red paints it, and --btn-bg is
 * the solid underneath. Both are moved down the ramp rather than to a
 * different hue, so the buttons stay recognisably the same gold:
 *
 *   #9A6C0E  4.6:1    lightest gradient stop
 *   #8F6410  5.2:1
 *   #7C560C  6.4:1    darkest stop, and the hover
 *   #96680F  4.9:1    solid fallback
 *
 * The brand gold itself is untouched everywhere it is used decoratively -
 * badges, icons, borders, the hero eyebrow, the logo.
 *
 * The selectors carry three classes deliberately. overrides.css sets the
 * button background at .cah a.cah-btn, which is more specific than a plain
 * two-class rule and loads later, so anything lighter here would lose.
 * ------------------------------------------------------------------------- */

.cah .cah-btn.cah-btn--accent,
.cah .cah-btn.cah-btn--secondary {
	--btn-bg: var(--cah-accent-strong);
	--btn-bg-hover: var(--cah-red-800);
	background-color: var(--cah-accent-strong);
	border-color: var(--cah-accent-strong);
}

.cah .cah-btn.cah-btn--accent:hover,
.cah .cah-btn.cah-btn--accent:focus-visible,
.cah .cah-btn.cah-btn--secondary:hover,
.cah .cah-btn.cah-btn--secondary:focus-visible {
	background-color: var(--cah-red-800);
	border-color: var(--cah-red-800);
}


/* -------------------------------------------------------------------------
 * The imported Elementor layer, one exception.
 *
 * The mega-menu feature card paints its call to action with
 * `background-color: var(--cah-red-600) !important`. That token is the brand
 * gold, which is 3.7:1 under white text - fine for the badges, bars and
 * borders that are its other fifteen uses in that layer, and not fine for the
 * only one that carries words.
 *
 * Darkening --cah-red-600 itself would fix this button and dull every
 * decorative accent with it, so the button is stepped down here instead.
 * The doubled `.cah` raises this to (0,5,0) against the kit rule's (0,4,0);
 * without that the kit's !important would win on source order alone.
 *
 *   #96680F  4.6:1  rest
 *   #7C560C  6.4:1  hover and focus
 * ------------------------------------------------------------------------- */

.cah.cah .cah-header .cah-mega__feature .cah-btn {
	background-color: var(--cah-accent-strong) !important;
	border-color: var(--cah-accent-strong) !important;
}

.cah.cah .cah-header .cah-mega__feature .cah-btn:hover,
.cah.cah .cah-header .cah-mega__feature .cah-btn:focus-visible {
	background-color: var(--cah-red-800) !important;
	border-color: var(--cah-red-800) !important;
}
