:root {
  --bg: #f1eadf;
  --paper: #fffaf0;
  --paper-warm: #f5eadb;
  --paper-dim: #ddd0c0;
  --ink: #171412;
  --muted: #665d55;
  --line: #d2c4b2;
  --line-strong: #aa9a87;
  --dark: #1b1715;
  --walnut: #3a2a21;
  --denim: #284e5b;
  --moss: #59654c;
  --clay: #8e4638;
  --oxblood: #5b2526;
  --plum: #4a3444;
  --amber: #b77b42;
  --cream: #fff7e6;
  --shadow: 0 18px 50px rgba(41, 31, 22, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(241, 234, 223, 0.96), rgba(231, 219, 204, 0.92)),
    linear-gradient(100deg, rgba(91, 37, 38, 0.055), transparent 38%, rgba(40, 78, 91, 0.045)),
    repeating-linear-gradient(90deg, rgba(23, 20, 18, 0.024) 0 1px, transparent 1px 8px);
  color: var(--ink);
  font-family: "Libre Franklin", Arial, sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

.container {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  border-bottom: 1px solid rgba(28, 27, 24, 0.12);
  background: rgba(255, 250, 240, 0.88);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.nav a {
  border: 1px solid transparent;
  color: var(--ink);
  padding: 0.42rem 0.56rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav a:hover {
  border-color: rgba(28, 27, 24, 0.14);
  background: rgba(255, 250, 240, 0.72);
}

.hero {
  min-height: 92vh;
  position: relative;
  display: grid;
  align-items: end;
  padding-top: 66px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(95deg, rgba(27, 23, 21, 0.82), rgba(58, 42, 33, 0.2) 48%, rgba(27, 23, 21, 0.66)),
    linear-gradient(0deg, rgba(27, 23, 21, 0.58), transparent 48%),
    image-set(
      url("./photos/04_zoom_details/optimized/IMG_0078-detail.webp") type("image/webp"),
      url("./photos/04_zoom_details/edited/IMG_0078-detail.jpg") type("image/jpeg")
    );
  background-position: center;
  background-size: cover;
  filter: contrast(1.02) saturate(1.04);
  transform: scale(1.01);
}

.hero-content {
  position: relative;
  color: var(--cream);
  padding: 0 0 clamp(2.4rem, 7vh, 5.5rem);
}

.eyebrow {
  margin: 0 0 0.62rem;
  color: var(--denim);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow,
.hero .hero-proof {
  color: rgba(255, 248, 232, 0.82);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  line-height: 0.96;
}

h1 {
  max-width: 100%;
  font-size: clamp(3.8rem, 9vw, 8.8rem);
}

h2 {
  font-size: clamp(2.35rem, 5vw, 4.8rem);
}

h3 {
  font-size: clamp(1.7rem, 2.5vw, 2.45rem);
}

p {
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-copy {
  max-width: 48ch;
  margin: 1rem 0 1.3rem;
  color: rgba(255, 248, 232, 0.9);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.cta,
.inquiry-form button,
.signup-form button,
.safecode-form button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cta:hover,
.inquiry-form button:hover,
.signup-form button:hover,
.safecode-form button:hover {
  border-color: var(--oxblood);
  background: var(--oxblood);
  transform: translateY(-1px);
}

.inquiry-form button:disabled,
.signup-form button:disabled,
.safecode-form button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.hero .cta {
  border-color: rgba(255, 248, 232, 0.88);
  background: rgba(255, 248, 232, 0.94);
  color: var(--ink);
}

.hero .cta.secondary {
  background: rgba(27, 23, 21, 0.16);
  color: var(--cream);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1rem;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-proof span {
  border-left: 1px solid rgba(255, 248, 232, 0.35);
  padding-left: 0.72rem;
}

.hero-ledger {
  width: min(640px, 100%);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.hero-ledger span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  border: 1px solid rgba(255, 248, 232, 0.22);
  background: rgba(27, 23, 21, 0.32);
  color: rgba(255, 248, 232, 0.76);
  padding: 0.48rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-ledger strong {
  color: var(--cream);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.after-hours-mark {
  width: 0.82rem;
  height: 0.82rem;
  margin-top: 1rem;
  border: 1px solid rgba(255, 248, 232, 0.48);
  border-radius: 50%;
  background: rgba(255, 248, 232, 0.22);
  cursor: pointer;
}

.after-hours-mark:hover {
  background: var(--cream);
}

.collector-strip {
  border-block: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.8);
}

.collector-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.strip-item {
  display: grid;
  align-content: center;
  min-height: 92px;
  border-left: 1px solid var(--line);
  padding: 1rem;
}

.strip-item:first-child {
  border-left: 0;
}

.strip-item span {
  color: var(--clay);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.strip-item strong {
  margin-top: 0.16rem;
  color: var(--ink);
  font-size: 0.96rem;
}

.house-map {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(245, 234, 219, 0.72), rgba(255, 250, 240, 0.5)),
    repeating-linear-gradient(90deg, rgba(23, 20, 18, 0.028) 0 1px, transparent 1px 18px);
}

.house-map-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.house-map-item {
  min-height: 120px;
  display: grid;
  align-content: end;
  gap: 0.18rem;
  background: rgba(255, 250, 240, 0.82);
  color: inherit;
  padding: 0.9rem;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease, color 160ms ease;
}

.house-map-item:hover,
.house-map-item.is-current {
  background: var(--ink);
  color: var(--cream);
}

.house-map-item.is-available:not(.is-current) {
  background: rgba(255, 247, 230, 0.95);
}

.house-map-item span,
.room-study span {
  color: var(--clay);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.house-map-item:hover span,
.house-map-item.is-current span {
  color: rgba(255, 248, 232, 0.62);
}

.house-map-item strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1;
}

.house-map-item small {
  max-width: 22ch;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.house-map-item:hover small,
.house-map-item.is-current small {
  color: rgba(255, 248, 232, 0.7);
}

.threshold-meter {
  width: fit-content;
  max-width: calc(100% - 2rem);
  position: sticky;
  top: 82px;
  z-index: 20;
  margin: 0.75rem 1rem 0 auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(23, 20, 18, 0.14);
  background: rgba(255, 250, 240, 0.84);
  color: var(--ink);
  padding: 0.44rem 0.58rem;
  box-shadow: 0 12px 26px rgba(41, 31, 22, 0.09);
  backdrop-filter: blur(14px);
}

.threshold-meter span,
.threshold-meter strong {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.threshold-meter span {
  color: var(--clay);
}

.threshold-meter strong {
  color: var(--muted);
}

body[data-clue-count="5"] .threshold-meter {
  border-color: rgba(91, 37, 38, 0.32);
  background: rgba(255, 247, 230, 0.94);
}

.section {
  padding: clamp(3.4rem, 8vw, 7rem) 0;
}

.collector-signup,
.process {
  border-block: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.5);
}

.signup-wrap,
.inquiry-wrap,
.feature-layout,
.process-grid,
.safety-layout,
.safecode-layout,
.riddle-layout,
.artwork-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.96fr);
  gap: clamp(1.2rem, 4vw, 3.4rem);
  align-items: center;
}

.process-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.process-grid > :first-child {
  grid-column: span 5;
}

.process-grid > :last-child {
  grid-column: span 7;
  max-width: 64ch;
  margin-top: 0.3rem;
}

.signup-panel,
.inquiry-panel {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 12px 34px rgba(30, 25, 18, 0.07);
  padding: clamp(1rem, 3vw, 1.7rem);
}

.signup-copy {
  max-width: 62ch;
}

.signup-form,
.inquiry-form,
.safecode-form {
  display: grid;
  gap: 0.78rem;
}

.signup-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.signup-form .form-status {
  grid-column: 1 / -1;
}

.spaces-section {
  background:
    linear-gradient(135deg, rgba(58, 42, 33, 0.08), transparent 46%),
    linear-gradient(180deg, rgba(255, 250, 240, 0.62), rgba(221, 208, 192, 0.42));
}

.spaces-layout,
.archive-layout,
.safe-entry-layout,
.back-room-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(300px, 1.12fr);
  gap: clamp(1.2rem, 4vw, 3.4rem);
  align-items: start;
}

.spaces-copy {
  position: sticky;
  top: 96px;
}

.space-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.space-cards article {
  min-height: 182px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.68);
  padding: 1rem;
}

.space-cards span {
  display: inline-block;
  margin-bottom: 0.72rem;
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.room-studies-section {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.7), rgba(221, 208, 192, 0.32)),
    var(--bg);
}

.room-study-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
}

.room-study {
  display: grid;
  gap: 0.9rem;
}

.room-wall {
  min-height: 390px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.9) 0 64%, rgba(80, 58, 46, 0.18) 64% 100%),
    repeating-linear-gradient(90deg, rgba(23, 20, 18, 0.025) 0 1px, transparent 1px 14px);
  overflow: hidden;
}

.room-study.is-deep .room-wall {
  background:
    linear-gradient(180deg, rgba(58, 42, 33, 0.92) 0 64%, rgba(27, 23, 21, 0.94) 64% 100%),
    repeating-linear-gradient(90deg, rgba(255, 248, 232, 0.035) 0 1px, transparent 1px 14px);
}

.room-study.is-corridor .room-wall {
  background:
    linear-gradient(90deg, rgba(31, 43, 48, 0.92), rgba(255, 250, 240, 0.88) 42%, rgba(31, 43, 48, 0.85)),
    repeating-linear-gradient(0deg, rgba(23, 20, 18, 0.026) 0 1px, transparent 1px 12px);
}

.room-wall img {
  width: min(56%, 240px);
  max-height: 250px;
  position: relative;
  z-index: 1;
  display: block;
  border: 8px solid rgba(255, 250, 240, 0.92);
  box-shadow: 0 22px 38px rgba(23, 20, 18, 0.28);
  object-fit: contain;
}

.room-study.is-deep .room-wall img {
  border-color: rgba(27, 23, 21, 0.85);
}

.room-ledge {
  width: 62%;
  height: 11px;
  position: absolute;
  bottom: 23%;
  left: 19%;
  border-top: 1px solid rgba(23, 20, 18, 0.18);
  background: rgba(58, 42, 33, 0.22);
}

.room-study h3 {
  margin-top: 0.32rem;
}

.room-study p {
  margin-bottom: 0;
}

.archive-section {
  border-block: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(221, 208, 192, 0.86), rgba(245, 234, 219, 0.72)),
    repeating-linear-gradient(0deg, rgba(23, 20, 18, 0.024) 0 1px, transparent 1px 10px);
}

.archive-wall {
  display: grid;
  gap: 0.72rem;
}

.archive-fragment {
  min-height: 64px;
  border: 1px solid rgba(23, 23, 21, 0.12);
  background: rgba(255, 250, 240, 0.58);
  color: var(--ink);
  padding: 0.8rem;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.archive-fragment:hover,
.archive-fragment.is-found {
  border-color: rgba(168, 95, 69, 0.36);
  background: rgba(255, 250, 240, 0.86);
  transform: translateX(3px);
}

.archive-sequence {
  grid-column: 1 / -1;
  max-width: 64ch;
  margin: 0;
  border-left: 2px solid var(--clay);
  color: var(--ink);
  padding-left: 0.9rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.archive-sequence.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.archive-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--clay);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.86);
  color: var(--ink);
  padding: 0.78rem 0.78rem;
  font: inherit;
  outline: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--denim);
  box-shadow: 0 0 0 3px rgba(44, 86, 100, 0.12);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.feature-section {
  background:
    linear-gradient(115deg, rgba(27, 23, 21, 0.98), rgba(58, 42, 33, 0.96) 54%, rgba(31, 21, 22, 0.98)),
    var(--dark);
  color: var(--cream);
}

.feature-art {
  margin: 0;
}

.feature-art picture,
.room-wall picture {
  display: contents;
}

.feature-art img,
.artwork-grid > img {
  width: 100%;
  display: block;
  border: 1px solid rgba(255, 248, 232, 0.18);
  background: #111;
  object-fit: contain;
  padding: clamp(0.55rem, 1.5vw, 0.9rem);
}

.feature-art img {
  aspect-ratio: 4 / 3;
}

.feature-copy p,
.feature-copy .eyebrow {
  color: rgba(255, 248, 232, 0.72);
}

.text-link,
.detail-link {
  width: fit-content;
  border-bottom: 1px solid currentColor;
  color: var(--denim);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.feature-copy .text-link {
  color: var(--cream);
}

.section-head {
  display: grid;
  gap: 0.45rem;
  margin-bottom: clamp(1.45rem, 4vw, 2.3rem);
}

.section-head p {
  max-width: 62ch;
}

.collection-head {
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.74fr);
  align-items: end;
  gap: clamp(1rem, 4vw, 3rem);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.35rem 0 clamp(1.25rem, 3vw, 2rem);
}

.filter-button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.72);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 150ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
}

.piece {
  grid-column: span 4;
  display: grid;
  gap: 0.7rem;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.piece:nth-child(1),
.piece:nth-child(8) {
  grid-column: span 6;
}

.piece-image-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 310px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.68);
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.piece:hover .piece-image-wrap {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.piece-code {
  position: absolute;
  top: 0.72rem;
  left: 0.72rem;
  z-index: 2;
  min-width: 2.1rem;
  min-height: 2.1rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 800;
}

.piece-fragment {
  position: absolute;
  right: 0.72rem;
  bottom: 0.72rem;
  z-index: 2;
  max-width: min(250px, calc(100% - 1.44rem));
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.94);
  color: var(--ink);
  padding: 0.38rem 0.5rem;
  font-size: 0.69rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.piece:hover .piece-fragment,
.piece:focus-visible .piece-fragment {
  opacity: 1;
  transform: translateY(0);
}

.piece picture,
.ledger-thumb picture {
  width: 100%;
  height: 100%;
  display: block;
}

.piece img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  display: block;
  object-fit: contain;
  padding: clamp(0.75rem, 1.4vw, 1rem);
}

.piece-meta-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.piece-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1;
}

.piece-specs,
.piece-signal,
.piece-action,
.ledger-number,
.inquiry-assurance span {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.piece-specs {
  margin-top: 0.18rem;
  color: var(--muted);
}

.piece-signal {
  color: var(--clay);
  text-align: right;
}

.piece-action {
  width: fit-content;
  margin-top: 0.48rem;
  border-bottom: 1px solid currentColor;
  color: var(--denim);
}

.empty-gallery {
  grid-column: 1 / -1;
  margin: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.dossier-section {
  border-block: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.74), rgba(245, 234, 219, 0.74)),
    repeating-linear-gradient(0deg, rgba(23, 20, 18, 0.022) 0 1px, transparent 1px 12px);
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.dossier-grid article {
  min-height: 250px;
  display: grid;
  align-content: space-between;
  background: rgba(255, 250, 240, 0.82);
  padding: clamp(1rem, 2vw, 1.25rem);
}

.dossier-grid span {
  color: var(--clay);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dossier-grid h3 {
  margin-top: 1.8rem;
}

.dossier-grid p {
  margin-bottom: 0;
}

.service,
.safety-stack details,
.faq-list details,
.object-card,
.field-notes details,
.drawer-piece,
.riddle-card,
.ledger-row {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.66);
}

.service {
  min-height: 166px;
  padding: clamp(1rem, 2vw, 1.25rem);
}

.service p {
  margin-bottom: 0;
}

.safety-section {
  border-block: 1px solid var(--line);
  background: var(--paper-dim);
}

.safety-stack,
.faq-list,
.field-notes,
.ledger-grid {
  display: grid;
  gap: 0.72rem;
}

.safety-stack details,
.faq-list details,
.field-notes details,
.riddle-card {
  padding: 1rem;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.safe-entry-section {
  background:
    linear-gradient(90deg, rgba(89, 101, 76, 0.17), rgba(245, 234, 219, 0.82)),
    linear-gradient(180deg, transparent, rgba(91, 37, 38, 0.045)),
    var(--paper-warm);
}

.safe-card {
  border: 1px solid rgba(23, 23, 21, 0.14);
  background: rgba(255, 250, 240, 0.7);
  padding: clamp(1rem, 2.5vw, 1.4rem);
}

.safe-dial {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.62rem;
  margin-bottom: 1rem;
}

.safe-dial span {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 23, 21, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 250, 240, 0.95), rgba(221, 208, 192, 0.82));
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  transition: transform 220ms ease;
}

.safecode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.safecode-grid span {
  border: 1px solid rgba(105, 120, 95, 0.26);
  background: rgba(255, 250, 240, 0.6);
  color: var(--muted);
  padding: 0.72rem;
}

.safecode-grid strong {
  display: block;
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-result {
  min-height: 64px;
  border-left: 2px solid var(--moss);
  background: rgba(105, 120, 95, 0.08);
  color: var(--ink);
  padding: 0.85rem;
  font-weight: 700;
}

.back-room-section {
  background:
    linear-gradient(110deg, rgba(27, 23, 21, 0.98), rgba(58, 42, 33, 0.96) 48%, rgba(31, 21, 22, 0.98));
  color: var(--cream);
}

.back-room-section p,
.back-room-section .eyebrow {
  color: rgba(255, 248, 232, 0.74);
}

.back-room-panel {
  display: grid;
  gap: 0.72rem;
}

.back-room-panel article {
  border: 1px solid rgba(255, 248, 232, 0.16);
  background: rgba(255, 248, 232, 0.06);
  padding: 1rem;
}

.back-room-panel span {
  display: block;
  color: rgba(255, 248, 232, 0.54);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.back-room-panel strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--cream);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
}

.back-room-panel p {
  max-width: 44ch;
  margin: 0.55rem 0 0;
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.86rem;
}

body[data-access-tier="1"] .collector-strip,
body[data-access-tier="2"] .collector-strip,
body[data-access-tier="3"] .collector-strip,
body[data-access-tier="4"] .collector-strip {
  background: rgba(255, 250, 240, 0.92);
}

body[data-access-tier="3"] [data-clue-word],
body[data-access-tier="4"] [data-clue-word],
.is-recognized {
  color: var(--clay);
}

body.after-hours {
  background:
    linear-gradient(rgba(27, 23, 21, 0.14), rgba(245, 234, 219, 0.9)),
    var(--bg);
}

.inquiry {
  border-top: 1px solid var(--line);
}

.inquiry-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 1rem;
}

.inquiry-assurance span {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.6);
  color: var(--muted);
  padding: 0.34rem 0.48rem;
}

.checkbox-label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.62rem;
  align-items: start;
  font-size: 0.78rem;
  line-height: 1.45;
}

.checkbox-label input {
  width: auto;
  margin-top: 0.18rem;
}

.form-status {
  min-height: 1.3rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-status[data-state="success"] {
  color: #315f49;
}

.form-status[data-state="warning"] {
  color: #7a4b30;
}

.form-status a {
  color: var(--denim);
  font-weight: 800;
}

.status-copy {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--denim);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-footer {
  border-top: 1px solid rgba(255, 248, 232, 0.14);
  background: var(--dark);
  color: rgba(255, 248, 232, 0.74);
  padding: 1rem 0;
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.footer-wrap p {
  color: inherit;
}

.footer-wrap a {
  color: inherit;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.82rem;
  flex-wrap: wrap;
}

.footer-clue {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.72rem;
  font-style: italic;
}

.studio-seal {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 232, 0.32);
  border-radius: 50%;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.08rem;
  text-decoration: none;
}

.studio-seal:hover {
  background: var(--cream);
  color: var(--ink);
}

.art-dialog {
  width: min(920px, calc(100% - 1rem));
  border: 1px solid var(--line);
  padding: 0;
  background: var(--paper);
}

.art-dialog::backdrop {
  background: rgba(23, 23, 21, 0.78);
}

.close-dialog {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(23, 23, 21, 0.5);
  color: #fff;
  cursor: pointer;
}

.art-dialog img {
  width: 100%;
  max-height: 72vh;
  display: block;
  object-fit: contain;
  background: #111;
}

.dialog-meta {
  padding: 1rem;
}

.artwork-page,
.drawer-page,
.ledger-page {
  padding-top: 66px;
}

.artwork-page {
  padding-bottom: 56px;
}

.artwork-grid {
  padding-top: clamp(2rem, 5vw, 3rem);
  align-items: start;
}

.artwork-grid > img {
  border-color: var(--line);
  background: rgba(255, 250, 240, 0.68);
}

.artwork-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.object-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 1.1rem 0;
  background: var(--line);
}

.object-card div,
.object-card p {
  margin: 0;
  background: rgba(255, 250, 240, 0.78);
  padding: 0.78rem;
}

.object-card p {
  grid-column: 1 / -1;
}

.object-card span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.object-card strong {
  display: block;
  margin-top: 0.22rem;
  color: var(--ink);
  font-size: 0.88rem;
}

.art-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.field-notes {
  margin: 1.1rem 0;
}

.field-notes img {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0;
  max-height: 340px;
  object-fit: cover;
}

.drawer-hero,
.ledger-hero {
  min-height: 58vh;
  display: grid;
  align-items: end;
  color: var(--cream);
}

.drawer-hero {
  background:
    linear-gradient(95deg, rgba(23, 23, 21, 0.76), rgba(23, 23, 21, 0.28)),
    image-set(
      url("./photos/04_zoom_details/optimized/IMG_0018-detail.webp") type("image/webp"),
      url("./photos/04_zoom_details/edited/IMG_0018-detail.jpg") type("image/jpeg")
    ) center / cover;
}

.ledger-hero {
  background:
    linear-gradient(95deg, rgba(23, 23, 21, 0.78), rgba(23, 23, 21, 0.26)),
    image-set(
      url("./photos/04_zoom_details/optimized/IMG_0085-detail.webp") type("image/webp"),
      url("./photos/04_zoom_details/edited/IMG_0085-detail.jpg") type("image/jpeg")
    ) center / cover;
}

.drawer-intro,
.ledger-intro {
  padding-bottom: clamp(2rem, 7vw, 4.5rem);
}

.drawer-intro .eyebrow,
.drawer-intro p,
.ledger-intro .eyebrow,
.ledger-intro p {
  color: rgba(255, 248, 232, 0.78);
}

.time-door {
  max-width: 48ch;
  border-left: 2px solid rgba(255, 248, 232, 0.46);
  background: rgba(23, 23, 21, 0.26);
  padding: 0.68rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.4rem);
}

.drawer-piece {
  display: grid;
  grid-template-columns: minmax(150px, 0.82fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.82rem;
}

.drawer-piece img,
.ledger-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: rgba(245, 234, 219, 0.8);
}

.drawer-piece picture {
  display: block;
}

.drawer-piece h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.drawer-note,
.no-ghosts-section {
  border-top: 1px solid rgba(255, 248, 232, 0.12);
  background: var(--dark);
  color: var(--cream);
}

.drawer-note .eyebrow,
.drawer-note p,
.no-ghosts-section .eyebrow,
.no-ghosts-section p {
  color: rgba(255, 248, 232, 0.74);
}

.riddle-section {
  border-top: 1px solid var(--line);
  background: var(--paper-dim);
}

.riddle-text {
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.45rem, 2.3vw, 2.05rem);
  line-height: 1.12;
}

.cabinet-section {
  border-top: 1px solid var(--line);
  background: var(--paper-warm);
}

.cabinet-section.is-locked {
  display: none;
}

.cabinet-ledger-link {
  margin: 1.1rem 0 0;
}

.ledger-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
}

.ledger-number {
  margin: 0 0 0.2rem;
  color: var(--clay);
}

.ledger-main h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.45rem);
}

.ledger-main p:last-child {
  margin-bottom: 0;
}

.ledger-marks {
  display: grid;
  gap: 0.38rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ledger-marks span {
  border-top: 1px solid var(--line);
  padding-top: 0.38rem;
}

.ledger-marks span:first-child {
  border-top: 0;
  padding-top: 0;
}

.ledger-marks b {
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.72rem 0;
  }

  .hero {
    min-height: 88vh;
  }

  .signup-wrap,
  .inquiry-wrap,
  .feature-layout,
  .safety-layout,
  .safecode-layout,
  .spaces-layout,
  .archive-layout,
  .safe-entry-layout,
  .back-room-layout,
  .riddle-layout,
  .artwork-grid,
  .collection-head,
  .ledger-row {
    grid-template-columns: 1fr;
  }

  .spaces-copy {
    position: static;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .process-grid > :first-child,
  .process-grid > :last-child {
    grid-column: auto;
  }

  .service-grid,
  .drawer-grid,
  .space-cards,
  .dossier-grid {
    grid-template-columns: 1fr;
  }

  .collector-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .house-map-grid,
  .room-study-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-wall {
    min-height: 330px;
  }

  .strip-item:nth-child(3) {
    border-left: 0;
  }

  .piece,
  .piece:nth-child(1),
  .piece:nth-child(8) {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1rem, 1160px);
  }

  .nav {
    width: 100%;
    flex-wrap: nowrap;
    gap: 0.16rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    padding: 0.34rem 0.38rem;
    font-size: 0.62rem;
  }

  h1,
  .hero h1 {
    max-width: none;
    font-size: 3.08rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .hero-copy {
    max-width: 32ch;
  }

  .hero-ledger {
    display: grid;
    grid-template-columns: 1fr;
  }

  .collector-strip-grid {
    grid-template-columns: 1fr;
  }

  .house-map-grid,
  .room-study-grid {
    grid-template-columns: 1fr;
  }

  .house-map-item {
    min-height: 104px;
  }

  .threshold-meter {
    margin-right: 0.5rem;
    top: 118px;
  }

  .threshold-meter strong {
    display: none;
  }

  .room-wall {
    min-height: 290px;
  }

  .strip-item {
    min-height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 0.82rem 0.2rem;
  }

  .strip-item:first-child {
    border-top: 0;
  }

  .signup-form {
    grid-template-columns: 1fr;
  }

  .piece,
  .piece:nth-child(1),
  .piece:nth-child(8) {
    grid-column: 1 / -1;
  }

  .piece-image-wrap {
    min-height: 250px;
  }

  .piece-meta-line {
    display: grid;
    gap: 0.2rem;
  }

  .piece-signal {
    text-align: left;
  }

  .object-card,
  .safecode-grid {
    grid-template-columns: 1fr;
  }

  .drawer-piece {
    grid-template-columns: 1fr;
  }
}
