:root {
  --paper: #eee3c9;
  --old-gold: #d8b86a;
  --brass: #b58b45;
  --deep-ink: #17120f;
  --compass: url("../assets/Icons/crossroads_compass.png");
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 50% 8%, rgba(216,184,106,.12), transparent 25%),
    radial-gradient(circle at 18% 50%, rgba(105,67,141,.08), transparent 26%),
    linear-gradient(180deg, #050609 0%, #101722 48%, #090806 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0) 50%, rgba(238,227,201,.04) 50%),
    radial-gradient(circle, transparent 62%, rgba(0,0,0,.58) 100%);
  background-size: 100% 4px, 100% 100%;
  mix-blend-mode: screen;
}

.wheel-watermark {
  position: fixed;
  width: min(82vw, 860px);
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: .045;
  z-index: 0;
  pointer-events: none;
}

.site-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 22px auto;
  padding: 18px clamp(10px, 2vw, 24px) 24px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(181,139,69,.56);
  background: linear-gradient(180deg, rgba(15,23,35,.88), rgba(23,18,15,.94));
  box-shadow: 0 0 44px rgba(0,0,0,.78), inset 0 0 48px rgba(216,184,106,.055);
}

.archive-header-art,
.archive-footer-art {
  width: calc(100% + 36px);
  margin-left: -18px;
  line-height: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 14px rgba(216,184,106,.18));
}

.archive-header-art img,
.archive-footer-art img {
  display: block;
  width: 100%;
  height: auto;
}

.page-header {
  padding: 10px 18px 32px;
  text-align: center;
}

.system-line {
  margin-bottom: 12px;
  color: rgba(238,227,201,.72);
  font: 12px/1.4 "Courier New", monospace;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

h1 {
  color: var(--paper);
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(216,184,106,.20);
}

.subtitle {
  margin-top: 12px;
  color: var(--old-gold);
  font-size: clamp(16px, 2vw, 21px);
}

.tagline {
  width: min(820px, 100%);
  margin: 18px auto 0;
  color: rgba(238,227,201,.82);
  font-size: 15px;
}

.restricted-section { padding: clamp(8px, 2vw, 20px); }

.cabinet-card {
  position: relative;
  width: min(1000px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(216,184,106,.30);
  background: #080706;
  box-shadow: 0 18px 46px rgba(0,0,0,.62);
}

.cabinet-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* INVISIBLE DRAWER HITBOXES */
.drawer-hitbox {
  position: absolute;
  z-index: 5;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: transparent;
  font-size: 0;
}

.drawer-hitbox > span:first-child {
  display: none;
}

.coming-soon {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: 170px;
  padding: 14px 18px;
  transform: translate(-50%, -50%) scale(.90);
  border: 1px solid rgba(216,184,106,.88);
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,.18), transparent 24%),
    linear-gradient(180deg, rgba(238,227,201,.98), rgba(205,180,137,.98));
  color: var(--deep-ink);
  box-shadow: 0 16px 36px rgba(0,0,0,.58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.drawer-hitbox:hover,
.drawer-hitbox:focus-visible {
  z-index: 20;
  outline: none;
}

.drawer-hitbox:hover .coming-soon,
.drawer-hitbox:focus-visible .coming-soon {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.hexcrawl {
  left: 5.7%;
  top: 7.7%;
  width: 43.8%;
  height: 41.5%;
}

.story-beats {
  left: 50.6%;
  top: 7.7%;
  width: 43.7%;
  height: 41.5%;
}

.places {
  left: 5.7%;
  top: 50.6%;
  width: 43.8%;
  height: 41.7%;
}

.npcs {
  left: 50.6%;
  top: 50.6%;
  width: 43.7%;
  height: 41.7%;
}

.page-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
  padding: 4px;
}

.archive-button {
  min-width: 280px;
  min-height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 22px;
  border: 1px solid rgba(216,184,106,.82);
  color: var(--old-gold);
  background: linear-gradient(180deg, rgba(181,139,69,.18), rgba(7,9,14,.62));
  text-decoration: none;
  font-size: 18px;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.compass-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  background: var(--compass) center / contain no-repeat;
  opacity: 0;
  transform: scale(.82);
  transition: opacity .18s ease, transform .18s ease;
}

.archive-button:hover .compass-icon,
.archive-button:focus-visible .compass-icon {
  opacity: 1;
  transform: scale(1);
}

.archive-footer-art { margin-top: 26px; }

footer {
  padding: 8px 16px 34px;
  text-align: center;
  color: rgba(238,227,201,.56);
  font: 12px/1.5 "Courier New", monospace;
}

@media (max-width: 900px) {
  .site-shell { padding: 10px; }

  .archive-header-art,
  .archive-footer-art {
    width: calc(100% + 20px);
    margin-left: -10px;
  }

  .restricted-section { padding-inline: 2px; }
}

@media (max-width: 560px) {
  h1 { letter-spacing: 2px; }

  .drawer-hitbox {
    border-width: 2px;
    font-size: 6px;
  }

  .coming-soon {
    min-width: 118px;
    padding: 10px 12px;
    font-size: 10px;
  }

  .archive-button {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
