:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f5f3e9;
  background: #081010;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #081010; }
body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 50% -20%, #243333, #081010 54%); }
a { color: inherit; text-decoration: none; }

.site-header {
  display: flex;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 28px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.brand { display: flex; align-items: center; gap: 14px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px, 3vw, 39px); font-weight: 400; letter-spacing: -.025em; }
.brand strong { font-weight: 700; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.48); border-radius: 50%; font-size: 23px; }
.site-header > p { margin: 0; color: rgba(255,255,255,.57); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

main { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: clamp(34px, 6vw, 78px) 0; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 30px); }
.book {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: clamp(480px, 63vw, 680px);
  overflow: hidden;
  align-items: flex-end;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0,0,0,.38);
  transition: transform .35s cubic-bezier(.2,.75,.3,1), border-color .25s, box-shadow .35s;
}
.book:hover, .book:focus-visible { z-index: 2; border-color: rgba(255,255,255,.62); box-shadow: 0 34px 90px rgba(0,0,0,.56); outline: none; transform: translateY(-8px); }
.book-image, .book-shade { position: absolute; z-index: -2; inset: 0; }
.book-image { background-position: center; background-size: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .5s; }
.book:hover .book-image, .book:focus-visible .book-image { transform: scale(1.035); filter: saturate(1.12); }
.palezoic-book .book-image { background-image: url("palezoic/scene3.jpg"); }
.egypt-book .book-image { background-image: url("egypt/panoramas/Scene8-Palace.jpg"); background-position: 62% center; }
.mesozoic-book .book-image { background-image: url("mesozoic-seas/tiles/0-besano-fm/preview.jpg"); background-size: 100% 600%; background-position: center top; }
.mesozoic-book .book-kicker { color: #69e7ff; }
.book-shade { z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(0,0,0,.2) 48%, rgba(2,8,9,.93) 100%); }
.book::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 8px; background: linear-gradient(90deg, rgba(0,0,0,.42), rgba(255,255,255,.08), transparent); }
.book-number { position: absolute; top: 24px; right: 25px; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.book-copy { width: 100%; padding: clamp(27px, 4vw, 46px); }
.book-kicker { margin: 0 0 11px; color: #c6dfb7; font-size: 10px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }
.egypt-book .book-kicker { color: #f2c45c; }
.book h1 { max-width: 11ch; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 5vw, 70px); font-weight: 400; letter-spacing: -.04em; line-height: .95; }
.book h1 strong { display: block; font-weight: 400; }
.book-copy > p:not(.book-kicker) { max-width: 48ch; margin: 19px 0 25px; color: rgba(255,255,255,.76); font-size: 14px; line-height: 1.6; }
.book-link { display: inline-flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.5); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.book-link i { font-size: 17px; font-style: normal; transition: transform .2s; }
.book:hover .book-link i { transform: translateX(5px); }

footer { display: flex; width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 22px 0 30px; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.42); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }

@media (max-width: 760px) {
  .site-header { width: calc(100% - 32px); padding: 25px 0 20px; }
  .site-header > p { display: none; }
  .brand-mark { width: 35px; height: 35px; font-size: 19px; }
  main { width: calc(100% - 32px); padding: 26px 0 38px; }
  .book-grid { grid-template-columns: 1fr; }
  .book { min-height: 520px; }
  .book h1 { font-size: clamp(43px, 14vw, 62px); }
  footer { width: calc(100% - 32px); }
  footer span:last-child { display: none; }
}

@media (min-width: 761px) and (max-width: 1040px) {
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mesozoic-book { grid-column: 1 / -1; min-height: 540px; }
}

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