/* Site-wide color schemes. Distinct from sample-site data-sample-theme. */

:root,
html[data-site-theme="navy"] {
  --hero-bg: #000b1b;
  --hero-tint: #000b1b;
  --hero-tint-strength: 0;
  --hero-tint-blend: hue;
  --hero-video-filter: none;
  --hero-glow-rgb: 174, 210, 235;
  --hero-ring-rgb: 210, 232, 246;
  --hero-stamp-rgb: 178, 218, 242;
  --forge-mill-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .49 0 0 0 0 .71 0 0 0 0 .83 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-site-theme="purple"] {
  --color-primary: #c4a0ff;
  --color-accent: #c4a0ff;
  --color-primary-fg: #1a1024;
  --color-accent-fg: #1a1024;
  --color-brand: #d2b8ff;
  --color-bg: color-mix(in srgb, #11061f 16%, #18181b);
  --hero-bg: #11061f;
  --hero-tint: #7c4dff;
  --hero-tint-strength: 0.32;
  --hero-tint-blend: hue;
  --hero-video-filter: sepia(1) saturate(2.1) hue-rotate(220deg) brightness(1.08);
  --hero-glow-rgb: 206, 176, 255;
  --hero-ring-rgb: 229, 212, 255;
  --hero-stamp-rgb: 214, 190, 255;
  --forge-mill-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .77 0 0 0 0 .63 0 0 0 0 1 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-site-theme="teal"] {
  --color-primary: #3ec8c8;
  --color-accent: #3ec8c8;
  --color-primary-fg: #041416;
  --color-accent-fg: #041416;
  --color-brand: #6fd4d4;
  --color-bg: color-mix(in srgb, #041a1d 16%, #18181b);
  --hero-bg: #041a1d;
  --hero-tint: #2ec4c4;
  --hero-tint-strength: 0.32;
  --hero-tint-blend: hue;
  --hero-video-filter: sepia(1) saturate(2.1) hue-rotate(132deg) brightness(1.08);
  --hero-glow-rgb: 147, 236, 236;
  --hero-ring-rgb: 198, 249, 249;
  --hero-stamp-rgb: 170, 240, 240;
  --forge-mill-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24 0 0 0 0 .78 0 0 0 0 .78 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-site-theme="emerald"] {
  --color-primary: #3dba7a;
  --color-accent: #3dba7a;
  --color-primary-fg: #07140d;
  --color-accent-fg: #07140d;
  --color-brand: #62c992;
  --color-bg: color-mix(in srgb, #05190f 16%, #18181b);
  --hero-bg: #05190f;
  --hero-tint: #3dba7a;
  --hero-tint-strength: 0.34;
  --hero-tint-blend: hue;
  --hero-video-filter: sepia(1) saturate(2.2) hue-rotate(95deg) brightness(1.1);
  --hero-glow-rgb: 158, 238, 190;
  --hero-ring-rgb: 206, 249, 223;
  --hero-stamp-rgb: 177, 243, 201;
  --forge-mill-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24 0 0 0 0 .73 0 0 0 0 .48 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-site-theme="amber"] {
  --color-primary: #f0a24a;
  --color-accent: #f0a24a;
  --color-primary-fg: #1c1410;
  --color-accent-fg: #1c1410;
  --color-brand: #f3b56b;
  --color-bg: color-mix(in srgb, #1d1205 12%, #18181b);
  --hero-bg: #1d1205;
  --hero-tint: #f0a24a;
  --hero-tint-strength: 0.3;
  --hero-tint-blend: hue;
  --hero-video-filter: sepia(1) saturate(2) hue-rotate(348deg) brightness(1.1);
  --hero-glow-rgb: 255, 206, 148;
  --hero-ring-rgb: 255, 231, 198;
  --hero-stamp-rgb: 255, 218, 167;
  --forge-mill-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .94 0 0 0 0 .64 0 0 0 0 .29 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-site-theme="crimson"] {
  --color-primary: #e85a7a;
  --color-accent: #e85a7a;
  --color-primary-fg: #1a070c;
  --color-accent-fg: #1a070c;
  --color-brand: #f08aa0;
  --color-bg: color-mix(in srgb, #19070c 16%, #18181b);
  --hero-bg: #19070c;
  --hero-tint: #e85a7a;
  --hero-tint-strength: 0.32;
  --hero-tint-blend: hue;
  --hero-video-filter: sepia(1) saturate(2.1) hue-rotate(298deg) brightness(1.08);
  --hero-glow-rgb: 255, 173, 196;
  --hero-ring-rgb: 255, 210, 223;
  --hero-stamp-rgb: 255, 188, 208;
  --forge-mill-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .91 0 0 0 0 .35 0 0 0 0 .48 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-site-theme="slate"] {
  --color-primary: #9aa7b5;
  --color-accent: #9aa7b5;
  --color-primary-fg: #111419;
  --color-accent-fg: #111419;
  --color-brand: #b3bec8;
  --color-bg: color-mix(in srgb, #111419 16%, #18181b);
  --hero-bg: #111419;
  --hero-tint: #9aa7b5;
  --hero-tint-strength: 0.22;
  --hero-tint-blend: hue;
  --hero-video-filter: saturate(0.35) brightness(1.06);
  --hero-glow-rgb: 210, 219, 229;
  --hero-ring-rgb: 229, 236, 242;
  --hero-stamp-rgb: 218, 226, 236;
  --forge-mill-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .6 0 0 0 0 .65 0 0 0 0 .71 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Where-and-why Oklahoma cutout follows the live site theme.
   Leaflet writes fill as a presentation attribute; CSS must win. */
.service-map path.service-map__oklahoma {
  fill: var(--color-primary) !important;
  stroke: color-mix(in srgb, var(--color-primary) 72%, #fff) !important;
}

.site-nav__theme {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.site-nav__search {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.site-nav__theme-toggle,
.site-nav__search-toggle,
.site-nav__locale-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--site-nav-tool, #e0a04a) 42%, var(--color-border));
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--site-nav-tool, #e0a04a) 10%, transparent);
  color: var(--site-nav-tool, #e0a04a);
  cursor: pointer;
}

.site-nav__theme-toggle:hover,
.site-nav__theme-toggle:focus-visible,
.site-nav__search-toggle:hover,
.site-nav__search-toggle:focus-visible,
.site-nav__locale-toggle:hover,
.site-nav__locale-toggle:focus-visible {
  border-color: color-mix(in srgb, var(--site-nav-tool, #e0a04a) 78%, var(--color-border));
  background: color-mix(in srgb, var(--site-nav-tool, #e0a04a) 18%, transparent);
  outline: none;
}

.site-nav__theme-toggle[aria-expanded="true"],
.site-nav__locale-toggle[aria-expanded="true"] {
  border-color: var(--site-nav-tool, #e0a04a);
  background: color-mix(in srgb, var(--site-nav-tool, #e0a04a) 18%, transparent);
}

.site-nav__theme-icon,
.site-nav__search-icon,
.site-nav__locale-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.site-nav__theme-icon svg,
.site-nav__search-icon svg,
.site-nav__locale-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.site-nav__theme-panel {
  z-index: 80;
  display: none;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 11.5rem;
  padding: 0.7rem;
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  left: auto;
}

.site-nav__theme-panel:not([hidden]) {
  display: flex;
}

.site-nav__theme-label {
  flex: 0 0 100%;
  margin: 0 0 0.15rem;
  color: var(--color-muted);
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav__theme-swatch {
  appearance: none;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 2px solid color-mix(in srgb, var(--color-fg) 18%, transparent);
  border-radius: 999px;
  background: var(--swatch, var(--color-primary));
  cursor: pointer;
}

.site-nav__theme-swatch:hover,
.site-nav__theme-swatch:focus-visible {
  outline: none;
  border-color: var(--color-fg);
}

.site-nav__theme-swatch.is-active {
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-primary);
}

.site-nav__search-lead {
  margin: 0 0 0.85rem;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.site-nav__search-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--color-primary) 32%, var(--color-border));
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  color: var(--color-fg);
  font: inherit;
}

.site-nav__search-input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.site-nav__search-status {
  min-height: 1.2em;
  margin: 0 0 0.55rem;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.site-nav__search-results {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: min(22rem, 50dvh);
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.site-nav__search-results a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: 0.45rem;
  color: var(--color-fg);
  text-decoration: none;
}

.site-nav__search-results a:hover,
.site-nav__search-results a:focus-visible {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  outline: none;
}

.site-nav__search-kind {
  color: var(--color-primary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#site-search-modal .site-modal__inner {
  width: min(40rem, calc(100vw - 1.5rem));
}

#site-search-modal .site-modal__dismiss {
  grid-column: auto;
  margin: 0;
}

@media (min-width: 1360px) {
  .site-nav__theme {
    margin-left: 0;
  }

  .site-nav__theme-panel {
    top: calc(100% + 0.55rem);
    right: 0;
    left: auto;
  }
}

@media (max-width: 1359px) {
  .site-nav__theme,
  .site-nav__search,
  .site-nav__locale {
    margin: 0;
  }

  .site-nav__theme-toggle,
  .site-nav__search-toggle,
  .site-nav__locale-toggle {
    width: var(--touch-target, 2.75rem);
    height: var(--touch-target, 2.75rem);
  }

  .site-nav__theme-icon,
  .site-nav__search-icon,
  .site-nav__locale-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .site-nav__theme-panel {
    width: min(16rem, calc(100vw - 2rem));
    margin-top: 0;
  }
}
