/* ==========================================================================
   KALIUM DESIGN SYSTEM (kalium-unified.css)
   Restrained Monochrome Typography, Structural Borders & Functional UI
   ========================================================================== */

/* 01. CANONICAL LOCAL FONTS */
@font-face {
  font-family: 'Nohemi';
  src: url('../../fonts/Nohemi-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Humane';
  src: url('../../fonts/Humane-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Montreal';
  src: url('../../fonts/NeueMontreal-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Montreal';
  src: url('../../fonts/NeueMontreal-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Montreal';
  src: url('../../fonts/NeueMontreal-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 02. SHARED ROOT TOKENS */
:root {
  --k-bg: #09090B;
  --k-surface: #0E0E11;
  --k-surface-hover: #141418;
  --k-border: #1F1F23;
  --k-border-hover: #3F3F46;
  --k-radius: 20px;
  --k-radius-sm: 10px;
  --k-text: #FAFAFA;
  --k-text-secondary: #D4D4D8;
  --k-text-muted: #A1A1AA;
  --k-accent: #FFFFFF;
  --k-font-display: 'Nohemi', -apple-system, BlinkMacSystemFont, sans-serif;
  --k-font-condensed: 'Humane', Impact, sans-serif;
  --k-font-body: 'Neue Montreal', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadcn-bg: #09090B;
  --shadcn-card: #0E0E11;
  --shadcn-card-hover: #141418;
  --shadcn-popover: #0E0E11;
  --shadcn-border: #27272A;
  --shadcn-border-strong: #52525B;
  --shadcn-ring: #A1A1AA;
  --shadcn-fg: #FAFAFA;
  --shadcn-muted: #18181B;
  --shadcn-muted-fg: #A1A1AA;
}

/* Accessible Keyboard Focus Ring */
a:focus-visible,
button:focus-visible,
input:not(.wm-cmd-input):focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--shadcn-ring) !important;
  outline-offset: 2px !important;
}

/* 03. UNIFIED SITE HEADER (Solid Surface, Crisp 1px Border, No Blur) */
.k-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 60px;
  padding: 0 clamp(1.25rem, 3.5vw, 3rem);
  background: #09090B;
  border-bottom: 1px solid #1F1F23;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-sizing: border-box;
}

.k-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--k-font-display);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #FFFFFF;
  text-decoration: none;
  line-height: 1;
}

.k-brand-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.k-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  font-family: var(--k-font-body);
  font-size: 0.84rem;
  font-weight: 500;
  list-style: none;
  margin: 0;
  padding: 0;
}

.k-nav-links a {
  color: #A1A1AA;
  text-decoration: none;
  font-family: var(--k-font-body);
  font-size: 0.84rem;
  font-weight: 500;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.k-nav-links a:hover,
.k-nav-links a.is-active {
  color: #FFFFFF;
}

.k-cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  color: #09090B !important;
  border-radius: 6px;
  padding: 0.44rem 0.9rem;
  font-family: var(--k-font-body);
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  text-decoration: none;
  white-space: nowrap !important;
  border: 1px solid #FFFFFF;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.k-cta-pill:hover {
  background: #E4E4E7;
  border-color: #E4E4E7;
  color: #09090B !important;
}

/* 04. SHARED SURFACE PRIMITIVE */
.k-bento-card {
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.k-bento-card:hover {
  background: var(--k-surface-hover);
  border-color: var(--k-border-hover);
}

@media (max-width: 768px) {
  .k-site-header {
    padding: 0 1rem;
    height: 56px;
    gap: 12px;
  }
  .k-brand-link {
    flex-shrink: 0;
  }
  .k-nav-links {
    gap: 0.85rem;
    overflow-x: auto;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }
  .k-nav-links::-webkit-scrollbar {
    display: none;
  }
  .k-nav-links a {
    font-size: 0.78rem;
    flex-shrink: 0;
  }
  .k-cta-pill {
    padding: 0.38rem 0.75rem;
    font-size: 0.74rem !important;
    flex-shrink: 0;
  }
}

/* 05. FRAME-0 ZERO-FLICKER CURTAIN (Disabled to prevent blank screen) */


/* 06. SEARCH COMMAND DIALOG (⌘K) & TOAST NOTIFICATIONS */
.wm-cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px 0 10px;
  border-radius: 6px;
  background: #121215;
  border: 1px solid #27272A;
  color: #A1A1AA;
  font-family: var(--k-font-body);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.wm-cmd-trigger:hover {
  background: #18181C;
  border-color: #3F3F46;
  color: #FAFAFA;
}

.wm-cmd-trigger svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  opacity: 0.8;
  flex-shrink: 0;
}

.wm-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 19px;
  padding: 0 5px;
  border-radius: 4px;
  background: #18181B;
  border: 1px solid #27272A;
  font-family: var(--k-font-body);
  font-size: 0.66rem;
  font-weight: 600;
  color: #A1A1AA;
  line-height: 1;
}

@media (max-width: 900px) {
  .wm-cmd-trigger .wm-cmd-label {
    display: none;
  }
  .wm-cmd-trigger {
    padding: 0 8px;
    gap: 5px;
  }
}

/* CommandDialog Modal (⌘K) */
.wm-cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.82);
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(48px, 11vh, 100px) 16px 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.wm-cmd-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wm-cmd-dialog {
  position: relative;
  width: 100%;
  max-width: 580px;
  background: #0E0E11;
  border: 1px solid #27272A;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  color: #FAFAFA;
  font-family: var(--k-font-body);
}

.wm-cmd-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #27272A;
}

.wm-cmd-header svg {
  width: 15px;
  height: 15px;
  color: #A1A1AA;
  flex-shrink: 0;
}

.wm-cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none !important;
  color: #FFFFFF;
  font-family: var(--k-font-body);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
}

.wm-cmd-input::placeholder {
  color: #71717A;
}

.wm-cmd-close-btn {
  background: #18181B;
  border: 1px solid #27272A;
  color: #A1A1AA;
  border-radius: 4px;
  padding: 3px 7px;
  font-family: var(--k-font-body);
  font-size: 0.66rem;
  font-weight: 600;
  cursor: pointer;
}

.wm-cmd-close-btn:hover {
  background: #27272A;
  color: #FFFFFF;
}

/* Segmented Filter Tabs inside Command Dialog */
.wm-cmd-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #09090B;
  border-bottom: 1px solid #1F1F23;
  overflow-x: auto;
  scrollbar-width: none;
}

.wm-cmd-tab {
  background: transparent;
  border: 1px solid transparent;
  color: #A1A1AA;
  font-family: var(--k-font-body);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.wm-cmd-tab:hover {
  color: #FFFFFF;
  background: #18181B;
}

.wm-cmd-tab.is-active {
  background: #FFFFFF;
  color: #09090B;
  font-weight: 600;
}

.wm-cmd-list {
  max-height: min(360px, 52vh);
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: #27272A transparent;
}

.wm-cmd-group-label {
  padding: 8px 10px 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #71717A;
}

.wm-cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #D4D4D8;
  text-align: left;
  font-family: var(--k-font-body);
  cursor: pointer;
}

.wm-cmd-item:hover,
.wm-cmd-item.is-selected {
  background: #18181B;
  color: #FFFFFF;
}

.wm-cmd-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wm-cmd-item-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #18181B;
  border: 1px solid #27272A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: #A1A1AA;
  flex-shrink: 0;
}

.wm-cmd-item-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.wm-cmd-item-title {
  font-size: 0.84rem;
  font-weight: 500;
  color: #FAFAFA;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wm-cmd-item-sub {
  font-size: 0.74rem;
  color: #71717A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wm-cmd-item-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #A1A1AA;
  padding: 2px 6px;
  border-radius: 4px;
  background: #18181B;
  border: 1px solid #27272A;
  flex-shrink: 0;
}

.wm-cmd-item.is-selected .wm-cmd-item-badge {
  background: #FFFFFF;
  color: #09090B;
  border-color: #FFFFFF;
}

.wm-cmd-empty {
  padding: 28px 16px;
  text-align: center;
  color: #A1A1AA;
  font-size: 0.84rem;
}

.wm-cmd-empty-reset {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #FFFFFF;
  color: #09090B;
  border: none;
  font-family: var(--k-font-body);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.wm-cmd-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #09090B;
  border-top: 1px solid #1F1F23;
  font-size: 0.7rem;
  color: #71717A;
}

.wm-cmd-footer-hints {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Stacked Toast Viewport */
.wm-sonner-viewport {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100005;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 32px));
}

.wm-sonner-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #0E0E11;
  border: 1px solid #27272A;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  color: #FFFFFF;
  font-family: var(--k-font-body);
  font-size: 0.8rem;
  transform: translate3d(0, 10px, 0);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.wm-sonner-toast.is-visible {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.wm-sonner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wm-sonner-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #FFFFFF;
  color: #09090B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  flex-shrink: 0;
}

.wm-sonner-title {
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.25;
}

.wm-sonner-sub {
  font-size: 0.72rem;
  color: #A1A1AA;
  margin-top: 2px;
}

/* ========================================================
   DUAL-PORTAL SWITCHER: FOR FANS vs. WORK WITH ME
   ======================================================== */
.dual-portal-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 4px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  vertical-align: middle;
}
.portal-switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--k-font-body, 'Space Grotesk', -apple-system, sans-serif);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.portal-switch-pill:hover {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.1);
}
.portal-switch-pill.is-active {
  background: #FFFFFF !important;
  color: #000000 !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}
.portal-switch-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 6px #22C55E;
}
.portal-switch-icon {
  font-size: 12px;
  line-height: 1;
}
@media (max-width: 600px) {
  .dual-portal-switcher {
    gap: 2px;
    padding: 3px;
  }
  .portal-switch-pill {
    padding: 5px 9px;
    font-size: 9.5px;
    letter-spacing: 0.02em;
  }
}
