/* Edenfall - the Chronicle. Design: AN_Claude\projects\website\design.md */
@font-face { font-family: 'IM Fell English'; src: url('../fonts/imfell-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IM Fell English'; src: url('../fonts/imfell-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'IM Fell English SC'; src: url('../fonts/imfell-sc.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('../fonts/cinzel.woff2') format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }

:root { --ink: #cbb994; --ink-dim: #9c8762; --gold: #e2cf9f; --red: #a33a26; --line: #4b3e2c; --line-soft: #3d3224; }
* { box-sizing: border-box; }
html { background: #0b0908; color: var(--ink); scroll-padding-top: 20px; }
body { margin: 0; font-family: 'IM Fell English', Georgia, serif; font-size: 18px; line-height: 1.6; min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #1a1511 0%, #0b0908 60%); padding: 28px 14px 60px; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: multiply; z-index: 9;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .2  0 0 0 0 .15  0 0 0 0 .1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
a { color: #d9b77c; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #e2cf9f; outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: #000; color: var(--gold); padding: 6px 10px; z-index: 20; }
.skip:focus { left: 8px; }

/* the book */
.book { position: relative; max-width: 880px; margin: 0 auto; padding: 34px 54px 44px;
  background: radial-gradient(ellipse at 50% 30%, #2b241b 0%, #1d1812 55%, #120f0b 100%);
  border: 1px solid var(--line); outline: 1px solid #2a2219; outline-offset: 7px;
  box-shadow: 0 30px 80px rgba(0,0,0,.8), inset 0 0 120px rgba(0,0,0,.55); }
.book::before, .book::after { content: "\2766"; position: absolute; color: #5e4c33; font-size: 22px; }
.book::before { top: 8px; left: 12px; } .book::after { bottom: 8px; right: 12px; transform: rotate(180deg); }
.banner { display: block; margin: -12px -26px 0; line-height: 0; }
.banner img { width: 100%; height: auto; display: block; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.sub { text-align: center; font-family: 'IM Fell English SC', serif; letter-spacing: .16em; font-size: 15px; color: var(--ink-dim); margin-top: 12px; }
.ornament { height: 16px; margin: 14px auto; max-width: 520px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14'><g fill='none' stroke='%238a7350' stroke-width='1'><path d='M0 7 H120'/><path d='M180 7 H300'/><path d='M120 7 C130 0 140 0 150 7 C160 14 170 14 180 7'/><path d='M120 7 C130 14 140 14 150 7 C160 0 170 0 180 7'/></g><circle cx='150' cy='7' r='2.2' fill='%23a33a26'/></svg>") center / 100% 16px no-repeat; }

/* the chapter list */
nav.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; font-family: 'IM Fell English SC', serif; font-size: 18px; }
nav.toc a { color: #b49b6b; text-decoration: none; border-bottom: 1px solid transparent; }
nav.toc a:hover, nav.toc a[aria-current="page"] { color: var(--gold); border-bottom-color: #7a6440; }
nav.toc i { font-style: normal; color: var(--red); margin-right: 4px; }

/* chapter text */
.chap { font-family: 'IM Fell English SC', serif; color: var(--red); letter-spacing: .25em; font-size: 14px; text-align: center; margin-top: 18px; }
h1.chaptitle { font-family: 'Cinzel', serif; font-weight: 700; color: #dcc796; text-align: center; font-size: 30px; letter-spacing: .08em; margin: 2px 0 18px; }
p { margin: 0 0 14px; }
p.lead::first-letter { float: left; font-family: 'Cinzel', serif; font-weight: 700; font-size: 54px; line-height: 52px; color: #e9cf8e;
  background: #5c1712; border: 1px solid #7a6440; box-shadow: inset 0 0 0 3px #2a0a07; padding: 6px 10px 4px; margin: 6px 12px 0 0; }
.muted { color: var(--ink-dim); font-style: italic; }
.center { text-align: center; }
.margin { float: right; width: 150px; margin: 0 -20px 10px 18px; font-style: italic; font-size: 14px; color: #7f6c4c; transform: rotate(3deg); border-left: 1px solid var(--line-soft); padding-left: 10px; }

/* wax seals */
.seal { display: inline-flex; align-items: center; gap: 14px; margin-top: 16px; font-family: 'IM Fell English SC', serif; color: var(--gold); font-size: 20px; text-decoration: none; }
.seal b { flex: none; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #c2402f, #7a1610 60%, #4d0b07);
  box-shadow: 0 3px 4px #000, inset 0 0 0 4px rgba(0,0,0,.25); display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 24px; color: #2b0705; text-shadow: 0 1px 0 rgba(255,180,150,.25); transition: transform .2s; }
a.seal:hover b { transform: rotate(-8deg) scale(1.05); }
.seal.waiting { opacity: .75; cursor: default; }
.summons { text-align: center; margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

/* the map plate */
.plate { position: relative; margin: 6px auto 8px; border: 2px solid #5a4931; outline: 1px solid #2e2519; outline-offset: 4px; max-width: 660px; aspect-ratio: 1 / 1; background: #18130e; }
.plate img.map { display: block; width: 100%; height: 100%; }
.pin { position: absolute; transform: translate(-50%, -50%); font-family: 'IM Fell English SC', serif; font-size: 15px; color: #f0dcae; cursor: pointer; white-space: nowrap;
  background: rgba(20,14,9,.8); border: 1px solid #7a6440; border-radius: 2px; padding: 2px 7px; text-shadow: 0 1px 2px #000; }
.pin::before { content: "\2726  "; color: #c94a33; }
.pin:hover, .pin[aria-pressed="true"] { color: #fff3d4; border-color: #c9a86a; }
.pin.warn { color: #e07a60; }
/* near the left or right edge the label grows inward, with its star still on the spot */
.pin.edge-l { transform: translate(-9px, -50%); }
.pin.edge-r { transform: translate(calc(-100% + 9px), -50%); }
.pin.edge-r::before { content: none; } .pin.edge-r::after { content: "  \2726"; color: #c94a33; }
.zoom { position: absolute; left: 8px; bottom: 8px; font-size: 13px; background: rgba(20,14,9,.8); border: 1px solid #7a6440; padding: 2px 8px; color: #e2cf9f; text-decoration: none; }
.caption { text-align: center; font-style: italic; font-size: 14px; color: #8c7756; margin-bottom: 14px; }
.note { min-height: 80px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.note b { font-family: 'IM Fell English SC', serif; font-weight: normal; color: var(--gold); }

/* the laws */
details.part { border: 1px solid var(--line-soft); margin: 0 0 14px; background: rgba(0,0,0,.18); }
details.part > summary { cursor: pointer; list-style: none; padding: 12px 16px; font-family: 'Cinzel', serif; font-weight: 700; font-size: 21px; color: #dcc796; letter-spacing: .05em; }
details > summary::-webkit-details-marker { display: none; }
details.part > summary .pnum { color: var(--red); margin-right: 12px; font-size: 16px; }
details.part > summary::after { content: "\2767"; float: right; color: #7a6440; transition: transform .2s; }
details.part[open] > summary::after { transform: rotate(90deg); }
.partbody { padding: 0 18px 10px; }
.partbody h2 { font-family: 'IM Fell English SC', serif; color: var(--red); letter-spacing: .12em; font-size: 16px; margin: 18px 0 6px; font-weight: normal; border-bottom: 1px solid var(--line-soft); padding-bottom: 4px; }
details.law { border-bottom: 1px dotted var(--line-soft); }
details.law > summary { cursor: pointer; list-style: none; padding: 8px 0; font-family: 'IM Fell English SC', serif; font-size: 18px; color: var(--gold); }
details.law > summary::before { content: "\2726"; color: #7a6440; margin-right: 10px; font-size: 13px; }
details.law[open] > summary::before { color: var(--red); }
details.law > :not(summary) { font-size: 16.5px; }
details.law p, details.law ul { margin: 0 0 10px; } details.law ul { padding-left: 22px; } details.law li { margin-bottom: 4px; }
details.law li::marker { color: #7a6440; }
details.law h3 { font-family: 'IM Fell English SC', serif; color: #d8c395; font-size: 17px; font-weight: normal; margin: 14px 0 4px; }
details.law blockquote { margin: 0 0 10px; padding: 0; }
details.law strong { color: #e2cf9f; font-weight: normal; font-family: 'IM Fell English SC', serif; }
details.law .permalink { font-size: 13px; margin-left: 8px; color: #7a6440; text-decoration: none; }
details.law .permalink:hover { color: var(--gold); }
.lawtools { text-align: center; margin: 0 0 14px; font-size: 15px; }
.lawtools button { font: inherit; color: #b49b6b; background: none; border: 1px solid var(--line-soft); padding: 2px 10px; cursor: pointer; }

/* sightings */
.frames { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.frame { aspect-ratio: 16 / 10; border: 2px solid #5a4931; outline: 1px solid #2e2519; outline-offset: 3px; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #17120d 0 8px, #1b1611 8px 16px); color: #6f5d40; font-style: italic; font-size: 15px; }

footer.colophon { text-align: center; margin-top: 30px; font-size: 13px; color: #6f5d40; font-style: italic; }

@media (max-width: 640px) {
  body { padding: 14px 8px 40px; font-size: 17px; }
  .book { padding: 22px 18px 32px; outline-offset: 4px; }
  .banner { margin: -8px -10px 0; }
  nav.toc ul { gap: 4px 16px; font-size: 16px; }
  .margin { float: none; width: auto; margin: 10px 0; transform: none; }
  h1.chaptitle { font-size: 25px; }
  .pin { font-size: 12px; padding: 1px 5px; }
  .partbody { padding: 0 10px 8px; }
  .seal { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
