/* Twilight palette. I wanted a night sky, not a template. */

:root {
  --dusk: #12071c;
  --plum: #2a1342;
  --lilac: #d4c2e6;
  --rose: #d4789c;
  --gold: #e8c56b;
  --gold-soft: #c9a44a;
  --cream: #f6efe4;
  --muted: #b9a6c8;
  --line: rgba(232, 197, 107, 0.28);
}

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

html, body {
  min-height: 100%;
  background: var(--dusk);
  color: var(--cream);
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.55;
}

body { overflow-x: hidden; }

.sky {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 78% 6%, rgba(212, 120, 156, 0.22), transparent 58%),
    radial-gradient(700px 480px at 8% 18%, rgba(90, 40, 130, 0.45), transparent 55%),
    radial-gradient(1200px 500px at 50% 108%, rgba(232, 197, 107, 0.12), transparent 55%),
    linear-gradient(180deg, #1a0a2c 0%, #12071c 42%, #0d0614 100%);
}

.sky svg.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sky .horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28vh;
  background:
    radial-gradient(ellipse 90% 80% at 50% 120%, rgba(232, 197, 107, 0.18), transparent 70%),
    linear-gradient(180deg, transparent, rgba(8, 3, 14, 0.85));
}

.sky .hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 18vh;
  min-height: 120px;
}

.sky .grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 96px;
}

.bar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  padding: 10px 22px;
  margin-bottom: 36px;
  background: rgba(18, 7, 28, 0.18);
  border: 1px solid rgba(232, 197, 107, 0.32);
  border-radius: 999px;
}

.bar-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.bar-title strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.bar-title span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mast {
  text-align: center;
  margin-bottom: 48px;
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 18px;
}

h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-style: italic;
  font-size: clamp(48px, 9vw, 86px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.mast p {
  margin-top: 18px;
  color: var(--lilac);
  font-weight: 300;
  font-size: 16px;
}

.gold-rule {
  width: 72px;
  height: 1px;
  background: var(--gold);
  margin: 22px auto 0;
  opacity: 0.85;
}

.card {
  background: rgba(42, 19, 66, 0.78);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px 20px 14px;
  margin-bottom: 16px;
}

.label {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.card h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.2;
  color: var(--cream);
}

.by {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
}

.section {
  margin-top: 48px;
}

.section-title {
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 14px;
}

.card .book-row:first-of-type { border-top: 0; }

.cat {
  border-bottom: 1px solid rgba(181, 122, 212, 0.18);
}

.cat:first-of-type {
  border-top: 1px solid rgba(181, 122, 212, 0.18);
}

.cat[open] {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(42, 19, 66, 0.62);
  margin: 14px 0;
  padding: 6px 8px 12px;
  box-shadow: 0 18px 40px rgba(8, 3, 14, 0.35);
}

.cat[open] + .cat {
  border-top: 0;
}

.cat summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 10px;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.cat summary::-webkit-details-marker { display: none; }

.cat summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg);
  flex: 0 0 auto;
  opacity: 0.85;
}

.cat[open] summary::after {
  transform: rotate(225deg);
  margin-top: 6px;
}

.cat summary span {
  margin-left: auto;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-size: 13px;
  min-width: 1.5em;
  text-align: right;
}

.cat[open] summary { color: var(--cream); }

.cat-body {
  padding: 4px 6px 10px;
}

.read-wrap {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(232, 197, 107, 0.22);
  background: rgba(18, 7, 28, 0.55);
}

.read-table {
  width: 100%;
  border-collapse: collapse;
}

.read-table thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  padding: 16px 22px 14px;
  background: rgba(232, 197, 107, 0.1);
}

.read-table tbody td {
  padding: 18px 22px;
  border-top: 1px solid rgba(181, 122, 212, 0.14);
  vertical-align: top;
}

.read-table tbody tr:first-child td { border-top: 0; }

.read-table td:first-child {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 24px;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.22;
}

.read-table td:last-child {
  color: var(--muted);
  font-weight: 300;
  font-size: 16px;
  width: 36%;
  padding-top: 22px;
}

.read-table tbody tr:hover td {
  background: rgba(232, 197, 107, 0.08);
}

.book-row {
  padding: 14px 4px;
  border-top: 1px solid rgba(181, 122, 212, 0.18);
}

.book-row em {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 18px;
  font-weight: 500;
  display: block;
  line-height: 1.2;
  color: var(--cream);
}

.book-row small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .wrap { width: min(920px, calc(100% - 28px)); }
  .bar { border-radius: 24px; }
  .read-table td:first-child { font-size: 20px; }
  .read-table td:last-child { width: auto; display: block; padding-top: 0; padding-bottom: 16px; }
  .read-table tbody td { padding: 14px 16px; }
}
