/* ============================================
   DANNY SMITH AUDIO
   dannysmithaudio.com
   ============================================ */

/* TOKENS */
:root {
  --studio-dark: #102C26;
  --parchment:   #F7E7CE;
  --studio-mid:  #1A3D36;
  --parchment-muted: #BFB095;
  --amber:       #C8965A;
  --studio-deep: #0A1E1A;

  --font-display: 'Cormorant Garant', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'Space Mono', monospace;

  --container-max: 1200px;
  --section-py: clamp(5rem, 9vw, 8rem);
  --nav-h: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--studio-dark);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

/* CONTAINER */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* EYEBROW */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: lowercase;
  color: var(--parchment-muted);
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #waveform-path {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* FOCUS */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.nav.scrolled {
  background: rgba(10, 30, 26, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(247, 231, 206, 0.07);
}

.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--parchment-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--parchment);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--parchment);
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

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

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-dark);
  overflow: hidden;
}

/* Hero photo strip */
.hero-photo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-photo-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(10, 30, 26, 0.42) 0%,
    rgba(10, 30, 26, 0.48) 55%,
    rgba(10, 30, 26, 0.72) 100%
  );
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-photo:nth-child(1) { object-position: center 30%; }
.hero-photo:nth-child(2) { object-position: center 35%; }
.hero-photo:nth-child(3) { object-position: center 40%; }
.hero-photo:nth-child(4) { object-position: center 55%; }
.hero-photo:nth-child(5) { object-position: center 30%; }

.hero-photo.active { opacity: 1; }

.hero-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: var(--nav-h) clamp(1.5rem, 5vw, 4rem) 10rem;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  letter-spacing: 0.35em;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(5rem, 14vw, 11.5rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  color: var(--parchment);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05em;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  font-weight: 400;
  color: var(--parchment-muted);
  letter-spacing: 0.06em;
  margin-top: 0.5rem;
}

/* Waveform container */
.hero-waveform {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: clamp(90px, 13vw, 150px);
  transform-origin: bottom center;
  pointer-events: none;
  will-change: transform, opacity;
  z-index: 1;
}

.hero-waveform svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================
   SECTIONS — shared
   ============================================ */

.section {
  padding: var(--section-py) 0;
}

.section-eyebrow {
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

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

/* ============================================
   ABOUT
   ============================================ */

.about {
  background: var(--studio-mid);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.about-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.7rem, 3.5vw, 2.8rem);
  line-height: 1.2;
  color: var(--parchment);
  border: none;
  padding: 0;
  quotes: none;
}

.about-body p {
  color: var(--parchment-muted);
  font-size: 0.975rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-rule {
  border: none;
  border-top: 1px solid rgba(247, 231, 206, 0.12);
  margin: 1.75rem 0;
}

.availability {
  color: var(--amber);
  letter-spacing: 0.25em;
}

/* ============================================
   SERVICES
   ============================================ */

.services {
  background: var(--parchment);
}

.services-eyebrow {
  color: rgba(16, 44, 38, 0.5);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(16, 44, 38, 0.1);
}

.service-card {
  padding: clamp(2rem, 4vw, 3rem);
  background: var(--parchment);
  border-right: 1px solid rgba(16, 44, 38, 0.1);
  transition: background 0.2s ease;
}

.service-card:last-child {
  border-right: none;
}

.service-card:hover {
  background: rgba(16, 44, 38, 0.04);
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: var(--studio-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.875rem;
  position: relative;
  text-transform: capitalize;
}

.service-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1.75rem;
  height: 1px;
  background: var(--amber);
  transition: width 0.35s ease;
}

.service-card:hover h3::after {
  width: 100%;
}

.service-card p {
  font-size: 0.875rem;
  color: rgba(16, 44, 38, 0.65);
  line-height: 1.75;
}

/* ============================================
   WORK / CUSTOM PLAYER
   ============================================ */

.credits {
  background: var(--studio-dark);
}

/* Shell */
.player-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(247, 231, 206, 0.08);
}

/* Track browser */
.track-browser {
  border-right: 1px solid rgba(247, 231, 206, 0.08);
  max-height: 500px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(247,231,206,0.1) transparent;
}
.track-browser::-webkit-scrollbar { width: 3px; }
.track-browser::-webkit-scrollbar-thumb { background: rgba(247,231,206,0.12); }

.track-group {
  border-bottom: 1px solid rgba(247, 231, 206, 0.06);
}
.track-group:last-child { border-bottom: none; }

.track-group-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.875rem 1.25rem 0.625rem;
  border-bottom: 1px solid rgba(247, 231, 206, 0.06);
}

.tg-artist {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--parchment);
  line-height: 1.2;
}

.tg-role {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--parchment-muted);
  opacity: 0.45;
  flex-shrink: 0;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.track-row:hover { background: rgba(247,231,206,0.04); }
.track-row.active { background: rgba(200,150,90,0.07); }

.track-pip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(247,231,206,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
/* Play triangle */
.track-pip::after {
  content: '';
  display: block;
  width: 0; height: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 5px solid rgba(247,231,206,0.3);
  margin-left: 1px;
  transition: border-left-color 0.15s;
}
.track-row:hover .track-pip { border-color: var(--amber); background: rgba(200,150,90,0.1); }
.track-row:hover .track-pip::after { border-left-color: var(--amber); }
.track-row.active .track-pip { border-color: var(--amber); background: rgba(200,150,90,0.12); }
.track-row.active .track-pip::after { border-left-color: var(--amber); }

/* Pause state — two bars (full icon width so flex centres it correctly) */
.track-row.playing .track-pip::after {
  border: none;
  width: 9px;
  height: 7px;
  background: linear-gradient(to right, var(--amber) 2px, transparent 2px, transparent 7px, var(--amber) 7px);
  margin-left: 0;
}

.track-row--noprev {
  cursor: default;
  opacity: 0.35;
  pointer-events: none;
}
.track-row--noprev .track-pip { border-style: dashed; }
.track-row--noprev .track-pip::after { display: none; }

.track-name {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(247,231,206,0.65);
  line-height: 1.3;
  transition: color 0.15s;
}
.track-row:hover .track-name,
.track-row.active .track-name { color: var(--parchment); }

/* Now playing panel — turntable layout */
.player-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2.5vw, 2rem);
  gap: 1.25rem;
}

/* Turntable SVG wrapper */
.turntable-wrap {
  width: 100%;
  max-width: 360px;
}
.player-turntable {
  width: 100%;
  height: auto;
  display: block;
}

/* Platter spin */
@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
#platter-g {
  transform-origin: 168px 178px;
  animation: vinyl-spin 2.3s linear infinite;
  animation-play-state: paused;
}
.player-turntable.spinning #platter-g {
  animation-play-state: running;
}

/* Tonearm — default is arm lifted (at rest) */
#tonearm-g {
  transform-origin: 345px 46px;
  transform: rotate(38deg);
  transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.player-turntable.arm-down #tonearm-g {
  transform: rotate(0deg);
}

@media (prefers-reduced-motion: reduce) {
  #platter-g  { animation: none !important; }
  #tonearm-g  { transition: none !important; }
}

/* Idle hint — sits at the bottom of player-info */
.player-idle {
  text-align: center;
  padding: 0.5rem 0;
}
.player-idle-hint {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--parchment-muted);
  opacity: 0.3;
}

/* Info area below the turntable */
.player-info {
  width: 100%;
  max-width: 320px;
}
.player-active {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.player-meta { display: flex; flex-direction: column; gap: 0.3rem; }
.player-artist {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--parchment-muted);
  opacity: 0.6;
}
.player-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  color: var(--parchment);
  line-height: 1.2;
}

.player-prog-wrap { display: flex; flex-direction: column; gap: 0.45rem; }
.player-prog-bar {
  height: 2px;
  background: rgba(247,231,206,0.1);
  position: relative;
  cursor: pointer;
}
.player-prog-bar:hover { background: rgba(247,231,206,0.16); }
.player-prog-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--amber);
  transition: width 0.1s linear;
}
.player-time {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--parchment-muted);
  opacity: 0.45;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.player-btn {
  background: none;
  border: 1px solid rgba(247,231,206,0.14);
  color: rgba(247,231,206,0.55);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.player-btn:hover { border-color: var(--amber); color: var(--amber); }
.player-pp {
  width: 2.6rem;
  height: 2.6rem;
  border-color: rgba(247,231,206,0.22);
  color: var(--parchment);
}
.player-pp:hover { background: rgba(200,150,90,0.1); }

.player-ext {
  text-decoration: none;
  color: var(--parchment-muted);
  opacity: 0.35;
  transition: opacity 0.2s;
  display: inline-block;
}
.player-ext:hover { opacity: 0.65; }

/* ============================================
   CONTACT
   ============================================ */

.contact {
  background: var(--studio-mid);
}

.contact-inner {
  max-width: 740px;
}

.contact-heading {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.75rem, 6.5vw, 5.5rem);
  line-height: 1.0;
  color: var(--parchment);
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: lowercase;
  color: var(--parchment-muted);
}

.form-group input,
.form-group textarea {
  background: rgba(10, 30, 26, 0.45);
  border: 1px solid rgba(247, 231, 206, 0.18);
  border-radius: 2px;
  padding: 0.875rem 1rem;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  width: 100%;
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--parchment-muted);
  opacity: 0.4;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--amber);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-error {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: #E08A7A;
  min-height: 1em;
}

.form-submit {
  background: var(--parchment);
  color: var(--studio-dark);
  border: none;
  padding: 0.9rem 2.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.form-submit:hover:not(:disabled) {
  background: var(--amber);
  color: var(--studio-deep);
}

.form-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.contact-direct {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--parchment-muted);
  opacity: 0.45;
}
.contact-direct a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(191,176,149,0.3);
  transition: opacity 0.2s;
}
.contact-direct a:hover { opacity: 0.8; }

.form-success {
  padding: 3rem 0;
}

.form-success p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--parchment);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--studio-deep);
  padding: 2.5rem 0;
  border-top: 1px solid rgba(247, 231, 206, 0.06);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment);
  opacity: 0.6;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--parchment-muted);
  opacity: 0.45;
}

.footer-socials {
  display: flex;
  gap: 1.75rem;
}

.footer-socials a {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--parchment-muted);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-socials a:hover {
  opacity: 1;
  color: var(--parchment);
}

/* ============================================
   RESPONSIVE — tablet
   ============================================ */

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

  .service-card {
    border-right: none;
    border-bottom: 1px solid rgba(16, 44, 38, 0.1);
  }

  .service-card:last-child {
    border-bottom: none;
  }

  .player-shell {
    grid-template-columns: 1fr;
  }

  .track-browser {
    border-right: none;
    border-bottom: 1px solid rgba(247,231,206,0.08);
    max-height: 320px;
  }

  .turntable-wrap {
    max-width: 260px;
  }
}

/* ============================================
   RESPONSIVE — mobile
   ============================================ */

@media (max-width: 680px) {
  /* Nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(10, 30, 26, 0.98);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0.5rem 0 2rem;
    border-top: 1px solid rgba(247, 231, 206, 0.07);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 1rem;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Form */
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .form-submit {
    text-align: center;
    width: 100%;
    padding: 1rem;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}
