/* Spotify-Proof — Court document typography */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Noto+Serif+SC:wght@400;600;700&display=swap');

:root {
  --paper: #f5f0e6;
  --ink: #1a1a1a;
  --seal: #8b0000;
  --gold: #b8860b;
  --border: #2c2c2c;
  --muted: #555;
  --highlight: #f0e6d3;
}

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

body {
  font-family: 'EB Garamond', 'Noto Serif SC', Georgia, 'Times New Roman', serif;
  background: #2a2520;
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}

.page {
  max-width: 780px;
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  padding: 48px 56px 64px 56px;
  box-shadow: 0 0 60px rgba(0,0,0,0.3);
  position: relative;
}

.page::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(0,0,0,0.02) 28px, rgba(0,0,0,0.02) 29px);
  pointer-events: none;
}

/* ─── Masthead ─── */
.masthead {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 8px;
}

.seal {
  width: 64px;
  height: 64px;
  border: 3px solid var(--seal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: var(--seal);
  font-family: 'EB Garamond', serif;
  letter-spacing: 1px;
  flex-shrink: 0;
  background: rgba(139,0,0,0.03);
}

.masthead-text { flex: 1; }

.masthead h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
  line-height: 1.1;
}

.tagline {
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
}

.lang-switch { flex-shrink: 0; }

.lang-link {
  font-size: 14px;
  color: var(--seal);
  text-decoration: none;
  border: 1px solid var(--seal);
  padding: 4px 12px;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}

.lang-link:hover {
  background: var(--seal);
  color: var(--paper);
}

/* ─── Dividers ─── */
.divider-thick {
  height: 4px;
  background: var(--border);
  margin: 12px 0 32px 0;
}

.divider-thin {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* ─── Intro ─── */
.intro { margin-bottom: 32px; }

.lede {
  font-size: 22px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.lede em { color: var(--seal); font-style: italic; }
.lede strong { font-weight: 700; }

.instructions {
  font-size: 15px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.6;
}

/* ─── Input ─── */
.input-section { margin-bottom: 32px; }

.input-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.song-input {
  font-family: 'EB Garamond', 'Noto Serif SC', Georgia, serif;
  font-size: 17px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.5);
  color: var(--ink);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.song-input:focus {
  border-color: var(--seal);
  box-shadow: 0 0 0 2px rgba(139,0,0,0.1);
}

.song-input::placeholder { color: #999; font-style: italic; }

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-copy, .btn-share {
  font-family: 'EB Garamond', 'Noto Serif SC', Georgia, serif;
  font-size: 17px;
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
  font-weight: 600;
}

.btn-primary {
  background: var(--seal);
  color: var(--paper);
  border: 2px solid var(--seal);
}

.btn-primary:hover { background: #a00000; }

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

.btn-secondary {
  background: transparent;
  color: var(--border);
  border: 2px solid var(--border);
}

.btn-secondary:hover { background: rgba(0,0,0,0.05); }

.input-hint {
  font-size: 14px;
  color: var(--seal);
  margin-top: 8px;
  min-height: 20px;
}

/* ─── Brief ─── */
.brief-container {
  margin-top: 32px;
}

.brief-document {
  border: 2px solid var(--border);
  padding: 40px 44px;
  background: #fdfaf2;
  position: relative;
}

.brief-document::before {
  content: '';
  position: absolute;
  top: 8px; left: 8px; right: 8px; bottom: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  pointer-events: none;
}

.court-header {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--ink);
}

.case-number {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 24px;
  font-family: 'EB Garamond', monospace;
}

.brief-section {
  margin-bottom: 24px;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--seal);
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(139,0,0,0.2);
  padding-bottom: 4px;
}

.brief-text {
  font-size: 17px;
  line-height: 1.8;
  text-align: justify;
}

.exhibit {
  margin-bottom: 16px;
  padding-left: 24px;
  position: relative;
  font-size: 16px;
  line-height: 1.7;
}

.exhibit::before {
  content: '\00A7';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.verdict-box {
  border: 3px double var(--seal);
  padding: 24px 32px;
  margin: 32px 0;
  text-align: center;
  background: var(--highlight);
}

.verdict-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--seal);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.verdict-text {
  font-size: 16px;
  line-height: 1.7;
}

.score-display {
  text-align: center;
  margin: 24px 0;
}

.score-number {
  font-size: 56px;
  font-weight: 700;
  color: var(--seal);
  line-height: 1;
}

.score-label {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.genre-tag {
  font-size: 12px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
}

/* ─── Payment ─── */
.payment-section { margin: 32px 0; }

.section-heading {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}

.payment-desc {
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.payment-box {
  border: 2px solid var(--border);
  padding: 24px;
  background: rgba(255,255,255,0.4);
  text-align: center;
}

.price-tag {
  font-size: 36px;
  font-weight: 700;
  color: var(--seal);
}

.price-note {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.wallet-box {
  margin: 16px 0;
}

.wallet-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.wallet-address {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  border-radius: 2px;
  word-break: break-all;
  margin-bottom: 8px;
}

.btn-copy {
  font-size: 14px;
  padding: 6px 16px;
  background: var(--border);
  color: var(--paper);
  border: none;
  border-radius: 2px;
  cursor: pointer;
}

.btn-copy:hover { background: #000; }

.payment-instructions {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}

.coming-later {
  font-size: 13px;
  color: #999;
  margin-top: 8px;
  font-style: italic;
}

/* ─── Share ─── */
.share-section { margin: 32px 0; }

.share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-share {
  font-size: 15px;
  padding: 8px 20px;
  background: transparent;
  color: var(--border);
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
}

.btn-share:hover { background: rgba(0,0,0,0.05); }

/* ─── Footer ─── */
.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.1);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-links {
  margin-top: 8px;
}

.footer-links a {
  color: var(--seal);
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

/* ─── Loading ─── */
.loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: var(--muted);
  font-style: italic;
}

/* ─── Mobile ─── */
@media (max-width: 640px) {
  .page { padding: 24px 20px 40px 20px; }
  .masthead { flex-wrap: wrap; }
  .masthead h1 { font-size: 26px; }
  .lede { font-size: 18px; }
  .brief-document { padding: 20px 16px; }
  .court-header { font-size: 17px; }
  .verdict-title { font-size: 19px; }
  .score-number { font-size: 42px; }
  .action-row { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; }
}
