:root {
  --nav-width: 56px;
  --header-overlap: 8px;
  --content-gap: 20px;
  --block-width: 88vw;
  --content-right-gap: 24px;
  --line-width: 1px;
  --ink: #111;
  --highlight: limegreen;
  --paper: #fff3d6;
  --accordion-right: calc(50% - (var(--block-width) / 2) + var(--nav-width));
  --accordion-right-pad: calc(var(--accordion-right) + 3vw - 2px);
  --page-swipe-duration: 680ms;
  --page-swipe-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

* {
  box-sizing: border-box;
  cursor: none;
}

::selection {
  background: limegreen;
  color: #fff3d6;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image: none;
  font-family: var(--font-family);
  cursor: none;
  overflow-x: hidden;
}

body.page-from-left {
  --page-swipe-offset: -12vw;
}

body.page-from-right {
  --page-swipe-offset: 12vw;
}

.page-swipe-layer {
  width: 100%;
}

body.page-swipe-ready .page-swipe-layer {
  opacity: 0;
  transform: translateX(var(--page-swipe-offset));
  transition: none;
}

body.page-swipe-active .page-swipe-layer {
  opacity: 1;
  transform: translateX(0);
  transition: transform var(--page-swipe-duration) var(--page-swipe-ease),
    opacity var(--page-swipe-duration) var(--page-swipe-ease);
  will-change: transform, opacity;
}

body.page-swipe-leave .page-swipe-layer {
  opacity: 0;
  transform: translateX(var(--page-swipe-offset));
  transition: transform var(--page-swipe-duration) var(--page-swipe-ease),
    opacity var(--page-swipe-duration) var(--page-swipe-ease);
  will-change: transform, opacity;
}

body.page-from-left.page-swipe-ready .navbar,
body.page-from-left.page-swipe-active .navbar,
body.page-from-left.page-swipe-leave .navbar {
  background-color: var(--paper);
}

a,
button,
summary {
  cursor: none;
}

.material-symbols-outlined {
  font-variation-settings: "opsz" 24, "wght" 400, "FILL" 0, "GRAD" 0;
  font-size: 18px;
  line-height: 1;
}

.page-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 24px calc(50% - (var(--block-width) / 2) + var(--nav-width));
  width: calc(100% - (50% - (var(--block-width) / 2) + var(--nav-width)));
  color: #111;
  font-size: 26px;
  letter-spacing: 0.08em;
}

.page-ornament img {
  width: 120px;
  height: auto;
}

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: var(--highlight);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: transform 120ms ease, opacity 120ms ease;
}

.custom-cursor.is-hovering {
  animation: cursor-pulse 900ms ease-in-out infinite;
}

@keyframes cursor-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(50, 205, 50, 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(50, 205, 50, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(50, 205, 50, 0);
  }
}

@media (pointer: coarse) {
  body {
    cursor: auto;
  }

  .custom-cursor {
    display: none;
  }
}

.navbar {
  position: fixed;
  top: 0;
  left: calc(50% - (var(--block-width) / 2));
  bottom: 0;
  width: var(--nav-width);
  border-right: var(--line-width) solid #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  background: var(--paper);
  z-index: 10;
}

.navbar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(-1 * (50vw - (var(--block-width) / 2)));
  width: calc(50vw - (var(--block-width) / 2));
  background: var(--paper);
  pointer-events: none;
}

.nav-title,
.nav-links a {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  text-decoration: none;
  color: var(--ink);
}

.nav-title {
  font-size: 32px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 30px;
  font-size: 18px;
}

.nav-links a {
  transition: opacity 180ms ease, color 260ms ease;
}

.nav-title:hover {
  color: var(--highlight);
}

.nav-links a:hover {
  opacity: 1;
  color: var(--highlight);
}

.more-button {
  align-self: flex-end;
  border: var(--line-width) solid #000;
  background: transparent;
  padding: 8px 18px;
  font-size: 14px;
  color: inherit;
  text-decoration: none;
  cursor: none;
  transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.more-button:hover {
  background: var(--highlight);
  color: #fff3d6;
  border-color: transparent;
  box-shadow: 0 0 0 0 rgba(50, 205, 50, 0.45);
  animation: cursor-pulse 900ms ease-in-out infinite;
}

.content-shell img,
.page-ornament img,
.media-pair img,
.slider-track img {
  border-radius: 0;
  box-shadow: none;
  transition: transform 220ms ease, filter 680ms ease, opacity 220ms ease;
}

.content-shell img:hover,
.page-ornament img:hover,
.media-pair img:hover,
.slider-track img:hover {
  filter: grayscale(1) contrast(1.18) brightness(0.82) sepia(1) saturate(14) hue-rotate(60deg);
}

@media (prefers-reduced-motion: reduce) {
  body.page-swipe-ready .page-swipe-layer,
  body.page-swipe-active .page-swipe-layer,
  body.page-swipe-leave .page-swipe-layer {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 640px) {
  :root {
    --block-width: 100vw;
  }

  .navbar {
    left: 0;
  }

  .navbar::before {
    display: none;
  }
}

@media (min-width: 820px) {
  :root {
    --content-right-gap: 14vw;
  }
}

@media (min-width: 1000px) {
  :root {
    --block-width: 72vw;
    --accordion-right-pad: calc(var(--accordion-right) + 6vw - 2px);
  }

  .more-button {
    align-self: flex-start;
  }
}

@media (min-width: 1280px) {
  :root {
    --content-right-gap: 10vw;
  }
}

@media (max-height: 480px) {
  .navbar {
    padding: 10px 0;
    overflow-y: auto;
  }

  .nav-title {
    font-size: 18px;
  }

  .nav-links {
    gap: 10px;
    font-size: 13px;
  }
}
