/* The app's own look: plain shelf colours, a serif for titles, and colour that comes from the covers. */
:root {
  color-scheme: light dark;
  --bg: light-dark(#ffffff, #161918); --soft: light-dark(#f3f5f4, #1d2120); --text: light-dark(#171a19, #eef1ef); --muted: light-dark(#56605c, #a9b3af); --line: light-dark(#dfe4e2, #343b38);
  --green: #0f5c3f; --rust: #99401f; --blue: #234a8c; --teal: #15565f; --paper: #fbf8f1; --ink: #24211b;
  --serif: ui-serif, "New York", Georgia, serif;
  /* The same left edge everywhere, 1240px apart at the most. */
  --edge: max(clamp(22px, 5vw, 72px), (100vw - 1240px) / 2);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text); background: var(--bg);
  -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(44px, 6vw, 84px); line-height: 1.02; }
h2 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.08; }
h3 { font: 600 20px/1.3 var(--serif); margin-bottom: 6px; }
.name { font: 600 24px/1 var(--serif); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 9; padding: 8px 14px; background: #fff; color: #000; }

/* Top: the shelf's colour with a row of books standing in it, up to the edges. */
.hero { --tall: max(600px, min(720px, 92svh)); position: relative; display: grid; grid-template: auto 1fr / minmax(0, 1fr) auto; min-height: var(--tall); background: var(--green); color: #fff; overflow: hidden; }
.hero nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; padding: 26px 16px 0 var(--edge); }
.hero nav a { text-decoration: none; }
.hero nav a:hover { text-decoration: underline; }
.hero nav .name { margin-right: 6px; }
.hero-text { align-self: center; max-width: calc(var(--edge) + 620px); padding: 48px 40px 64px var(--edge); }
.hero-text > p { margin-top: 24px; max-width: 34em; font-size: 19px; text-wrap: pretty; }
.hero-text .soon { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 32px; font-size: 17px; }
.soon strong { padding: 11px 20px; border-radius: 24px; background: var(--paper); color: var(--ink); font: 600 18px/1.3 var(--serif); }
.spines { grid-area: 1 / 2 / 3 / 3; display: flex; width: calc(var(--tall) * 2 / 3 + 11 * clamp(20px, 2.3vw, 44px)); height: 100%; min-height: 100%; }
.spines span { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; transition: flex-basis .6s cubic-bezier(.45, .05, .15, 1), flex-grow .6s cubic-bezier(.45, .05, .15, 1); }
/* As wide as the cover is, for its height. */
.spines span.open { flex: 0 0 calc(var(--tall) * 2 / 3); }
.spines img { position: absolute; top: 0; left: 50%; width: auto; max-width: none; height: 100%; translate: -50%; }
.spines span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0006, #ffffff2e 22%, transparent 50%, #00000059); transition: opacity .6s; }
.spines span.open::after { opacity: .25; }

/* Sections */
section { padding: clamp(72px, 9vw, 128px) var(--edge); }
.intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px 64px; align-items: end; max-width: 1240px; margin: 0 auto clamp(36px, 5vw, 64px); }
.intro p { font-size: 18px; text-wrap: pretty; max-width: 36em; }
.window { position: relative; max-width: 1240px; margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px #0f1a1626, 0 30px 80px #0f1a1640; }
/* The window buttons, which the picture leaves room for. */
.window i, .window i::before, .window i::after { position: absolute; z-index: 1; width: .97%; aspect-ratio: 1; border-radius: 50%; background: #ff5f57; }
.window i { left: 1.5%; top: 2.9%; }
.window i::before, .window i::after { content: ""; width: 100%; left: 165%; background: #febc2e; }
.window i::after { left: 330%; background: #28c840; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 40px; max-width: 1240px; margin: clamp(40px, 5vw, 64px) auto 0; }
.facts p, .pair p { color: var(--muted); font-size: 16px; }

.opens { background: var(--rust); color: #fff; }
.volume { width: min(1080px, 100%); margin: 0 auto; border-radius: 10px; box-shadow: 0 34px 80px #0000006b, 0 4px 14px #00000047; }

.reads { background: light-dark(#f1ebdd, #211f1a); }

.kindle { background: var(--blue); color: #fff; }
.ways { display: grid; grid-template-columns: 1.5fr 1fr 1fr; max-width: 1240px; margin: 0 auto; border-top: 1px solid #ffffff59; }
.ways li { padding: 26px 32px 0 0; }
.ways li + li { padding-left: 32px; border-left: 1px solid #ffffff59; }
.ways li:first-child h3 { font-size: 28px; line-height: 1.2; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 64px; max-width: 1240px; margin: 0 auto; padding-top: 32px; border-top: 1px solid var(--line); }
.pair h3 { font-size: 24px; }
.pair p { max-width: 34em; font-size: 17px; }

.account { background: var(--teal); color: #fff; }
.account .intro { grid-template-columns: minmax(0, 15em); font-size: clamp(34px, 4.2vw, 56px); }
.offer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 64px; max-width: 1240px; margin: 0 auto; }
.price { font-size: 18px; }
.price strong { display: block; font: 500 clamp(64px, 8vw, 112px)/1 var(--serif); letter-spacing: -.03em; }
.offer ul { display: grid; gap: 22px; }
.offer > p:last-child { grid-column: 2; padding-top: 24px; border-top: 1px solid #ffffff59; font-size: 16px; }

.questions { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 64px; }
details { border-bottom: 1px solid var(--line); }
details:first-child { border-top: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 20px; padding: 17px 0; font: 600 19px/1.35 var(--serif); cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 300 25px/1 -apple-system, sans-serif; color: var(--muted); }
details[open] summary::after { content: "–"; }
details p { padding: 0 40px 22px 0; color: var(--muted); }

footer { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr; gap: 28px 48px; align-items: end; padding: 64px var(--edge) 44px; background: var(--green); color: #fff; font-size: 15px; }
footer .name { margin-bottom: 14px; font-size: 40px; }
address { font-style: normal; }
.lost { display: grid; place-content: center; gap: 16px; min-height: 100svh; padding: var(--edge); background: var(--green); color: #fff; }

@media (max-width: 1180px) {
  .hero { --tall: min(92vw, 520px); grid-template: auto auto auto / minmax(0, 1fr); min-height: 0; }
  .hero-text { max-width: none; padding: 52px var(--edge) 44px; }
  .spines { grid-area: 3 / 1; width: 100%; height: var(--tall); min-height: 0; }
}
@media (max-width: 900px) {
  .intro, .account .intro, .offer, .questions, .pair { grid-template-columns: minmax(0, 1fr); }
  .offer > p:last-child { grid-column: 1; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ways { grid-template-columns: minmax(0, 1fr); border: 0; }
  .ways li, .ways li + li { padding: 22px 0; border: 0; border-top: 1px solid #ffffff59; }
  .window { border-radius: 8px; }
  footer { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .hero nav { gap: 8px 18px; font-size: 15px; }
  .hero nav .name { width: 100%; }
  /* Large enough to make something out: the part that matters, not the whole window. */
  .library .window img, .reads .window img { width: 175%; max-width: none; }
  .library .window i { width: 1.7%; left: 2.6%; top: 2.9%; }
}
@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } .spines span, .spines span::after { transition: none; } }
