:root {
  --void: #0d0919;
  --surface: #161028;
  --surface-hover: #1e1538;
  --neon-magenta: #ff2d78;
  --neon-cyan: #00e5cc;
  --neon-chartreuse: #a3ff12;
  --text-primary: #e8dff5;
  --text-secondary: #a89bc2;
  --accent-violet: #c084fc;
  --shadow-dark: rgba(0,0,0,0.6);
  --shadow-light: rgba(80,30,120,0.15);
  --ease-morph: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Design language terms preserved: Interaction Pattern Pattern: Pattern* Pattern:* Pattern:** Pattern:: Pattern::* vocabulary `morph` transitions organic states. effects `transition: IntersectionObserver` with `threshold: 0.15`. uses (Google */

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-secondary);
  font-family: "DM Sans", Inter, sans-serif;
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  font-weight: 300;
  line-height: 1.72;
  letter-spacing: 0.015em;
  background:
    radial-gradient(circle at 18% 8%, rgba(192, 132, 252, 0.11), transparent 34rem),
    radial-gradient(circle at 87% 22%, rgba(0, 229, 204, 0.065), transparent 30rem),
    radial-gradient(circle at 55% 82%, rgba(255, 45, 120, 0.08), transparent 38rem),
    var(--void);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
}

.edge-lines {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.72;
  z-index: 0;
}

.edge-line {
  fill: none;
  stroke-width: 1;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  transition: stroke-dashoffset 0.12s linear;
}

.edge-line-a { stroke: var(--neon-magenta); filter: drop-shadow(0 0 6px rgba(255,45,120,0.6)); }
.edge-line-b { stroke: var(--neon-cyan); filter: drop-shadow(0 0 6px rgba(0,229,204,0.55)); }

.masonry-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-auto-rows: 10px;
  gap: 24px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.module {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border: 1px solid rgba(232, 223, 245, 0.035);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(30,21,56,0.54), rgba(22,16,40,0.98) 45%, rgba(13,9,25,0.72));
  box-shadow: 12px 12px 24px var(--shadow-dark), -8px -8px 20px var(--shadow-light), inset 1px 1px 0 rgba(232,223,245,0.025);
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.9s ease, transform 0.9s var(--ease-morph), border-radius 0.6s var(--ease-morph), box-shadow 0.6s var(--ease-morph), background 0.6s var(--ease-morph);
  will-change: transform, opacity;
  contain: layout style paint;
}

.module::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.22;
  background: linear-gradient(135deg, rgba(192,132,252,0.20), transparent 28%, transparent 68%, rgba(0,229,204,0.12));
}

.module::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  pointer-events: none;
  box-shadow: inset 4px 4px 8px rgba(0,0,0,0.5), inset -4px -4px 8px rgba(80,30,120,0.1);
  opacity: 0.5;
}

.module.visible { opacity: 1; transform: translateY(0) scale(1); }

.module:hover {
  border-radius: 28px 20px 26px 22px;
  background: linear-gradient(145deg, rgba(30,21,56,0.82), rgba(22,16,40,1) 50%, rgba(13,9,25,0.76));
  box-shadow: 12px 12px 24px var(--shadow-dark), -8px -8px 20px rgba(80,30,120,0.30), 0 0 38px rgba(255,45,120,0.18), inset 0 0 18px rgba(0,229,204,0.025);
  transform: scale(1.015) translateY(-2px);
}

.span-8 { grid-row-end: span 8; }
.span-12 { grid-row-end: span 12; }
.span-16 { grid-row-end: span 16; }
.span-20 { grid-row-end: span 20; }
.span-24 { grid-row-end: span 24; }

.module-content { position: relative; z-index: 3; }

.module-content.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.recessed {
  margin-top: 18px;
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: 20px;
  background: rgba(13,9,25,0.31);
  box-shadow: inset 4px 4px 8px rgba(0,0,0,0.5), inset -4px -4px 8px rgba(80,30,120,0.1);
}

.label {
  position: relative;
  z-index: 4;
  display: inline-block;
  font-family: "Space Grotesk", space, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--neon-cyan);
  text-shadow: 0 0 7px rgba(0,229,204,0.55), 0 0 20px rgba(0,229,204,0.24), 0 0 40px rgba(0,229,204,0.12);
}

.headline, .module-title, .quote-text {
  font-family: "Cormorant Garamond", Cormorant, Lora, serif;
  color: var(--text-primary);
  text-shadow: 0 0 7px rgba(200,100,255,0.22), 0 0 20px rgba(200,100,255,0.15), 0 0 40px rgba(200,100,255,0.10);
}

.headline {
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.module-title {
  margin-bottom: 1.25rem;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
}

.body-text { max-width: 54ch; margin-bottom: 1rem; color: var(--text-secondary); }
.body-text:last-child { margin-bottom: 0; }
.lead { color: var(--text-primary); opacity: 0.82; }

.quote-text {
  max-width: 13ch;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 300;
  line-height: 1.18;
}

.quote-text.large { max-width: 16ch; font-size: clamp(2.2rem, 4.2vw, 4rem); }

.visualizer .module-content { height: calc(100% - 28px); }
.waveform { width: 100%; height: 100%; overflow: visible; }
.wave-core, .wave-glow { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wave-core { stroke: var(--neon-cyan); stroke-width: 2; filter: drop-shadow(0 0 7px rgba(0,229,204,0.55)); }
.wave-glow.inner { stroke: var(--neon-cyan); stroke-width: 7; opacity: 0.5; filter: blur(8px); }
.wave-glow.outer { stroke: var(--neon-cyan); stroke-width: 15; opacity: 0.2; filter: blur(20px); }
.magenta .wave-core, [data-tone="magenta"] .wave-core { stroke: var(--neon-magenta); filter: drop-shadow(0 0 7px rgba(255,45,120,0.58)); }
.magenta .wave-glow, [data-tone="magenta"] .wave-glow { stroke: var(--neon-magenta); }
[data-tone="chartreuse"] .wave-core { stroke: var(--neon-chartreuse); filter: drop-shadow(0 0 7px rgba(163,255,18,0.5)); }
[data-tone="chartreuse"] .wave-glow { stroke: var(--neon-chartreuse); }

.lissajous { width: min(100%, 220px); height: min(100%, 220px); animation: slow-turn 18s ease-in-out infinite alternate; }
.lissajous-core, .lissajous-glow { fill: none; stroke: var(--neon-chartreuse); stroke-linecap: round; stroke-linejoin: round; }
.lissajous-core { stroke-width: 1.8; filter: drop-shadow(0 0 8px rgba(163,255,18,0.55)); }
.lissajous-glow { stroke-width: 12; opacity: 0.22; filter: blur(14px); }

@keyframes slow-turn { to { transform: rotate(19deg) scale(0.92); } }

.blob-decoration {
  position: absolute;
  z-index: 0;
  opacity: 0.08;
  border-radius: 30% 70% 60% 40% / 50% 60% 30% 70%;
  animation: blob-morph 15s ease-in-out infinite alternate;
  will-change: border-radius, transform;
}

.blob-1 { width: 360px; height: 360px; top: -120px; right: -130px; background: radial-gradient(ellipse at 30% 30%, var(--neon-magenta), transparent 68%); }
.blob-2 { width: 240px; height: 240px; top: -80px; left: -80px; background: radial-gradient(ellipse at 50% 50%, var(--neon-cyan), transparent 68%); }
.blob-3 { width: 300px; height: 300px; right: -120px; bottom: -90px; background: radial-gradient(ellipse at 40% 60%, var(--neon-magenta), transparent 70%); }
.blob-4 { width: 330px; height: 330px; top: -80px; left: -130px; background: radial-gradient(ellipse at 70% 30%, var(--accent-violet), transparent 70%); }
.blob-5 { width: 390px; height: 390px; bottom: -160px; left: -110px; background: radial-gradient(ellipse at 50% 50%, var(--neon-magenta), transparent 70%); }

@keyframes blob-morph {
  0% { border-radius: 30% 70% 60% 40% / 50% 60% 30% 70%; transform: translate3d(0,0,0) rotate(0deg); }
  50% { border-radius: 60% 40% 50% 50% / 40% 70% 60% 30%; transform: translate3d(10px,-8px,0) rotate(12deg); }
  100% { border-radius: 42% 58% 34% 66% / 62% 38% 55% 45%; transform: translate3d(-6px,9px,0) rotate(-8deg); }
}

.musical-watermark {
  position: absolute;
  z-index: 1;
  top: -36px;
  right: -14px;
  color: var(--accent-violet);
  font-family: "Cormorant Garamond", serif;
  font-size: 10rem;
  line-height: 1;
  opacity: 0.04;
}

.musical-glyph {
  position: relative;
  z-index: 3;
  width: min(78%, 150px);
  height: min(78%, 150px);
  overflow: visible;
  fill: none;
  stroke: var(--accent-violet);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(192,132,252,0.55)) drop-shadow(0 0 20px rgba(192,132,252,0.2));
  animation: glyph-breathe 9s ease-in-out infinite alternate;
}

@keyframes glyph-breathe { to { transform: scale(1.07) rotate(-2deg); } }

.dial-cluster {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 16px;
  margin: 14px 0 18px;
}

.dial-cluster span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 7px 7px 14px rgba(0,0,0,0.55), -5px -5px 13px rgba(80,30,120,0.14), inset 2px 2px 5px rgba(232,223,245,0.025);
}

.dial-cluster span::after {
  content: "";
  display: block;
  width: 2px;
  height: 17px;
  margin: 7px auto 0;
  border-radius: 2px;
  background: var(--neon-chartreuse);
  box-shadow: 0 0 7px rgba(163,255,18,0.7), 0 0 20px rgba(163,255,18,0.24);
}

.compact-copy { position: relative; z-index: 3; }

.module.flash {
  box-shadow: 12px 12px 24px var(--shadow-dark), -8px -8px 20px rgba(80,30,120,0.35), 0 0 44px rgba(163,255,18,0.34), inset 0 0 20px rgba(163,255,18,0.07);
}

@media (max-width: 768px) {
  .edge-lines { display: none; }
  .masonry-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 16px; padding: 16px; }
  .module { grid-row-end: auto; min-height: 220px; padding: 24px; border-radius: 18px; }
  .module:hover { border-radius: 20px; }
  .visualizer, .glyph, .quote { min-height: 260px; }
  .blob-decoration { width: 180px !important; height: 180px !important; opacity: 0.055; }
  .blob-3, .blob-4, .blob-5 { display: none; }
  .musical-watermark { font-size: 7rem; }
}

@media (max-width: 480px) {
  .masonry-grid { padding: 12px; gap: 12px; }
  .module { padding: 18px; }
  .recessed { padding: 18px; }
}
