/* ---------------------------------------------------------
   Tokens
--------------------------------------------------------- */
:root {
  --ink: #14120f;
  --ink-raised: #1c1a15;
  --paper: #efe9dc;
  --paper-dim: #b9af98;
  --moss: #445c45;
  --moss-bright: #5c7c5d;
  --rust: #a8462f;
  --hairline: rgba(239, 233, 220, 0.14);

  --display: 'Bebas Neue', sans-serif;
  --body: 'Space Grotesk', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

a { color: var(--moss-bright); }

/* subtle paper-grain texture over the dark ground */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------
   Header / footer
--------------------------------------------------------- */
.site-head, .site-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
}

.wordmark {
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.08em;
}

.site-head__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-dim);
  letter-spacing: 0.04em;
}

.site-foot {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-dim);
  border-top: 1px solid var(--hairline);
}

.site-foot__meta { display: flex; gap: 16px; }

.site-foot__links { display: flex; gap: 16px; }
.site-foot__links a {
  color: var(--paper-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-foot__links a:hover { color: var(--paper); }

/* ---------------------------------------------------------
   Buttons / fields (shared)
--------------------------------------------------------- */
.btn {
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 3px;
  padding: 14px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:not(:disabled):hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--rust);
  color: var(--paper);
}
.btn--primary:not(:disabled):hover { background: #bf5138; }

.btn--secondary {
  background: var(--moss);
  color: var(--paper);
  width: 100%;
  justify-content: center;
}
.btn--secondary:hover { background: var(--moss-bright); }

.btn--ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--paper-dim);
}
.btn--ghost:hover { border-color: var(--paper-dim); color: var(--paper); }

.btn__needle {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--paper);
  display: inline-block;
}

/* ---------------------------------------------------------
   Login view
--------------------------------------------------------- */
.view { flex: 1; display: flex; }
.view[hidden] { display: none; }

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 20px 40px 80px;
  max-width: 1180px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0 0 14px;
}

.hero__title {
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 0 0 22px;
  text-wrap: balance;
}

.hero__sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--paper-dim);
  max-width: 46ch;
  margin: 0 0 32px;
}

.fineprint {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--paper-dim);
  max-width: 42ch;
  line-height: 1.6;
  margin-top: 18px;
}
.fineprint code {
  background: var(--ink-raised);
  padding: 1px 5px;
  border-radius: 3px;
}
.fineprint--warn { color: var(--rust); }

/* --- sleeve / vinyl illustration --- */
.hero__art { display: flex; justify-content: center; }

.sleeve {
  position: relative;
  width: min(380px, 80vw);
  aspect-ratio: 1;
}

.vinyl {
  position: absolute;
  top: 6%;
  right: -18%;
  width: 88%;
  height: 88%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, #0c0b09 0 2px, #201d18 3px 5px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  animation: spin 14s linear infinite;
}
.vinyl__label {
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: var(--moss);
  border: 2px solid var(--ink);
}
.vinyl__label::after {
  content: "";
  position: absolute;
  inset: 44%;
  border-radius: 50%;
  background: var(--ink);
}

.sleeve__jacket {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, var(--paper), #ded5bd 70%);
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.45);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 78%, 22% 62%, 0 46%);
  transition: clip-path 0.4s ease;
}
.sleeve:hover .sleeve__jacket {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 92%, 22% 76%, 0 60%);
}
.sleeve__spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 10%;
  background: rgba(20,18,15,0.08);
}
.sleeve__stamp {
  position: absolute;
  bottom: 18px;
  left: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.55;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------
   App / studio view
--------------------------------------------------------- */
.view-app { padding: 20px 40px 60px; }

.studio {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
}

.studio__cover {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cover-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cover-title-label {
  margin: 0;
  font-family: var(--display);
  font-size: 56px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.cover-byline-label {
  margin: 0;
  font-family: var(--body);
  font-weight: 500;
  font-size: 16px;
  color: var(--rust);
}

.cover-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  background: var(--ink-raised);
}
#cover-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.cover-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink-raised);
}
.cover-loading[hidden] { display: none; }
.cover-loading span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--rust);
  animation: pulse 1s ease-in-out infinite;
}
.cover-loading span:nth-child(2) { animation-delay: 0.15s; }
.cover-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

.vinyl-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 423;
}

.vinyl-band-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vinyl-disc-canvas {
  position: absolute;
  left: 61.2%;
  top: 8.274%;
  width: 35.3%;
  height: 83.452%;
  animation: vinyl-spin 3.2s linear infinite;
  will-change: transform;
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cover-actions { display: flex; gap: 12px; }

.studio__sheet {
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  padding: 28px;
  position: sticky;
  top: 20px;
}

.sheet__kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss);
  margin: 0 0 12px;
}

.field { display: block; margin-bottom: 16px; }
.field[hidden] { display: none; }
.field__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.field__input {
  width: 100%;
  font-family: var(--body);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(20,18,15,0.25);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
}

.sheet__divider {
  height: 1px;
  background: rgba(20,18,15,0.15);
  margin: 20px 0;
}

.matrix {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: rgba(20,18,15,0.06);
  padding: 8px 10px;
  border-radius: 3px;
}

.tracklist {
  margin: 0;
  padding-left: 28px;
  font-size: 13px;
  line-height: 1.7;
  max-height: 260px;
  overflow-y: auto;
  color: var(--ink);
}
.tracklist li span { color: var(--moss); }

/* ---------------------------------------------------------
   Legal pages (About / Privacy)
--------------------------------------------------------- */
.legal {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding: 40px 40px 80px;
}

.legal__back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
  margin-bottom: 28px;
}
.legal__back:hover { color: var(--paper); }

.legal h1 {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
  margin: 0 0 8px;
}

.legal__updated {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-dim);
  margin: 0 0 36px;
}

.legal h2 {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.01em;
  color: var(--rust);
  margin: 36px 0 12px;
}

.legal p, .legal li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--paper-dim);
}

.legal ul { padding-left: 20px; margin: 0 0 16px; }
.legal a { color: var(--moss-bright); }

/* ---------------------------------------------------------
   Ads
--------------------------------------------------------- */
.ad-slot {
  margin-top: 24px;
  max-width: 100%;
  overflow: hidden;
}
.ad-slot .adsbygoogle {
  max-width: 100%;
}
.ad-slot__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-dim);
  text-align: center;
  margin: 0 0 8px;
}
.studio__sheet .ad-slot__label { color: var(--moss); }

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 900px) {
  .hero, .studio { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .studio__sheet { position: static; }
  .site-head, .site-foot, .hero, .view-app { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .vinyl { animation: none; }
  .btn:hover { transform: none; }
}
