/* Saving Hosanna — savinghosanna.com. Shared styles for every page. */

@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --ink: #0b0b0b;
  --gold: #d9b56c;
  --gold-deep: #c9a35e;
  --rule: #8a6f3e;
  --label: #7d6436;            /* small gold labels on cream: 5.2:1, meets WCAG AA (was 4.4:1) */
  --cream: #faf7f0;
  --cream-line: #d8ccb2;
  --text-dark: #2a2621;
  --text-light: #f2ede3;
  --muted-light: #b9b1a2;
  --muted-dark: #6b6359;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-dark);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-deep); }
.on-cream .eyebrow, .eyebrow.on-cream { color: var(--label); }

/* keyboard users: skip link and visible focus everywhere */
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--gold); color: var(--ink); text-decoration: none; font-size: 16px; }
.skip:focus { top: 12px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.on-cream a:focus-visible { outline-color: var(--rule); }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: var(--text-light); padding: 56px 0 72px; }
.masthead { text-align: center; margin-bottom: 48px; }
.masthead .now { display: inline-flex; align-items: center; gap: 14px; margin-top: 10px;
  font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: #e9e2d2; }
.masthead .now::before, .masthead .now::after { content: ""; width: 48px; height: 1px; background: var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; }
/* ---------- 3D book: CSS spin (24 s a turn), pauses on hover, still for reduced motion; book.js adds drag-to-turn ---------- */
.cover { --bw: 320px; --bh: 480px; --bd: 56px; padding: 10px 0 10px; }   /* 6 x 9 in, 424-page cream spine = 1.06 in */
.scene { display: block; position: relative; width: var(--bw); height: var(--bh); margin: 0 auto; perspective: 2000px; text-decoration: none; }
.book { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: spin 24s linear infinite; }
.face { position: absolute; top: 0; left: 0; display: block; background-color: #0b0b0b; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; }
.front { width: var(--bw); height: var(--bh); transform: translateZ(calc(var(--bd) / 2));
  background-image: url("/cover-front.jpg"); background-image: image-set(url("/cover-front.webp") type("image/webp"), url("/cover-front.jpg") type("image/jpeg"));
  box-shadow: inset 4px 0 6px rgba(0,0,0,.35); }   /* square corners, trimmed flush with the pages like a real paperback */
.back { width: var(--bw); height: var(--bh); transform: rotateY(180deg) translateZ(calc(var(--bd) / 2));
  background-image: url("/cover-back.jpg"); background-image: image-set(url("/cover-back.webp") type("image/webp"), url("/cover-back.jpg") type("image/jpeg"));
}
.spine { width: var(--bd); height: var(--bh); transform: rotateY(-90deg) translateZ(calc(var(--bd) / 2));
  background-image: url("/cover-spine.jpg"); background-image: image-set(url("/cover-spine.webp") type("image/webp"), url("/cover-spine.jpg") type("image/jpeg")); }
/* the page block: fore-edge, head and tail all meet square at the corners, cream to cream, the way
   a trimmed paperback does; only a hairline of cover card shows along each edge */
.edge { width: var(--bd); height: var(--bh); top: 0; transform: rotateY(90deg) translateZ(calc(var(--bw) - var(--bd) / 2));
  background:
    linear-gradient(to right, #2b2620 0 1px, transparent 1px calc(100% - 1px), #2b2620 calc(100% - 1px)),
    linear-gradient(to bottom, rgba(0,0,0,.10), rgba(0,0,0,0) 6%, rgba(0,0,0,0) 94%, rgba(0,0,0,.10)),
    repeating-linear-gradient(to right, #f3ecdb 0, #f3ecdb 1px, #e6dcc6 1px, #e6dcc6 3px); }
.face.top, .face.bottom { width: var(--bw); height: var(--bd);
  background:
    linear-gradient(to bottom, #2b2620 0 1px, transparent 1px calc(100% - 1px), #2b2620 calc(100% - 1px)),
    linear-gradient(to right, rgba(0,0,0,.18), rgba(0,0,0,0) 5%, rgba(0,0,0,0) 96%, rgba(0,0,0,.06)),
    repeating-linear-gradient(to bottom, #f3ecdb 0, #f3ecdb 1px, #e6dcc6 1px, #e6dcc6 3px); }
.face.top { top: calc(var(--bd) / -2); transform: rotateX(90deg); }
.face.bottom { top: calc(var(--bh) - var(--bd) / 2); transform: rotateX(-90deg); }
.pages { position: absolute; display: block; width: calc(var(--bw) - 4px); height: calc(var(--bh) - 6px); top: 3px; left: 0;
  transform: translateZ(calc(var(--bd) / -2 + 2px)); background: #efe7d4; }
.book-shadow { position: absolute; left: 50%; bottom: -60px; width: calc(var(--bw) * 1.5); height: 50px; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0,0,0,.85) 0%, transparent 70%); filter: blur(12px); animation: shadow 24s linear infinite; }
.scene:hover .book, .scene:hover .book-shadow, .scene:focus-visible .book, .scene:focus-visible .book-shadow { animation-play-state: paused; }
.scene { cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.scene:active { cursor: grabbing; }
.scene.held .book, .scene.held .book-shadow { animation: none; }   /* book.js: visitor is turning it by hand */
@keyframes spin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
@keyframes shadow { 0%, 50%, 100% { transform: translateX(-50%) scaleX(1); opacity: .9; } 25%, 75% { transform: translateX(-50%) scaleX(.55); opacity: .6; } }
@media (prefers-reduced-motion: reduce) {
  .book { animation: none; transform: rotateY(-24deg); }
  .book-shadow { animation: none; }
}
/* "Look inside" sits under the spinning book; book.js flies the book forward and opens it */
.look-under { margin: 64px 0 0; text-align: center; }
.look-link { display: inline-block; padding: 17px 40px; background: var(--gold); color: var(--ink); border: 1px solid var(--gold);
  font-size: 16px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; transition: background .2s, border-color .2s; }
.look-link:hover, .look-link:focus-visible { background: #f0d79c; border-color: #f0d79c; color: var(--ink); }
.look-note { margin: 12px 0 0; font-size: 15px; font-style: italic; color: var(--muted-light); }
h1 { margin: 0; font-weight: 400; color: var(--gold);
  font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: .08em; text-transform: uppercase; }
.subtitle { margin: 14px 0 0; font-style: italic; font-size: 24px; line-height: 1.35; color: #e9e2d2; }
.byline { margin: 18px 0 0; font-size: 14px; line-height: 1.9; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-light); }
.hook { margin: 30px 0 0; font-size: 19px; line-height: 1.65; color: var(--text-light); }
.named { margin: 22px 0 0; font-style: italic; font-size: 27px; color: var(--gold); }
.reach { margin: 22px 0 0; font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); }
.order { display: inline-block; margin-top: 34px; padding: 17px 40px;
  background: var(--ink); color: var(--gold); border: 1px solid var(--gold-deep);
  font: inherit; font-size: 16px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s; }
.order:hover, .order:focus-visible { background: var(--gold); color: var(--ink); }
.order-note { margin: 12px 0 0; font-size: 15px; font-style: italic; color: var(--muted-light); }

/* ---------- quote ---------- */
.quote { background: var(--cream); padding: 72px 0 64px; text-align: center; }
.quote blockquote { margin: 0 auto; max-width: 720px; font-style: italic; font-size: clamp(23px, 3vw, 29px); line-height: 1.45; }
.quote .who { margin-top: 18px; font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--label); }
.quote .role { margin-top: 2px; font-size: 15px; font-style: italic; color: var(--muted-dark); }

/* ---------- author ---------- */
.author { background: var(--cream); padding: 8px 0 80px; }
.author-inner { border-top: 1px solid var(--cream-line); padding-top: 64px;
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.author-photo img { width: 100%; max-width: 380px; margin: 0 auto; box-shadow: 0 10px 30px rgba(42,38,33,.18); }
.author h2 { margin: 8px 0 22px; font-weight: 400; font-size: 36px; line-height: 1.15; color: var(--text-dark); }
.author p { margin: 0 0 18px; }
.author .first { font-size: 23px; font-style: italic; color: var(--label); }

/* ---------- contact ---------- */
.contact { background: var(--ink); color: var(--text-light); padding: 64px 0 56px; }
.contact-head { text-align: center; }
.contact h2 { margin: 10px 0 12px; font-weight: 400; font-size: 32px; color: var(--gold); }
.contact-head p { margin: 0 auto; max-width: 560px; color: #e9e2d2; }
.form { max-width: 560px; margin: 32px auto 0; }
.form .row { margin: 0 0 18px; }
.form label { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep); }
.form input, .form textarea { width: 100%; padding: 12px 14px; font: inherit; font-size: 18px; color: var(--text-light);
  background: #151412; border: 1px solid #4a4134; border-radius: 0; }
.form textarea { min-height: 170px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--gold-deep); }
.form .send { text-align: center; }
.form .order { margin-top: 6px; }
.form .note { margin: 14px 0 0; text-align: center; font-size: 15px; font-style: italic; color: var(--muted-light); }
.form .note a { color: var(--muted-light); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- simple pages: thank you, privacy, not found ---------- */
.page { background: var(--ink); color: var(--text-light); min-height: 70vh; padding: 64px 0 72px; }
.page .wrap { max-width: 720px; }
.page-center { text-align: center; }
.page h1 { font-size: clamp(34px, 5vw, 48px); }
.page .lede { margin: 18px auto 0; max-width: 560px; font-size: 21px; color: #e9e2d2; }
.page .actions { margin-top: 30px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.page .actions .order { margin-top: 0; }
.page .lede.small { font-size: 17px; }
.page .lede a { color: var(--gold); }
.page.short { min-height: 0; padding-bottom: 48px; }
.prose { background: var(--cream); color: var(--text-dark); padding: 56px 0 72px; }
.prose .wrap { max-width: 720px; }
.prose h2 { margin: 34px 0 10px; font-weight: 400; font-size: 27px; color: var(--text-dark); }
.prose p { margin: 0 0 16px; }
.prose a { color: var(--text-dark); }

footer { background: var(--ink); color: #9a9283; text-align: center; padding: 28px 24px 40px; font-size: 14px; }
footer .imprint { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px; }
footer a { color: #9a9283; }
footer .links { margin-top: 8px; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  body { font-size: 18px; }
  .hero { padding: 40px 0 56px; }
  .masthead { margin-bottom: 32px; }
  .hero-grid, .author-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-text { text-align: center; }
  .cover { --bw: 230px; --bh: 345px; --bd: 40px; padding: 0 0 6px; }
  .look-under { margin-top: 56px; }
  .look-link { display: block; padding: 17px 20px; }
  .hook { text-align: left; }
  .hero .order { display: block; padding: 17px 20px; }
  .author-photo img { max-width: 300px; }
  .author-inner { padding-top: 48px; }
  .quote { padding: 56px 0 48px; }
  .form .order { width: 100%; }
}
@media (max-width: 380px) {
  .quote blockquote { font-size: 20px; }   /* keeps the quote on its two ruled lines on the smallest phones */
}
@media (max-width: 340px) {
  .quote blockquote { font-size: 18px; }
}

/* ---------- look inside: sample pages ---------- */
.reader { background: #1a1815; padding: 48px 0 56px; }
.sheets { max-width: 620px; margin: 0 auto; padding: 0 20px; display: grid; gap: 28px; }
.sheet { margin: 0; background: #fff; box-shadow: 0 10px 34px rgba(0,0,0,.55); }
.sheet img { width: 100%; }
.page .end-title { margin: 10px 0 0; font-weight: 400; font-size: clamp(30px, 4.4vw, 42px); color: var(--gold); }
@media (max-width: 760px) { .reader { padding: 28px 0 36px; } .sheets { gap: 18px; padding: 0 12px; } }

/* ---------- look inside: book reader (reader.js); the list above is the no-script fallback ---------- */
.js .sheets { display: none; }
.look-head { min-height: 0; padding-bottom: 8px; }
.js .look-head { padding: 20px 0 8px; position: relative; z-index: 5; }   /* a lifted page passes behind the title, not over it */
.js .look-head h1 { font-size: clamp(24px, 2.6vw, 32px); margin-top: 4px; }
.js .reader { padding: 40px 0 40px; min-height: calc(100vh - 87px); display: flex; flex-direction: column; justify-content: center; }   /* book sits centred in the space under the title */
.reader-app { padding: 0 12px; }
.rstage { display: flex; align-items: center; justify-content: center; gap: 22px; }
.bookview { position: relative; flex: none; perspective: calc(var(--pw) * 7); transition: transform .9s cubic-bezier(.42,0,.28,1); cursor: pointer;
  -webkit-user-select: none; user-select: none; touch-action: pan-y; }
/* desktop: as large as the screen allows with the whole spread in view */
.bookview.two { --pw: min(640px, calc((100vw - 200px) / 2), calc((100vh - 242px) / 1.5)); width: calc(var(--pw) * 2); height: calc(var(--pw) * 1.5); }
.bookview.one { --pw: min(560px, calc(100vw - 24px)); width: var(--pw); height: calc(var(--pw) * 1.5); }
.bookview.closed { transform: translateX(-25%); }
.bookview .side { position: absolute; top: 0; height: 100%; }
.bookview .side.left { left: 0; width: 50%; }
.bookview .side.right { left: 50%; width: 50%; }
.bookview .side.single { left: 0; width: 100%; }
.pg { position: relative; width: 100%; height: 100%; background: #fff; overflow: hidden; }
.pg img { width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.side.left .pg { box-shadow: -6px 8px 24px rgba(0,0,0,.45); }
.side.right .pg, .side.single .pg { box-shadow: 6px 8px 24px rgba(0,0,0,.45); }
/* each page's drop shadow falls outward only, never across the fold, so a page that has just
   turned looks exactly the same once it lands */
.side.left .pg { clip-path: inset(-60px 0 -60px -60px); }
.side.right .pg { clip-path: inset(-60px -60px -60px 0); }
.pg.none { background: transparent; box-shadow: none !important; }
.pg.inside { background: #f3eee2; }
.pg.cover-pg { background: #0b0b0b; border-radius: 0 3px 3px 0; }
/* gutter: each page carries its own fold shading, so it moves with the paper */
.pg.verso::after, .pg.recto::after { content: ""; position: absolute; top: 0; bottom: 0; width: 9%; pointer-events: none; z-index: 1; }
.pg.verso::after { right: 0; background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,.07) 50%, rgba(0,0,0,.30)); }
.pg.recto::after { left: 0; background: linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,.07) 50%, rgba(0,0,0,.30)); }
.pg.none::after, .pg.cover-pg::after { display: none; }
.leaf { position: absolute; top: 0; height: 100%; z-index: 3; transform-style: preserve-3d; }
.leaf.on-right { left: 50%; width: 50%; transform-origin: left center; }
.leaf.on-left { left: 0; width: 50%; transform-origin: right center; }
.leaf.on-single { left: 0; width: 100%; transform-origin: left center; }
.leaf .pg { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: none; }
.leaf .face-back { transform: rotateY(180deg); }
.shade, .cast { position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0; }
.face-front.recto .shade, .face-front.cover-pg .shade { background: linear-gradient(to right, rgba(0,0,0,.55), rgba(0,0,0,.15)); }
.face-back.verso .shade, .face-front.verso .shade { background: linear-gradient(to left, rgba(0,0,0,.55), rgba(0,0,0,.15)); }
.face-back.recto .shade { background: linear-gradient(to right, rgba(0,0,0,.55), rgba(0,0,0,.15)); }
.recto .cast { background: linear-gradient(to right, rgba(0,0,0,.6), rgba(0,0,0,0) 70%); }
.verso .cast { background: linear-gradient(to left, rgba(0,0,0,.6), rgba(0,0,0,0) 70%); }
.pg.endpg { background: var(--cream); display: flex; align-items: center; justify-content: center; text-align: center; color: var(--text-dark); }
.endin { padding: 0 12%; position: relative; z-index: 3; }
.endin .eyebrow { color: var(--label); }
.endin .endtitle { margin: 12px 0 10px; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.2; color: var(--text-dark); }
.endin p { margin: 0; font-size: 17px; line-height: 1.5; }
.endin .order { margin-top: 22px; padding: 14px 22px; font-size: 14px; }
.turnbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; color: var(--gold); background: transparent;
  border: 1px solid var(--gold-deep); cursor: pointer; transition: background .2s, color .2s, opacity .2s; }
.turnbtn:hover:not(:disabled), .turnbtn:focus-visible { background: var(--gold); color: var(--ink); }
.turnbtn:disabled { opacity: .25; cursor: default; }
.rmeta { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 18px auto 0; }
.where { text-align: center; font-size: 15px; letter-spacing: .08em; color: #e9e2d2; }
.hint { margin: 10px 0 0; text-align: center; font-size: 15px; font-style: italic; color: var(--muted-light); }
@media (min-width: 900px) {
  /* big round arrows either side of the book */
  .turnbtn { width: 64px; height: 64px; border-radius: 50%; padding: 0; }
  .turnbtn .btntext { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .arrowglyph { font-size: 40px; line-height: 1; margin-top: -6px; }
}
@media (max-width: 899px) {
  .rstage { flex-wrap: wrap; gap: 10px; }
  .bookview { order: -1; flex: 0 0 auto; }
  .rstage .turnbtn { flex: 1 1 40%; padding: 12px 8px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-top: 12px; }
  .arrowglyph { font-size: 22px; line-height: 1; }
  .rmeta { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .bookview { transition: none; } }

/* ---------- close (×), the home-page reading view, and the flying book ---------- */
.rclose { position: fixed; top: 14px; right: 18px; z-index: 1003; width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font: inherit; font-size: 34px; line-height: 1; text-decoration: none;
  color: var(--gold); background: rgba(11,11,11,.85); border: 1px solid var(--gold-deep); cursor: pointer; transition: background .2s, color .2s; }
.rclose span { margin-top: -4px; }
.rclose:hover, .rclose:focus-visible { background: var(--gold); color: var(--ink); }
html.reading { overflow: hidden; }
.reader-overlay { position: fixed; inset: 0; z-index: 1000; overflow-y: auto; background: #1a1815; color: var(--text-light); display: flex; flex-direction: column; }
.ov-head { flex: none; position: relative; z-index: 5; background: var(--ink); text-align: center; padding: 20px 0 8px; }
.ov-title { margin: 4px 0 0; font-weight: 400; color: var(--gold); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.05; letter-spacing: .08em; text-transform: uppercase; }
.reader-overlay .reader-app { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; padding-top: 40px; padding-bottom: 40px; }   /* equal room above and below */
.flyer { position: fixed; z-index: 1001; perspective: 1800px; transform-origin: center center; pointer-events: none; will-change: transform; }
.flyer-book { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.flyer-front { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0 3px 3px 0; box-shadow: 0 30px 70px rgba(0,0,0,.6); }
.flyer-edge { position: absolute; top: 1%; right: 0; height: 98%; transform-origin: right center; transform: rotateY(-90deg);
  background: repeating-linear-gradient(to right, #f3ecdb 0, #f3ecdb 1px, #e6dcc6 1px, #e6dcc6 3px); }
@media (max-width: 899px) {
  .rclose { top: 10px; right: 10px; width: 44px; height: 44px; font-size: 30px; }
  .ov-head, .js .look-head .wrap { padding-left: 58px; padding-right: 58px; }   /* keep the title clear of the × */
}
