﻿/* Theme engine shared layer */
body[data-theme-mode='dark'] {
  color-scheme: dark;
}

body[data-theme-mode='light'] {
  color-scheme: light;
}

@media (min-width: 981px) {
  .header-main-inner {
    gap: 10px;
  }

  .main-nav {
    min-width: 0;
    flex: 1 1 auto;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 6px;
  }

  .header-actions {
    flex: 0 0 auto;
  }
}

.theme-mode-toggle {
  position: relative;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 34%, rgba(255, 255, 255, 0.4));
  background:
    linear-gradient(
      140deg,
      color-mix(in srgb, var(--color-background-lighter) 14%, transparent),
      color-mix(in srgb, var(--color-background-light) 24%, transparent)
    ),
    rgba(255, 255, 255, 0.04);
  color: var(--color-text-primary);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.theme-mode-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--color-primary) 56%, rgba(255, 255, 255, 0.5));
  background:
    linear-gradient(
      140deg,
      color-mix(in srgb, var(--color-primary) 16%, transparent),
      color-mix(in srgb, var(--color-background-light) 28%, transparent)
    ),
    rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.theme-mode-toggle:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.theme-toggle-orb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  flex: 0 0 18px;
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--color-secondary) 74%, #fff 26%),
    color-mix(in srgb, var(--color-primary) 62%, #fff 38%)
  );
  box-shadow:
    0 6px 12px color-mix(in srgb, var(--color-primary) 36%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.theme-toggle-icon {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.88;
}

.theme-toggle-text {
  line-height: 1;
  white-space: nowrap;
}

.theme-mode-toggle[data-current-mode='dark'] .theme-toggle-orb {
  transform: translateX(0);
}

.theme-mode-toggle[data-current-mode='light'] .theme-toggle-orb {
  transform: translateX(-2px);
  box-shadow:
    0 6px 12px color-mix(in srgb, var(--color-secondary) 32%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.theme-icon-pack {
  display: none;
}

body[data-theme-icon-pack='fleet'] .theme-icon-pack-fleet,
body[data-theme-icon-pack='pulse'] .theme-icon-pack-pulse,
body[data-theme-icon-pack='trail'] .theme-icon-pack-trail {
  display: block;
}

.logo-theme-note {
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, transparent);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: color-mix(in srgb, var(--color-text-primary) 92%, #fff 8%);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.designer-credit {
  display: inline-flex;
  align-items: center;
  opacity: 0.72;
  font-size: 0.65rem;
  line-height: 1.4;
  white-space: nowrap;
}

@media (min-width: 821px) {
  .page-home .hero-prev {
    left: clamp(12px, 1.5vw, 22px) !important;
    right: auto !important;
  }

  .page-home .hero-next {
    right: clamp(12px, 1.5vw, 22px) !important;
    left: auto !important;
  }

  .page-home .hero-nav-btn {
    z-index: 10;
  }
}

body[data-theme-mode='light'] .site-header {
  background: rgba(220, 236, 255, 0.86) !important;
}

body[data-theme-mode='light'] .site-header.header-shrunk {
  background: rgba(227, 241, 255, 0.94) !important;
}

body[data-theme-mode='light'] .header-shell {
  background:
    radial-gradient(circle at 86% -20%, rgba(27, 117, 209, 0.16), transparent 42%),
    radial-gradient(circle at 6% 120%, rgba(76, 148, 232, 0.14), transparent 46%),
    linear-gradient(180deg, rgba(239, 248, 255, 0.92), rgba(228, 241, 255, 0.9)),
    rgba(236, 246, 255, 0.88) !important;
  border-color: rgba(64, 118, 182, 0.22) !important;
}

body[data-theme-mode='light'] .main-nav a,
body[data-theme-mode='light'] .header-link-chip,
body[data-theme-mode='light'] .contact-item,
body[data-theme-mode='light'] .logo-subtitle,
body[data-theme-mode='light'] .header-presence-copy,
body[data-theme-mode='light'] .header-presence-badge,
body[data-theme-mode='light'] .theme-mode-toggle {
  color: #123055 !important;
}

body[data-theme-mode='light'] .theme-mode-toggle {
  border-color: rgba(18, 48, 85, 0.22);
}

body[data-theme-mode='light'] .logo-theme-note {
  border-color: rgba(0, 92, 185, 0.24);
  background: rgba(0, 92, 185, 0.08);
  color: #123055;
}

body[data-theme-mode='light'] .main-nav a.is-active,
body[data-theme-mode='light'] .main-nav a:hover {
  background: rgba(0, 92, 185, 0.12);
}

body[data-theme-mode='light'] .site-footer {
  background:
    radial-gradient(circle at 12% 0%, rgba(27, 117, 209, 0.14), transparent 30%),
    radial-gradient(circle at 84% 100%, rgba(76, 148, 232, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(236, 246, 255, 0.92), rgba(220, 236, 255, 0.94)),
    #dcecff !important;
}

body[data-theme-mode='light'] .footer-showcase,
body[data-theme-mode='light'] .footer-col,
body[data-theme-mode='light'] .footer-highlight-card {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(230, 241, 255, 0.9)),
    rgba(236, 246, 255, 0.86) !important;
  border-color: rgba(64, 118, 182, 0.2) !important;
}

body[data-theme-mode='light'] .footer-col h4,
body[data-theme-mode='light'] .footer-col a,
body[data-theme-mode='light'] .footer-col p,
body[data-theme-mode='light'] .footer-bottom p,
body[data-theme-mode='light'] .footer-bottom-links a {
  color: #16385f;
}

body[data-theme-mode='light'] .hero-nav-btn {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(0, 92, 185, 0.28);
  color: #123055;
}

body[data-theme-icon-style='soft'] .cart-icon-svg path,
body[data-theme-icon-style='soft'] .hero-nav-btn svg path {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

body[data-theme-icon-style='soft'] .nav-toggle span {
  border-radius: 999px;
}

body[data-theme-icon-style='sharp'] .cart-icon-link,
body[data-theme-icon-style='sharp'] .header-link-chip,
body[data-theme-icon-style='sharp'] .theme-mode-toggle {
  border-radius: 6px !important;
}

body[data-theme-icon-style='sharp'] .hero-nav-btn {
  border-radius: 8px !important;
}

body[data-theme-icon-style='sharp'] .cart-icon-svg path,
body[data-theme-icon-style='sharp'] .hero-nav-btn svg path {
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.7;
}

@media (max-width: 980px) {
  .theme-mode-toggle {
    min-height: 38px;
    padding: 0 10px 0 9px;
    font-size: 0.74rem;
  }

  .theme-toggle-orb {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .designer-credit {
    white-space: normal;
    text-align: center;
  }
}
