@import "./kit/overlays.css";
@import "./kit/tokens.css";
:root {
  --wood: #1a120c;
  --wood-hi: #3a2418;
  --shelf: #24180f;
  --shelf-hi: #3a281c;
  --brass: #c4a35a;
  --brass-hi: #e8d090;
  --paper: #ead9b8;
  --mute: #9a8468;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background:
    repeating-linear-gradient(
      92deg,
      #140e0a 0px,
      #22150e 5px,
      #2c1a10 9px,
      #1a100c 14px,
      #3a2216 19px,
      #160f0b 24px
    );
  color: var(--paper);
  font-family: "Cormorant Garamond", Georgia, serif;
  padding: 40px 18px 72px;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 8;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 7;
  background:
    radial-gradient(90% 70% at 50% 30%, transparent 35%, rgba(0, 0, 0, 0.45) 100%);
}

.lamp {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(196, 163, 90, 0.22), transparent 60%);
}

.mast {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  max-width: 40rem;
  margin: 0 auto 40px;
  align-items: start;
}

.mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(232, 208, 144, 0.35),
    0 10px 24px rgba(0, 0, 0, 0.35);
}

.kicker {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--brass);
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(48px, 10vw, 84px);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.9;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.lede {
  font-size: 20px;
  color: var(--mute);
  font-style: italic;
  margin: 12px 0 0;
  max-width: 36rem;
}

.shelf {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1040px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  perspective: 1400px;
  position: relative;
  z-index: 2;
}

.card {
  --rx: 4deg;
  --ry: 0deg;
  --z: 0px;
  background:
    linear-gradient(180deg, var(--shelf-hi), var(--shelf));
  border: 1px solid color-mix(in srgb, var(--brass) 40%, #000);
  padding: 18px 18px 16px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(var(--z));
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 420ms ease;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--brass) 30%, transparent),
    inset 0 -18px 28px rgba(0, 0, 0, 0.28),
    0 18px 36px rgba(0, 0, 0, 0.28);
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dust {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.room {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  perspective: 1600px;
}

.wall {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18vw;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent);
}

.wall-l { left: 0; transform: rotateY(28deg); transform-origin: left; }
.wall-r { right: 0; background: linear-gradient(-90deg, rgba(0, 0, 0, 0.45), transparent); transform: rotateY(-28deg); transform-origin: right; }

.rail {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 118px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  opacity: 0.35;
  box-shadow: 0 8px 18px rgba(196, 163, 90, 0.18);
}

.card:nth-child(1) { animation-delay: 0.02s; }
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.14s; }
.card:nth-child(5) { animation-delay: 0.18s; }
.card:nth-child(6) { animation-delay: 0.22s; }
.card:nth-child(7) { animation-delay: 0.26s; }
.card:nth-child(8) { animation-delay: 0.3s; }
.card:nth-child(9) { animation-delay: 0.34s; }
.card:nth-child(10) { animation-delay: 0.38s; }
.card:nth-child(11) { animation-delay: 0.42s; }
.card:nth-child(12) { animation-delay: 0.46s; }
.card:nth-child(13) { animation-delay: 0.5s; }
.card:nth-child(14) { animation-delay: 0.54s; }
.card:nth-child(15) { animation-delay: 0.58s; }
.card:nth-child(16) { animation-delay: 0.62s; }
.card:nth-child(17) { animation-delay: 0.66s; }
.card:nth-child(18) { animation-delay: 0.7s; }

.card:hover {
  --z: 22px;
  box-shadow:
    inset 0 1px 0 var(--brass-hi),
    0 28px 50px rgba(0, 0, 0, 0.4);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px) rotateX(10deg);
  }
  to {
    opacity: 1;
    transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(var(--z));
  }
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  flex: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  transform: translateZ(18px);
}

.acc {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin: 0;
}

.card h2 {
  margin: 8px 0 6px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0 0 14px;
  color: var(--mute);
  flex: 1;
  font-size: 16px;
}

.card code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--brass-hi);
}

.links {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.links a {
  color: var(--paper);
  margin-right: 12px;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--brass) 35%, transparent);
}

.links a:hover { color: var(--brass-hi); }

footer {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 48px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--mute);
}
footer a { color: var(--brass); }

@media (max-width: 640px) {
  .mast { grid-template-columns: 1fr; }
  .card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
    transform: none;
    transition: none;
  }
  .shelf { perspective: none; }
}
