/* Keeper's Journal, shared with shop.beastbound.net: walnut cover, parchment page, brass and ivy frame. */
:root {
    --ink: #382315;
    --ink-soft: #655338;
    --gold: #a78142;
    --green: #365238;
    --line: #b99c64;
    --ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --serif: Georgia, "Times New Roman", serif;
}

*, ::before, ::after { box-sizing: border-box; }

html { background: #25160c; scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
    max-width: 1680px;
    margin: auto;
    padding: 0 0 26px;
    background: #2b1b12 url("/images/walnut-v1.webp") center top / 650px;
    color: var(--ink);
    font: 16px/1.65 var(--ui);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
:is(a, button, summary):focus-visible { outline: 3px solid #ae7e26; outline-offset: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 12px 18px; background: #fffcf5; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

/* The frame sits above the page and never takes clicks. */
.book-frame {
    position: fixed;
    z-index: 80;
    inset: 0;
    max-width: 1680px;
    margin: auto;
    pointer-events: none;
    border: 82px solid transparent;
    border-image: url("/images/book-frame-v1.webp") 110 / 82px / 0 stretch;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 134px;
    padding: 32px 120px 0;
    background:
        repeating-linear-gradient(0deg, #140a0377 0 3px, #b77c3822 4px 5px, transparent 6px 30px),
        linear-gradient(#35211366, #160b04aa),
        url("/images/walnut-v1.webp") center / 950px;
    border-bottom: 4px ridge #77502c;
    box-shadow: 0 3px 6px #29160988;
}
.brand { position: relative; z-index: 81; }
.brand img { width: 190px; height: 127px; object-fit: contain; filter: drop-shadow(0 3px 1px #0007); transform: translateY(9px); }
.site-header nav { display: flex; gap: 6px; padding-top: 20px; }
.site-header nav a { padding: 10px 18px; color: #fff0cd; font: 700 19px/1.2 var(--serif); text-decoration: none; }
.site-header nav a + a { border-left: 1px solid #a5864b88; }
.site-header nav a:hover { color: #ffe5a0; text-decoration: underline; text-underline-offset: 5px; }

.journal {
    width: calc(100% - 54px);
    margin: 0 auto;
    background: linear-gradient(#fff6db22, #fff6db22), url("/images/parchment-v1.webp");
    border: 1px solid #9e7945;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: inset 0 0 30px #78461477, 0 3px 0 #37200d, 0 6px 0 #b0884a, 0 9px 0 #2b190c;
    overflow: hidden;
}
.page { padding: 34px 50px 24px; }

/* The title card sits on the landscape, as in design study 03. */
.hero { position: relative; display: grid; place-items: center; min-height: 470px; padding: 44px 24px; text-align: center; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #5d7c8e; }
.title-card {
    position: relative;
    width: min(560px, 100%);
    padding: 26px 34px 28px;
    background: linear-gradient(#fbf1d6e6, #f3e4bfe6), url("/images/parchment-v1.webp");
    border: 3px double #a88443;
    border-radius: 6px;
    box-shadow: 0 0 0 1px #6b4c24, 0 10px 26px #2b190c77;
}
.hero h1 { font-size: clamp(46px, 5.4vw, 76px); letter-spacing: -.04em; color: #2b1509; }
.rule { display: flex; align-items: center; justify-content: center; gap: 12px; width: 280px; max-width: 80%; margin: 2px auto 6px; color: var(--gold); font: 700 24px/1 var(--serif); }
.rule::before, .rule::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule::after { transform: rotate(180deg); }
.lead { margin: 0 auto; font: 20px/1.4 var(--serif); color: var(--ink-soft); }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; margin-top: 20px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 222px;
    min-height: 54px;
    padding: 0 12px;
    border: 10px solid transparent;
    border-image: url("/images/button-frame-v1.svg") 16 fill stretch;
    color: #fff2cf;
    font: 700 19px/1.2 var(--serif);
    text-decoration: none;
    transition: filter .15s;
}
.button:hover { filter: brightness(1.12); }
.button-small { min-width: 0; width: 100%; max-width: 290px; min-height: 48px; font-size: 17px; }

.address {
    position: relative;
    display: block;
    width: min(330px, 100%);
    margin: 14px auto 0;
    padding: 4px 44px;
    border: 8px solid transparent;
    border-image: url("/images/address-frame-v1.svg") 16 fill stretch;
    background: transparent;
    color: #fff0cd;
    font: 700 19px/1.6 var(--serif);
    cursor: pointer;
}
/* A two-sheet copy glyph drawn in CSS; no icon font is loaded for one symbol. */
.address::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 13px;
    height: 15px;
    margin-top: -6px;
    border: 2px solid #dec38b;
    border-radius: 2px;
    background: #2d1b10;
    box-shadow: 4px -4px 0 -2px #2d1b10, 4px -4px 0 0 #dec38b;
}
.address-copied { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; font: 600 15px/1 var(--ui); }
.address[data-copied] .address-text { opacity: 0; }
.address[data-copied] .address-copied { opacity: 1; }
.address:hover { color: #ffe5a0; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 22px 24px;
    text-align: center;
    background: #fff9e518;
    border: 3px double #bc9c61;
    border-radius: 8px;
    box-shadow: inset 0 0 0 5px #fff4d233;
    scroll-margin-top: 24px;
}
.card::before, .card::after {
    content: "";
    position: absolute;
    top: -3px;
    width: 30px;
    height: 30px;
    background: url("/images/card-corner-v1.svg") center / contain no-repeat;
}
.card::before { left: -3px; }
.card::after { right: -3px; transform: scaleX(-1); }
/* Cloth ribbon, as on the store's chapter links. */
.card h2 {
    width: 100%;
    padding: 9px 18px;
    background: linear-gradient(110deg, #315132, #425d36);
    box-shadow: inset 0 0 0 2px #284226, inset 0 0 0 4px #a5a46699;
    clip-path: polygon(0 0, 100% 0, 97% 50%, 100% 100%, 0 100%, 3% 50%);
    color: #fff0c6;
    font-size: 22px;
    letter-spacing: 0;
}
.card p { flex: 1; margin: 16px 0 18px; font-size: 16px; color: var(--ink-soft); }

.play {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    margin-top: 40px;
    padding-top: 34px;
    border-top: 1px solid #b4965b66;
    scroll-margin-top: 24px;
}
.play h2, .faq h2 { font-size: clamp(26px, 2.5vw, 36px); margin-bottom: 14px; }
.play h3 { font-size: 21px; margin: 8px 0 12px; }
.play :is(ol, ul) { margin: 0; padding-left: 22px; }
.play li { margin-bottom: 8px; padding-left: 4px; }
.play li::marker { color: #806744; font-family: var(--serif); font-weight: 700; }
.note { margin: 16px 0 0; font-size: 15px; color: var(--ink-soft); }

.faq { display: grid; grid-template-columns: .7fr 1.5fr; gap: 35px; margin-top: 40px; padding-top: 34px; border-top: 1px solid #b4965b66; }
.faq details { border-bottom: 1px solid #c1a56d66; }
.faq summary { padding: 15px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: #8c784e; font: 400 20px/1.2 var(--serif); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0 25px 16px 0; color: var(--ink-soft); }

.not-found { padding-block: 52px; text-align: center; }
.not-found h1 { font-size: clamp(30px, 5vw, 52px); }

.site-footer {
    position: relative;
    margin-top: 44px;
    padding: 26px 0 6px;
    border-top: 1px solid #ad8f55;
    text-align: center;
    font-size: 13px;
    color: #624d33;
}
.site-footer::before { content: "◇"; position: absolute; top: -15px; left: 50%; transform: translateX(-50%); padding: 0 12px; background: #f3e4bf; color: #94713c; font: 23px/28px var(--serif); }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 26px; font-size: 15px; }
.site-footer nav a { padding: 4px 0; text-underline-offset: 4px; }
.site-footer p { margin: 12px auto 0; max-width: 620px; }

@media (max-width: 980px) {
    .book-frame { border-image-width: 48px; }
    .site-header { padding-inline: 74px; }
    .brand img { width: 150px; height: 100px; }
    .journal { width: calc(100% - 36px); }
    .page { padding-inline: 34px; }
    /* Narrow screens stack the card under the landscape and let it overlap the lower edge. */
    .hero { display: block; min-height: 0; padding: 0 20px 6px; }
    .hero-art img { position: static; display: block; width: calc(100% + 40px); max-width: none; margin-inline: -20px; height: auto; aspect-ratio: 21 / 9; }
    .title-card { margin: -46px auto 0; }
    .cards { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
    .play, .faq { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 680px) {
    body { padding-bottom: 20px; font-size: 15px; }
    .book-frame { border-image-width: 31px; }
    .site-header { height: 104px; padding: 14px 44px 0; }
    .brand img { width: 115px; height: 76px; transform: none; }
    .site-header nav { padding-top: 0; gap: 0; }
    .site-header nav a { padding: 8px 9px; font-size: 16px; }
    .journal { width: calc(100% - 24px); }
    .page { padding: 26px 18px 18px; }
    .hero { padding-inline: 12px; }
    .hero-art img { width: calc(100% + 24px); margin-inline: -12px; aspect-ratio: 16 / 9; }
    .title-card { margin-top: -34px; padding: 20px 16px 22px; }
    .hero h1 { font-size: clamp(36px, 11.5vw, 46px); }
    .lead { font-size: 18px; }
    .address { padding-inline: 8px 34px; font-size: clamp(15px, 5vw, 17px); }
    .button { width: 100%; max-width: 330px; min-width: 0; }
}

/* Below 390px the logo and the links no longer fit side by side. */
@media (max-width: 389px) {
    .site-header { flex-direction: column; justify-content: center; gap: 0; height: 118px; padding-top: 12px; }
    .brand img { width: 96px; height: 64px; }
    .site-header nav a { padding-block: 5px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
