/* Skyrealms of Jorune: Worldbook — site styles. Fonts match the books (Alegreya, Alegreya SC). */
@font-face { font-family: 'Alegreya'; src: url('../fonts/Alegreya_400Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url('../fonts/Alegreya_400Regular_Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url('../fonts/Alegreya_700Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya SC'; src: url('../fonts/AlegreyaSC_400Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Alegreya SC'; src: url('../fonts/AlegreyaSC_700Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --bg: #0f0e0c; --panel: #1a1815; --panel-2: #23201c; --line: #3a352e;
  --text: #e8e1d3; --muted: #a99f8d; --head: #f1e7d2;
  --player: #c49a55; --sholari: #8fb0d3; --module: #9fbd7c; --accent: #d9b56f;
  --max: 1080px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.6 'Alegreya', Georgia, serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #f0cf8a; }
h1, h2, h3 { font-family: 'Alegreya SC', Georgia, serif; color: var(--head); font-weight: 700; line-height: 1.2; }
h1 { font-size: 2.4rem; margin: 0 0 .4em; }
h2 { font-size: 1.6rem; margin: 2em 0 .6em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* header */
.site-head { position: sticky; top: 0; z-index: 10; background: rgba(15,14,12,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; min-height: 58px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--head); text-decoration: none; font-family: 'Alegreya SC', serif; font-size: 1.15rem; }
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-left: auto; font-family: 'Alegreya SC', serif; font-size: 1rem; }
.nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--head); border-bottom-color: var(--accent); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); font: inherit; padding: 4px 10px; border-radius: 4px; }
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; padding: 6px 0 12px; }
  .nav.open { display: flex; }
}

/* home hero */
.hero { min-height: calc(100vh - 58px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 48px 16px; background: #000 url('../img/planet-2000.jpg') right 70% / cover no-repeat; }
@media (max-width: 700px) { .hero { background-image: url('../img/planet-1000.jpg'); } }
.hero .logo { width: min(820px, 92vw); margin-top: -4vh; }
.hero .tag { font-family: 'Alegreya SC', serif; letter-spacing: .18em; color: #ddd3bf; margin: 1.2em 0 1.6em; font-size: 1.05rem; }
.hero .lede { max-width: 640px; color: #d9d0bf; text-shadow: 0 1px 3px #000; }
.btn { display: inline-block; font-family: 'Alegreya SC', serif; font-size: 1.05rem; padding: .55em 1.3em; border-radius: 4px;
  background: var(--accent); color: #1a140a; text-decoration: none; border: 0; cursor: pointer; }
.btn:hover { background: #ecc983; color: #1a140a; }
.btn.ghost { background: transparent; color: var(--head); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn[aria-disabled="true"] { background: var(--panel-2); color: var(--muted); pointer-events: none; }

/* page body */
main.page { padding: 40px 0 72px; }
.intro { font-size: 1.12rem; color: #ddd5c5; max-width: 760px; }
.note { background: var(--panel); border-left: 3px solid var(--accent); padding: 14px 18px; border-radius: 0 4px 4px 0; margin: 1.4em 0; }
.note.sholari { border-left-color: var(--sholari); }

/* book cards */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-top: 18px; }
.book { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; border-top: 4px solid var(--c, var(--accent)); }
.book.player { --c: var(--player); } .book.sholari { --c: var(--sholari); } .book.module { --c: var(--module); }
.book .cover { background: #000; aspect-ratio: 8.5 / 11; overflow: hidden; }
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.book .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.book h3 { margin: 0 0 .3em; color: var(--c); }
.book .who { font-family: 'Alegreya SC', serif; font-size: .9rem; color: var(--muted); margin-bottom: .6em; }
.book p { font-size: 1rem; }
.book .meta { font-size: .9rem; color: var(--muted); margin: auto 0 12px; }
.book .count { font-size: .85rem; color: var(--muted); margin-top: 8px; min-height: 1.2em; }

/* a section holding one book: cover beside the text */
.books.wide { grid-template-columns: 1fr; }
.books.wide .book { flex-direction: row; max-width: 820px; }
.books.wide .cover { flex: 0 0 280px; }
.books.wide .body { padding: 22px 26px; }
.books.wide .book p { font-size: 1.08rem; }
.books.wide .btn { align-self: flex-start; }
@media (max-width: 640px) { .books.wide .book { flex-direction: column; } .books.wide .cover { flex: none; } }

/* strips of covers on the home page */
.covers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.covers a { display: block; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.covers a:hover { border-color: var(--accent); }
@media (max-width: 700px) { .covers { grid-template-columns: repeat(3, 1fr); } }

/* art */
figure { margin: 1.6em 0; }
figure img { border-radius: 4px; background: #fff; }
figcaption { font-size: .9rem; color: var(--muted); font-style: italic; margin-top: .4em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

.creditlist { color: #d8cfbe; }
.creditlist strong { font-family: 'Alegreya SC', serif; color: var(--head); font-weight: 400; display: block; margin-top: 1em; }

table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: 'Alegreya SC', serif; color: var(--head); font-weight: 400; }

.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 28px 0 40px; }
.site-foot p { margin: 0 0 .5em; }

/* places to talk */
.social { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0 24px; }
.soc { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; text-decoration: none; color: inherit; }
.soc:hover { border-color: var(--accent); }
.soc strong { display: block; font-family: 'Alegreya SC', serif; font-size: 1.2rem; color: var(--accent); margin-bottom: 4px; }
.soc span { font-size: .98rem; color: var(--muted); }
@media (max-width: 700px) { .social { grid-template-columns: 1fr; } }
