:root {
  --accent: #1d6cc5;
  --night: #090e11;
  --paper: #f2f1eb;
  --page-width: clamp(220px, min(35vw, 54vh), 520px);
  --page-height: calc(var(--page-width) * 1.32);
  color-scheme: dark;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  background: var(--night);
}

body {
  overflow-x: hidden;
}

button {
  color: inherit;
  font: inherit;
}

.archive {
  position: relative;
  min-height: 100vh;
}

.stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 590px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--accent) 23%, transparent), transparent 34%),
    linear-gradient(145deg, #10191e 0%, var(--night) 58%, #050809 100%);
}

.stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.62) 100%);
}

.atmosphere {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: 0.27;
  background-image:
    linear-gradient(rgba(180, 210, 222, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 210, 222, 0.1) 1px, transparent 1px);
  background-size: 8vw 8vw;
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
}

.company-header {
  position: absolute;
  z-index: 500;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  padding: 24px clamp(22px, 4vw, 58px);
}

.company-header > img {
  display: block;
  width: auto;
  max-width: min(42vw, 290px);
  max-height: 38px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.home-button {
  position: absolute;
  left: clamp(22px, 4vw, 58px);
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: rgba(235, 244, 247, 0.62);
}

.home-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
}

.home-button:hover {
  color: white;
}

.home-button:focus-visible,
.page-controls button:focus-visible,
.book-viewport:focus-visible {
  outline: 2px solid white;
  outline-offset: 5px;
}

.book-viewport {
  position: absolute;
  z-index: 100;
  top: 50%;
  left: 50%;
  width: calc(var(--page-width) * 2);
  height: var(--page-height);
  perspective: 2400px;
  transform: translate(-50%, -48%);
  cursor: grab;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.book-viewport:active {
  cursor: grabbing;
}

.book {
  position: relative;
  width: 100%;
  height: 100%;
  transform: rotateX(4deg) rotateZ(-0.25deg);
  transform-style: preserve-3d;
}

.book::after {
  content: "";
  position: absolute;
  z-index: -5;
  right: 4%;
  bottom: -8%;
  left: 4%;
  height: 18%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  filter: blur(30px);
  transform: translateZ(-30px);
}

.book-board,
.leaf {
  position: absolute;
  top: 0;
  width: var(--page-width);
  height: var(--page-height);
}

.book-board {
  border: 1px solid rgba(219, 226, 227, 0.3);
  background:
    repeating-linear-gradient(0deg, rgba(18, 30, 36, 0.045) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, #d3d5d0, var(--paper) 7%, #faf9f4 96%);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  transform: translateZ(-7px);
}

.book-board--left {
  left: 0;
  border-radius: 5px 0 0 5px;
  background: linear-gradient(90deg, #e7e6df, var(--paper) 10%, #e4e3dc 98%);
}

.book-board--right {
  left: 50%;
  border-radius: 0 5px 5px 0;
}

.book-spine {
  position: absolute;
  z-index: 280;
  top: 1%;
  bottom: 1%;
  left: 50%;
  width: 13px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(9, 16, 19, 0.48), rgba(255, 255, 255, 0.15), transparent);
  filter: blur(1px);
  transform: translateX(-50%) translateZ(25px);
}

.leaves {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.leaf {
  left: 50%;
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  will-change: transform;
}

.page-face {
  position: absolute;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(96, 105, 105, 0.48);
  border-radius: 0 4px 4px 0;
  background: var(--paper);
  box-shadow: inset 12px 0 18px rgba(0, 0, 0, 0.085), 3px 7px 18px rgba(0, 0, 0, 0.22);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.page-face::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  opacity: var(--turn-shadow, 0);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.58), transparent 38%, rgba(255, 255, 255, 0.1));
}

.page-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}

.page-back {
  border-radius: 4px 0 0 4px;
  transform: rotateY(180deg);
  box-shadow: inset -12px 0 18px rgba(0, 0, 0, 0.1), -3px 7px 18px rgba(0, 0, 0, 0.2);
}

.page-back::before {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.5), transparent 38%, rgba(255, 255, 255, 0.08));
}

.page-back img {
  filter: saturate(0.76) brightness(0.91);
}

.current-year {
  position: absolute;
  z-index: 380;
  top: 50%;
  right: clamp(22px, 4vw, 58px);
  color: white;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(32px, 4.3vw, 64px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  text-align: right;
  transform: translateY(-50%);
}

.page-controls {
  position: absolute;
  z-index: 500;
  right: clamp(22px, 4vw, 58px);
  bottom: clamp(20px, 3.2vw, 42px);
  left: clamp(22px, 4vw, 58px);
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 20px;
}

.page-controls button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(198, 221, 230, 0.26);
  border-radius: 50%;
  background: rgba(8, 15, 18, 0.58);
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.page-controls button:last-child {
  justify-self: end;
}

.page-controls button:hover:not(:disabled) {
  border-color: rgba(225, 240, 246, 0.8);
  transform: scale(1.06);
}

.page-controls button:disabled {
  opacity: 0.2;
  cursor: default;
}

.page-controls svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.scroll-mark {
  display: none;
}

.loading-screen {
  position: absolute;
  z-index: 900;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--night);
  transition: opacity 420ms ease, visibility 420ms step-end;
}

.loading-screen.is-ready {
  visibility: hidden;
  opacity: 0;
}

.loading-screen span {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(180, 214, 228, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
  :root {
    --page-width: min(78vw, 53vh);
  }

  .company-header {
    min-height: 76px;
    padding: 20px;
  }

  .company-header > img {
    max-width: 56vw;
    max-height: 30px;
  }

  .home-button {
    left: 14px;
  }

  .book-viewport {
    width: var(--page-width);
    transform: translate(-50%, -54%);
  }

  .book-board--left {
    display: none;
  }

  .book-board--right,
  .leaf {
    left: 0;
  }

  .book-spine {
    left: 0;
  }

  .current-year {
    top: auto;
    right: 0;
    bottom: 88px;
    left: 0;
    font-size: 34px;
    text-align: center;
    transform: none;
  }

  .page-controls {
    right: 16px;
    bottom: 16px;
    left: 16px;
    gap: 14px;
  }
}

@media (max-height: 690px) and (min-width: 701px) {
  :root {
    --page-width: min(31vw, 46vh);
  }

  .company-header {
    min-height: 70px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .current-year {
    right: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .book {
    transform: none;
  }
}
