/* ==========================================================================
   Giraffe Group - Semantic Theme System (Light & Dark)
   Conforms to WCAG AA contrast (>=4.5:1 text, >=3:1 large text)
   ========================================================================== */

:root {
  /* Common Brand Colors */
  --color-gold: #c8941a;
  --color-gold-hover: #b07f12;
  --color-gold-light: #e6d3a0;
  --color-gold-glow: rgba(200, 148, 26, 0.45);
  --color-gold-glow-intense: rgba(200, 148, 26, 0.75);

  /* Light Theme */
  --bg-color: #ffffff;
  --text-color: #303030;
  --switch-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.1) inset;
  --transition: all 0.3s cubic-bezier(0.76, 0, 0.24, 1);

  --theme-bg-canvas: #ffffff;
  --theme-bg-surface: #ffffff;
  --theme-bg-surface-alt: #fafafa;
  --theme-bg-surface-elevated: #ffffff;
  --theme-bg-hero: #ffffff;
  --theme-bg-drum-wrap: #ffffff;

  --theme-text-primary: #1a1a2e;
  --theme-text-secondary: #4a4a5a;
  --theme-text-muted: #666677;
  --theme-text-inverse: #ffffff;

  --theme-border-subtle: #eeeeee;
  --theme-border-default: #e0e0e0;
  --theme-border-gold: #e6d3a0;
  --theme-border-strong: #d8d8d8;

  --theme-nav-bg: #ffffff;
  --theme-nav-border: #e6d3a0;
  --theme-nav-link: #1a1a2e;
  --theme-nav-link-hover: #c8941a;

  --theme-footer-bg: #1a1a2e;
  --theme-footer-text: #ffffff;
  --theme-footer-muted: rgba(255, 255, 255, 0.72);
  --theme-footer-border: #c8941a;

  --theme-card-bg: #fafafa;
  --theme-card-border: #e6d3a0;

  --theme-office-bg: linear-gradient(135deg, #1a1a2e 0%, #252541 100%);
  --theme-office-text: #ffffff;
  --theme-office-p: #f5f1e7;
  --theme-office-border: #d8d8d8;

  --theme-drum-photo-filter: none;
  --theme-logo-filter: none;

  --theme-tooltip-bg: rgba(18, 20, 29, 0.95);
  --theme-tooltip-text: #ffffff;
  --theme-tooltip-border: rgba(255, 255, 255, 0.15);

  --theme-btn-bg: #ffffff;
  --theme-btn-text: #1a1a2e;
  --theme-btn-border: #e6d3a0;
  --theme-btn-hover-bg: #f8f6f0;

  --theme-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --theme-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --theme-shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.14);

  --theme-transition: background-color 0.3s cubic-bezier(0.76, 0, 0.24, 1),
                      color 0.3s cubic-bezier(0.76, 0, 0.24, 1),
                      border-color 0.3s cubic-bezier(0.76, 0, 0.24, 1),
                      box-shadow 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}

/* ==========================================================================
   Dark Theme Definition
   True luxury deep black palette (#000000 / #0a0b10) for pure seamless integration
   ========================================================================== */
[data-theme="dark"],
html.dark,
body.dark {
  --bg-color: #000000;
  --text-color: #ebeaf7;
  --switch-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.5) inset;

  --theme-bg-canvas: #000000;
  --theme-bg-surface: #0a0b12;
  --theme-bg-surface-alt: #12141f;
  --theme-bg-surface-elevated: #161827;
  --theme-bg-hero: #000000;
  --theme-bg-drum-wrap: #000000;

  --theme-text-primary: #f5f6fa;
  --theme-text-secondary: #c8cbd9;
  --theme-text-muted: #9da2b8;
  --theme-text-inverse: #000000;

  --theme-border-subtle: #1c1f30;
  --theme-border-default: #252a40;
  --theme-border-gold: #c8941a;
  --theme-border-strong: #333a57;

  --theme-nav-bg: #000000;
  --theme-nav-border: #1a1c29;
  --theme-nav-link: #f5f6fa;
  --theme-nav-link-hover: #e0ac2b;

  --theme-footer-bg: #000000;
  --theme-footer-text: #f5f6fa;
  --theme-footer-muted: rgba(245, 246, 250, 0.72);
  --theme-footer-border: #c8941a;

  --theme-card-bg: #0e1019;
  --theme-card-border: #22263a;

  --theme-office-bg: linear-gradient(135deg, #10121d 0%, #191b29 100%);
  --theme-office-text: #ffffff;
  --theme-office-p: #e8eaee;
  --theme-office-border: #2a2f47;

  --theme-drum-photo-filter: none;
  --theme-logo-filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.85));

  --theme-tooltip-bg: rgba(8, 9, 14, 0.96);
  --theme-tooltip-text: #ffffff;
  --theme-tooltip-border: rgba(200, 148, 26, 0.35);

  --theme-btn-bg: #11131c;
  --theme-btn-text: #f5f6fa;
  --theme-btn-border: #2c3147;
  --theme-btn-hover-bg: #1c1f30;

  --theme-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.45);
  --theme-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --theme-shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  :root[data-theme="dark"], html.dark, body.dark {
    --theme-transition: none !important;
    --transition: none !important;
  }
}

/* ==========================================================================
   Global Resets with Semantic Colors
   ========================================================================== */
body {
  background-color: var(--theme-bg-canvas);
  color: var(--theme-text-primary);
  transition: var(--theme-transition);
}

/* ==========================================================================
   Header / Navigation Theming (Matching Solid Black in Dark Mode)
   ========================================================================== */
nav {
  background-color: var(--theme-nav-bg) !important;
  transition: var(--theme-transition);
  border-bottom: 1px solid var(--theme-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1157px;
  margin: 0 auto;
  padding: 16px 20px;
  position: relative;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.logo-wrap img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
  transition: filter 0.25s ease;
}

[data-theme="dark"] .logo-wrap img,
html.dark .logo-wrap img,
body.dark .logo-wrap img {
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-left: auto;
}

.nav-links a {
  color: var(--theme-nav-link) !important;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--color-gold) !important;
}

.nav-links a.active {
  color: var(--color-gold) !important;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-gold);
}

.nav-toggle-label {
  background-color: var(--theme-btn-bg) !important;
  border-color: var(--theme-btn-border) !important;
  transition: var(--theme-transition);
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  background-color: var(--theme-text-primary) !important;
}

@media (max-width: 760px) {
  .nav-links {
    background-color: var(--theme-bg-surface) !important;
    border-right-color: var(--theme-border-gold) !important;
    box-shadow: 16px 0 34px var(--theme-shadow-lg) !important;
  }
  .nav-links a {
    border-bottom-color: var(--theme-border-subtle) !important;
  }
  .nav-close-label {
    background-color: var(--theme-btn-bg) !important;
    border-color: var(--theme-btn-border) !important;
    color: var(--theme-text-primary) !important;
  }
}

/* ==========================================================================
   Hero Section Theming
   ========================================================================== */
.hero {
  background-color: var(--theme-bg-hero) !important;
  transition: var(--theme-transition);
}

.hero h1 .dark {
  color: #1a1a2e !important;
  opacity: 1 !important;
  font-weight: 900 !important;
  transition: color 0.28s ease;
}

[data-theme="dark"] .hero h1 .dark,
html.dark .hero h1 .dark,
body.dark .hero h1 .dark {
  color: #ffffff !important;
  opacity: 1 !important;
  font-weight: 900 !important;
}

.hero h1 .gold {
  color: var(--color-gold) !important;
}

.hero p {
  color: var(--theme-text-secondary) !important;
  transition: color 0.28s ease;
}

/* ==========================================================================
   Drum Stage / Instruments Section (100% Solid Black in Dark Mode)
   ========================================================================== */
.drum-wrap {
  background-color: var(--theme-bg-drum-wrap) !important;
  transition: var(--theme-transition);
}

[data-theme="dark"] .drum-wrap,
html.dark .drum-wrap,
body.dark .drum-wrap {
  background: #000000 !important;
  background-color: #000000 !important;
}

.drum-stage {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.drum-stage img#drumImg {
  width: 100%;
  height: auto;
  display: block;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  user-select: none;
  -webkit-user-drag: none;
}

[data-theme="dark"] .drum-stage,
html.dark .drum-stage,
body.dark .drum-stage {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

[data-theme="dark"] .drum-stage img#drumImg,
html.dark .drum-stage img#drumImg,
body.dark .drum-stage img#drumImg {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Slider Controls */
.slider-arrow {
  background-color: var(--theme-btn-bg) !important;
  color: var(--color-gold) !important;
  border-color: var(--color-gold) !important;
}

.slider-arrow:hover {
  background-color: var(--color-gold) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Tooltip Semantic Theming
   ========================================================================== */
#drum-tooltip {
  background: var(--theme-tooltip-bg) !important;
  color: var(--theme-tooltip-text) !important;
  border: 1px solid var(--theme-tooltip-border) !important;
  box-shadow: var(--theme-shadow-md) !important;
}

/* ==========================================================================
   Mute Music Toggle Button Theming
   ========================================================================== */
#muteToggle {
  background: var(--theme-btn-bg) !important;
  border-color: var(--color-gold) !important;
  color: var(--theme-text-primary) !important;
  box-shadow: var(--theme-shadow-md) !important;
  transition: transform 0.18s, background 0.18s, color 0.18s;
}

#muteToggle:hover {
  background: var(--theme-btn-hover-bg) !important;
}

/* ==========================================================================
   About Page Theming
   ========================================================================== */
.about-main {
  background-color: var(--theme-bg-canvas) !important;
  transition: var(--theme-transition);
}

.about-copy h2 {
  color: var(--theme-text-primary) !important;
}

.about-copy p {
  color: var(--theme-text-secondary) !important;
}

.about-mark {
  background-color: var(--theme-card-bg) !important;
  border-color: var(--theme-card-border) !important;
  transition: var(--theme-transition);
  border-radius: 8px;
}

.about-values {
  border-top-color: var(--theme-border-default) !important;
  border-bottom-color: var(--theme-border-default) !important;
}

.about-values article {
  border-right-color: var(--theme-border-default) !important;
  transition: var(--theme-transition);
}

.about-values h3 {
  color: var(--theme-text-primary) !important;
}

.about-values p {
  color: var(--theme-text-secondary) !important;
}

@media (max-width: 760px) {
  .about-values article {
    border-bottom-color: var(--theme-border-default) !important;
  }
}

/* ==========================================================================
   Contact Page Theming
   ========================================================================== */
.contact-main {
  background-color: var(--theme-bg-canvas) !important;
  transition: var(--theme-transition);
}

.contact-copy h2 {
  color: var(--theme-text-primary) !important;
}

.contact-copy p {
  color: var(--theme-text-secondary) !important;
}

.contact-details article,
.contact-info-strip article {
  background-color: var(--theme-card-bg) !important;
  border-color: var(--theme-card-border) !important;
  transition: var(--theme-transition);
  border-radius: 6px;
}

.contact-details a {
  color: var(--theme-text-primary) !important;
  transition: color 0.18s ease;
}

.contact-details a:hover {
  color: var(--color-gold) !important;
}

.contact-office {
  background: var(--theme-office-bg) !important;
  border-color: var(--theme-office-border) !important;
  color: var(--theme-office-text) !important;
  border-radius: 8px;
}

.contact-office h3 {
  color: var(--theme-office-text) !important;
}

.contact-office p {
  color: var(--theme-office-p) !important;
}

.contact-info-strip p {
  color: var(--theme-text-muted) !important;
}

/* ==========================================================================
   Footer Theming (Clean Black in Dark Mode)
   ========================================================================== */
.site-footer {
  background-color: var(--theme-footer-bg) !important;
  color: var(--theme-footer-text) !important;
  border-top-color: var(--theme-footer-border) !important;
  transition: var(--theme-transition);
}

.site-footer-links a {
  color: var(--theme-footer-text) !important;
}

.site-footer-links a:hover {
  color: var(--color-gold) !important;
}

.site-footer p {
  color: var(--theme-footer-muted) !important;
}

/* ==========================================================================
   Sun/Moon Animated Switch Button (Placed in Left Corner)
   ========================================================================== */
.theme-control-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 20px;
  margin-right: auto; /* Pushes everything else to the right */
  z-index: 100;
}

.theme-switch-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.theme-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.theme-switch .checkbox {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.theme-switch .label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  border-radius: 50px;
  position: relative;
  height: 36px;
  width: 72px;
  background-color: var(--theme-bg-surface-alt);
  border: 1.5px solid var(--theme-border-gold);
  cursor: pointer;
  box-shadow: var(--switch-shadow);
  transition: var(--transition);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-switch .label:hover .moon,
.theme-switch .label:hover .sun {
  transform: rotate(360deg);
}

.theme-switch .sun {
  color: #ff6b00;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: all 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  transform: rotate(0);
}

.theme-switch .moon {
  color: #f1c40f;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: all 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  transform: rotate(0);
}

.theme-switch .ball {
  transition: var(--transition);
  background-color: var(--color-gold);
  position: absolute;
  border-radius: 50%;
  top: 4px;
  left: 5px;
  height: 25px;
  width: 25px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transform: translateX(0);
}

/* Dark mode slide ball */
[data-theme="dark"] .theme-switch .ball,
html.dark .theme-switch .ball,
body.dark .theme-switch .ball,
.theme-switch input:checked + .label .ball {
  transform: translateX(34px);
  background-color: #f5f6fa;
}

[data-theme="dark"] .theme-switch .sun,
html.dark .theme-switch .sun,
body.dark .theme-switch .sun,
.theme-switch input:checked + .label .sun {
  transform: rotate(360deg);
}

[data-theme="dark"] .theme-switch .moon,
html.dark .theme-switch .moon,
body.dark .theme-switch .moon,
.theme-switch input:checked + .label .moon {
  transform: rotate(360deg);
}

.theme-opt-badge-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.theme-opt-badge-btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Theme Dropdown Menu */
.theme-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 290px;
  background: var(--theme-bg-surface-elevated);
  border: 1.5px solid var(--theme-border-default);
  border-radius: 12px;
  box-shadow: var(--theme-shadow-lg);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  font-family: 'Montserrat', sans-serif;
  z-index: 1050;
}

.theme-control-container.is-open .theme-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.theme-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--theme-border-subtle);
}

.theme-menu-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--theme-text-muted);
}

.theme-menu-status {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-gold);
}

.theme-options-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theme-option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--theme-text-primary);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  outline: none;
}

.theme-option-item:hover {
  background: var(--theme-bg-surface-alt);
  border-color: var(--theme-border-subtle);
}

.theme-option-item:focus-visible {
  outline: 2px solid var(--color-gold);
}

.theme-option-item.is-selected {
  background: var(--theme-bg-surface-alt);
  border-color: var(--color-gold);
}

.theme-opt-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--theme-bg-surface);
  color: var(--color-gold);
  border: 1px solid var(--theme-border-subtle);
  flex-shrink: 0;
}

.theme-opt-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.theme-opt-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--theme-text-primary);
}

.theme-opt-desc {
  font-size: 10px;
  font-weight: 500;
  color: var(--theme-text-muted);
}

.theme-opt-check {
  color: var(--color-gold);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.theme-option-item.is-selected .theme-opt-check {
  opacity: 1;
}

.theme-location-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--theme-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-location-info {
  font-size: 10px;
  line-height: 1.4;
  color: var(--theme-text-muted);
}

.theme-location-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--theme-bg-surface);
  border: 1px solid var(--theme-border-default);
  color: var(--theme-text-primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--theme-transition);
}

.theme-location-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.theme-location-btn:focus-visible {
  outline: 2px solid var(--color-gold);
}

/* Responsive adjustments */
@media (max-width: 760px) {
  nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .theme-control-container {
    margin-left: 0;
    margin-top: 10px;
    padding: 0 4px;
  }
  .theme-switch .label {
    height: 32px;
    width: 64px;
    padding: 0 7px;
  }
  .theme-switch .ball {
    width: 22px;
    height: 22px;
    top: 3.5px;
    left: 4px;
  }
  [data-theme="dark"] .theme-switch .ball,
  html.dark .theme-switch .ball,
  body.dark .theme-switch .ball,
  .theme-switch input:checked + .label .ball {
    transform: translateX(30px);
  }
}
