﻿/* Hero Banner - Premium Dark Style */
.hero-banner {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  /* Use a slightly higher opacity background instead of expensive backdrop-filter for better performance */
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 1) 100%);
  padding: 2.25rem 2rem 1.75rem;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  transform: translateZ(0); /* Hardware acceleration */
}

/* Glass Highlight - Top Border simulation */
.hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

/* Subtle Glowing Orbs for Depth */
.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 40%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: drift 15s linear infinite alternate;
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

/* Logo Container with Ambient Glow */
.hero-logo-container {
  position: relative;
  flex-shrink: 0;
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-logo-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.2) 0%, transparent 70%);
  z-index: -1;
  filter: blur(5px);
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-logo {
  width: 85px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-logo:hover {
  transform: scale(1.1) rotate(3deg);
  filter: drop-shadow(0 8px 25px rgba(96, 165, 250, 0.4));
}

/* Typography Enhancements */
.hero-text {
  text-align: left;
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.15rem;
  text-transform: none;
}

.hero-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: 0;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(10px); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .hero-banner {
    padding: 1.5rem 1rem 1.25rem;
  }

  .hero-content {
    gap: 1.25rem;
  }

  .hero-logo {
    width: 75px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .hero-banner {
    padding: 1rem 1rem 0.75rem;
  }

  .hero-logo {
    width: 60px;
  }

  .hero-title {
    font-size: 1.35rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }
}

/* Split viewport scrolls under banner */
body:has(.hero-banner) {
  overflow-y: auto;
}

.split-viewport {
  position: relative;
  z-index: 1;
}

/* Dedicated static banner for legal and subpages */
.hero-banner-static {
    position: relative;
    padding: 5rem 2rem 4rem;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0) 100%);
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-banner-static .hero-logo {
    max-width: 100px;
    filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.3));
}

.hero-banner-static .hero-title {
    font-size: 2.5rem;
    margin-top: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

:root[data-theme='light'] .hero-banner-static {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(248, 250, 252, 0.18) 100%);
    border-bottom-color: rgba(148, 163, 184, 0.14);
}

:root[data-theme='light'] .hero-banner-static .hero-logo {
    filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.18));
}

:root[data-theme='light'] .hero-banner-static .hero-title {
    background: linear-gradient(to right, #0f172a, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Jobs Page specific Logo + Icon Badge */
.hero-logo-wrapper {
    position: relative;
    display: inline-block;
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-icon-badge {
    position: absolute;
    bottom: -5px;
    right: -12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 5;
    border: 3px solid #0f172a;
    font-size: 1.25rem;
    animation: badgeReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.4);
}

@keyframes badgeReveal {
    from { opacity: 0; transform: scale(0) rotate(-45deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

@media (max-width: 768px) {
    .hero-banner-static {
        padding: 3rem 1.5rem 2rem;
    }
    .hero-banner-static .hero-title {
        font-size: 1.8rem;
    }
    .hero-banner-static .hero-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    .hero-banner-static .hero-text {
        text-align: center;
    }
    .hero-icon-badge {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        right: -8px;
        bottom: -2px;
    }
}

/* Homepage premium redesign */

:root {
  --home-hero-offset: 16rem;
  --scroll-offset: 220px;
}

/* Reserve space for the fixed hero so page content never scrolls under it */
body {
  padding-top: var(--home-hero-offset, 16rem);
  transition: padding-top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smoothly reduce gap when banner condenses */
.hero-condensed body {
  padding-top: var(--home-hero-offset-condensed, 6.5rem);
}

@media (max-width: 768px) {
  body {
    padding-top: var(--home-hero-offset-mobile, 10rem);
  }
}

.hero-banner {
  padding: 1.15rem 1.75rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22) 0%, transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.96) 100%);
  transition: padding 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, background 0.35s ease;
}

@media (max-width: 576px) {
    .hero-banner {
        padding: 0.75rem 1rem;
    }
}

.hero-banner::before {
  top: -80%;
  left: -15%;
  width: 42%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.14) 0%, transparent 72%);
}

.hero-content {
  max-width: 1560px;
  transition: gap 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-content-home {
  display: grid;
  grid-template-columns: auto minmax(0, 1.55fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 2.25rem;
  transition: gap 0.35s cubic-bezier(0.16, 1, 0.3, 1), grid-template-columns 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 991px) {
    .hero-content-home {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 1.5rem;
    }

    .hero-logo-container {
        grid-column: 1;
        grid-row: 1;
    }

    .hero-text {
        grid-column: 2;
        grid-row: 1;
    }

    .hero-panel {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-content-home {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        text-align: center;
        gap: 1rem;
    }

    .hero-logo-container {
        grid-column: 1;
        grid-row: 1;
        margin: 0 auto;
    }

    .hero-text {
        grid-column: 1;
        grid-row: 2;
        text-align: center;
    }

    .hero-panel {
        grid-column: 1;
        grid-row: 3;
    }

    .hero-controls {
        top: 0.5rem;
        right: 0.5rem;
    }

    .hero-controls button,
    .hero-controls .emergency-toggle {
        width: 2.5rem;
        height: 2.5rem;
    }
}

.hero-logo-container {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.hero-logo {
  width: 78px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease, transform 0.35s ease;
}

.hero-text {
  grid-column: 2;
  grid-row: 1;
  text-align: left;
  min-width: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 140;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.hero-controls-row {
  display: inline-flex;
  align-items: center;
  gap: inherit;
}

.emergency-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.78);
  color: #f8fafc;
  box-shadow: 0 12px 30px -16px rgba(220, 38, 38, 0.95);
  text-decoration: none;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), background 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease, filter 0.32s ease, color 0.32s ease;
}

.emergency-toggle:hover,
.emergency-toggle:focus-visible {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(220, 38, 38, 0.95);
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 18px 36px -18px rgba(220, 38, 38, 0.6);
  color: white;
}

.emergency-toggle i {
  position: absolute;
  font-size: 1rem;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease, filter 0.32s ease;
}

.emergency-toggle:hover i {
  transform: scale(1.1);
}

.emergency-toggle-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.emergency-toggle-close {
  opacity: 0;
  transform: scale(0.5) rotate(-90deg);
  font-size: 1.25rem !important;
}

.emergency-open .emergency-toggle-icon {
  opacity: 0;
  transform: scale(0.5) rotate(90deg);
}

.emergency-open .emergency-toggle-close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.emergency-open .emergency-toggle:hover .emergency-toggle-close {
  transform: scale(1.2) rotate(90deg);
}

.emergency-open .emergency-toggle {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

:root[data-theme='light'] .emergency-open .emergency-toggle {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

:root[data-theme='light'] .emergency-toggle {
  background: rgba(254, 226, 226, 0.9);
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
  box-shadow: 0 10px 24px -18px rgba(220, 38, 38, 0.4);
}

:root[data-theme='light'] .emergency-toggle:hover,
:root[data-theme='light'] .emergency-toggle:focus-visible {
  background: #fef2f2;
  border-color: rgba(239, 68, 68, 0.5);
  color: #b91c1c;
}

.hero-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  color: #f8fafc;
  box-shadow: 0 12px 30px -16px rgba(15, 23, 42, 0.95);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.hero-menu-toggle:hover,
.hero-menu-toggle:focus-visible {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(147, 197, 253, 0.32);
  transform: scale(1.03);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  box-shadow: 0 12px 30px -16px rgba(15, 23, 42, 0.95);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: rgba(147, 197, 253, 0.32);
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 18px 36px -18px rgba(59, 130, 246, 0.48);
}

.theme-toggle-icon {
  font-size: 1rem;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), color 0.32s ease, filter 0.32s ease;
}

:root[data-theme='light'] .theme-toggle-icon {
  color: #facc15;
  filter: drop-shadow(0 4px 10px rgba(250, 204, 21, 0.24));
}

.theme-toggle.theme-toggle-animating {
  animation: themeToggleBurst 0.82s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle.theme-toggle-animating .theme-toggle-icon {
  animation: themeToggleIconSpin 0.82s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Button: quick scale-up with a glowing ring, then settle back */
@keyframes themeToggleBurst {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(147, 197, 253, 0); }
  20%  { transform: scale(1.18); box-shadow: 0 0 0 8px rgba(147, 197, 253, 0.35); }
  50%  { transform: scale(1.04); box-shadow: 0 0 0 18px rgba(147, 197, 253, 0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(147, 197, 253, 0); }
}

/* Icon: 360° spin with brightness flash */
@keyframes themeToggleIconSpin {
  0%   { transform: rotate(0deg)   scale(1);   filter: brightness(1); }
  30%  { transform: rotate(180deg) scale(1.2);  filter: brightness(1.4); }
  60%  { transform: rotate(300deg) scale(1.05); filter: brightness(1.1); }
  100% { transform: rotate(360deg) scale(1);    filter: brightness(1); }
}

/* Light-theme variant: golden glow ring instead of blue */
:root[data-theme='light'] .theme-toggle.theme-toggle-animating {
  animation-name: themeToggleBurstLight;
}

@keyframes themeToggleBurstLight {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
  20%  { transform: scale(1.18); box-shadow: 0 0 0 8px rgba(250, 204, 21, 0.35); }
  50%  { transform: scale(1.04); box-shadow: 0 0 0 18px rgba(250, 204, 21, 0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}

.hero-menu-toggle-box {
  display: inline-flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hero-menu-toggle-line {
  width: 1.15rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-open .hero-menu-toggle-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-closing .hero-menu-toggle-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-open .hero-menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-closing .hero-menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-open .hero-menu-toggle-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-closing .hero-menu-toggle-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hero-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 2rem;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22) 0%, transparent 30%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.16) 0%, transparent 28%),
    rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-open #hero-menu,
.emergency-open #emergency-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-closing #hero-menu,
.emergency-closing #emergency-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hero-nav-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(100%, 58rem);
  padding: 2.25rem;
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 80px -36px rgba(0, 0, 0, 0.8);
  transform: translateY(1rem) scale(0.985);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-open #hero-menu .hero-nav-overlay-inner,
.emergency-open #emergency-menu .hero-nav-overlay-inner {
  transform: translateY(0) scale(1);
}

.nav-closing #hero-menu .hero-nav-overlay-inner,
.emergency-closing #emergency-menu .hero-nav-overlay-inner {
  transform: translateY(-0.85rem) scale(0.97);
  opacity: 0;
}

.hero-nav-overline {
  margin-bottom: 0.35rem;
  color: #93c5fd;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-nav-title {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-align: center;
}

.hero-nav-copy {
  max-width: 42rem;
  margin: 0;
  color: rgba(226, 232, 240, 0.84);
  font-size: 1.02rem;
  line-height: 1.75;
  text-align: center;
}

.hero-nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: 0.75rem;
}

.hero-nav-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 7.25rem;
  padding: 1.25rem 1.4rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  text-decoration: none;
  text-align: left;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.hero-nav-link-primary {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.22) 0%, rgba(59, 130, 246, 0.12) 100%);
  border-color: rgba(147, 197, 253, 0.24);
}

.hero-nav-link-compact {
  min-height: 6.35rem;
}

.hero-nav-link:hover,
.hero-nav-link:focus-visible {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(147, 197, 253, 0.32);
  transform: translateY(-2px);
}

.hero-nav-link-label {
  font-size: clamp(1.2rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hero-nav-link-copy {
  margin-top: 0.35rem;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.95rem;
  line-height: 1.6;
}

.hero-nav-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.92rem;
  text-align: center;
}

.hero-nav-note i {
  color: #93c5fd;
}

.hero-nav-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
}

.hero-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.3) 0%, rgba(37, 99, 235, 0.18) 100%);
  border: 1px solid rgba(147, 197, 253, 0.28);
  color: #f8fafc;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.hero-nav-cta:hover,
.hero-nav-cta:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.38) 0%, rgba(37, 99, 235, 0.24) 100%);
  border-color: rgba(147, 197, 253, 0.38);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: padding 0.35s ease, font-size 0.35s ease, letter-spacing 0.35s ease;
}

.hero-title {
  margin-top: 0.85rem;
  margin-bottom: 0.55rem;
  font-size: clamp(2rem, 2.8vw, 3.25rem);
  line-height: 1.12;
  padding-bottom: 0.12rem;
  transition: margin 0.35s ease, font-size 0.35s ease, line-height 0.35s ease;
}

.hero-subtitle {
  max-width: 50rem;
  color: rgba(203, 213, 225, 0.92);
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 1;
  max-height: 8rem;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.25s ease, font-size 0.3s ease;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: 1.15rem;
  transition: gap 0.35s ease, margin 0.35s ease;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  transition: padding 0.35s ease, font-size 0.35s ease, background 0.35s ease;
}

.hero-badge i {
  color: #93c5fd;
}

.hero-panel {
  grid-column: 3;
  grid-row: 1;
  padding: 1.2rem;
  text-align: left;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: padding 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s ease, opacity 0.3s ease;
}

.hero-panel-kicker {
  display: none;
}

.hero-panel-title {
  display: none;
}

.hero-panel-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.05rem;
  transition: gap 0.35s ease, margin 0.35s ease;
}

.hero-panel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: min(8.9rem, 100%);
  min-height: 8.9rem;
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0.95rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  text-decoration: none;
  text-align: center;
  transition: padding 0.35s ease, background 0.35s ease, border-color 0.35s ease, opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease, margin 0.25s ease, width 0.35s ease, min-height 0.35s ease;
}

.hero-panel-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.15);
}

.hero-panel-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.16);
  color: #93c5fd;
  flex-shrink: 0;
  transition: width 0.35s ease, height 0.35s ease;
}

.hero-panel-item span {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.hero-panel-item strong {
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.15;
}

.hero-panel-item small {
  color: rgba(203, 213, 225, 0.82);
  max-width: 6rem;
  font-size: 0.69rem;
  line-height: 1.25;
  transition: font-size 0.35s ease;
}

.hero-condensed .hero-banner {
  padding: 0.65rem 1.35rem;
  box-shadow: 0 8px 28px -12px rgba(0, 0, 0, 0.55);
}

.hero-condensed .hero-content-home {
  gap: 1.35rem;
}

.hero-condensed .hero-logo {
  width: 54px;
}

.hero-condensed .hero-eyebrow {
  padding: 0.25rem 0.65rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.hero-condensed .hero-title {
  margin-top: 0.35rem;
  margin-bottom: 0.15rem;
  font-size: clamp(1.45rem, 2vw, 2.25rem);
  line-height: 1.12;
  padding-bottom: 0.08rem;
}

.hero-condensed .hero-subtitle {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.hero-condensed .hero-badges {
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.hero-condensed .hero-badge {
  padding: 0.38rem 0.7rem;
  font-size: 0.74rem;
}

.hero-condensed .hero-menu-toggle {
  width: 3rem;
  height: 3rem;
}

.hero-condensed .theme-toggle,
.hero-condensed .emergency-toggle {
  width: 3rem;
  height: 3rem;
}

.hero-condensed .hero-panel {
  padding: 0.8rem;
}

.hero-condensed .hero-panel-kicker,
.hero-condensed .hero-panel-title {
  display: none;
}

.hero-condensed .hero-panel-title {
  margin-top: 0.35rem;
  font-size: 0.98rem;
}

.hero-condensed .hero-panel-list {
  gap: 0.45rem;
  margin-top: 0;
}

.hero-condensed .hero-panel-item {
  width: min(7rem, 100%);
  min-height: 7rem;
  padding: 0.7rem 0.65rem;
}

.hero-condensed .hero-panel-icon {
  width: 2.35rem;
  height: 2.35rem;
}

.hero-condensed .hero-panel-item small {
  font-size: 0.64rem;
}

@media (max-width: 1280px) {
  .hero-content-home {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .hero-text {
    grid-column: 2;
    grid-row: 1;
  }

  .hero-panel {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 768px) {
  :root {
    --home-hero-offset: 10rem;
    --scroll-offset: 160px;
  }

  .hero-condensed {
    --scroll-offset: 104px;
  }

  .hero-banner {
    padding: 0.5rem 0.75rem 0.6rem;
  }

  .hero-controls {
    top: 0.8rem;
    right: 0.8rem;
    gap: 0.45rem;
  }

  .hero-content-home {
    grid-template-columns: 1fr;
    gap: 0.72rem;
    align-items: center;
  }

  .hero-logo-container {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
  }

  .hero-text {
    grid-column: 1;
    grid-row: 2;
    text-align: center;
  }

  .hero-logo {
    width: 75px;
  }

  .hero-eyebrow {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-nav-overlay {
    padding: 5.5rem 1.25rem 2rem;
  }

  .hero-nav-overlay-inner {
    width: min(100%, 40rem);
    padding: 1.5rem;
    border-radius: 1.5rem;
  }

  .hero-nav-copy {
    font-size: 0.95rem;
  }

  .hero-nav-links {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .hero-nav-link {
    min-height: 5.25rem;
    border-radius: 1.2rem;
    padding: 1rem 1.1rem;
  }

  .hero-nav-link-compact {
    min-height: 5rem;
  }

  .hero-nav-link-copy {
    font-size: 0.88rem;
  }

  .hero-nav-note {
    border-radius: 1rem;
    padding: 0.85rem 0.95rem;
  }

  .hero-nav-footer {
    flex-direction: column;
  }

  .hero-panel,
  .hero-panel.glass-card {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
    padding: 0.55rem;
    border-radius: 1rem;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .hero-logo {
    width: 80px;
  }

  .hero-subtitle,
  .hero-badges,
  .hero-panel-kicker,
  .hero-panel-title {
    display: none;
  }

  .hero-eyebrow {
    font-size: 0.68rem;
    padding: 0.25rem 0.65rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.35rem;
  }

  .hero-title {
    font-size: 1.4rem;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
    line-height: 1.18;
    padding-bottom: 0.1rem;
  }

  .hero-panel-list {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0;
  }

  .hero-panel-item,
  .hero-panel-item:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .hero-panel-item {
    width: 4.5rem;
    height: 4.5rem;
    min-height: auto;
    aspect-ratio: 1;
    margin: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.3rem;
    border-radius: 50%;
    gap: 0.2rem;
  }

  .hero-panel-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
  }

  .hero-panel-item span {
    align-items: center;
  }

  .hero-panel-item strong {
    font-size: 0.65rem;
    line-height: 1.1;
  }

  .hero-panel-item small {
    display: none;
  }

  /* Condensed: minimal banner footprint while scrolling */
  .hero-condensed .hero-banner {
    padding: 0.4rem 0.65rem 0.55rem;
  }

  .hero-condensed .hero-controls {
    top: 0.55rem;
    right: 0.75rem;
  }

  .hero-condensed .hero-logo {
    width: 44px;
  }

  .hero-condensed .hero-eyebrow {
    display: none;
  }

  .hero-condensed .hero-title {
    font-size: 1.15rem;
  }

  .hero-condensed .hero-panel {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .hero-condensed .hero-panel-list {
    gap: 0.22rem;
  }

  .hero-condensed .hero-panel-item {
    width: 4.5rem;
    height: 4.5rem;
    min-height: auto;
    padding: 0.3rem;
  }

  .hero-condensed .hero-panel-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .hero-condensed .hero-panel-item strong {
    font-size: 0.65rem;
  }

  .hero-condensed .hero-panel-item small {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-banner {
    padding: 0.35rem 0.55rem 0.45rem;
  }

  .hero-controls {
    top: 0.35rem;
    right: 0.45rem;
    gap: 0.18rem;
  }

  .hero-menu-toggle,
  .theme-toggle,
  .emergency-toggle {
    width: 1.8rem;
    height: 1.8rem;
  }

  .hero-content-home {
    gap: 0.45rem;
  }

  .hero-title {
    font-size: 1.25rem;
    line-height: 1.2;
    margin-bottom: 0.15rem;
    padding-bottom: 0.08rem;
  }

  .hero-panel,
  .hero-panel.glass-card {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .hero-panel-list {
    gap: 0.45rem;
  }

  .hero-panel-item {
    width: 4rem;
    height: 4rem;
    min-height: auto;
    padding: 0.25rem;
  }

  .hero-panel-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .hero-panel-item strong {
    font-size: 0.66rem;
  }

  .hero-panel-item small {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-banner {
    padding: 1rem 0.9rem 0.9rem;
  }

  .hero-content-home {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .hero-logo-container,
  .hero-text,
  .hero-panel {
    grid-column: 1;
  }

  .hero-logo-container {
    justify-self: center;
  }

  .hero-text {
    text-align: center;
    justify-items: center;
  }

  .hero-badges {
    justify-content: center;
  }

  .hero-panel {
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .hero-panel-list {
    gap: 0.45rem;
  }

  .hero-panel-item {
    width: 4rem;
    height: 4rem;
    min-height: auto;
    padding: 0.25rem;
  }

  .hero-panel-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .hero-panel-item strong {
    font-size: 0.66rem;
  }
}

@media (max-width: 480px) {
  .hero-menu-toggle {
    width: 2.8rem;
    height: 2.8rem;
  }

  .hero-nav-overlay {
    padding-top: 5rem;
  }

  .hero-nav-overlay-inner {
    padding: 1.25rem;
  }

  .hero-nav-title {
    font-size: 1.7rem;
  }

  .hero-nav-link {
    min-height: 4.6rem;
    padding: 0.9rem 1rem;
  }

  .hero-nav-note {
    font-size: 0.85rem;
  }

  .hero-panel-item strong {
    font-size: 0.68rem;
  }

  .hero-panel-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .hero-panel-item {
    width: 4rem;
    height: 4rem;
    min-height: auto;
  }
}

html.nav-open,
html.nav-open body,
html.nav-closing,
html.nav-closing body {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .hero-menu-toggle,
  .theme-toggle,
  .theme-toggle-icon,
  .hero-menu-toggle-line,
  .hero-nav-overlay,
  .hero-nav-link {
    transition: none;
  }
}

/* ─── Premium Theme Transition (View Transition API) ─── */

::view-transition-group(root) {
  animation-duration: 0.88s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* New theme snapshot: circular reveal with glow ring + contrast flash */
::view-transition-new(root) {
  mix-blend-mode: normal;
  clip-path: circle(0% at var(--theme-switch-x, 50%) var(--theme-switch-y, 5%));
  animation:
    theme-reveal-circle 0.88s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    theme-new-flash    0.88s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Old theme snapshot: gentle zoom-out + blur + fade — feels like "dissolving away" */
::view-transition-old(root) {
  z-index: -1;
  animation: theme-old-dissolve 0.88s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* The circular expansion — with a slight overshoot via 160% */
@keyframes theme-reveal-circle {
  0% {
    clip-path: circle(0% at var(--theme-switch-x, 50%) var(--theme-switch-y, 5%));
  }
  70% {
    clip-path: circle(115% at var(--theme-switch-x, 50%) var(--theme-switch-y, 5%));
  }
  100% {
    clip-path: circle(160% at var(--theme-switch-x, 50%) var(--theme-switch-y, 5%));
  }
}

/* Brightness + contrast pop on the incoming theme */
@keyframes theme-new-flash {
  0%   { filter: brightness(1.12) saturate(1.15); }
  40%  { filter: brightness(1.04) saturate(1.06); }
  100% { filter: brightness(1) saturate(1); }
}

/* Old snapshot: subtle scale-down + blur + fade-out */
@keyframes theme-old-dissolve {
  0%   { opacity: 1; transform: scale(1);    filter: blur(0); }
  60%  { opacity: 0.6; transform: scale(0.98); filter: blur(2px); }
  100% { opacity: 0; transform: scale(0.96); filter: blur(6px); }
}

/* Skip the effect when the user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root),
  ::view-transition-new(root),
  ::view-transition-old(root) {
    animation: none !important;
  }
}

:root[data-theme='light'] .hero-banner {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14) 0%, transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.97) 100%);
  border-bottom-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 12px 40px -18px rgba(15, 23, 42, 0.2);
}

:root[data-theme='light'] .hero-banner::after {
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.22), transparent);
}

:root[data-theme='light'] .hero-banner::before {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 72%);
}

:root[data-theme='light'] .hero-logo-container::after {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16) 0%, transparent 70%);
}

:root[data-theme='light'] .hero-title {
  background: linear-gradient(to right, #0f172a, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

:root[data-theme='light'] .hero-subtitle {
  color: rgba(51, 65, 85, 0.88);
}

:root[data-theme='light'] .hero-eyebrow {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
}

:root[data-theme='light'] .hero-badge {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(148, 163, 184, 0.2);
  color: #0f172a;
  box-shadow: 0 12px 30px -22px rgba(15, 23, 42, 0.22);
}

:root[data-theme='light'] .hero-badge i {
  color: #2563eb;
}

:root[data-theme='light'] .hero-menu-toggle,
:root[data-theme='light'] .theme-toggle {
  border-color: rgba(148, 163, 184, 0.2);
  color: #0f172a;
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.22);
}

:root[data-theme='light'] .hero-panel-phone,
:root[data-theme='light'] .teaser-metric-link {
  color: #1d4ed8;
}

:root[data-theme='light'] .hero-panel-phone:hover,
:root[data-theme='light'] .hero-panel-phone:focus-visible,
:root[data-theme='light'] .teaser-metric-link:hover,
:root[data-theme='light'] .teaser-metric-link:focus-visible {
  color: #1e40af;
}

:root[data-theme='light'] .hero-menu-toggle:hover,
:root[data-theme='light'] .hero-menu-toggle:focus-visible,
:root[data-theme='light'] .theme-toggle:hover,
:root[data-theme='light'] .theme-toggle:focus-visible {
  border-color: rgba(37, 99, 235, 0.24);
}

:root[data-theme='light'] .hero-menu-toggle {
  background: rgba(255, 255, 255, 0.94);
}

:root[data-theme='light'] .hero-menu-toggle:hover,
:root[data-theme='light'] .hero-menu-toggle:focus-visible {
  background: #ffffff;
}

:root[data-theme='light'] .theme-toggle {
  background: rgba(255, 255, 255, 0.94);
}

:root[data-theme='light'] .theme-toggle:hover,
:root[data-theme='light'] .theme-toggle:focus-visible {
  background: #ffffff;
}

:root[data-theme='light'] .hero-nav-overlay {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16) 0%, transparent 30%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12) 0%, transparent 28%),
    rgba(241, 245, 249, 0.92);
}

:root[data-theme='light'] .hero-nav-overlay-inner {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.84) 100%);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 28px 80px -40px rgba(15, 23, 42, 0.28);
}

:root[data-theme='light'] .hero-nav-overline {
  color: #2563eb;
}

:root[data-theme='light'] .hero-nav-title,
:root[data-theme='light'] .hero-panel-title {
  color: #0f172a;
}

:root[data-theme='light'] .hero-nav-copy {
  color: rgba(51, 65, 85, 0.84);
}

:root[data-theme='light'] .hero-nav-link {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(148, 163, 184, 0.18);
  color: #0f172a;
}

:root[data-theme='light'] .hero-nav-link:hover,
:root[data-theme='light'] .hero-nav-link:focus-visible {
  color: #0f172a;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
}

:root[data-theme='light'] .hero-nav-link-copy {
  color: rgba(51, 65, 85, 0.72);
}

:root[data-theme='light'] .hero-nav-note {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.12);
  color: rgba(15, 23, 42, 0.84);
}

:root[data-theme='light'] .hero-nav-note i,
:root[data-theme='light'] .hero-panel-kicker {
  color: #2563eb;
}

:root[data-theme='light'] .hero-nav-cta {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.14) 0%, rgba(37, 99, 235, 0.08) 100%);
  border-color: rgba(37, 99, 235, 0.18);
  color: #1d4ed8;
}

:root[data-theme='light'] .hero-nav-cta:hover,
:root[data-theme='light'] .hero-nav-cta:focus-visible {
  color: #1e40af;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.18) 0%, rgba(37, 99, 235, 0.12) 100%);
}

:root[data-theme='light'] .hero-panel {
  background: transparent;
  border: none;
  box-shadow: none;
}

:root[data-theme='light'] .hero-panel-item {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(148, 163, 184, 0.18);
  color: #0f172a;
}

:root[data-theme='light'] .hero-panel-item:hover {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.22);
}

:root[data-theme='light'] .hero-panel-icon {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

:root[data-theme='light'] .hero-panel-item small {
  color: rgba(51, 65, 85, 0.72);
}

@media (max-width: 768px) {
  :root[data-theme='light'] .hero-panel,
  :root[data-theme='light'] .hero-panel.glass-card,
  :root[data-theme='light'] .hero-panel-item,
  :root[data-theme='light'] .hero-panel-item:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
}

