/* ==========================================================================
   STUDIO NR2B — shared design system
   "Fractured Perception"
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* base surfaces */
  --bg-deep: oklch(8% 0.02 280);
  --bg-surface: oklch(12% 0.025 280);
  --bg-elevated: oklch(16% 0.03 280);
  --bg-elevated-2: oklch(20% 0.035 280);

  /* text */
  --text-primary: oklch(90% 0.01 280);
  --text-secondary: oklch(65% 0.015 280);
  --text-dim: oklch(45% 0.01 280);

  /* label brand accents */
  --accent-violet: oklch(55% 0.2 290);
  --accent-violet-bright: oklch(65% 0.25 290);
  --accent-cyan: oklch(70% 0.12 210);
  --brand-cyan: #01e7ff;
  --brand-blue: #0a40c6;

  --border: oklch(20% 0.02 280);
  --border-bright: oklch(30% 0.04 280);

  /* spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --space-3xl: 128px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --content-max: 1120px;
}

html {
  font-optical-sizing: auto;
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 350;
  letter-spacing: -0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ambient background texture, present on every page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, oklch(15% 0.06 290 / 0.4), transparent),
    radial-gradient(ellipse 60% 40% at 85% 30%, oklch(12% 0.04 210 / 0.3), transparent);
  pointer-events: none;
  z-index: 0;
}

/* scanline overlay for texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    oklch(0% 0 0 / 0.03) 2px,
    oklch(0% 0 0 / 0.03) 4px
  );
  pointer-events: none;
  z-index: 100;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

.mono {
  font-family: 'Space Mono', monospace;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--space-lg);
  font-weight: 400;
}

.section-label.accent { color: var(--accent-violet-bright); }

/* subtle glitch effect, applied selectively */
@keyframes textGlitchSubtle {
  0%, 92%, 94%, 96%, 100% { text-shadow: none; transform: translate(0, 0); }
  92.5% { text-shadow: -1px 0 oklch(60% 0.2 290 / 0.4), 1px 0 oklch(70% 0.15 210 / 0.4); transform: translate(-0.5px, 0); }
  93%   { text-shadow: 1px 0 oklch(60% 0.2 290 / 0.3), -1px 0 oklch(70% 0.15 210 / 0.3); transform: translate(0.5px, 0); }
  93.5% { text-shadow: none; transform: translate(0, 0); }
  95%   { text-shadow: -0.5px 0 oklch(60% 0.2 290 / 0.25), 0.5px 0 oklch(70% 0.15 210 / 0.25); transform: translate(0, -0.5px); }
  95.5% { text-shadow: 0.5px 0 oklch(60% 0.2 290 / 0.35), -0.5px 0 oklch(70% 0.15 210 / 0.35); transform: translate(0.5px, 0.5px); }
}

.glitch-text { animation: textGlitchSubtle 8s infinite; }

@media (prefers-reduced-motion: reduce) {
  .glitch-text, [class*="glitch"] { animation: none !important; }
  body::after { display: none; }
}

/* ==========================================================================
   Layout shell
   ========================================================================== */

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

main { position: relative; z-index: 1; }

/* ==========================================================================
   Nav
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(8% 0.02 280 / 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 148px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-mark img { height: 130px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--text-secondary);
  position: relative;
  padding: var(--space-xs) 0;
  transition: color 0.25s var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
}

.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-blue));
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  color: var(--text-primary);
  width: 40px;
  height: 36px;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-links {
    position: fixed;
    top: 148px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-out-expo);
  }
  .nav-links.open { max-height: 400px; }
  .nav-links a {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border);
  }
  .nav-toggle { display: block; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  border: 1px solid var(--border-bright);
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
  background: transparent;
  color: var(--text-primary);
}

.btn:hover {
  border-color: var(--accent-violet-bright);
  background: oklch(55% 0.2 290 / 0.12);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-blue));
  border: none;
  color: #04101f;
  font-weight: 700;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.hero-statement {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-wrap: balance;
  max-width: 18ch;
}

.hero-sub {
  margin-top: var(--space-lg);
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 60ch;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .hero { padding: var(--space-2xl) 0 var(--space-lg); }
}

/* ==========================================================================
   Sections
   ========================================================================== */

section.block {
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--border);
}

section.block:last-of-type { border-bottom: none; }

.block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.block-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Grids & Cards
   ========================================================================== */

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

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

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out-expo), border-color 0.35s var(--ease-out-expo);
}

a.card:hover, .card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
}

.card-art {
  aspect-ratio: 1 / 1;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
  background-size: cover;
}

.card-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, oklch(5% 0 0 / 0.55));
}

.card-art .tag {
  position: relative;
  z-index: 1;
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: oklch(0% 0 0 / 0.35);
  padding: 0.3em 0.7em;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: var(--space-lg);
}

.card-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
}

.card-body p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.card-body .meta {
  margin-top: var(--space-md);
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* generative cover-art tiles, colored per-artist via inline custom props */
.cover-tile {
  --c1: var(--brand-cyan);
  --c2: var(--brand-blue);
  background:
    radial-gradient(ellipse 120% 90% at 15% 10%, color-mix(in oklab, var(--c1) 55%, transparent), transparent 60%),
    radial-gradient(ellipse 120% 90% at 85% 90%, color-mix(in oklab, var(--c2) 60%, transparent), transparent 60%),
    linear-gradient(155deg, var(--bg-elevated), var(--bg-deep));
  position: relative;
}

.cover-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: repeating-linear-gradient(100deg, transparent 0 6px, oklch(100% 0 0 / 0.03) 6px 7px);
  mix-blend-mode: overlay;
}

.cover-tile .cover-mark {
  position: relative;
  z-index: 1;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: oklch(95% 0 0 / 0.85);
}

/* ==========================================================================
   Player (embed or fallback placeholder)
   ========================================================================== */

.player {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  overflow: hidden;
}

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

.player-placeholder {
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  color: var(--text-dim);
}

.player-placeholder .bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
}

.player-placeholder .bars span {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-cyan), var(--brand-blue));
  opacity: 0.5;
  animation: barPulse 1.8s ease-in-out infinite;
}

.player-placeholder .bars span:nth-child(1) { height: 40%; animation-delay: 0s; }
.player-placeholder .bars span:nth-child(2) { height: 90%; animation-delay: 0.15s; }
.player-placeholder .bars span:nth-child(3) { height: 60%; animation-delay: 0.3s; }
.player-placeholder .bars span:nth-child(4) { height: 100%; animation-delay: 0.45s; }
.player-placeholder .bars span:nth-child(5) { height: 50%; animation-delay: 0.6s; }
.player-placeholder .bars span:nth-child(6) { height: 75%; animation-delay: 0.75s; }

@keyframes barPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

.player-placeholder .txt {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.link-pill {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5em 1em;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: all 0.25s var(--ease-out-expo);
}

.link-pill:hover { color: var(--text-primary); border-color: var(--accent-violet-bright); }

/* ==========================================================================
   Values / journey (about page)
   ========================================================================== */

.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  counter-reset: value;
}

.value-item {
  counter-increment: value;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-lg);
  align-items: baseline;
}

.value-item:last-child { border-bottom: 1px solid var(--border); }

.value-item::before {
  content: counter(value, decimal-leading-zero);
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding-top: 0.15em;
}

.value-name { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; }
.value-desc { font-size: 0.9rem; color: var(--text-secondary); margin-top: var(--space-sm); max-width: 50ch; line-height: 1.5; }

.journey-text { font-family: 'Space Mono', monospace; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); white-space: nowrap; }

/* A continuous loop rather than a line, so it never has to wrap on
   narrow viewports — it just scales down as a whole. */
.journey-circle {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  margin: var(--space-xl) auto 0;
}

.journey-circle svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.journey-arc {
  fill: none;
  stroke: url(#journeyGradient);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.8;
}

.journey-node { position: absolute; }

.journey-node--top    { top: 6%;  left: 50%; transform: translate(-50%, -100%); }
.journey-node--bottom { top: 94%; left: 50%; transform: translate(-50%, 0%); }
.journey-node--left   { top: 50%; left: 8%;  transform: translate(-100%, -50%); }
.journey-node--right  { top: 50%; left: 92%; transform: translate(0%, -50%); }

@media (max-width: 640px) {
  .value-item { grid-template-columns: 1fr; gap: var(--space-xs); }
  .value-item::before { font-size: 0.65rem; }

  /* Shrink the ring so the left/right labels — which grow outward
     from the circle rather than wrapping — have room to spill into
     without clipping against the viewport edge. */
  .journey-circle { max-width: 210px; }
  .journey-node--left, .journey-node--right { font-size: 0.6rem; }
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-grid {
  display: grid;
  gap: var(--space-lg);
  max-width: 640px;
}

.field label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--space-sm);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85em 1em;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.25s var(--ease-out-expo);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-violet-bright);
}

.field textarea { resize: vertical; min-height: 120px; }

.form-note {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.form-status {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  padding: var(--space-md);
  border-radius: 8px;
  display: none;
}

.form-status.visible { display: block; }
.form-status.ok { background: oklch(50% 0.12 160 / 0.15); color: oklch(75% 0.15 160); }
.form-status.err { background: oklch(50% 0.15 25 / 0.15); color: oklch(75% 0.18 25); }

/* ==========================================================================
   Contact info blocks
   ========================================================================== */

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 640px) { .info-grid { grid-template-columns: 1fr; } }

.info-item {
  padding: var(--space-lg);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
}

.info-item .k {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--space-xs);
}

.info-item .v { font-size: 1rem; }
.info-item .v a:hover { color: var(--accent-violet-bright); }

/* ==========================================================================
   News list
   ========================================================================== */

.news-item {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-lg);
}

.news-item:last-child { border-bottom: 1px solid var(--border); }

.news-item time {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.news-item h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: var(--space-sm); }
.news-item p { color: var(--text-secondary); font-size: 0.92rem; max-width: 65ch; }

@media (max-width: 640px) {
  .news-item { grid-template-columns: 1fr; gap: var(--space-sm); }
}

/* ==========================================================================
   Artist bio page
   ========================================================================== */

.artist-hero {
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (max-width: 780px) {
  .artist-hero { grid-template-columns: 1fr; gap: var(--space-lg); }
}

.artist-portrait {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.artist-genre-tag {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tag-color, var(--accent-violet-bright));
  border: 1px solid currentColor;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  margin-bottom: var(--space-md);
}

.artist-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-md);
}

.artist-hero .tagline {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 55ch;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0 var(--space-xl);
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (max-width: 780px) {
  .footer-top { grid-template-columns: 1fr; gap: var(--space-lg); }
}

.footer-top img.footer-logo { height: 28px; margin-bottom: var(--space-md); }
.footer-top p { color: var(--text-dim); font-size: 0.85rem; max-width: 40ch; }

.footer-col h4 {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--space-md);
}

.footer-col a, .footer-col span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

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

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.footer-bottom .tagline { font-style: italic; }

/* ==========================================================================
   Entrance animation utility
   ========================================================================== */

.fade-up { animation: fadeUp 0.8s var(--ease-out-expo) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
