:root {
  --bg: #f5efe2;
  --bg-deep: #d9cdb6;
  --ink: #10202c;
  --panel: rgba(13, 28, 40, 0.92);
  --panel-soft: rgba(18, 37, 53, 0.82);
  --line: rgba(255, 245, 228, 0.12);
  --text-soft: rgba(255, 245, 228, 0.72);
  --card: rgba(255, 247, 234, 0.72);
  --accent-a: #ff7a32;
  --accent-b: #0fb5ac;
  --accent-c: #f0bf59;
  --accent-d: #1c3f5f;
  --white: #fff9ef;
  --shadow: 0 24px 64px rgba(18, 32, 46, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 50, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 22%, rgba(15, 181, 172, 0.22), transparent 26rem),
    linear-gradient(180deg, var(--bg) 0%, #efe4cd 48%, var(--bg-deep) 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 32, 44, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 44, 0.035) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  opacity: 0.55;
}

.page-shell {
  position: relative;
  overflow: hidden;
  padding: 32px 20px 48px;
}

.glow {
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.42;
  pointer-events: none;
  animation: drift 12s ease-in-out infinite alternate;
}

.glow-a {
  top: -6rem;
  left: -8rem;
  background: rgba(255, 122, 50, 0.44);
}

.glow-b {
  right: -10rem;
  bottom: 4rem;
  background: rgba(15, 181, 172, 0.36);
  animation-duration: 16s;
}

.hero,
.workspace {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
}

.hero {
  padding: 24px 0 28px;
  animation: rise-in 700ms ease-out both;
}

.eyebrow,
.section-label,
.deck-label,
.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
}

.hero h1,
.panel-head h2,
.coach-panel h2,
.deck h2 {
  font-family: "Fraunces", Georgia, serif;
}

.hero h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 36rem;
  margin: 0.85rem 0 0;
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255, 249, 239, 0.72);
  border: 1px solid rgba(28, 63, 95, 0.14);
  box-shadow: var(--shadow);
  font-size: 0.94rem;
}

.workspace {
  display: grid;
  gap: 22px;
  align-items: start;
}

.mix-surface {
  display: grid;
  gap: 22px;
}

.deck-grid {
  display: grid;
  gap: 22px;
}

.deck,
.mixer-panel,
.coach-panel {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.deck,
.mixer-panel {
  background:
    linear-gradient(180deg, rgba(255, 245, 228, 0.03), transparent 22%),
    var(--panel);
  color: var(--white);
  border: 1px solid var(--line);
}

.deck {
  padding: 22px;
  animation: rise-in 700ms ease-out both;
}

.deck-a {
  animation-delay: 60ms;
}

.deck-b {
  animation-delay: 140ms;
}

.deck-head,
.panel-head,
.master-row,
.control-top,
.time-row,
.meta-row,
.transport-row,
.xfade-readout,
.sync-actions,
.meter-row,
.mini-actions,
.inline-inputs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deck h2 {
  margin: 0.2rem 0 0;
  font-size: 1.8rem;
}

.deck-subtitle,
.coach-summary,
.master-copy,
.file-drop small {
  color: var(--text-soft);
}

.status-pill {
  align-self: flex-start;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
  font-weight: 700;
}

.file-drop {
  display: grid;
  gap: 0.35rem;
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.file-drop:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.07);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop span {
  font-size: 1.02rem;
  font-weight: 700;
}

.timeline {
  margin-top: 18px;
}

.wave-shell {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.12) 0,
      rgba(255, 255, 255, 0.12) 9px,
      rgba(255, 255, 255, 0.04) 9px,
      rgba(255, 255, 255, 0.04) 16px
    );
}

.wave-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-c), var(--accent-a));
  transition: width 120ms linear;
}

.deck-b .wave-fill {
  background: linear-gradient(90deg, #9fe7df, var(--accent-b));
}

.scrub,
.crossfader,
input[type="range"] {
  width: 100%;
  accent-color: var(--accent-c);
}

.deck-b input[type="range"] {
  accent-color: var(--accent-b);
}

.scrub {
  margin-top: 10px;
}

.time-row,
.meta-row {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.meta-row span {
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.meter-row {
  margin-top: 16px;
  font-size: 0.86rem;
}

.meter-track {
  width: min(100%, 14rem);
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.meter-fill {
  width: calc(var(--meter-level, 0) * 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #63d7c9, #f0bf59, #ff7a32);
  transform-origin: left center;
  transition: width 120ms ease;
}

.transport-row {
  margin-top: 18px;
}

button,
input,
output {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.primary-button,
.secondary-button,
.ghost-button,
.mini-actions button,
.inline-inputs button {
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent-c), var(--accent-a));
  color: #1d1408;
  box-shadow: 0 12px 24px rgba(255, 122, 50, 0.22);
}

.secondary-button,
.ghost-button,
.mini-actions button,
.inline-inputs button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.deck-b .primary-button {
  background: linear-gradient(135deg, #9fe7df, var(--accent-b));
  color: #082420;
  box-shadow: 0 12px 24px rgba(15, 181, 172, 0.24);
}

.control-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-group {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.control-wide {
  grid-column: 1 / -1;
}

.control-top {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.control-group output {
  color: var(--text-soft);
}

.mini-actions,
.inline-inputs {
  margin-top: 10px;
}

.mini-actions button,
.inline-inputs button {
  flex: 1;
  padding: 0.62rem 0.85rem;
}

.inline-inputs input,
.control-group input[type="text"],
.control-group input[type="number"] {
  flex: 1.2;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.control-group input::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

.mixer-panel {
  padding: 22px;
  animation: rise-in 700ms ease-out 220ms both;
}

.section-label {
  color: rgba(255, 249, 239, 0.64);
  margin: 0 0 0.25rem;
}

.panel-head h2,
.coach-panel h2 {
  margin: 0;
  font-size: 2rem;
}

.xfade-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.crossfader {
  margin-top: 10px;
}

.xfade-readout {
  margin-top: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

.xfade-readout strong {
  font-size: 1.08rem;
}

.xfade-readout span {
  color: var(--text-soft);
}

.sync-actions {
  margin-top: 18px;
  flex-wrap: wrap;
}

.sync-actions button {
  flex: 1;
}

.master-row {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.master-meter {
  min-width: 14rem;
}

.master-track {
  width: 100%;
  height: 12px;
}

.coach-panel {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 249, 239, 0.74), rgba(255, 247, 234, 0.92)),
    var(--card);
  border: 1px solid rgba(28, 63, 95, 0.12);
  animation: rise-in 700ms ease-out 260ms both;
}

.coach-summary {
  margin-top: 0.75rem;
  color: rgba(16, 32, 44, 0.72);
  line-height: 1.7;
}

.coach-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(28, 63, 95, 0.1);
}

.stat-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1rem;
}

.coach-steps {
  margin: 18px 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 12px;
  line-height: 1.6;
}

.coach-banner {
  margin: 20px 0 0;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 122, 50, 0.14), rgba(15, 181, 172, 0.14));
  border: 1px solid rgba(28, 63, 95, 0.1);
}

@media (min-width: 980px) {
  .workspace {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  }

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

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

@media (max-width: 720px) {
  .page-shell {
    padding-inline: 14px;
  }

  .hero h1 {
    font-size: 3.15rem;
  }

  .control-grid,
  .coach-stats {
    grid-template-columns: 1fr;
  }

  .transport-row,
  .sync-actions,
  .master-row {
    flex-direction: column;
    align-items: stretch;
  }

  .meter-track,
  .master-meter {
    width: 100%;
    min-width: 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(18px, -20px, 0) scale(1.08);
  }
}
