/* The Vinyl Matrix — site styles (public brand foundation, V1.4-B; internals stay matrix-binder-web) */

/* ------------------------------------------------------------------ */
/* Brand design tokens — the single source for site colors (V1.4-B).  */
/* Black / white / deep red, premium-industrial. Change here, not in  */
/* individual rules.                                                  */
/* ------------------------------------------------------------------ */
:root {
    /* Core brand */
    --tvm-black: #121316;          /* brand black — chrome (header/footer) */
    --tvm-white: #f6f5f3;          /* brand off-white */
    --tvm-red: #9e1b1e;            /* deep red accent */
    --tvm-red-hover: #c22226;      /* accent hover/active */

    /* Surfaces */
    --tvm-bg: #f2f1ef;             /* page background */
    --tvm-surface: #ffffff;        /* cards, tables */
    --tvm-surface-muted: #eae8e5;  /* table headers, subtle fills */

    /* Borders */
    --tvm-border: #d8d5d1;
    --tvm-border-strong: #b9b5b0;

    /* Text */
    --tvm-text: #1b1c1e;           /* primary text */
    --tvm-text-muted: #66655f;     /* secondary text */
    --tvm-text-on-dark: #d9d7d2;   /* body text on black chrome */
    --tvm-text-on-dark-muted: #a3a19b;

    /* States */
    --tvm-focus: #c22226;          /* focus ring */

    /* Layout badges (functional color-coding, kept from pre-brand UI) */
    --badge-standard: #2c6dba;
    --badge-extended: #8e44ad;
    --badge-boxset: #c0712c;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--tvm-text);
    background: var(--tvm-bg);
    margin: 0;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Keyboard focus — visible on light and dark surfaces alike */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--tvm-focus);
    outline-offset: 2px;
}

/* Header + navigation — black chrome, red accent rule */
.site-header {
    background: var(--tvm-black);
    color: var(--tvm-white);
    border-bottom: 2px solid var(--tvm-red);
    padding: 16px 0;
}

/* Text wordmark (temporary treatment — a final logo asset slots in here) */
.site-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tvm-white);
}

.site-tagline {
    margin: 2px 0 10px 0;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--tvm-text-on-dark-muted);
}

.site-nav a {
    color: var(--tvm-text-on-dark);
    text-decoration: none;
    margin-right: 16px;
    font-weight: bold;
}

.site-nav a:hover {
    color: var(--tvm-white);
    text-decoration: underline;
    text-decoration-color: var(--tvm-red-hover);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* Main content */
main.container {
    padding-top: 24px;
    padding-bottom: 24px;
}

h1, h2, h3 {
    color: var(--tvm-text);
}

h2 {
    margin-top: 28px;
    margin-bottom: 8px;
}

hr {
    border: none;
    border-top: 1px solid var(--tvm-border);
    margin: 24px 0;
}

/* Forms (search + filters) */
form p {
    margin: 8px 0;
}

label {
    font-weight: bold;
    margin-right: 4px;
}

input[type="text"],
select {
    padding: 4px 6px;
    font-size: 14px;
    border: 1px solid var(--tvm-border-strong);
    border-radius: 3px;
    background: var(--tvm-surface);
    color: var(--tvm-text);
}

button {
    padding: 5px 12px;
    font-size: 14px;
    cursor: pointer;
    background: var(--tvm-black);
    color: var(--tvm-white);
    border: 1px solid var(--tvm-black);
    border-radius: 3px;
}

button:hover {
    background: var(--tvm-red);
    border-color: var(--tvm-red);
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    background: var(--tvm-surface);
}

th, td {
    border: 1px solid var(--tvm-border);
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--tvm-surface-muted);
}

tr:nth-child(even) td {
    background: #f7f6f4;
}

a {
    color: var(--tvm-red);
}

a:hover {
    color: var(--tvm-red-hover);
}

/* Hero / landing section (collection page) */
.hero {
    background: var(--tvm-surface);
    border: 1px solid var(--tvm-border);
    border-left: 3px solid var(--tvm-red);
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
}

.hero h1 {
    margin: 0 0 8px 0;
}

/* Emotional brand line — collection hero only, by design */
.hero-motto {
    margin: 0 0 12px 0;
    font-style: italic;
    color: var(--tvm-red);
}

.hero-description {
    margin: 0 0 20px 0;
    max-width: 640px;
    color: var(--tvm-text-muted);
}

/* Stats row / cards */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stat-card {
    flex: 1 1 120px;
    background: var(--tvm-surface);
    border: 1px solid var(--tvm-border);
    border-radius: 6px;
    padding: 12px 16px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: var(--tvm-text);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tvm-text-muted);
}

/* Spacing above the search / filter controls */
.collection-controls {
    margin-top: 8px;
    margin-bottom: 16px;
}

/* Results section (collection page) */
.results {
    margin-top: 24px;
}

.results-heading {
    margin-bottom: 4px;
}

.result-count {
    margin-top: 0;
    color: var(--tvm-text-muted);
}

/* Album results table refinements */
.album-table th {
    background: var(--tvm-surface-muted);
    color: var(--tvm-text);
    font-weight: bold;
}

.album-table tbody tr:hover td {
    background: var(--tvm-surface-muted);
}

/* Layout badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.4;
    color: #fff;
    background: var(--tvm-text-muted);
}

.badge-standard {
    background: var(--badge-standard);
}

.badge-extended {
    background: var(--badge-extended);
}

.badge-boxset {
    background: var(--badge-boxset);
}

/* Collection table — cover thumbnails */
.cover-cell {
    width: 60px;
    text-align: center;
}

.cover-thumb {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid var(--tvm-border);
    border-radius: 3px;
    background: var(--tvm-surface);
}

.no-cover {
    display: inline-block;
    font-size: 11px;
    color: var(--tvm-text-muted);
    font-style: italic;
}

/* Empty state */
.empty-state {
    background: var(--tvm-surface-muted);
    border: 1px solid var(--tvm-border-strong);
    border-radius: 6px;
    padding: 20px;
    color: var(--tvm-text-muted);
}

.empty-state p {
    margin: 4px 0;
}

/* Album detail — header */
.album-header {
    background: var(--tvm-surface);
    color: var(--tvm-text);
    border: 1px solid var(--tvm-border);
    border-left: 3px solid var(--tvm-red);
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
}

/* Album detail — header with cover image */
.album-header--with-cover {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.album-cover {
    flex: 0 0 auto;
}

.album-cover img {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--tvm-border);
    border-radius: 4px;
    background: var(--tvm-surface);
}

.album-header-info {
    flex: 1 1 280px;
    min-width: 0;
}

.album-title {
    color: var(--tvm-text);
    margin: 0 0 4px 0;
    font-size: 26px;
}

.album-artist {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--tvm-text-muted);
}

.album-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.album-meta-item {
    font-size: 14px;
}

/* Album detail — sections */
.detail-section {
    background: var(--tvm-surface);
    border: 1px solid var(--tvm-border);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.detail-section h2 {
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tvm-border);
}

.detail-section h3 {
    margin-bottom: 4px;
}

/* Album detail — metadata key/value grid */
.info-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 6px 16px;
    margin: 0;
}

.info-grid dt {
    font-weight: bold;
    color: var(--tvm-text-muted);
}

.info-grid dd {
    margin: 0;
}

/* Album detail — tables */
.detail-table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    background: var(--tvm-surface);
}

.detail-table th {
    background: var(--tvm-surface-muted);
    text-align: left;
    padding: 6px 10px;
    border: 1px solid var(--tvm-border);
}

.detail-table td {
    padding: 6px 10px;
    border: 1px solid var(--tvm-border);
    vertical-align: top;
}

.detail-table tbody tr:nth-child(even) td {
    background: #f7f6f4;
}

/* ------------------------------------------------------------------ */
/* Public landing page (Phase 4A10-LP) — bare-root front door only.    */
/* ------------------------------------------------------------------ */

.landing-hero {
    text-align: center;
    padding: 48px 16px 40px;
}

/* Pure-CSS vinyl record — no image asset needed. Concentric grooves via
   repeating-radial-gradient, red center label via ::after. Decorative
   only (aria-hidden in the template). */
.landing-record {
    width: 120px;
    height: 120px;
    margin: 0 auto 28px;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        var(--tvm-text) 0px 2px,
        var(--tvm-border-strong) 2px 4px
    );
    position: relative;
}

.landing-record::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--tvm-red);
    box-shadow: 0 0 0 3px var(--tvm-bg);
}

.landing-hero .hero-motto {
    font-size: 19px;
    margin: 0 0 16px 0;
}

.landing-description {
    max-width: 520px;
    margin: 0 auto 28px;
    color: var(--tvm-text-muted);
    font-size: 16px;
}

.landing-cta {
    display: inline-block;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    color: var(--tvm-white);
    background: var(--tvm-black);
    border: 1px solid var(--tvm-black);
    border-radius: 4px;
}

.landing-cta:hover {
    background: var(--tvm-red);
    border-color: var(--tvm-red);
    color: var(--tvm-white);
}

/* Footer — black chrome mirroring the header */
.site-footer {
    background: var(--tvm-black);
    border-top: 2px solid var(--tvm-red);
    margin-top: 32px;
    padding: 16px 0;
    color: var(--tvm-text-on-dark-muted);
    font-size: 14px;
}
