/* ============================================================
   THE JAM BOX — Summer Hits 2026
   Shared design system: cream/paper billboard, coral accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=IBM+Plex+Mono:wght@400;600&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --cream: #FAF6EA;
  --paper: #FFFFFF;
  --ink: #14151A;
  --ink-dim: #5B5C66;
  --line: rgba(20, 21, 26, 0.12);

  --coral: #FF5B41;
  --pink: #FFC9C0;
  --yellow: #F5E14F;
  --sky: #6FC6E0;
  --lime: #A8D97C;
  --navy: #10111A;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(20, 21, 26, 0.25);

  --font-display: 'Archivo Black', 'Arial Black', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

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

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.stripe {
  height: 8px;
  background: linear-gradient(to right,
    var(--coral) 0%, var(--coral) 20%,
    var(--pink) 20%, var(--pink) 40%,
    var(--yellow) 40%, var(--yellow) 60%,
    var(--sky) 60%, var(--sky) 80%,
    var(--lime) 80%, var(--lime) 100%);
}

.shell { max-width: 900px; margin: 0 auto; padding: clamp(20px, 4vw, 48px); }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 34px; flex-wrap: wrap; gap: 10px; }
.brand { font-family: var(--font-display); font-size: 1.4rem; text-decoration: none; color: var(--ink); text-transform: uppercase; }
.brand .accent { color: var(--coral); }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 40px);
}

.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 13px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--navy); color: #fff; border-color: transparent; }
.btn--coral { background: var(--coral); color: #fff; border-color: transparent; }
.btn--ghost { background: transparent; border-color: var(--line); }
.btn--lg { padding: 17px 30px; font-size: 1.05rem; }
.btn--block { width: 100%; text-align: center; }

label.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.field { margin-bottom: 22px; }
.input, .select, .textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--coral); outline-offset: 1px; }

.hidden { display: none !important; }
.actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.grow { flex: 1; }

.hint { color: var(--ink-dim); margin: 10px 0 22px; }
.hint-sm { color: var(--ink-dim); font-size: 0.82rem; margin-top: 8px; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  opacity: 0; pointer-events: none; transition: all .3s; z-index: 200; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.badge {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.1rem; color: var(--ink);
  text-transform: uppercase; flex-shrink: 0;
  background-size: cover; background-position: center;
}

.logo-upload { display: flex; align-items: center; gap: 14px; }
.logo-preview {
  width: 64px; height: 64px; border-radius: 12px; border: 1px dashed var(--line);
  background-color: var(--cream); background-size: cover; background-position: center;
  flex-shrink: 0;
}

.step-indicator { margin-bottom: 14px; }

.question-step { text-align: center; }
.link-btn {
  display: block; margin: 18px auto 0; padding: 6px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.08em; color: var(--ink-dim);
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--coral); }
.char-count { text-align: right; font-family: var(--font-mono); font-size: 0.72rem; }
.rec-btn {
  width: 120px; height: 120px; border-radius: 50%; border: none; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #ff7a63, var(--coral));
  box-shadow: 0 0 0 1px rgba(255, 91, 65, .4), 0 18px 44px -12px rgba(255, 91, 65, .55);
  display: grid; place-items: center; margin: 18px auto 0;
}
.rec-btn .core { width: 42px; height: 42px; background: #fff; border-radius: 14px; }

.video-wrap { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--navy); margin-bottom: 18px; }
.video-wrap video { width: 100%; display: block; max-height: 420px; object-fit: cover; }
.timer {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 1rem; color: #fff;
  background: rgba(0, 0, 0, 0.5); padding: 6px 14px; border-radius: 999px;
}

/* ---------- upload page ---------- */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--coral); }
.dropzone:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.dropzone.is-over { border-color: var(--coral); background: rgba(255, 91, 65, 0.07); }
.dropzone.has-files { padding: 20px; }
.dz-main { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; }
.dropzone .hint-sm { margin-top: 6px; }

.file-list { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.file-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-dim); flex-shrink: 0; }
.file-remove {
  border: none; background: none; cursor: pointer;
  font-size: 1.3rem; line-height: 1; color: var(--ink-dim);
  padding: 0 4px; flex-shrink: 0;
}
.file-remove:hover { color: var(--coral); }
.file-list .file-total {
  background: none; border: none; padding: 0 4px;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-dim);
}

.or-rule {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 22px;
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-dim);
}
.or-rule::before, .or-rule::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.upload-bar {
  height: 8px; border-radius: 999px; background: var(--line);
  overflow: hidden; margin-top: 4px;
}
.upload-bar i { display: block; height: 100%; width: 0; background: var(--coral); transition: width .2s; }

.genlog { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.genlog li { font-family: var(--font-mono); font-size: 0.88rem; color: var(--ink-dim); }
.genlog li.completed { color: var(--ink); }
.genlog li.failed { color: var(--coral); }

.done-mark {
  width: 64px; height: 64px; border-radius: 50%; background: var(--lime); color: var(--ink);
  display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 18px;
}

audio { width: 100%; margin: 18px 0; }

/* ---------- chart page ---------- */
.chart-featured {
  background: var(--navy);
  color: #fff;
  margin-bottom: 32px;
}
.chart-featured h2 { color: #fff; }
.chart-featured .eyebrow { color: rgba(255, 255, 255, 0.6); }
.chart-featured-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.chart-rank { font-family: var(--font-display); font-size: 2.4rem; color: var(--coral); }
.chart-featured-body { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.chart-badge-lg {
  width: 72px; height: 72px; border-radius: 16px; font-size: 1.8rem;
  background-color: var(--coral); color: #fff;
}
.chart-featured .hint { color: rgba(255, 255, 255, 0.75); }
.chart-links { display: flex; gap: 14px; margin-top: 12px; }
.chart-links a { color: var(--lime); font-family: var(--font-mono); font-size: 0.82rem; text-decoration: underline; }
.chart-featured audio { max-width: 340px; }

.chart-row {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.chart-row:last-child { border-bottom: none; }
.chart-row .rank-num { font-family: var(--font-display); font-size: 1.3rem; width: 44px; flex-shrink: 0; }
.chart-row .badge { background-color: var(--sky); }
.chart-row-body { flex: 1; min-width: 0; }
.chart-row-body h3 { text-transform: none; font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin: 0 0 2px; }
.chart-row-body p { color: var(--ink-dim); font-size: 0.86rem; margin: 0; }
.chart-row .chart-links { margin-top: 6px; }
.chart-row .chart-links a { color: var(--ink-dim); }

.mv { font-family: var(--font-mono); font-size: 0.82rem; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.mv--up { background: rgba(168, 217, 124, 0.25); color: #3f7a1f; }
.mv--down { background: rgba(255, 91, 65, 0.15); color: var(--coral); }
.mv--flat { background: var(--line); color: var(--ink-dim); }
.mv--new { background: rgba(111, 198, 224, 0.25); color: #1a6f8c; }

@keyframes chart-land {
  0% { opacity: 0; transform: translateY(-56px) scale(1.02); }
  65% { opacity: 1; transform: translateY(5px); }
  100% { opacity: 1; transform: none; }
}
@keyframes chart-glow {
  0%, 55% { box-shadow: 0 0 0 3px var(--lime), 0 8px 28px rgba(168, 217, 124, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(168, 217, 124, 0); }
}
.landing { animation: chart-land 0.9s cubic-bezier(0.2, 0.8, 0.3, 1.15) both, chart-glow 3.6s ease-out both; }

.vote-wrap { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.vote-btn { padding: 6px 14px; font-size: 0.85rem; }
.vote-btn.voted { pointer-events: none; opacity: 0.55; }
.vote-count { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-dim); white-space: nowrap; }

/* ---------- cassette chart ---------- */
.cassette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.cassette {
  position: relative;
  background: linear-gradient(#26262e, #1b1b21);
  border: 1px solid #3a3a44;
  border-radius: 14px;
  padding: 22px 18px 14px;
  box-shadow: 0 12px 26px rgba(16, 24, 51, 0.28);
  transition: transform 0.18s, box-shadow 0.18s;
}
.cassette:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(16, 24, 51, 0.38); }
.cassette--top { border-color: var(--tape); box-shadow: 0 12px 30px rgba(16, 24, 51, 0.4), 0 0 0 2px var(--tape); }

.screw {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #7c7c88, #3c3c46);
}
.screw::after {
  content: '';
  position: absolute; left: 1px; right: 1px; top: 50%;
  height: 1px; background: rgba(0, 0, 0, 0.55);
  transform: rotate(45deg);
}
.screw--tl { top: 7px; left: 7px; }
.screw--tr { top: 7px; right: 7px; }
.screw--bl { bottom: 7px; left: 7px; }
.screw--br { bottom: 7px; right: 7px; }

.cassette-label {
  background: var(--tape);
  border-radius: 8px 8px 2px 2px;
  padding: 10px 12px 12px;
  color: var(--ink);
}
.cassette-label-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cassette-rank {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}
.cassette-label-main { display: flex; align-items: center; gap: 12px; }
.cassette-badge {
  width: 52px; height: 52px;
  border-radius: 10px;
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.85);
  background-size: cover;
  background-position: center;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.cassette-name-wrap { min-width: 0; }
.cassette-name {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cassette-industry {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.75;
  margin-top: 2px;
}
.cassette-quote {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 0, 0, 0.3);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cassette-window {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 12px 26px 0;
  padding: 8px 14px;
  background: #101014;
  border: 1px solid #3a3a44;
  border-radius: 999px;
}
.reel {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background:
    repeating-conic-gradient(#e8e4da 0deg 24deg, #6b6b75 24deg 60deg);
  border: 4px solid #2c2c34;
  transition: transform 0.6s ease;
}
.reel i {
  position: absolute; inset: 30%;
  border-radius: 50%;
  background: #101014;
}
.cassette:hover .reel { transform: rotate(120deg); }
.tape-band {
  flex: 1;
  height: 8px;
  margin: 0 6px;
  background: linear-gradient(#3b2a1c, #241a12);
  border-radius: 2px;
}

.cassette-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.cassette-foot .play-link { font-size: 0.85rem; padding: 8px 16px; }
.cassette-foot .chart-links { margin: 0; }
.cassette-foot .chart-links a { color: var(--ink-dim); }
.cassette-foot .vote-wrap { margin: 0; }
.cassette-foot .play-link {
  background: var(--coral);
  color: #fff;
  border-color: transparent;
}
.cassette-foot .chart-links a { color: #b9b9c4; }
.cassette-foot .vote-count { color: #b9b9c4; }
.cassette-foot .vote-btn { color: #e8e4da; border-color: #4a4a55; }

/* ---------- responsive / touch ----------
   The layouts are fluid and measure clean down to 320px, so phones keep the same
   structure; what needed fixing was type size and hit area. Form labels and
   eyebrows sat at 10.9-11.5px, and several links were 17-20px tall against a
   ~44px finger. `hover: none` targets touch input rather than a width guess --
   a narrow desktop window keeps the tighter mouse-sized controls. */
@media (max-width: 900px) {
  label.field-label { font-size: 0.8rem; white-space: normal; }
  .eyebrow { font-size: 0.8rem; }
  .cassette-industry { font-size: 0.78rem; }
}

@media (hover: none) {
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn--block { display: flex; }
  a.brand, a.eyebrow, .chart-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
