:root {
  --ink: #141312;
  --black: #080807;
  --charcoal: #1f1d1a;
  --ash: #5d574f;
  --paper: #d8cbb6;
  --paper-light: #eee4d1;
  --warm-gray: #a79b8a;
  --line: rgba(216, 203, 182, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  color: var(--paper-light);
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 203, 182, 0.07), transparent 34rem),
    linear-gradient(180deg, #090908 0%, #171512 48%, #0a0908 100%);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 300;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(0deg, rgba(20,19,18,0.12) 0 1px, transparent 1px 5px);
  mix-blend-mode: overlay;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
}

.hero__image,
.hero__veil {
  position: absolute;
  inset: 0;
}

.hero__image {
  background-image: url("assets/chateau-hero.png");
  background-position: center;
  background-size: cover;
  filter: grayscale(0.18) contrast(0.92) brightness(0.64);
  transform: scale(1.025);
}

.hero__veil {
  background:
    linear-gradient(180deg, rgba(8,8,7,0.24), rgba(8,8,7,0.48) 58%, #090908 100%),
    radial-gradient(circle at 50% 52%, transparent 0 18rem, rgba(8,8,7,0.46) 47rem);
}

.hero__center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2.2rem;
}

.hero__center p {
  margin: 0;
  color: rgba(238, 228, 209, 0.78);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.3rem, 7vw, 6.8rem);
  font-weight: 500;
  letter-spacing: 0.12rem;
  text-align: center;
}

.enter-button,
.quiet-link {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(238, 228, 209, 0.52);
  color: var(--paper-light);
  background: rgba(8, 8, 7, 0.28);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.22rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 500ms ease, background 500ms ease, transform 500ms ease;
}

.enter-button {
  min-width: 9rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
}

.enter-button:hover,
.quiet-link:hover {
  border-color: rgba(238, 228, 209, 0.9);
  background: rgba(216, 203, 182, 0.08);
  transform: translateY(-2px);
}

.intro,
.artifacts,
.chapters-gate {
  width: min(78rem, calc(100% - 3rem));
  margin: 0 auto;
}

.intro {
  display: grid;
  min-height: 58svh;
  place-items: center;
}

.intro p {
  max-width: 40rem;
  margin: 0;
  color: rgba(238, 228, 209, 0.82);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 1.05;
  text-align: center;
}

.artifacts {
  padding: 7rem 0 8rem;
}

.section-kicker,
.chapter__number {
  margin: 0 0 1rem;
  color: rgba(216, 203, 182, 0.58);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
}

.artifacts h1,
.chapters-gate h2,
.lightbox h2,
.chapter h1,
.chapter h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
}

.artifacts h1 {
  margin-bottom: 5rem;
  font-size: clamp(3rem, 7vw, 7rem);
}

.artifact-field {
  position: relative;
  display: grid;
  min-height: 42rem;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.2rem;
}

.artifact {
  position: relative;
  min-height: 13rem;
  border: 1px solid rgba(216, 203, 182, 0.2);
  color: rgba(31, 29, 26, 0.78);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 34%),
    repeating-linear-gradient(2deg, rgba(31,29,26,0.04) 0 1px, transparent 1px 8px),
    var(--paper);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 500;
  text-align: left;
  transform: rotate(var(--tilt));
  transition: filter 400ms ease, transform 500ms ease;
}

.artifact:hover {
  filter: brightness(1.08);
  transform: rotate(var(--tilt)) translateY(-0.35rem);
}

.artifact span {
  position: absolute;
  left: 1.2rem;
  bottom: 1rem;
}

.artifact--unknown {
  display: grid;
  place-items: center;
  color: rgba(31, 29, 26, 0.32);
}

.artifact--unknown span[aria-hidden="true"] {
  position: static;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(5rem, 11vw, 9rem);
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.artifact::before {
  position: absolute;
  inset: 1rem;
  content: "";
  border: 1px solid rgba(31, 29, 26, 0.12);
}

.artifact--image {
  padding: 0;
  overflow: hidden;
  background: #171512;
}

.artifact--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.12) contrast(0.92) brightness(0.82);
}

.artifact--image span {
  color: rgba(238, 228, 209, 0.88);
  text-shadow: 0 0.15rem 0.9rem rgba(0, 0, 0, 0.78);
}

.artifact--tree {
  --tilt: -3deg;
  grid-column: 1 / span 4;
  background-image:
    linear-gradient(90deg, transparent 49%, rgba(31,29,26,0.2) 50%, transparent 51%),
    linear-gradient(rgba(31,29,26,0.16), rgba(31,29,26,0.16)),
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 34%);
}

.artifact--letter {
  --tilt: 2deg;
  grid-column: 6 / span 4;
  margin-top: 4rem;
}

.artifact--plan {
  --tilt: -1deg;
  grid-column: 10 / span 3;
  margin-top: 1rem;
  background-size: 2.8rem 2.8rem;
  background-image:
    linear-gradient(rgba(31,29,26,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,29,26,0.1) 1px, transparent 1px);
}

.artifact--score {
  --tilt: 1.5deg;
  grid-column: 2 / span 5;
  margin-top: -1rem;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 1.1rem, rgba(31,29,26,0.2) 1.1rem 1.16rem, transparent 1.16rem 1.5rem),
    linear-gradient(135deg, rgba(255,255,255,0.16), transparent 35%);
}

.artifact--photo {
  --tilt: -2deg;
  grid-column: 7 / span 3;
  margin-top: 3rem;
  color: rgba(238, 228, 209, 0.76);
  background:
    linear-gradient(180deg, rgba(8,8,7,0.1), rgba(8,8,7,0.72)),
    radial-gradient(circle at 55% 38%, rgba(216,203,182,0.38), transparent 26%),
    #1d1b18;
}

.artifact--map {
  --tilt: 3deg;
  grid-column: 10 / span 3;
  margin-top: -0.5rem;
  background-image:
    radial-gradient(circle at 30% 40%, transparent 0 2rem, rgba(31,29,26,0.1) 2.05rem 2.1rem, transparent 2.15rem),
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 34%);
}

.chapters-gate {
  display: grid;
  min-height: 54svh;
  place-items: center;
  padding-bottom: 7rem;
  text-align: center;
}

.chapters-gate h2 {
  margin-bottom: 2rem;
  font-size: clamp(3rem, 8vw, 8rem);
}

.quiet-link {
  display: inline-flex;
  padding: 0.95rem 1.25rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(8, 8, 7, 0.76);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__paper {
  width: min(58rem, 100%);
  padding: clamp(2rem, 6vw, 4rem);
  color: var(--ink);
  background:
    repeating-linear-gradient(2deg, rgba(31,29,26,0.04) 0 1px, transparent 1px 8px),
    var(--paper-light);
  box-shadow: 0 4rem 8rem rgba(0, 0, 0, 0.48);
}

.lightbox__image {
  display: block;
  width: 100%;
  max-height: 62vh;
  margin: 0 0 2rem;
  object-fit: contain;
  border: 1px solid rgba(31, 29, 26, 0.18);
  background: rgba(31, 29, 26, 0.08);
}

.lightbox__image[hidden] {
  display: none;
}

.lightbox h2 {
  margin-bottom: 1.3rem;
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  line-height: 0.95;
}

.lightbox p:last-child {
  margin: 0;
  color: rgba(20, 19, 18, 0.72);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.35;
}

.lightbox__close {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(238, 228, 209, 0.28);
  color: var(--paper-light);
  background: transparent;
  cursor: pointer;
  font-size: 1.8rem;
}

.novel-page {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0, rgba(255,255,255,0.5), transparent 34rem),
    repeating-linear-gradient(2deg, rgba(31,29,26,0.035) 0 1px, transparent 1px 9px),
    #d9cbb6;
}

.reader-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(58rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2rem 0;
  color: rgba(31, 29, 26, 0.56);
  font-size: 0.72rem;
  letter-spacing: 0.11rem;
  text-transform: uppercase;
}

.reader-head a {
  color: inherit;
  text-decoration: none;
}

.reader-head a:hover {
  color: var(--ink);
}

.manuscript {
  width: min(46rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 8vh 0 16vh;
}

.book-title {
  margin: 0 0 18vh;
  text-align: center;
}

.book-title p {
  margin: 0 0 1rem;
  color: rgba(31, 29, 26, 0.48);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
}

.book-title h1 {
  margin: 0;
  color: #191714;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.2rem, 9vw, 7rem);
  font-weight: 500;
  line-height: 0.92;
}

.chapter {
  margin: 0;
}

.chapter h1,
.chapter h2 {
  margin-bottom: 2rem;
  color: #191714;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.94;
}

.chapter p {
  margin: 0 0 1.35rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2.6vw, 1.78rem);
  line-height: 1.62;
}

.chapter--manuscript {
  margin: 0;
}

.chapter--manuscript .manuscript-line {
  margin: 0 0 0.72rem;
  white-space: pre-wrap;
}

.manuscript-gap {
  height: 1.75rem;
}

.scene-divider {
  width: 4.5rem;
  height: 1px;
  margin: 2.8rem auto;
  background: rgba(31, 29, 26, 0.2);
}

.parallel-divider {
  width: min(18rem, 72%);
  height: 1px;
  margin: 1.9rem auto;
  background: rgba(31, 29, 26, 0.18);
}

.chapter__number {
  color: rgba(31, 29, 26, 0.48);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.68rem;
  line-height: 1.4;
}

.chapter-divider {
  width: 8rem;
  height: 1px;
  margin: 5.5rem auto;
  background: rgba(31, 29, 26, 0.22);
}

@media (max-width: 760px) {
  .intro,
  .artifacts,
  .chapters-gate {
    width: min(100% - 2rem, 42rem);
  }

  .artifact-field {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .artifact {
    grid-column: auto;
    min-height: 11rem;
    margin-top: 0;
  }

  .reader-head {
    display: grid;
  }
}
