/* ============================================================
   ARTIST 27 — Official Website
   Ultra-Fluid Responsive Architecture • Zero Overflow Guaranteed
   Minimalist Dark Editorial • Obsidian & Precision Grid
   ============================================================ */

:root {
  /* Dark Palette (Default) */
  --bg: #090A0F;
  --bg-card: rgba(16, 18, 27, 0.82);
  --bg-card-hover: rgba(22, 25, 38, 0.95);
  --bg-subtle: rgba(255, 255, 255, 0.035);
  --bg-active: rgba(255, 255, 255, 0.07);

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text-main: #F8FAFC;
  --text-dim: #94A3B8;
  --text-muted: #64748B;

  /* Alter-Ego Pure Tone Accents */
  --accent-25: #EF4444; /* Hater/Diss: Blood crimson */
  --accent-26: #94A3B8; /* Simple/Plain: Slate monochrome */
  --accent-27: #A855F7; /* Host/Synthesis: Electric Violet */
  --accent-28: #EC4899; /* Sex/Hedonism: Saturated Rose */
  --accent-29: #06B6D4; /* Roflo/Irony: Acid Cyan */

  /* Tactile Button Tokens (Okoka heritage) */
  --btn-bg: #8B5CF6;
  --btn-fg: #FFFFFF;
  --btn-edge: #5B21B6;

  --font-heading: 'Unbounded', system-ui, -apple-system, sans-serif;
  --font-text: 'Onest', -apple-system, sans-serif;
  --font-code: 'JetBrains Mono', monospace;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F1F4F9;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: #FFFFFF;
  --bg-subtle: rgba(0, 0, 0, 0.035);
  --bg-active: rgba(0, 0, 0, 0.07);

  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);

  --text-main: #0F172A;
  --text-dim: #475569;
  --text-muted: #94A3B8;

  --btn-bg: #7C3AED;
  --btn-edge: #4C1D95;

  color-scheme: light;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Precision Grid Background */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% 20%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, black 40%, transparent 90%);
}

:root[data-theme="light"] .bg-grid {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

/* Global Responsive Container */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px 80px;
}

@media (min-width: 768px) {
  .container {
    padding: 24px 28px 90px;
  }
}

/* ============================================================
   NAVBAR (100% RESPONSIVE)
   ============================================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 36px;
  flex-wrap: wrap;
}

@media (min-width: 600px) {
  .nav {
    padding: 12px 20px;
    margin-bottom: 48px;
    flex-wrap: nowrap;
  }
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
}

.nav-artist-num {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.05em;
  color: var(--text-main);
}

.nav-badge {
  font-family: var(--font-code);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--text-dim);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  font-family: var(--font-code);
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
  border-color: var(--line);
}

.nav-link-pm {
  color: var(--text-main);
  background: var(--bg-subtle);
  border-color: var(--line);
}

.theme-switch {
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.theme-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-btn[aria-pressed="true"] {
  background: var(--text-main);
  color: var(--bg);
}

.theme-btn svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* ============================================================
   HERO (FLUID & EDITORIAL)
   ============================================================ */
.hero {
  padding: 10px 0 44px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .hero {
    padding: 20px 0 54px;
    margin-bottom: 48px;
  }
}

.hero-meta-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.meta-pill {
  font-family: var(--font-code);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 2px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 5px;
  white-space: nowrap;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.98;
  margin: 0 0 18px;
  text-transform: uppercase;
  word-break: break-word;
  overflow-wrap: break-word;
}

.hero-sub {
  font-size: clamp(0.98rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 680px;
  line-height: 1.55;
  margin: 0 0 28px;
  overflow-wrap: break-word;
}

.hero-sub strong {
  color: var(--text-main);
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Tactile 3D Buttons */
.btn-tactile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  user-select: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  white-space: nowrap;
}

@media (max-width: 440px) {
  .btn-tactile {
    width: 100%;
  }
}

.btn-tactile:active {
  transform: translateY(2px);
}

.btn-tactile-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: 0 3px 0 var(--btn-edge);
}

.btn-tactile-primary:active {
  box-shadow: 0 1px 0 var(--btn-edge);
}

.btn-tactile-ghost {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--line);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
}

.btn-tactile-ghost:hover {
  border-color: var(--line-strong);
}

.btn-tactile-ghost:active {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

/* ============================================================
   5 ALTER-EGOS DECK (FLUID GRID - NO BLOWOUT)
   ============================================================ */
.section-title-wrap {
  margin-bottom: 20px;
}

.section-label {
  font-family: var(--font-code);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.section-h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

/* Using minmax(0, 1fr) to prevent content width blowout! */
.deck-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
  width: 100%;
}

@media (max-width: 900px) {
  .deck-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .deck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .deck-card[data-ego="27"] {
    grid-column: span 2;
  }
}

.deck-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  user-select: none;
  min-width: 0; /* Critical for grid shrinking! */
}

.deck-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.deck-card.active {
  background: var(--bg-card-hover);
  border-color: var(--text-main);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.deck-card[data-ego="25"].active { border-color: var(--accent-25); }
.deck-card[data-ego="26"].active { border-color: var(--accent-26); }
.deck-card[data-ego="27"].active { border-color: var(--accent-27); }
.deck-card[data-ego="28"].active { border-color: var(--accent-28); }
.deck-card[data-ego="29"].active { border-color: var(--accent-29); }

.deck-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.deck-card-num {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 900;
  line-height: 1;
}

.deck-card[data-ego="25"] .deck-card-num { color: var(--accent-25); }
.deck-card[data-ego="26"] .deck-card-num { color: var(--accent-26); }
.deck-card[data-ego="27"] .deck-card-num { color: var(--accent-27); }
.deck-card[data-ego="28"] .deck-card-num { color: var(--accent-28); }
.deck-card[data-ego="29"] .deck-card-num { color: var(--accent-29); }

.deck-card-role {
  font-family: var(--font-code);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--text-dim);
  white-space: nowrap;
}

.deck-card-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-card-status {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ============================================================
   ACTIVE DOSSIER BOX (ADAPTIVE REVEAL)
   ============================================================ */
.dossier-box {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 44px;
  width: 100%;
  min-width: 0;
  position: relative;
  transition: all 0.2s ease;
}

@media (min-width: 680px) {
  .dossier-box {
    padding: 28px;
  }
}

.dossier-panel {
  display: none;
  animation: panelFade 0.25s ease;
  min-width: 0;
}

.dossier-panel.active {
  display: block;
}

@keyframes panelFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dossier-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  flex-direction: column;
}

@media (min-width: 580px) {
  .dossier-header {
    flex-direction: row;
    align-items: center;
  }
}

.dossier-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dossier-avatar {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}

.dossier-titles {
  min-width: 0;
}

.dossier-titles h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dossier-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dossier-tag {
  font-family: var(--font-code);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--text-dim);
  white-space: nowrap;
}

.dossier-channel-slot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  max-width: 100%;
}

.dossier-channel-slot:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
}

.dossier-text {
  font-size: clamp(0.92rem, 1.8vw, 1.02rem);
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 820px;
  margin: 0 0 20px;
  overflow-wrap: break-word;
}

.dossier-text strong {
  color: var(--text-main);
}

/* ============================================================
   SINGLE «ФЕШЕН» SHOWCASE (IN 29 DOSSIER)
   ============================================================ */
.release-block {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
  min-width: 0;
}

@media (min-width: 680px) {
  .release-block {
    padding: 20px;
  }
}

.release-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

@media (min-width: 720px) {
  .release-grid {
    grid-template-columns: 170px minmax(0, 1fr);
  }
}

.release-cover {
  width: 100%;
  max-width: 170px;
  aspect-ratio: 1/1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 0 auto;
}

@media (min-width: 720px) {
  .release-cover {
    margin: 0;
  }
}

.release-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.release-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.release-header-row {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.release-track-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0 0 2px;
  word-break: break-word;
}

.release-artists-sub {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Player Embed Frame */
.player-box {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.player-box iframe {
  width: 100%;
  max-width: 100%;
  border: none;
  display: block;
}

.player-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tab-platform-btn {
  padding: 4px 10px;
  border-radius: 5px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-platform-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--line-strong);
}

/* Streaming Links Grid (Fluid Auto-Fit) */
.stream-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

@media (min-width: 580px) {
  .stream-tiles-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stream-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-code);
  font-size: 0.74rem;
  font-weight: 600;
  transition: all 0.15s ease;
  min-width: 0;
}

.stream-tile:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.stream-tile svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.stream-tile span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Link to Promo Page */
.promo-page-link-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-code);
  font-size: 0.76rem;
  transition: all 0.15s ease;
  flex-wrap: wrap;
}

.promo-page-link-bar:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
}

/* ============================================================
   CONTACTS & DIRECT MANAGEMENT (NO TWENTY NINE CHANNEL HERE)
   ============================================================ */
.contacts-section {
  border-top: 1px solid var(--line);
  padding-top: 40px;
  margin-top: 40px;
  width: 100%;
}

.contacts-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

@media (max-width: 600px) {
  .contacts-row {
    grid-template-columns: 1fr;
  }
}

.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.contact-meta-label {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.contact-link-val {
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-all;
  display: block;
}

.contact-actions {
  display: flex;
  gap: 6px;
}

.btn-contact {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-contact:hover {
  color: var(--text-main);
  border-color: var(--line-strong);
}

/* Toast */
.toast-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  padding: 8px 18px;
  background: #11131c;
  color: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-code);
  font-size: 0.76rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 9999;
  white-space: nowrap;
}

.toast-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
.footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--text-dim);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-main);
}
