/* Music Collection landing — tokens mirror frontend/src/index.css */

:root {
  --bg: #f3f7fc;
  --surface: #ffffff;
  --surface-2: #eaf2fb;
  --border: #d4e2f1;
  --border-strong: #aecbe6;
  --text: #1f2d3d;
  --text-muted: #5d7287;
  --primary: #3f8fd6;
  --primary-hover: #2f7abf;
  --primary-contrast: #ffffff;
  --primary-tint: #e6f1fb;
  --primary-tint-border: #aecbe6;
  --status-wishlist-stripe: #c4b5e0;
  --status-wishlist-tint: #f3eef9;
  --status-ordered-stripe: #e0c48a;
  --status-ordered-tint: #faf4e8;
  --status-for-sale-stripe: #8fc4b0;
  --status-for-sale-tint: #eaf6f1;
  --danger: #c0533f;
  --danger-hover: #a4432f;
  --danger-bg: #fbeae6;
  --success: #5a9e6a;
  --warning: #c79a3a;
  --focus: #7fb8e8;
  --link-visited: #4a7aad;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 3px rgba(31, 45, 61, 0.08), 0 1px 2px rgba(31, 45, 61, 0.06);
  --shadow-lg: 0 10px 30px rgba(31, 45, 61, 0.16);
  --overlay-bg: rgba(15, 23, 42, 0.45);
  --on-danger: #ffffff;
  --alert-error-border: #f0b8b5;
  --alert-warn-bg: #fff4e0;
  --alert-warn-border: #f0d9a8;
  --max-width: 1080px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: "Figtree", "Segoe UI", "Helvetica Neue", sans-serif;
  --header-h: 3.5rem;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0f1620;
  --surface: #18222f;
  --surface-2: #1f2c3b;
  --border: #2b3a4d;
  --border-strong: #3a4d63;
  --text: #e6edf3;
  --text-muted: #8aa0b5;
  --primary: #5cb0e6;
  --primary-hover: #74c0ec;
  --primary-contrast: #0a1118;
  --primary-tint: #1c2a3a;
  --primary-tint-border: #2b3a4d;
  --status-wishlist-stripe: #7a6a9a;
  --status-wishlist-tint: #2a2435;
  --status-ordered-stripe: #9a7e4a;
  --status-ordered-tint: #2e281c;
  --status-for-sale-stripe: #4a8a72;
  --status-for-sale-tint: #1e2e28;
  --danger: #d9684f;
  --danger-hover: #e57a60;
  --danger-bg: #3a1e18;
  --success: #6ab87a;
  --warning: #d9a944;
  --focus: #5cb0e6;
  --link-visited: #7aa8c9;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --overlay-bg: rgba(0, 0, 0, 0.6);
  --on-danger: #ffffff;
  --alert-error-border: #5a2e22;
  --alert-warn-bg: #2e2516;
  --alert-warn-border: #4a3a1a;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 60% at 10% -10%, var(--primary-tint) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 20%, rgba(63, 143, 214, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--surface-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 90% 60% at 10% -10%, rgba(92, 176, 230, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 20%, rgba(92, 176, 230, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, #0c121a 100%);
  background-attachment: fixed;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:visited {
  color: var(--link-visited);
}
a:hover {
  text-decoration: underline;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* —— Site chrome (landing + user-guide) —— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand:visited {
  color: var(--text);
}
.brand:hover {
  color: var(--primary);
  text-decoration: none;
}

.site-header__spacer {
  flex: 1;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0.35rem;
  border-radius: var(--radius-sm);
}

.lang-switch a:hover {
  color: var(--primary);
  text-decoration: none;
}

.lang-switch a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.theme-control {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-control__label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--primary);
}

.header-pdf {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--primary);
  margin-right: 0.35rem;
}
.header-pdf:hover {
  text-decoration: none;
  color: var(--primary-hover);
}

.site-footer {
  margin-top: 4rem;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

/* —— Landing hero —— */

.hero {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: center;
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  gap: 2rem;
  grid-template-columns: 1fr 1.05fr;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.85rem;
  color: var(--text);
  animation: rise-in 0.7s ease both;
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: var(--text);
  animation: rise-in 0.7s ease 0.08s both;
}

.hero__lead {
  margin: 0;
  max-width: 28rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  animation: rise-in 0.7s ease 0.14s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise-in 0.7s ease 0.2s both;
}

.cta-row--center {
  justify-content: center;
}

.closing {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 3.5rem 0 1rem;
  text-align: center;
}

.closing__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 650;
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.closing__lead {
  margin: 0 auto 1.5rem;
  max-width: 28rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn:visited {
  /* keep CTA colors */
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-contrast);
}
.btn--primary:visited {
  color: var(--primary-contrast);
}
.btn--primary:hover {
  background: var(--primary-hover);
  color: var(--primary-contrast);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:visited {
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-tint);
}

.hero__visual {
  justify-self: center;
  width: min(100%, 480px);
  animation: float-in 0.9s ease 0.12s both;
}

.hero__visual svg {
  width: 100%;
  filter: drop-shadow(var(--shadow-lg));
}

.hero__visual .vinyl-disc {
  transform-box: view-box;
  transform-origin: 300px 180px;
  animation: vinyl-spin 48s linear infinite;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* —— Feature sections —— */

.features {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 1rem 0 3rem;
  display: grid;
  gap: 3.5rem;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
}

.feature--flip {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.feature--flip .feature__copy {
  order: 2;
}
.feature--flip .feature__art {
  order: 1;
}

.feature__copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
  color: var(--text);
}

.feature__copy p {
  margin: 0;
  color: var(--text-muted);
  max-width: 32rem;
  font-size: 1.05rem;
}

.feature__art svg {
  width: min(100%, 380px);
  margin-inline: auto;
  opacity: 0.95;
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.5rem;
  }

  .hero__visual {
    order: -1;
    width: min(100%, 320px);
  }

  .hero__brand {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .feature,
  .feature--flip {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature--flip .feature__copy,
  .feature--flip .feature__art {
    order: unset;
  }

  .feature__art {
    order: -1;
  }
}

/* —— User-guide / releases doc chrome —— */

.doc-page {
  width: min(100% - 2rem, 920px);
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.doc-back {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.doc-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem 2rem;
  box-shadow: var(--shadow);
}

.prose h1 {
  font-family: var(--font-display);
  margin: 0 0 0.75rem;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.prose h2 {
  font-family: var(--font-display);
  margin: 1.6rem 0 0.55rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.3rem;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.prose h3 {
  margin: 1.15rem 0 0.35rem;
  font-size: 1.08rem;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.prose h4 {
  margin: 0.9rem 0 0.25rem;
  font-size: 1rem;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.prose p {
  margin: 0 0 0.75rem;
}

.prose ul,
.prose ol {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.25rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--surface-2);
}

.prose blockquote {
  margin: 0.75rem 0;
  padding: 0.45rem 0.85rem;
  border-left: 4px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
}

.prose a {
  color: var(--primary);
}

.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0.5rem 0 0.85rem;
  box-shadow: var(--shadow);
}
