:root {
  color-scheme: light;
  --paper: #f7f2e7;
  --ink: #2d2224;
  --wine: #692f3d;
  --dark: #24191c;
  --gold: #e4bd75;
  --line: #d9c7ac;
  --serif: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 system-ui,sans-serif; }
[hidden] { display: none !important; }
a { color: var(--wine); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid #a05d14; outline-offset: 4px; }
.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.bar { background: var(--dark); color: var(--paper); border-bottom: 1px solid #705340; }
.bar .wrap,.footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem 1.6rem; padding-block: .85rem; }
.bar a { color: inherit; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; font: 1.05rem var(--serif); }
.brand img { width: 2.4rem; border-radius: 50%; }
nav { display: flex; flex-wrap: wrap; gap: .4rem 1.45rem; }
nav a { padding: .25rem 0; }
.hero { background: radial-gradient(ellipse at 78% 40%, #542c32, transparent 62%), var(--dark); color: var(--paper); }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: center; padding-block: clamp(3rem, 8vw, 7rem); }
.hero img { width: min(100%, 16rem); height: auto; border-radius: 50%; justify-self: center; box-shadow: 0 0 0 1px #ae824b, 0 0 3rem #dba86638; }
h1,h2,h3 { font-family: var(--serif); line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.5rem, 6.7vw, 5.6rem); letter-spacing: -.05em; }
h2 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); letter-spacing: -.04em; }
h3 { font-size: 1.45rem; }
.hero p { color: #f0ddc4; max-width: 42ch; margin: 1.35rem 0 1.7rem; font-size: 1.08rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.1rem; }
.hero-link { color: var(--gold); }
.button,button { display: inline-block; border: 1px solid transparent; border-radius: .32rem; padding: .55rem .85rem; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.button:hover { text-decoration: underline; }
.gold { background: var(--gold); color: var(--dark); }
.primary { background: var(--wine); color: #fffaf2; }
.section { padding-block: clamp(2.7rem, 6vw, 5rem); }
.idea { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 2rem 4rem; }
.idea p:last-child { margin-bottom: 0; }
blockquote { margin: 0; padding: 1.5rem; border-left: 2px solid #ae824b; background: #eee4d1; font: clamp(1.05rem, 2.5vw, 1.45rem)/1.55 var(--serif); }
cite { display: block; margin-top: .7rem; color: var(--wine); font: .86rem system-ui,sans-serif; }
.shelf { background: #efe6d7; border-block: 1px solid var(--line); }
.books,.rituals { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; margin-top: 1.65rem; }
.book { display: grid; grid-template-columns: minmax(4rem, 29%) 1fr; align-items: center; gap: 1.05rem; background: var(--paper); border: 1px solid var(--line); border-radius: .5rem; padding: 1.05rem; }
.cover { display: block; align-self: start; }
.cover img { display: block; width: 100%; box-shadow: 0 .25rem .8rem #32202633; }
.book p { margin: .55rem 0 .8rem; }
.book .actions { font-size: .91rem; }
.rituals article { border-top: 1px solid var(--line); padding: 1.25rem 1.15rem 0 0; }
li + li { margin-top: .35rem; }
.note,.footer { font-size: .88rem; }
.footer { background: var(--dark); color: #f0ddc4; padding-block: 1rem; }
.footer a { color: var(--gold); }
.footer p { margin: .25rem 0; }
.reader { background: #eee6da; }
.reading { padding-block: 2rem 3rem; }
.reading h1 { font-size: clamp(2rem, 5vw, 3.7rem); }
.reading-links { margin-block: .5rem 1rem; }
.controls, #jump { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.controls { margin-block: 1rem .75rem; }
.controls button { color: var(--ink); background: var(--paper); border-color: #ae9782; }
.controls button:disabled { opacity: .45; cursor: default; }
.controls input { width: 4.4rem; padding: .55rem .35rem; border: 1px solid #ae9782; border-radius: .3rem; font: inherit; }
.stage { display: flex; align-items: flex-start; justify-content: center; gap: .25rem; overflow: auto; background: #30282b; border-radius: .4rem; padding: clamp(.35rem, 2vw, 1rem); touch-action: pan-y pinch-zoom; }
.stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 78vh; object-fit: contain; box-shadow: 0 .2rem .7rem #0007; }
.stage.spread img { max-width: calc(50% - .125rem); align-self: center; }
.stage.zoomed { justify-content: flex-start; touch-action: auto; max-height: 82vh; }
.stage.zoomed img { max-height: none; max-width: none; width: min(125vw, 56rem); flex: none; }
.stage.turn img { animation: turn-in .24s ease-out; }
@keyframes turn-in { from { opacity: .5; transform: perspective(65rem) rotateY(-6deg); } }
.counter { margin-block: .45rem .8rem; }
details { border-top: 1px solid #ae9782; padding-top: .6rem; }
summary { cursor: pointer; }
.page-text { white-space: pre-line; max-width: 65ch; }
@media(max-width: 47rem) {
  .books,.idea { grid-template-columns: 1fr; }
}
@media(max-width: 34rem) {
  .hero-grid,.rituals { grid-template-columns: 1fr; }
  .hero img { grid-row: 1; justify-self: start; width: 6.25rem; }
  .hero-grid { gap: 1.4rem; }
  .wrap { width: calc(100% - 1.6rem); }
}
@media(prefers-reduced-motion: reduce) { .stage.turn img { animation: none; } }
