/* ============================================================
   SONARENA — style.css
   All design decisions governed by DESIGN.md.
   Do not override without updating DESIGN.md first.
   ============================================================ */

/* --- Google Fonts import --- */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Lato:wght@300;400;700&family=IBM+Plex+Mono:wght@400&display=swap');

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */

:root {
  /* Colors */
  --c-black:         #000000;
  --c-purple:        #5E17EB;
  --c-purple-accent: #A070FF;
  --c-white:         #FFFFFF;
  --c-muted:         #AAAAAA;
  --c-card-border:   rgba(94, 23, 235, 0.3);
  --c-card-bg:       #000000;

  /* Type scale */
  --t-xl:   clamp(48px, 7vw, 72px);
  --t-lg:   clamp(32px, 5vw, 48px);
  --t-md:   clamp(22px, 3vw, 32px);
  --t-nav:  clamp(18px, 2vw, 22px);
  --t-body: clamp(16px, 1.5vw, 18px);
  --t-sm:   clamp(13px, 1.1vw, 15px);
  --t-mono: clamp(14px, 1.2vw, 16px);

  /* Spacing (8px base) */
  --sp-1:  8px;
  --sp-2:  16px;
  --sp-3:  24px;
  --sp-4:  32px;
  --sp-6:  48px;
  --sp-8:  64px;
  --sp-12: 96px;

  /* Layout */
  --max-width:      1200px;
  --pad-x:          clamp(24px, 5vw, 96px);
  --nav-height:     80px;

  /* Easing */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--c-black);
  color: var(--c-white);
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

img, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ============================================================
   FILM GRAIN OVERLAY
   8% opacity, fixed to viewport, pointer-events: none always.
   ============================================================ */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  height: 80px !important;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 96px) !important;
}

/* Home page nav — no wordmark, items sit right */
.nav--home { justify-content: flex-end; }

.nav__wordmark {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-white);
  text-decoration: none;
  flex-shrink: 0;
}

/* Non-link variant — index.html (already home) */
span.nav__wordmark {
  cursor: default;
  opacity: 0.70;
}

.nav__logo-link {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav__logo-img {
  height: 68px !important;
  width: auto !important;
  display: block !important;
  opacity: 0.90 !important;
  transition: opacity 200ms ease;
}

.nav__logo-img:hover {
  opacity: 1;
}

.nav__list {
  display: flex;
  gap: var(--sp-8);
  list-style: none;
}

.nav__link {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  font-family: 'Bebas Neue', sans-serif;
  font-size: var(--t-nav);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.70);
  transition: color 200ms var(--ease);
  line-height: 1;
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--c-purple-accent);
}

.nav__letter {
  font-family: 'Bebas Neue', cursive !important;
  font-size: 26px !important;
  letter-spacing: 0.1em !important;
  line-height: 1 !important;
  display: block !important;
}

.nav__sublabel {
  font-family: 'Bebas Neue', cursive !important;
  font-size: 13px !important;
  letter-spacing: 0.15em !important;
  color: rgba(255, 255, 255, 0.55) !important;
  line-height: 1 !important;
  display: block !important;
}

.nav__link:hover .nav__sublabel,
.nav__link[aria-current="page"] .nav__sublabel {
  color: var(--c-purple-accent);
}

/* Hamburger — hidden on desktop */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-1);
  position: absolute;
  right: var(--pad-x);
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-white);
  transition: all 200ms var(--ease);
}

/* Mobile drawer */
.nav__drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 7999;
  background: var(--c-black);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
}

.nav__drawer.is-open {
  display: flex;
}

.nav__drawer .nav__link {
  font-size: clamp(40px, 10vw, 64px);
  color: var(--c-white);
  opacity: 1;
}

.nav__drawer .nav__letter {
  font-size: 32px !important;
}

.nav__drawer .nav__sublabel {
  font-size: 14px !important;
}

.nav__close {
  position: absolute;
  top: var(--sp-3);
  right: var(--pad-x);
  background: none;
  border: none;
  color: var(--c-white);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: var(--sp-1);
}

@media (max-width: 768px) {
  :root { --nav-height: 56px; }

  .nav__list     { display: none; }
  .nav__hamburger { display: flex; }
}

/* ============================================================
   PAGE WRAPPER
   ============================================================ */

.page {
  padding-top: var(--nav-height);
}

.section {
  padding: var(--sp-12) var(--pad-x);
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ============================================================
   SECTION HEADER WITH SONAR WATERMARK
   Static faint rings — not animated (per DESIGN.md).
   ============================================================ */

.section__header {
  position: relative;
  text-align: center;
  margin-bottom: var(--sp-8);
  padding: var(--sp-6) 0;
}

.section__header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Ccircle cx='200' cy='200' r='55'  fill='none' stroke='%235E17EB' stroke-width='1' opacity='0.05'/%3E%3Ccircle cx='200' cy='200' r='95'  fill='none' stroke='%235E17EB' stroke-width='1' opacity='0.05'/%3E%3Ccircle cx='200' cy='200' r='135' fill='none' stroke='%235E17EB' stroke-width='1' opacity='0.05'/%3E%3Ccircle cx='200' cy='200' r='175' fill='none' stroke='%235E17EB' stroke-width='1' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 400px 400px;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

.section__title {
  position: relative;
  z-index: 1;
  font-family: 'Bebas Neue', sans-serif;
  font-size: var(--t-xl);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-white);
  line-height: 1.05;
}

.section__subtitle {
  position: relative;
  z-index: 1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-mono);
  color: var(--c-muted);
  margin-top: var(--sp-2);
  line-height: 1.5;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--c-black);
  overflow: hidden;
  padding: 0 var(--pad-x);
}

/* Sonar rings — animated, behind video in z-order */
.sonar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  pointer-events: none;
}

.sonar__ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--c-purple);
  width: 320px;
  height: 320px;
  opacity: 0;
  animation: sonar-pulse 4s ease-out infinite;
}

.sonar__ring:nth-child(1) { animation-delay: 0.0s; }
.sonar__ring:nth-child(2) { animation-delay: 0.6s; }
.sonar__ring:nth-child(3) { animation-delay: 1.2s; }
.sonar__ring:nth-child(4) { animation-delay: 1.8s; }
.sonar__ring:nth-child(5) { animation-delay: 2.4s; }

@keyframes sonar-pulse {
  0%   { transform: scale(0);   opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0;   }
}

/* Video wrapper */
.hero__media {
  position: relative;
  z-index: 1;
  width: min(600px, 90vw);
}

.hero__video {
  width: 100%;
}

/* Static PNG fallback if video unavailable */
.hero__logo-fallback {
  width: 100%;
  display: none;
}

/* Tagline */
.hero__tagline {
  position: relative;
  z-index: 1;
  margin-top: var(--sp-4);
  font-family: 'Bebas Neue', sans-serif;
  font-size: var(--t-lg);
  letter-spacing: 1.5em;
  color: var(--c-white);
  text-transform: uppercase;
  /* Compensate trailing letter-spacing so text appears centered */
  padding-left: 1.5em;
}

/* ============================================================
   HERO MUTE TOGGLE
   Small icon button — bottom-right of hero. Starts muted.
   ============================================================ */

.hero__mute-btn {
  position: absolute;
  bottom: var(--sp-4);
  right: var(--sp-4);
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  padding: var(--sp-1);
  transition: color 200ms var(--ease);
  line-height: 0;
}

.hero__mute-btn:hover {
  color: var(--c-purple);
}

.hero__mute-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

.hero__mute-btn .icon-muted   { display: block; }
.hero__mute-btn .icon-unmuted { display: none;  }

.hero__mute-btn.is-unmuted .icon-muted   { display: none;  }
.hero__mute-btn.is-unmuted .icon-unmuted { display: block; }

/* ============================================================
   PAGE INTRO TEXT
   Used on ELECTRONIC page.
   ============================================================ */

.page-intro {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: var(--t-body);
  color: var(--c-white);
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--sp-12);
  line-height: 1.65;
}

/* ============================================================
   TRACK CARDS (ELECTRONIC)
   ============================================================ */

.track-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

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

@media (min-width: 1024px) {
  .track-grid { grid-template-columns: repeat(3, 1fr); }
}

.track-card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  padding: var(--sp-4);
  transition: box-shadow 200ms var(--ease);
}

.track-card:hover {
  box-shadow: 0 0 16px rgba(94, 23, 235, 0.4);
}

.track-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--sp-3);
}

.track-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: var(--sp-3);
}

.track-card__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: var(--t-md);
  letter-spacing: 0.08em;
  color: var(--c-white);
  margin-bottom: 4px;
}

.track-card__year {
  font-family: 'Lato', sans-serif;
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--c-muted);
  margin-bottom: var(--sp-2);
}

.track-card__desc {
  font-family: 'Lato', sans-serif;
  font-size: var(--t-body);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
  margin-bottom: var(--sp-3);
}

.track-card__embed {
  width: 100%;
  min-height: 120px;
  background: #0a0a0a;
  border: 1px solid rgba(94, 23, 235, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   HTML5 AUDIO PLAYER
   accent-color styles the progress bar; color-scheme: dark
   tells the browser to use dark-themed native controls.
   ============================================================ */

.audio-player {
  width: 100%;
}

.audio-player audio {
  display: block;
  width: 100%;
  accent-color: var(--c-purple);
  color-scheme: dark;
}

.track-card__sc-link {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: var(--c-purple-accent);
  text-decoration: none;
  margin-top: 12px;
}

.track-card__sc-link:hover {
  color: var(--c-white);
  text-decoration: underline;
}

/* ============================================================
   NOETIC — THE RABBIT HOLE
   ============================================================ */

.rabbit-hole {
  max-width: 720px;
  margin: 0 auto;
}

.rabbit-hole__section-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: var(--t-lg);
  letter-spacing: 0.08em;
  color: var(--c-white);
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-3);
}

.rabbit-hole p {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: var(--t-body);
  color: var(--c-white);
  line-height: 1.75;
  margin-bottom: var(--sp-3);
}

.rabbit-hole__closing {
  font-style: italic;
  color: var(--c-muted);
  margin-top: var(--sp-8);
}

.rabbit-hole__imgs {
  display: flex;
  gap: 24px;
  margin: 48px 0;
}

.rabbit-hole__imgs figure {
  flex: 1;
}

.rabbit-hole__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.rabbit-hole__caption {
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: #A070FF;
  margin-top: 8px;
}

/* ENA structured callout */
.ena-callout {
  margin: var(--sp-8) 0;
  border-left: 2px solid var(--c-card-border);
  padding-left: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.ena-item__letter {
  font-family: 'Bebas Neue', sans-serif;
  font-size: var(--t-lg);
  color: var(--c-purple-accent);
  letter-spacing: 0.08em;
  line-height: 1.0;
}

.ena-item__desc {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: var(--t-body);
  color: var(--c-white);
  margin-top: 4px;
  line-height: 1.65;
}

/* ============================================================
   NOETIC — INSPIRATIONS & INFLUENCES
   ============================================================ */

.inspirations__photo {
  display: block;
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  object-position: center top;
  margin-bottom: var(--sp-8);
}

.inspirations__header {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: var(--sp-6);
}

.inspirations__header-left,
.inspirations__header-right {
  font-family: 'Bebas Neue', sans-serif;
  font-size: var(--t-lg);
  letter-spacing: 0.08em;
  color: var(--c-white);
  line-height: 1.1;
}

.inspirations__list {
  font-family: 'Lato', sans-serif;
  font-size: var(--t-body);
  font-weight: 300;
  color: var(--c-muted);
  line-height: 2;
}

.inspirations__artist {
  display: inline;
  cursor: default;
  transition: color 200ms var(--ease);
}

.inspirations__artist:hover {
  color: var(--c-purple-accent);
}

/* ============================================================
   ALCHEMY — SHARED LAB STYLES
   ============================================================ */

.lab-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

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

@media (min-width: 1024px) {
  .lab-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   LYRIC LAB CARDS
   ============================================================ */

.lyric-card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  padding: var(--sp-4);
  transition: box-shadow 200ms var(--ease);
}

.lyric-card:hover {
  box-shadow: 0 0 16px rgba(94, 23, 235, 0.4);
}

.lyric-card__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: var(--t-md);
  letter-spacing: 0.10em;
  color: var(--c-white);
  margin-bottom: var(--sp-2);
}

.lyric-card__excerpt {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-mono);
  color: var(--c-white);
  line-height: 1.7;
  white-space: pre-line;
}

.lyric-card__full {
  display: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-mono);
  color: var(--c-white);
  line-height: 1.7;
  white-space: pre-line;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-card-border);
}

.lyric-card__full.is-open {
  display: block;
}

.lyric-card__btn {
  display: inline-block;
  margin-top: var(--sp-3);
  padding: 6px var(--sp-2);
  font-family: 'Lato', sans-serif;
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--c-purple-accent);
  border: 1px solid var(--c-purple);
  background: transparent;
  cursor: pointer;
  transition: background 200ms var(--ease), border-color 200ms var(--ease);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lyric-card__btn:hover {
  background: rgba(94, 23, 235, 0.15);
}

/* In-progress card */
.lyric-card--in-progress {
  opacity: 0.5;
}

.lyric-card__status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-sm);
  color: var(--c-muted);
  letter-spacing: 0.12em;
  margin-top: var(--sp-1);
}

/* ============================================================
   SOUND LAB CARDS
   ============================================================ */

.sound-card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  padding: var(--sp-4);
  transition: box-shadow 200ms var(--ease);
}

.sound-card:hover {
  box-shadow: 0 0 16px rgba(94, 23, 235, 0.4);
}

.sound-card__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: var(--t-md);
  letter-spacing: 0.10em;
  color: var(--c-white);
  margin-bottom: var(--sp-3);
}

.sound-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--sp-3);
}

.sound-lab__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.6;
  margin-bottom: var(--sp-3);
}

.sound-card__embed {
  width: 100%;
  min-height: 120px;
  background: #0a0a0a;
  border: 1px solid rgba(94, 23, 235, 0.15);
}

/* ============================================================
   FOOTER — ECHO CHAMBERS
   ============================================================ */

.footer {
  background: var(--c-black);
  padding: var(--sp-12) var(--pad-x);
  text-align: center;
  border-top: 1px solid rgba(94, 23, 235, 0.15);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: var(--t-lg);
  letter-spacing: 0.10em;
  color: var(--c-white);
  margin-bottom: var(--sp-6);
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
  list-style: none;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-white);
  opacity: 0.6;
  transition: opacity 200ms var(--ease), color 200ms var(--ease);
}

.footer__social-link:hover {
  opacity: 1;
  color: var(--c-purple-accent);
}

.footer__social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.footer__copy {
  font-family: 'Lato', sans-serif;
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--c-muted);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for grid children */
.stagger-grid .reveal:nth-child(1)  { transition-delay:    0ms; }
.stagger-grid .reveal:nth-child(2)  { transition-delay:  100ms; }
.stagger-grid .reveal:nth-child(3)  { transition-delay:  200ms; }
.stagger-grid .reveal:nth-child(4)  { transition-delay:  300ms; }
.stagger-grid .reveal:nth-child(5)  { transition-delay:  400ms; }
.stagger-grid .reveal:nth-child(6)  { transition-delay:  500ms; }
.stagger-grid .reveal:nth-child(7)  { transition-delay:  600ms; }
.stagger-grid .reveal:nth-child(8)  { transition-delay:  700ms; }
.stagger-grid .reveal:nth-child(9)  { transition-delay:  800ms; }
.stagger-grid .reveal:nth-child(10) { transition-delay:  900ms; }
.stagger-grid .reveal:nth-child(11) { transition-delay: 1000ms; }
.stagger-grid .reveal:nth-child(12) { transition-delay: 1100ms; }

/* ============================================================
   FOCUS STATES
   Never outline: none without a visible replacement.
   ============================================================ */

:focus-visible {
  outline: 2px solid var(--c-purple);
  outline-offset: 4px;
}

/* ============================================================
   ACCESSIBILITY — prefers-reduced-motion
   All animations off; final states shown immediately.
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .sonar__ring { display: none; }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
