:root {
  --paper: #fbf8f3;      /* warm paper, the page */
  --navy: #21315e;       /* night blue: text and the duotone */
  --ebony: #29292b;      /* the layer in difference over the photo */
  --line: rgba(33, 49, 94, 0.14);
  --white: #ffffff;
  --serif: 'Fraunces Variable', 'Times New Roman', serif;
  --sans: 'Mona Sans Variable', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--navy);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.page {
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(8px, 2.4vh, 26px);
  padding: clamp(12px, 3.4vh, 40px) clamp(12px, 3vw, 44px);
  max-width: 1240px;
  margin: 0 auto;
}

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(6px, 1.4vh, 12px);
}

.brand {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 48, 'SOFT' 50;
  font-size: clamp(16px, min(2.2vw, 3.6vh), 24px);
  letter-spacing: -0.01em;
}

.book {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
  text-decoration: none;
  font-size: clamp(11px, min(1.2vw, 2.4vh), 13px);
  font-variation-settings: 'wdth' 100;
}
.book svg { width: 9px; height: 9px; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@media (hover: hover) {
  .book:hover svg { transform: translate(2px, -2px); }
}

.title {
  font-family: var(--serif);
  font-weight: 340;
  font-variation-settings: 'opsz' 96, 'SOFT' 30;
  font-size: clamp(22px, min(4.6vw, 7.4vh), 62px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.title > span { display: inline; }
.title > .title__indent { display: inline-block; width: clamp(28px, 6vw, 120px); }
.title > span:last-child { display: block; }

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1.1vw, 16px);
  min-height: 0;
}

.tile {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(5px, 1.2vh, 12px);
  min-height: 0;
  color: var(--navy);
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.tile__media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper);
  min-height: 0;
  isolation: isolate;
}

.tile__move {
  position: absolute;
  left: 0; right: 0;
  top: -5%;
  height: 110%;
  display: block;
}
.tile__move img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--fx, 50%) 50%;
  display: block;
  opacity: 0.8;
  filter: saturate(0);
}

.tile__layer { position: absolute; inset: 0; pointer-events: none; }
.tile__layer--ebony { background: var(--ebony); mix-blend-mode: difference; z-index: 3; }
.tile__layer--blue { background: var(--navy); mix-blend-mode: screen; z-index: 2; }
.tile__layer--black { background: #000; opacity: 0.1; z-index: 2; }

.tile__grain {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0.16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.tile__sheen {
  position: absolute; top: 0; left: 0; right: 0; height: 1px; z-index: 5; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85) 50%, transparent);
  opacity: 0;
}

.tile__veil { position: absolute; inset: 0; z-index: 7; background: var(--paper); opacity: 0; pointer-events: none; }

.tile__label {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: var(--white);
  font-size: clamp(10px, min(1.1vw, 2.6vh), 13px);
  font-weight: 500;
  font-variation-settings: 'wdth' 112;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  text-shadow: 0 1px 10px rgba(20, 24, 40, 0.25);
}
.tile__dot {
  width: 0.55em; height: 0.55em;
  border-radius: 50%;
  background: var(--white);
  transform: scale(0);
  margin-left: -1.1em;
}

.tile__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: clamp(10px, min(1.1vw, 2.5vh), 13px);
  font-variation-settings: 'wdth' 92;
  border-top: 1px solid var(--line);
  padding-top: clamp(4px, 1vh, 9px);
  white-space: nowrap;
  min-width: 0;
}
.tile__kind { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tile__count { overflow: hidden; display: inline-block; flex: none; }
.tile__count > span { display: inline-block; opacity: 0.6; }

@media (max-width: 560px) {
  .tile__kind { display: none; }
  .tile__foot { justify-content: flex-start; }
  .tile__count > span { transform: none; opacity: 0.45; }
}
