/* ==========================================================================
   The Unjust "Justice" — book website
   Concept: a case file read after hours. Ink-dark courtroom, brass scales,
   oxblood stamps, cold jail-light steel. One bold moment: the cell bars that
   open as you read (Three.js), everything else stays quiet.
   ========================================================================== */
:root {
  --ink: #090a0d;
  --ink-2: #11141a;
  --steel: #1b212a;
  --line: #2a323e;
  --paper: #e7e0ce;
  --paper-dim: #a8a495;
  --brass: #c0955a;
  --brass-dk: #8a6a3b;
  --blood: #a3283b;
  --blood-lt: #d8606f;
  --cold: #8ea4b8;

  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-body: "Newsreader", Georgia, "Times New Roman", serif;
  --f-docket: "Special Elite", "Courier New", monospace;

  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --maxw: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: clamp(1.06rem, 1rem + 0.28vw, 1.24rem);
  line-height: 1.68;
  font-optical-sizing: auto;
  overflow-x: hidden;
}
img,
svg,
canvas {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
p {
  margin: 0 0 1.1em;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.04;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 4px;
  border-radius: 2px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- backdrop layers ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      120% 90% at 50% 40%,
      rgba(9, 10, 13, 0) 35%,
      rgba(9, 10, 13, 0.78) 100%
    ),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.3'/></svg>");
  background-blend-mode: normal;
  opacity: 0.96;
}
.vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(9, 10, 13, 0);
}
main,
.site-foot {
  position: relative;
  z-index: 2;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 40px);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.sec {
  position: relative;
  padding-block: clamp(72px, 11vw, 160px);
}
.veil {
  background: linear-gradient(
    180deg,
    rgba(9, 10, 13, 0),
    rgba(9, 10, 13, 0.84) 16%,
    rgba(9, 10, 13, 0.84) 84%,
    rgba(9, 10, 13, 0)
  );
}
.veil-solid {
  background: rgba(9, 10, 13, 0.9);
}
.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--brass-dk), transparent);
  border: 0;
  margin: 0;
  transform-origin: left;
}

/* ---------- type ---------- */
.docket {
  font-family: var(--f-docket);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--brass);
  line-height: 1.5;
}
.docket.dim {
  color: var(--paper-dim);
}
.h-xl {
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: 0.98;
}
.h-lg {
  font-size: clamp(2.1rem, 4.8vw, 4.2rem);
}
.h-md {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}
.lede {
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.9rem);
  line-height: 1.45;
  color: var(--paper);
  max-width: 34ch;
  font-style: italic;
  font-weight: 400;
}
.measure {
  max-width: 62ch;
}
.dim {
  color: var(--paper-dim);
}
.mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.mask > span {
  display: inline-block;
  will-change: transform;
}
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
.w > i {
  display: inline-block;
  font-style: inherit;
  will-change: transform;
}

.stamp {
  display: inline-block;
  font-family: var(--f-docket);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blood-lt);
  border: 2px solid var(--blood-lt);
  border-radius: 3px;
  padding: 0.32em 0.8em 0.26em;
  transform: rotate(-4deg);
  opacity: 0.92;
  box-shadow: inset 0 0 0 1px rgba(216, 96, 111, 0.25);
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  min-height: 48px;
  font-family: var(--f-docket);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  background: var(--b);
  padding: 0.8em 1.5em;
  border: 1px solid var(--b);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  transition: color 0.35s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
  z-index: -1;
}
.btn:hover {
  color: var(--brass);
}
.btn:hover::before {
  transform: none;
}
.btn.ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn.ghost::before {
  background: var(--paper);
}
.btn.ghost:hover {
  color: var(--ink);
  border-color: var(--paper);
}
.btn svg {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.35s var(--ease);
}
.btn:hover svg {
  transform: translateX(4px);
}

/* ---------- header ---------- */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition:
    transform 0.5s var(--ease),
    background 0.4s;
}
.site-head.solid {
  background: rgba(9, 10, 13, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(42, 50, 62, 0.7);
}
.site-head.hide {
  transform: translateY(-110%);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--f-display);
  font-size: 1.22rem;
  font-style: italic;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.brand .mark {
  width: 26px;
  height: 26px;
  flex: none;
}
.nav {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.4rem);
  align-items: center;
}
.nav a {
  font-family: var(--f-docket);
  font-size: 1rem;
  color: var(--paper-dim);
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.3s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--paper);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
.burger {
  display: none;
  width: 48px;
  height: 48px;
  background: none;
  border: 0;
  color: var(--paper);
  cursor: pointer;
  position: relative;
  margin-right: -10px;
}
.burger i {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: currentColor;
  transition:
    transform 0.45s var(--ease),
    top 0.45s var(--ease);
}
.burger i:nth-child(1) {
  top: 19px;
}
.burger i:nth-child(2) {
  top: 28px;
}
.menu-open .burger i:nth-child(1) {
  top: 24px;
  transform: rotate(45deg);
}
.menu-open .burger i:nth-child(2) {
  top: 24px;
  transform: rotate(-45deg);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(9, 10, 13, 0.995);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: 90px var(--gutter-r) 40px var(--gutter-l);
}
.drawer a {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 10vw, 3.4rem);
  font-style: italic;
  line-height: 1.15;
  overflow: hidden;
  display: block;
}
.drawer a span {
  display: block;
}
.drawer .docket {
  margin-top: 1.5rem;
}
.menu-open .drawer {
  display: flex;
}

@media (max-width: 640px) {
  .hero-foot > div:last-child {
    justify-items: start !important;
    text-align: left !important;
  }
}
@media (max-width: 860px) {
  .nav {
    display: none;
  }
  .burger {
    display: block;
  }
}

/* ---------- page wipe (cell bars) ---------- */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  grid-template-columns: repeat(7, 1fr);
  pointer-events: none;
}
.js .wipe {
  display: grid;
  animation: wipe-safety 0.01s linear 6s forwards;
}
.wipe i {
  background: #0d0f14;
  /* opaque line + 1px overlap: no see-through seams while the bars move */
  border-right: 1px solid #2d2721;
  margin-right: -1px;
  transform-origin: top;
  will-change: transform;
  backface-visibility: hidden;
}
.wipe i:last-child {
  border-right: 0;
  margin-right: 0;
}
@keyframes wipe-safety {
  to {
    visibility: hidden;
  }
}

/* ---------- hero ---------- */
.hero {
  min-height: min(100svh, 940px);
  display: flex;
  align-items: flex-end;
  padding-top: 130px;
  padding-bottom: clamp(48px, 8vh, 96px);
}
.hero .wrap {
  display: grid;
  gap: clamp(1.4rem, 3vh, 2.4rem);
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hero h1 {
  font-size: clamp(3.6rem, 15vw, 11.5rem);
  line-height: 0.86;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.hero h1 .l2 {
  display: block;
  font-style: italic;
  padding-left: clamp(0rem, 7vw, 6.5rem);
  font-weight: 400;
}
.hero .sub {
  font-family: var(--f-docket);
  font-size: clamp(1.05rem, 0.9rem + 1vw, 1.7rem);
  color: var(--brass);
  letter-spacing: 0.02em;
}
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 3rem;
  align-items: flex-end;
  justify-content: space-between;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.byline {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-style: italic;
}
.scroll-cue {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.scroll-cue i {
  width: 1px;
  height: 52px;
  background: linear-gradient(var(--brass), transparent);
  display: block;
  transform-origin: top;
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0% {
    transform: scaleY(0);
  }
  55% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* sub-page hero */
.phero {
  padding-top: clamp(150px, 22vh, 230px);
  padding-bottom: clamp(40px, 7vw, 90px);
}
.phero h1 {
  font-size: clamp(2.9rem, 9vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.phero .docket {
  margin-bottom: 1.4rem;
  display: block;
}
.phero p.lede {
  margin-top: 2rem;
}

/* ---------- premise ---------- */
.premise {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.premise .big {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 5.2vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.premise .big em {
  font-style: italic;
}
.book-card {
  border: 1px solid var(--line);
  background: linear-gradient(
    160deg,
    rgba(27, 33, 42, 0.7),
    rgba(17, 20, 26, 0.7)
  );
  padding: clamp(1.4rem, 3vw, 2.4rem);
  position: relative;
}
.book-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 56px;
  height: 56px;
  border-top: 2px solid var(--brass);
  border-left: 2px solid var(--brass);
}
.book-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.book-card p:last-child {
  margin-bottom: 0;
}

/* ---------- themes: exhibits ---------- */
.themes-head {
  margin-bottom: clamp(2rem, 5vw, 4rem);
  display: grid;
  gap: 1rem;
}
.pin {
  overflow: visible;
}
.sec {
  overflow-x: clip;
}
.track {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2rem);
  will-change: transform;
}
.exhibit {
  flex: none;
  width: min(80vw, 520px);
  min-height: 380px;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  border: 1px solid var(--line);
  background: linear-gradient(
    170deg,
    rgba(27, 33, 42, 0.82),
    rgba(12, 14, 19, 0.9)
  );
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
}
.exhibit .tag {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.exhibit .tag b {
  font-weight: 400;
  color: var(--blood-lt);
}
.exhibit h3 {
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-style: italic;
  font-weight: 400;
  margin-top: auto;
}
.exhibit p {
  margin: 0;
  color: var(--paper-dim);
}
.exhibit svg.glyph {
  width: 84px;
  height: 84px;
  stroke: var(--brass);
  fill: none;
  stroke-width: 1.2;
}
@media (max-width: 899px) {
  .track {
    flex-direction: column;
  }
  .exhibit {
    width: 100%;
    min-height: 0;
  }
}

/* ---------- quote band ---------- */
.quote {
  text-align: left;
}
.quote blockquote {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.7rem, 3.9vw, 3.4rem);
  line-height: 1.15;
  font-style: italic;
  font-weight: 400;
  max-width: 24em;
  text-wrap: pretty;
}
.quote cite {
  display: block;
  margin-top: 2rem;
  font-style: normal;
}

/* ---------- record (timeline) ---------- */
.rec {
  position: relative;
  display: grid;
  gap: clamp(2.2rem, 5vw, 4rem);
  padding-left: clamp(26px, 5vw, 56px);
}
.rec-line {
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}
.rec-line i {
  position: absolute;
  inset: 0;
  background: var(--brass);
  transform-origin: top;
  transform: scaleY(0);
}
.js .rec-line i {
  transform: scaleY(0);
}
.entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(110px, 190px) minmax(0, 1fr);
  gap: 1rem clamp(1.4rem, 4vw, 4rem);
}
.entry::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(26px, 5vw, 56px) + 1px);
  top: 0.9em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid var(--brass-dk);
  transition:
    background 0.5s,
    border-color 0.5s,
    box-shadow 0.5s;
}
.entry.on::before {
  background: var(--brass);
  border-color: var(--brass);
  box-shadow: 0 0 0 6px rgba(192, 149, 90, 0.14);
}
.entry .yr {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 1;
  color: var(--paper);
  letter-spacing: -0.02em;
}
.entry .yr small {
  display: block;
  font-family: var(--f-docket);
  font-size: 0.84rem;
  color: var(--brass);
  letter-spacing: 0.03em;
  margin-top: 0.6rem;
}
.entry h3 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  margin-bottom: 0.6rem;
  font-style: italic;
  font-weight: 400;
}
.entry p {
  color: var(--paper-dim);
  max-width: 56ch;
  margin: 0;
}
.entry.dark .yr {
  color: var(--blood-lt);
}
@media (max-width: 640px) {
  .entry {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* ---------- chapters ---------- */
.chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.chapters li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1rem 2rem;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.chapters li::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}
.chapters li:hover::before {
  transform: scaleX(1);
}
.chapters .ch {
  font-family: var(--f-docket);
  color: var(--brass);
  font-size: 0.95rem;
  padding-top: 0.45rem;
}
.chapters h3 {
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  font-style: italic;
  font-weight: 400;
  margin-bottom: 0.3rem;
}
.chapters p {
  margin: 0;
  color: var(--paper-dim);
  max-width: 60ch;
}
@media (max-width: 640px) {
  .chapters li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

/* ---------- generic grids ---------- */
.cols-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.6rem, 4vw, 4rem);
}
.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
}
.cell {
  border-top: 1px solid var(--brass-dk);
  padding-top: 1.2rem;
}
.cell h3 {
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 0.6rem;
}
.cell p {
  color: var(--paper-dim);
  margin: 0;
}
@media (max-width: 900px) {
  .premise,
  .cols-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- author ---------- */
.file {
  border: 1px solid var(--line);
  background: linear-gradient(
    160deg,
    rgba(27, 33, 42, 0.8),
    rgba(14, 16, 21, 0.85)
  );
  padding: clamp(1.6rem, 3vw, 2.6rem);
  position: relative;
  margin-top: 18px;
}
.file::before {
  content: "Author file";
  position: absolute;
  top: -17px;
  left: 24px;
  font-family: var(--f-docket);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--brass);
  padding: 0.25em 0.9em;
  border-radius: 2px 2px 0 0;
}
.file dl {
  margin: 0;
  display: grid;
  gap: 1.2rem;
}
.file dt {
  font-family: var(--f-docket);
  font-size: 0.84rem;
  color: var(--brass);
}
.file dd {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
}
.monogram {
  font-family: var(--f-display);
  font-size: clamp(7rem, 20vw, 15rem);
  line-height: 0.8;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px var(--brass-dk);
  letter-spacing: -0.04em;
}
.count {
  font-family: var(--f-display);
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

/* ---------- note / help ---------- */
.note {
  border-left: 2px solid var(--blood-lt);
  padding: 0.4rem 0 0.4rem 1.4rem;
  color: var(--paper-dim);
  max-width: 62ch;
}
.note strong {
  color: var(--paper);
  font-weight: 500;
}
.help {
  border: 1px solid var(--line);
  padding: clamp(1.4rem, 3vw, 2rem);
  background: rgba(17, 20, 26, 0.7);
}
.help a {
  color: var(--brass);
  border-bottom: 1px solid var(--brass-dk);
}
.help a:hover {
  color: var(--paper);
  border-color: var(--paper);
}

/* ---------- form ---------- */
.form {
  display: grid;
  gap: 1.6rem;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label {
  font-family: var(--f-docket);
  font-size: 0.88rem;
  color: var(--brass);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  color: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
  font: inherit;
  border-radius: 0;
  transition: border-color 0.3s;
}
.field select option {
  background: var(--ink-2);
  color: var(--paper);
}
.field textarea {
  min-height: 150px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 6px;
}
.form-msg {
  min-height: 1.6em;
  font-family: var(--f-docket);
  font-size: 0.95rem;
  color: var(--paper-dim);
}
.form-msg.ok {
  color: var(--brass);
}
.form-msg.err {
  color: var(--blood-lt);
}

/* ---------- cta + footer ---------- */
.cta {
  text-align: left;
}
.cta h2 {
  max-width: 14em;
}
.cta .row {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.site-foot {
  border-top: 1px solid var(--line);
  background: rgba(9, 10, 13, 0.94);
  padding-block: clamp(2.4rem, 5vw, 4rem)
    calc(2rem + env(safe-area-inset-bottom, 0px));
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}
.foot-grid h4 {
  font-family: var(--f-docket);
  font-weight: 400;
  font-size: 0.86rem;
  color: var(--brass);
  margin-bottom: 0.8rem;
  letter-spacing: 0.03em;
}
.foot-grid a {
  display: block;
  color: var(--paper-dim);
  padding: 0.15rem 0;
  transition: color 0.3s;
}
.foot-grid a:hover {
  color: var(--paper);
}
.foot-grid .dedic {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--paper);
  max-width: 30ch;
}
.fine {
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--paper-dim);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .scroll-cue i {
    animation: none;
    transform: none;
  }
  .wipe {
    display: none !important;
  }
  * {
    scroll-behavior: auto !important;
  }
}

.book-cover-frame {
  position: relative;
  width: min(75%, 400px);
  aspect-ratio: 2 / 3;
  overflow: hidden;

  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.1);
  transform: rotate(-2deg);
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease;
}



/* Mobile */
@media (max-width: 768px) {
  .book-cover-frame {
    width: min(65%, 220px);
  }
}
/* =================================
   FOOTER
================================= */

.site-foot .foot-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Logo */
.footer-logo {
  display: block;
  width: min(100%, 230px);
  height: auto;
  object-fit: contain;
}

/* Footer Headings */
.site-foot .foot-grid h4 {
  margin-bottom: 1.3rem;
}

/* Navigation Links */
.site-foot .foot-grid > div > a {
  display: block;
  width: fit-content;
  margin-bottom: 0.75rem;
}

/* Connect Section */
.foot-connect a,
.foot-connect p {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  text-decoration: none;
}

.foot-connect p {
  margin-top: 0;
}

/* Contact Icons */
.contact-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  margin-top: 2px;
}

.contact-icon svg {
  display: block;
  width: 17px;
  height: 17px;
}

/* Copyright */
.site-foot .fine {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* =================================
   RESPONSIVE FOOTER
================================= */

@media (max-width: 768px) {
  .site-foot .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 1.5rem;
  }

  .site-foot .foot-brand {
    grid-column: 1 / -1;
  }

  .footer-logo {
    width: 190px;
  }

  .site-foot .fine {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .site-foot .foot-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .site-foot .foot-brand {
    grid-column: auto;
  }
}


.fine a {
  color: var(--brass);
  text-decoration: none;
  transition: color 0.3s ease;
}

.fine a:hover {
  color: #e3bd83;
}


.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 230px;
  height: auto;
  object-fit: contain;
  background: transparent;
}

/* Mobile */
@media (max-width: 768px) {
  .brand-logo {
    width: 175px;
  }
}




.site-head {
    padding-top: 5px;
    padding-bottom: 10px;
    height: auto;
    overflow: visible;
}

.site-head .wrap {
    min-height: 90px;
    display: flex;
    align-items: center;
}

.brand-logo {
    display: block;
    height: 75px;
    width: auto;
    object-fit: contain;
    transform: translateY(8px);
}