:root
{
    --paper: #f5f1e7; --ink: #25221e; --wine: #88313a; --muted: #71695f; --line: #d7cebe;
}
*
{
    box-sizing: border-box;
}
html
{
    scroll-behavior: smooth;
}
body
{
    margin: 0; color: var(--ink); background: var(--paper); font: 20px/1.8 Georgia, serif;
}
a
{
    color: inherit;
}
#progress
{
    position: fixed; top: 0; left: 0; height: 2px; background: var(--wine); width: 0; z-index: 40;
}
header, footer
{
    max-width: 1120px; margin: auto; display: flex; justify-content: space-between; gap: 20px; padding: 28px 35px; font: 11px/1.6 "Segoe UI", sans-serif; letter-spacing: .1em;
}
header a
{
    text-decoration: none;
}
header span
{
    color: var(--wine); margin-left: 20px;
}
h1, h2, h3
{
    font-weight: 400; line-height: 1.13; letter-spacing: -.025em; margin: 18px 0 30px;
}
h1
{
    font-size: clamp(42px, 5.2vw, 67px);
}
h2
{
    font-size: clamp(31px, 3.5vw, 43px);
}
h3
{
    font-size: 24px;
}
em
{
    color: var(--wine);
}
p
{
    margin: 0 0 25px;
}
.label, .fine, .button, button, .chapters small, cite, .page-top, .page-number
{
    font-family: "Segoe UI", sans-serif;
}
.label
{
    font-size: 10px; font-weight: 600; letter-spacing: .15em; line-height: 1.7;
}
.fine
{
    font-size: 12px; line-height: 1.7; color: var(--muted);
}
.button
{
    display: inline-block; padding: 14px 28px; background: var(--wine); color: var(--paper); text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .04em; border: 0; cursor: pointer;
}
.button:hover
{
    background: #63222a;
}
.hero
{
    max-width: 1050px; margin: auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; padding: 65px 35px 100px; align-items: center;
}
.hero .fine
{
    margin-top: 20px;
}
.book-stage
{
    perspective: 1200px; min-height: 460px; display: grid; place-items: center;
}
.book
{
    width: 280px; height: 400px; transform-style: preserve-3d; transform: rotateY(-14deg) rotateZ(2deg); position: relative; transition: transform 1.1s cubic-bezier(.22, 1, .36, 1); box-shadow: 30px 35px 35px #25221e25; animation: settle 1.1s both;
}
.book:hover
{
    transform: rotateY(-24deg) rotateZ(0);
}
.front
{
    position: absolute; inset: 0; background: var(--ink); color: var(--paper); padding: 28px; border-right: 1px solid #6b6257; transform: translateZ(13px);
}
.front > p
{
    font: 9px/1.7 "Segoe UI", sans-serif; letter-spacing: .15em;
}
.cover-title
{
    font: 54px/1.05 Georgia, serif; margin-top: 40px;
}
.cover-title i
{
    color: #d5a5a2;
}
.cover-line
{
    display: block; width: 40px; height: 2px; background: #c7888a; margin-top: 24px;
}
.front .author
{
    position: absolute; bottom: 14px;
}
.spine
{
    position: absolute; width: 26px; height: 400px; left: -13px; top: 0; background: #15130f; transform: rotateY(-90deg);
}
.pages
{
    position: absolute; right: -9px; top: 5px; width: 20px; height: 390px; background: repeating-linear-gradient(#d9d1c4 0 1px, #f8f2e7 1px 3px); transform: rotateY(90deg);
}
.reading
{
    max-width: 720px; margin: auto; padding: 65px 25px;
}
.problem
{
    border-top: 1px solid var(--line);
}
.annotated
{
    position: relative;
}
aside
{
    position: absolute; right: calc(100% + 45px); top: 10px; width: 140px; color: var(--wine); font: 10px/1.7 "Segoe UI", sans-serif; letter-spacing: .12em;
}
.chapters
{
    list-style: none; padding: 0; margin-top: 40px;
}
.chapters li
{
    border-top: 1px solid var(--line);
}
.chapters button
{
    display: flex; width: 100%; gap: 22px; background: transparent; padding: 20px 0; border: 0; color: var(--ink); text-align: left; cursor: pointer; font: 21px/1.3 Georgia, serif;
}
.chapters b
{
    color: var(--muted); font: 11px/2 "Segoe UI", sans-serif;
}
.chapters button:hover b
{
    color: var(--wine);
}
.chapters small
{
    display: block; font-size: 12px; margin-top: 8px; color: var(--muted);
}
.chapters i
{
    margin-left: auto; color: var(--wine);
}
.chapter-note
{
    border-left: 2px solid var(--wine); padding: 15px 20px; font-size: 17px; background: #ece5d9;
}
.sample-section
{
    background: #eae3d7; padding: 10px 0 50px;
}
.spreads
{
    max-width: 970px; margin: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 35px; padding: 0 30px 35px;
}
.spreads article
{
    background: #fcf8ee; padding: 30px; min-height: 350px; transform: rotate(-2deg); box-shadow: 0 12px 25px #25221e0e; position: relative; transition: transform .3s;
}
.spreads article:nth-child(2)
{
    transform: rotate(2deg);
}
.spreads article:hover
{
    transform: rotate(0) translateY(-4px);
}
.page-top
{
    display: flex; gap: 20px; justify-content: space-between; font-size: 8px; letter-spacing: .1em; margin-bottom: 35px; color: var(--wine);
}
.spreads article p
{
    font-size: 23px; line-height: 1.6;
}
.page-number
{
    font-size: 9px; color: var(--muted);
}
.center
{
    text-align: center;
}
.text-button
{
    padding: 10px 0; font-size: 12px; border: 0; border-bottom: 1px solid var(--wine); color: var(--wine); background: transparent; cursor: pointer;
}
.for
{
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.for b
{
    color: var(--wine);
}
.for p
{
    font-size: 16px;
}
.about
{
    display: flex; gap: 28px; border-top: 1px solid var(--line); align-items: flex-start;
}
.portrait
{
    display: grid; place-items: center; flex-shrink: 0; width: 95px; height: 95px; border-radius: 50%; color: var(--wine); background: #ded4c5; font: italic 33px Georgia, serif;
}
.about h2
{
    font-size: 33px;
}
.praise blockquote
{
    font-size: 26px; font-style: italic; margin: 35px 0;
}
cite
{
    display: block; margin-top: 15px; color: var(--wine); font-size: 10px; font-style: normal; letter-spacing: .1em;
}
.edition
{
    border: 1px solid #b9a998; padding: 45px 30px; text-align: center; background: #eee7dc;
}
.price
{
    font-size: 85px; line-height: 1; margin: 30px 0;
}
.edition ul
{
    list-style: none; padding: 0; font-size: 17px; line-height: 2;
}
.edition .fine
{
    margin: 20px 0 0;
}
.guarantee
{
    border-bottom: 1px solid var(--line); font-size: 15px; padding: 25px 0; margin: 0;
}
details
{
    border-top: 1px solid var(--line); padding: 18px 0; font-size: 17px;
}
summary
{
    cursor: pointer; font-size: 21px;
}
details p
{
    margin: 15px 0;
}
.final
{
    text-align: center; padding: 65px 24px 90px;
}
footer
{
    border-top: 1px solid var(--line); font-size: 9px; letter-spacing: .03em;
}
dialog
{
    width: min(620px, calc(100% - 32px)); max-height: 85dvh; padding: 45px; border: 1px solid var(--line); color: var(--ink); background: var(--paper);
}
dialog::backdrop
{
    background: #25221eb3;
}
.close
{
    position: absolute; right: 15px; top: 10px; background: transparent; border: 0; font-size: 30px; cursor: pointer;
}
.reader-controls
{
    display: flex; justify-content: space-between; gap: 15px; font: 12px "Segoe UI", sans-serif; margin: 25px 0;
}
.reader-controls button
{
    border: 1px solid var(--line); padding: 10px; background: transparent; cursor: pointer;
}
dialog .text-button
{
    display: block; margin: 15px 0;
}
.sticky-buy
{
    display: none;
}
:focus-visible
{
    outline: 2px solid var(--wine); outline-offset: 4px;
}
@keyframes settle
{
    from { transform: rotateY(-28deg) translateY(20px); opacity: 0; }
    to { transform: rotateY(-14deg) translateY(0); opacity: 1; }
}
@media (max-width: 1100px)
{
    aside { display: none; }
}
@media (max-width: 767px)
{
    body { font-size: 19px; padding-bottom: 55px; }
    header { padding: 22px; font-size: 9px; letter-spacing: .05em; }
    header span { margin-left: 8px; }
    .hero { display: flex; flex-direction: column-reverse; gap: 30px; padding: 25px 25px 60px; }
    .book-stage { min-height: 315px; width: 100%; }
    .book { width: 210px; height: 300px; }
    .spine { height: 300px; }
    .pages { height: 290px; }
    .cover-title { font-size: 39px; margin-top: 25px; }
    .front { padding: 22px; }
    .front > p { font-size: 7px; }
    h1 { font-size: 43px; }
    .reading { padding: 48px 25px; }
    .spreads { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 25px 30px; gap: 25px; }
    .spreads article { min-width: 300px; transform: none !important; scroll-snap-align: center; }
    .for { grid-template-columns: 1fr; gap: 10px; }
    .about { flex-direction: column; }
    .edition { padding: 35px 22px; }
    footer { flex-direction: column; padding: 25px; }
    .sticky-buy.visible { display: block; position: fixed; bottom: 0; left: 0; right: 0; text-align: center; z-index: 30; }
    dialog { padding: 35px 25px; }
}
@media (prefers-reduced-motion: reduce)
{
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}
