/* ============================================================
   Burn CD — Design Tokens (source of truth)
   Consumed via var(--token). Do not hard-code hex elsewhere.
   ============================================================ */

:root {
  /* ---- Color: surfaces ---- */
  --paper:           #F4ECE0;
  --paper-raised:    #FBF4E8;
  --paper-sunken:    #EBE1D2;

  /* ---- Color: ink ---- */
  --ink:             #1C1714;
  --ink-2:           #5A4F45;
  --ink-3:           #8A7D70;
  --line:            #D8CCB6;

  /* ---- Color: accents (Y2K, used sparingly) ---- */
  --accent-magenta:  #E63E92;
  --accent-electric: #2C6FE0;
  --accent-yellow:   #F4C24C;

  /* ---- Color: status ---- */
  --success-ink:     #1F6B3F;
  --success-bg:      #E4F0DB;
  --error-ink:       #B3322C;
  --error-bg:        #F7E0DC;

  /* ---- Color: the disc ---- */
  --disc-chrome: linear-gradient(135deg,
    #EFE7DA 0%,
    #CFC2DA 30%,
    #CFE0EE 55%,
    #E8D9B8 78%,
    #EFE7DA 100%);
  --disc-edge:    #B9AC95;

  /* ---- Typography ---- */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Public Sans", "Helvetica Neue", system-ui, sans-serif;
  --font-hand:    "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --fs-h1:      clamp(2.0rem, 6vw, 3.25rem);
  --fs-h2:      clamp(1.4rem, 3.5vw, 1.9rem);
  --fs-h3:      1.1rem;
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-eyebrow: 0.75rem;
  --fs-hand:    clamp(1.25rem, 4vw, 1.6rem);

  --lh-tight:   1.15;
  --lh-body:    1.55;

  --tracking-eyebrow: 0.14em;

  /* ---- Spacing (8-base) ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* ---- Layout ---- */
  --maxw:       1140px;
  --maxw-read:  720px;
  --gutter:     clamp(16px, 5vw, 32px);

  /* ---- Radii ---- */
  --r-card: 6px;
  --r-btn:  4px;
  --r-pill: 999px;

  /* ---- Shadows (paper, not Material) ---- */
  --shadow-paper:   0 1px 0 rgba(28,23,20,0.04), 0 1px 2px rgba(28,23,20,0.04);
  --shadow-sticker: 0 2px 0 rgba(28,23,20,0.10);

  /* ---- Motion ---- */
  --t-fast: 120ms;
  --t-spin: 8s;

  /* ---- Field caps (must match backend validators) ---- */
  --field-max-title:     60;
  --field-max-recipient: 40;
  --field-max-message:   280;
  --field-max-track:     80;
  --field-max-artist:    60;
  --field-max-tracks:    12;
}

/* ============================================================
   Base element styling shared by every mockup
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-4);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--sp-4); }

a {
  color: var(--accent-magenta);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration: underline; }

/* ---- Layout primitives ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-read { max-width: var(--maxw-read); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- Header / footer ---- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-5) var(--gutter);
  max-width: var(--maxw); margin: 0 auto;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.15rem;
  color: var(--ink); text-decoration: none;
  letter-spacing: -0.02em;
}
.site-header nav { display: flex; gap: var(--sp-4); }
.site-header nav a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-small); }
.site-header nav a:hover { color: var(--ink); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--sp-6) var(--gutter);
  max-width: var(--maxw); margin: var(--sp-9) auto 0;
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  align-items: center; justify-content: space-between;
  color: var(--ink-2); font-size: var(--fs-small);
}
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-body); font-weight: 600;
  font-size: var(--fs-body);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: transform var(--t-fast) ease-out, background var(--t-fast) ease-out;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent-magenta);
  color: #FFFFFF;
}
.btn-primary:hover { background: #C92E7C; }

.btn-ghost {
  background: transparent;
  color: var(--accent-magenta);
  border-color: var(--accent-magenta);
}
.btn-ghost:hover { background: rgba(230,62,146,0.08); }

.btn-quiet {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line);
}
.btn-quiet:hover { color: var(--ink); border-color: var(--ink-3); }

.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---- Cards & paper surfaces ---- */
.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-paper);
  padding: var(--sp-5);
}

/* ---- Sticker ---- */
.sticker {
  display: inline-block;
  font-family: var(--font-hand);
  background: var(--accent-yellow);
  color: var(--ink);
  padding: 2px var(--sp-3);
  border-radius: var(--r-pill);
  transform: rotate(-2deg);
  box-shadow: var(--shadow-sticker);
  font-size: var(--fs-hand);
  line-height: 1.2;
}
.sticker--magenta { background: var(--accent-magenta); color: #FFFFFF; }
.sticker--electric { background: var(--accent-electric); color: #FFFFFF; }

/* ---- The disc ---- */
.disc {
  width: 240px; height: 240px;
  border-radius: 50%;
  background: var(--disc-chrome);
  border: 1px solid var(--disc-edge);
  box-shadow:
    inset 0 0 0 6px rgba(255,255,255,0.35),
    inset 0 0 24px rgba(28,23,20,0.18),
    var(--shadow-paper);
  position: relative;
  margin: 0 auto;
}
.disc::before {
  content: "";
  position: absolute; inset: 38%;
  background: var(--paper-raised);
  border: 1px solid var(--disc-edge);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(28,23,20,0.08);
}
.disc::after {
  content: "";
  position: absolute; inset: 47%;
  background: var(--paper);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(28,23,20,0.15);
}
.disc--cover {
  background:
    radial-gradient(circle at 50% 50%, transparent 38%, rgba(28,23,20,0.05) 38.5%, rgba(28,23,20,0.05) 100%),
    var(--disc-chrome);
}
.disc--cover .disc-cover-img {
  position: absolute; inset: 8%;
  border-radius: 50%;
  object-fit: cover;
  width: 84%; height: 84%;
  opacity: 0.92;
  mix-blend-mode: multiply;
}
.disc--spin { animation: spin var(--t-spin) linear infinite; }
.disc--silhouette {
  background: var(--paper-sunken);
  border-style: dashed;
  box-shadow: inset 0 0 0 6px rgba(255,255,255,0.5);
}

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

@media (prefers-reduced-motion: reduce) {
  .disc--spin { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---- Eyebrow ---- */
.eyebrow {
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 600;
  margin-bottom: var(--sp-3);
}

/* ---- Status callouts ---- */
.callout {
  border-radius: var(--r-card);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-small);
  border: 1px solid transparent;
}
.callout--error { background: var(--error-bg); color: var(--error-ink); border-color: rgba(179,50,44,0.25); }
.callout--success { background: var(--success-bg); color: var(--success-ink); border-color: rgba(31,107,63,0.25); }
.callout--info { background: var(--paper-raised); color: var(--ink-2); border-color: var(--line); }

/* ---- Forms ---- */
label.field { display: block; margin-bottom: var(--sp-4); }
label.field > span { display: block; font-weight: 600; margin-bottom: var(--sp-2); font-size: var(--fs-small); }
label.field .helper { color: var(--ink-3); font-size: var(--fs-small); margin-top: var(--sp-1); }
input[type="text"], input[type="url"], textarea, select {
  width: 100%;
  font-family: var(--font-body); font-size: var(--fs-body);
  padding: var(--sp-3) var(--sp-4);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: 3px solid var(--accent-magenta);
  outline-offset: 1px;
  border-color: var(--accent-magenta);
}
input[aria-invalid="true"] { border-color: var(--error-ink); }

/* ---- Focus ring for keyboard ---- */
:focus-visible {
  outline: 3px solid var(--accent-magenta);
  outline-offset: 2px;
}

/* ---- Visually hidden but readable by AT ---- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---- Responsive helpers ---- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .disc { width: 320px; height: 320px; }
}
