/* Emperor Discography — site styles */
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
:root {
  --black: #000;
  --bone: #dcd6c8;
  --bone-dim: #b9b3a5;
  --ash: #8c877c;
  --rule: #2a2823;
  --rule-soft: #1a1916;
  --steel: #9fb0c8;
  --frost: #eef2f8;
  --blood: #9a4a3f;
  --side: 264px;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4rem; }
body {
  margin: 0;
  background: var(--black);
  color: var(--bone);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; }
a { color: var(--steel); text-decoration-color: rgba(159, 176, 200, .35); text-underline-offset: .18em; }
a:hover { color: var(--frost); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bone); color: #000; padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: 0; }
.muted { color: var(--ash); }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; color: var(--bone); line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); margin: .2em 0 .35em; letter-spacing: .02em; }
h2 { font-size: 1.2rem; letter-spacing: .06em; margin: 2.2rem 0 .9rem; color: var(--bone-dim); }
h3 { font-size: 1.05rem; letter-spacing: .04em; margin: 1.6rem 0 .5rem; }
h4 { font-size: .9rem; letter-spacing: .06em; color: var(--ash); margin: 1rem 0 .4rem; }
p { margin: 0 0 1em; max-width: 72ch; }
ul, ol { padding-left: 1.3em; }

/* ---------- frame: sidebar + main (the old frameset, kept) ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  overflow-y: auto; padding: 1.75rem 1.5rem 2rem;
  border-right: 1px solid var(--rule);
  background: var(--black);
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
main { margin-left: var(--side); padding: 2rem clamp(1rem, 4vw, 3.5rem) 3rem; max-width: calc(var(--side) + 1080px); }
.topbar { display: none; }

.wordmark { display: block; font-family: var(--display); color: var(--bone); text-decoration: none; line-height: 1.05; }
.wordmark span:first-child { display: block; font-size: 1.55rem; font-weight: 600; letter-spacing: .14em; }
.wordmark span:last-child { display: block; font-size: .78rem; letter-spacing: .38em; color: var(--ash); margin-top: .2rem; }
.wordmark:hover { color: var(--frost); }

.nav-group { margin-top: 1.6rem; }
.nav-group h2 { font-size: .74rem; letter-spacing: .2em; color: var(--ash); margin: 0 0 .45rem; }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a {
  display: block; padding: .18rem 0 .18rem .8rem; margin-left: -.8rem;
  color: var(--bone-dim); text-decoration: none; font-size: .98rem;
  border-left: 1px solid transparent;
}
.nav-group a:hover { color: var(--frost); border-left-color: var(--rule); }
.nav-group a[aria-current="page"], .nav-group a.in { color: var(--frost); border-left-color: var(--steel); }

/* ---------- search ---------- */
.search { position: relative; margin-top: 1.5rem; }
.search input {
  width: 100%; font: inherit; font-size: .92rem; color: var(--bone);
  background: var(--black); border: 1px solid var(--rule); border-radius: 2px;
  padding: .5rem .65rem;
}
.search input::placeholder { color: #6d695f; }
.search input:focus { border-color: var(--steel); outline: none; }
#results {
  position: absolute; z-index: 30; left: 0; right: -6rem; top: calc(100% + 4px);
  list-style: none; margin: 0; padding: .3rem 0; max-height: 60vh; overflow-y: auto;
  background: #000; border: 1px solid var(--rule); box-shadow: 0 12px 40px #000;
}
#results a { display: block; padding: .45rem .75rem; text-decoration: none; color: var(--bone); line-height: 1.3; }
#results a small { display: block; color: var(--ash); font-size: .8rem; margin-top: .1rem; }
#results a:hover, #results [aria-selected="true"] a { background: var(--rule-soft); color: var(--frost); }
#results .none { padding: .5rem .75rem; color: var(--ash); font-size: .9rem; }

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: .88rem; color: var(--ash); margin-bottom: 1rem; }
.crumbs a { color: var(--ash); text-decoration: none; }
.crumbs a:hover { color: var(--frost); }
.crumbs span { margin: 0 .35rem; color: #4a473f; }

/* ---------- home ---------- */
.hero { text-align: center; padding: 1rem 0 0; }
.hero .logo {
  width: min(680px, 100%); display: block; margin: 0 auto;
  mix-blend-mode: screen;
  animation: rise 2.4s ease-out both;
}
.masthead { margin: 0; font-size: inherit; line-height: 1; }
.masthead .subtitle {
  display: flex; align-items: center; justify-content: center; gap: 1.1em;
  margin: -.4rem auto 1.2rem; max-width: min(560px, 86%);
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(.9rem, 2.4vw, 1.3rem); letter-spacing: .62em; color: var(--bone-dim);
  animation: rise 2.4s ease-out .9s both;
}
/* letter-spacing trails the last letter; match it on the left so the word sits centred */
.masthead .subtitle::before { margin-right: .62em; }
.masthead .subtitle::before, .masthead .subtitle::after {
  content: ""; flex: 1; height: 1px; min-width: 1.5rem;
  background: linear-gradient(90deg, transparent, var(--ash));
}
.masthead .subtitle::after { background: linear-gradient(90deg, var(--ash), transparent); }
@keyframes rise { from { opacity: 0; filter: blur(6px) brightness(.4); } to { opacity: 1; filter: none; } }
.tagline { margin: .4rem auto 0; color: var(--bone-dim); font-style: italic; max-width: 46ch; }
.disclaimer { margin: .7rem auto 0; color: var(--ash); font-size: .82rem; letter-spacing: .02em; max-width: 58ch; }

.timeline { margin: 3rem 0 1rem; position: relative; }
.timeline ol {
  list-style: none; margin: 0; padding: 0 0 1rem; display: grid;
  grid-auto-flow: column; grid-auto-columns: minmax(84px, 1fr); gap: .8rem;
  overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
.timeline li { scroll-snap-align: start; }
.timeline a { display: block; text-decoration: none; color: var(--bone-dim); }
.timeline img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(.35) brightness(.85); transition: filter .3s; }
.timeline a:hover img, .timeline a:focus-visible img { filter: none; }
.timeline .yr { position: relative; display: block; font-family: var(--display); font-size: 1rem; color: var(--bone); margin-top: .9rem; padding-top: .9rem; }
.timeline .yr::before { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--bone); z-index: 1; }
.timeline .yr::after { content: ""; position: absolute; left: 0; top: 0; height: 1px; width: calc(100% + .8rem); background: var(--rule); }
.timeline li:last-child .yr::after { width: 100%; }
.timeline .nm { display: block; font-size: .82rem; line-height: 1.3; color: var(--ash); }
.timeline a:hover .nm { color: var(--frost); }

.news { max-width: 74ch; }
.news article { padding: 1.2rem 0; border-top: 1px solid var(--rule); }
.news h3 { margin: 0 0 .6rem; font-size: .95rem; color: var(--ash); }
.news .older { margin-top: 1rem; }

/* ---------- release (single pressing) ---------- */
.release-head { display: grid; grid-template-columns: max-content 1fr; gap: 2rem; align-items: start; }
.release-head .cover img { display: block; width: auto; max-width: min(300px, 100%); max-height: 420px; border: 1px solid var(--rule); }
.release-head h1 { margin-top: 0; }
.group .release-head .cover img { max-width: 240px; }
.sub { color: var(--bone-dim); font-style: italic; margin-top: -.2rem; }
.flag { display: inline-block; color: #e4b3aa; border: 1px solid var(--blood); padding: .05rem .55rem; font-size: .85rem; border-radius: 2px; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1.4rem; margin: 1.2rem 0 0; }
.specs dt { color: var(--ash); }
.specs dd { margin: 0; font-variant-numeric: tabular-nums; }
.release section, .group section { max-width: 80ch; }
.release .images, .group .pressings { max-width: none; }
.tracks { margin: 0 0 .8rem; padding-left: 2em; }
.tracks li { padding: .08rem 0; }
.tracks li::marker { color: var(--ash); font-variant-numeric: tabular-nums; }
.count { font-family: var(--text); font-size: .85rem; color: var(--ash); letter-spacing: 0; margin-left: .3rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 3rem; }
.lineup { list-style: none; padding: 0; margin: 0; }
.lineup li { padding: .1rem 0; }
.notes p { color: var(--bone); }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.5rem 1.25rem; align-items: start; }
.gallery figure { margin: 0; }
.gallery a { display: block; background: #050505; }
.gallery img { display: block; width: 100%; height: 220px; object-fit: contain; }
.gallery figcaption { font-size: .86rem; color: var(--ash); font-style: italic; margin-top: .45rem; line-height: 1.35; }
.btn { display: inline-block; border: 1px solid var(--rule); padding: .35rem .8rem; text-decoration: none; border-radius: 2px; }
.btn:hover { border-color: var(--steel); }

/* ---------- release lists (category pages) ---------- */
.releases { list-style: none; padding: 0; margin: 1rem 0 2rem; border-top: 1px solid var(--rule); }
.releases li { display: grid; grid-template-columns: 100px 1fr; gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.releases .thumb img { display: block; width: 100px; height: 100px; object-fit: cover; }
.releases .thumb a:hover img { outline: 1px solid var(--steel); }
.releases .title { font-size: 1.08rem; }
.releases .title > a:first-child { font-family: var(--display); font-size: 1.12rem; text-decoration: none; color: var(--bone); letter-spacing: .02em; }
.releases .title > a:first-child:hover { color: var(--frost); }
.releases .title > b:first-child { font-family: var(--display); font-weight: 400; font-size: 1.12rem; }
.releases .meta { display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; margin-top: .4rem; color: var(--ash); font-size: .92rem; font-variant-numeric: tabular-nums; }
.releases .body br + br { display: none; }

/* ---------- data tables ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0 2rem; }
table.data { width: 100%; border-collapse: collapse; font-size: .96rem; font-variant-numeric: tabular-nums; }
table.data th { text-align: left; font-family: var(--display); font-weight: 400; font-size: .78rem; letter-spacing: .14em; color: var(--ash); padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.data td { padding: .6rem .75rem .6rem 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
table.data tbody tr:hover td { background: #070707; }
table.data .note { display: block; color: var(--ash); font-size: .88rem; font-style: italic; line-height: 1.4; margin-top: .15rem; }
table.data tr.unofficial td { color: var(--bone-dim); }
table.data tr.unofficial td:first-child { box-shadow: inset 2px 0 0 var(--blood); padding-left: .6rem; }
table.data tr.group th { font-family: var(--display); color: var(--bone); font-size: .95rem; letter-spacing: .06em; padding-top: 1.6rem; }
table.data td[data-label="Official"], table.data th:last-child { text-align: center; }

table.layout { border-collapse: collapse; margin: 1rem 0; }
table.layout td { padding: .3rem 1.25rem .3rem 0; vertical-align: top; }

/* ---------- 100px thumbnails in layout tables (videos.html, sideprojects.html) ---------- */
table.layout img.vthumb { display: block; width: 100px; height: 100px; max-width: none; object-fit: cover; margin-bottom: .5rem; }
table.layout a.zoom:hover img.vthumb { outline: 1px solid var(--steel); }

.prose { max-width: 80ch; }
.prose li { margin: .2rem 0; }

.foot { margin-top: 4rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); color: var(--ash); font-size: .86rem; }
.foot p { max-width: 80ch; }
.foot a { color: var(--ash); }

/* ---------- musicians ---------- */
table.members td[data-label="Name"] .portrait { display: block; width: 104px; height: 128px; margin-bottom: .55rem; background: #050505; border: 1px solid var(--rule); overflow: hidden; }
table.members .portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: grayscale(.25); transition: filter .3s; }
table.members a.portrait:hover img, table.members a.portrait:focus-visible img { filter: none; }
table.members a.portrait:hover { border-color: var(--steel); }
table.members td[data-label="Dates"] { white-space: nowrap; }
table.members td[data-label="Name"] .portrait.none { display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 2rem; color: var(--rule); }

/* ---------- contact form ---------- */
.contact-form { display: grid; gap: 1rem; max-width: 40rem; margin: 1.5rem 0 2rem; }
.contact-form label { display: grid; gap: .3rem; color: var(--bone-dim); font-size: .95rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; font: inherit; color: var(--bone); background: var(--black);
  border: 1px solid var(--rule); border-radius: 2px; padding: .55rem .7rem;
}
.contact-form textarea { min-height: 10rem; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--steel); outline: none; }
.contact-form .hp { position: absolute; left: -9999px; }
.contact-form button { justify-self: start; font: inherit; font-family: var(--display); letter-spacing: .1em; color: var(--bone); background: none; border: 1px solid var(--rule); padding: .5rem 1.4rem; border-radius: 2px; cursor: pointer; }
.contact-form button:hover { border-color: var(--steel); color: var(--frost); }
.contact-form button:disabled { opacity: .5; cursor: default; }
.contact-form .form-status { margin: 0; color: var(--frost); }

/* ---------- lightbox ---------- */
#lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(0,0,0,.96); color: var(--bone); }
#lightbox::backdrop { background: #000; }
#lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 4rem; }
#lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; }
#lightbox figcaption { margin-top: .8rem; color: var(--bone-dim); font-style: italic; text-align: center; }
#lightbox button { position: absolute; background: none; border: 0; color: var(--bone); font-size: 2.4rem; line-height: 1; cursor: pointer; padding: .5rem 1rem; }
#lightbox button:hover { color: var(--frost); }
.lb-close { top: .5rem; right: .5rem; }
.lb-prev { left: .25rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .25rem; top: 50%; transform: translateY(-50%); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 40; background: rgba(0,0,0,.94);
    padding: .7rem 1rem; border-bottom: 1px solid var(--rule);
    backdrop-filter: blur(6px);
  }
  .topbar .wordmark span:first-child { font-size: 1.15rem; }
  .topbar .wordmark span:last-child { font-size: .62rem; }
  .menu-btn { font: inherit; font-family: var(--display); letter-spacing: .1em; color: var(--bone); background: none; border: 1px solid var(--rule); padding: .35rem .8rem; border-radius: 2px; }
  .topbar { height: 3.6rem; z-index: 50; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; z-index: 45; width: min(320px, 86vw); top: 3.6rem; padding-top: 1.25rem; box-shadow: 0 0 60px #000; }
  .sidebar.open { transform: none; }
  .sidebar > .wordmark { display: none; }
  .sidebar .search { margin-top: 0; }
  #results { right: 0; }
  main { margin-left: 0; padding: 1.25rem 1rem 2.5rem; }
  .release-head, .group .release-head { grid-template-columns: 1fr; gap: 1.25rem; }
  .release-head .cover { max-width: 320px; }
  .releases li { grid-template-columns: 72px 1fr; gap: 1rem; }
  .releases .thumb img { width: 72px; height: 72px; }
  table.layout img.vthumb { width: 72px; height: 72px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .gallery img { height: 160px; }
  .timeline ol { grid-auto-columns: 96px; }
  #lightbox figure { padding: 3rem .5rem; }

  /* stacked tables */
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { padding: .7rem 0; border-bottom: 1px solid var(--rule); }
  table.data td { border: 0; padding: .12rem 0 .12rem 8rem; position: relative; text-align: left !important; min-height: 1.6em; }
  table.data td::before { content: attr(data-label); position: absolute; left: 0; top: .2rem; width: 7.5rem; color: var(--ash); font-size: .85rem; line-height: 1.4; }
  table.data td:not([data-label]) { padding-left: 0; }
  table.layout, table.layout tbody { display: block; }
  table.layout tr { display: flex; flex-wrap: wrap; gap: 0 1rem; padding: .5rem 0; border-bottom: 1px solid var(--rule-soft); }
  table.layout td { display: block; padding: .1rem 0; }
  table.layout td:empty { display: none; }
  table.data td:empty { display: none; }
  table.data tr.unofficial td:first-child { box-shadow: none; padding-left: 0; }
  table.data tr.unofficial { box-shadow: inset 2px 0 0 var(--blood); padding-left: .7rem; }
  table.data tr.group th { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* data tables use the full content width; text around them keeps its measure */
.prose:has(table.data) { max-width: none; }
.prose:has(table.data) > :not(.table-wrap) { max-width: 80ch; }
