/* DND Tavern Library Static v0.1 */
:root {
  --bg: #030507;
  --bg-2: #070b0f;
  --panel: rgba(7, 10, 12, .88);
  --panel-strong: rgba(4, 6, 8, .94);
  --ink: #f2ebdc;
  --muted: #c9bca3;
  --faint: #907f61;
  --gold: #d0a354;
  --gold-strong: #f1c46a;
  --amber: #ef9d43;
  --line: rgba(208, 163, 84, .42);
  --line-soft: rgba(208, 163, 84, .18);
  --shadow: 0 24px 62px rgba(0, 0, 0, .56);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(circle at 80% 8%, rgba(239, 157, 67, .13), transparent 31rem),
    radial-gradient(circle at 8% 36%, rgba(56, 82, 112, .12), transparent 33rem),
    linear-gradient(180deg, #020405, #06090d 58%, #030506);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.site-shell { width: min(1920px, 100%); margin: 0 auto; min-height: 100vh; position: relative; overflow: hidden; }
.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  opacity: .14;
  mix-blend-mode: soft-light;
  z-index: 20;
}
.site-header {
  position: absolute;
  z-index: 8;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(1rem, 2vw, 2.25rem);
  padding: clamp(1rem, 1.65vw, 1.65rem) clamp(1.25rem, 3vw, 3rem);
}
.brand { display: inline-flex; align-items: center; gap: .66rem; color: var(--gold-strong); font-family: var(--serif); font-size: clamp(.94rem, 1.05vw, 1.25rem); letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 0 24px rgba(208, 163, 84, .25); }
.brand img { width: 1.85rem; height: 1.85rem; opacity: .92; }
.main-nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(.95rem, 1.7vw, 2.05rem); font-size: clamp(.72rem, .78vw, .9rem); letter-spacing: .14em; text-transform: uppercase; color: rgba(242, 235, 220, .82); }
.main-nav a { position: relative; padding: .45rem 0; transition: color .18s ease, text-shadow .18s ease; white-space: nowrap; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .12rem; height: 1px; transform: scaleX(0); transform-origin: center; background: linear-gradient(90deg, transparent, rgba(241,196,106,.9), transparent); transition: transform .18s ease; }
.main-nav a:hover, .main-nav a.active { color: #fff2dc; text-shadow: 0 0 22px rgba(208,163,84,.24); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
main { position: relative; z-index: 2; padding: 0 clamp(1rem, 2.8vw, 2.8rem) 0; }
.hero {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 540px);
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  padding: clamp(6.8rem, 9vw, 8.5rem) 0 clamp(2rem, 3vw, 2.8rem);
  isolation: isolate;
}
.library-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3,5,7,.94) 0%, rgba(3,5,7,.76) 44%, rgba(3,5,7,.38) 70%, rgba(3,5,7,.14) 100%),
    radial-gradient(circle at 72% 30%, rgba(239,157,67,.14), transparent 18rem),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 30%);
  z-index: -2;
}
.hero-glow {
  position: absolute;
  right: 18%;
  top: 15%;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(241,196,106,.15), rgba(239,157,67,.07) 40%, transparent 68%);
  filter: blur(6px);
  z-index: -1;
}
.hero-content { max-width: 760px; padding-bottom: 2rem; }
.eyebrow, .panel-label { margin: 0 0 .8rem; color: var(--gold-strong); font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; font-weight: 800; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(3.2rem, 6vw, 5.4rem); line-height: .98; letter-spacing: -.045em; color: #fff5e6; text-shadow: 0 8px 26px rgba(0,0,0,.35); }
.hero-subtitle { max-width: 42rem; margin: 1rem 0 0; color: rgba(242,235,220,.77); font-size: clamp(1rem, 1.08vw, 1.16rem); line-height: 1.72; }
.hero-shelf {
  position: relative;
  height: 100%;
  min-height: 380px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: .8rem;
  padding: 2rem 0 1.3rem;
}
.hero-book {
  width: clamp(86px, 9vw, 122px);
  aspect-ratio: 0.67;
  border: 1px solid rgba(208,163,84,.24);
  background: rgba(0,0,0,.28);
  box-shadow: 0 18px 42px rgba(0,0,0,.42);
  overflow: hidden;
  transform: perspective(800px) rotateY(calc((var(--hero-index) - 2) * 3deg)) translateY(calc(var(--hero-index) * 4px - 8px));
}
.hero-book img, .book-cover img, .sourcebook-cover img { width: 100%; height: 100%; object-fit: cover; }
.ornament {
  display: flex; align-items: center; justify-content: center;
  margin: 0 0 clamp(1.4rem, 2vw, 1.8rem);
}
.ornament span {
  width: min(540px, 72vw); height: 48px;
  background: url("assets/ui/section-divider-filigree.png") center / contain no-repeat;
  opacity: .82; filter: drop-shadow(0 8px 14px rgba(0,0,0,.32));
}
.page-intro { margin-bottom: clamp(1.15rem, 1.8vw, 1.6rem); }
.page-intro h2, .section-header h2, .summary-card h2 { margin: 0; font-family: var(--serif); font-weight: 500; color: #fff4dd; line-height: 1.06; letter-spacing: -.035em; }
.page-intro h2 { max-width: 960px; font-size: clamp(1.55rem, 2.7vw, 3rem); }
.page-intro p:not(.panel-label) { max-width: 840px; margin: .95rem 0 0; color: rgba(242,235,220,.72); font-size: clamp(.98rem, 1.04vw, 1.08rem); line-height: 1.7; }
.content-wrap { display: grid; gap: clamp(1rem, 1.4vw, 1.35rem); margin-bottom: clamp(1rem, 1.8vw, 1.5rem); }
.section-header { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: .25rem; }
.section-header h2 { font-size: clamp(1.5rem, 2.1vw, 2.3rem); }
.section-note { margin: 0; color: rgba(242,235,220,.58); max-width: 30rem; text-align: right; }
.section-header.narrow { margin-bottom: 1rem; }
.summary-card, .featured-card, .sourcebook-card, .quick-link-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(14,18,22,.88), rgba(5,7,9,.92));
  box-shadow: var(--shadow);
  isolation: isolate;
}
.summary-card::before, .featured-card::before, .sourcebook-card::before, .quick-link-card::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 80% 0%, rgba(241,196,106,.11), transparent 14rem), linear-gradient(180deg, rgba(255,255,255,.03), transparent 38%);
  opacity: .84; z-index: -1;
}
.featured-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 1.5vw, 1.35rem); }
.featured-card { display: grid; grid-template-columns: 170px minmax(0, 1fr); min-height: 290px; }
.book-cover { border-right: 1px solid rgba(208,163,84,.14); background: rgba(0,0,0,.25); }
.featured-copy { padding: clamp(1rem, 1.5vw, 1.35rem); display: flex; flex-direction: column; }
.featured-copy h2 { margin: 0; font-family: var(--serif); font-size: clamp(1.55rem, 2vw, 2.15rem); color: #fff2dc; line-height: 1.06; }
.card-copy { color: rgba(242,235,220,.72); line-height: 1.66; margin: .75rem 0 1rem; }
.text-link, .mini-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.4rem; padding: .65rem .95rem;
  border: 1px solid rgba(208,163,84,.38); color: #fff0d1; background: rgba(208,163,84,.08);
  font-size: .72rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.text-link { margin-top: auto; align-self: flex-start; }
.text-link:hover, .mini-link:hover { transform: translateY(-1px); border-color: rgba(241,196,106,.74); background: rgba(208,163,84,.13); }
.split-layout { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .78fr); align-items: start; }
.summary-card { padding: clamp(1.1rem, 1.6vw, 1.45rem); }
.sourcebook-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .95rem; }
.sourcebook-card { padding: .8rem; display: flex; flex-direction: column; min-height: 100%; }
.sourcebook-cover { aspect-ratio: .69; overflow: hidden; border: 1px solid rgba(208,163,84,.16); background: rgba(0,0,0,.2); margin-bottom: .8rem; }
.sourcebook-card h3, .quick-link-card h3 { margin: 0; color: #fff2dc; font-family: var(--serif); font-size: 1.08rem; line-height: 1.15; }
.sourcebook-card p, .quick-link-card p { color: rgba(242,235,220,.68); line-height: 1.56; font-size: .92rem; }
.sourcebook-card .mini-link, .quick-link-card .mini-link { align-self: flex-start; margin-top: auto; }
.side-panel { height: 100%; }
.quick-links-grid { display: grid; gap: .9rem; }
.quick-link-card { padding: .95rem; }
.edit-card { padding-bottom: 1.25rem; }
.clean-list { margin: .75rem 0 0; padding-left: 1.1rem; color: rgba(242,235,220,.74); line-height: 1.68; }
.footer-note { margin-top: clamp(1.2rem, 2vw, 1.8rem); margin-bottom: clamp(2.5rem, 4vw, 4rem); color: rgba(242,235,220,.56); font-size: .86rem; line-height: 1.65; border-top: 1px solid rgba(208,163,84,.13); padding-top: 1rem; }
@media (max-width: 1080px) {
  .site-header { position: relative; align-items: flex-start; background: rgba(2,4,5,.88); border-bottom: 1px solid rgba(208,163,84,.14); }
  .main-nav { flex-wrap: wrap; justify-content: flex-start; gap: .8rem 1.1rem; }
  .hero { grid-template-columns: 1fr; min-height: unset; padding-top: 5rem; }
  .hero-shelf { min-height: 280px; justify-content: flex-start; }
  .featured-grid, .split-layout, .sourcebook-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-header { display: grid; }
  .hero h1 { font-size: clamp(2.85rem, 15vw, 4.5rem); }
  .section-header { display: block; }
  .section-note { text-align: left; margin-top: .5rem; }
  .featured-card { grid-template-columns: 120px minmax(0, 1fr); min-height: 240px; }
  .hero-shelf { gap: .55rem; overflow-x: auto; padding-bottom: .5rem; }
  .hero-book { flex: 0 0 82px; }
}
