@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500;1,600&display=swap');

:root {
  color-scheme: light;
  --ink: #202326;
  --ink-soft: #55595a;
  --paper: #f4f0e7;
  --paper-bright: #fbf9f3;
  --line: #d7d1c5;
  --amber: #f1ae4b;
  --amber-deep: #b87921;
  --rose: #e5d8d2;
  --slate: #d8dfdc;
  --mono: 'DM Mono', 'Courier New', monospace;
  --sans: 'DM Sans', Arial, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --page-pad: clamp(1.25rem, 6.3vw, 6.5rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { color: var(--ink); background: #f6ce91; }
a { color: inherit; }
.skip-link {
  position: fixed;
  z-index: 10;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  color: var(--ink);
  background: var(--paper-bright);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 4px; }

.site-header {
  height: 76px;
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  color: #f6f2e9;
  background: #171a1c;
  border-bottom: 1px solid rgba(255,255,255,.11);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  font-weight: 500;
}
.wordmark i { color: var(--amber); font-style: normal; }
.door-mark { width: 30px; height: 30px; fill: none; stroke: var(--amber); stroke-width: 1.35; }
.site-header nav { display: flex; align-items: center; gap: clamp(1rem, 3.5vw, 3.3rem); }
.site-header nav a, .back-top {
  color: #cac8c0;
  text-decoration: none;
  font-family: var(--mono);
  font-size: .63rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color .2s ease;
}
.site-header nav a:hover, .back-top:hover { color: var(--amber); }
.site-header nav .nav-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--amber);
  border: 1px solid rgba(241,174,75,.55);
  border-radius: 50%;
  font-size: .92rem;
}

.hero {
  min-height: min(800px, calc(100svh - 76px));
  padding: clamp(4.5rem, 10vh, 7.5rem) var(--page-pad) 5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: #f6f2e9;
  background: #171a1c;
  isolation: isolate;
}
.hero::before {
  content: '';
  width: min(60vw, 780px);
  height: 130%;
  position: absolute;
  z-index: -1;
  right: -6%;
  top: -14%;
  background: linear-gradient(104deg, rgba(23,26,28,0) 0%, rgba(23,26,28,.3) 30%, rgba(241,174,75,.055) 68%, rgba(241,174,75,.015) 100%);
  transform: skewX(-7deg);
}
.hero-copy { position: relative; z-index: 1; width: min(52rem, 72%); }
.eyebrow, .kicker, .section-index, .room-label, .room-number, .hero-caption, .scroll-cue, .threshold-note, .room-edge, .character-index, .closing-rule, .back-top {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.eyebrow { display: flex; align-items: center; gap: .85rem; color: #c1bcb2; font-size: .67rem; }
.eyebrow-rule { display: inline-block; width: 34px; height: 1px; background: var(--amber); }
.hero h1 {
  margin: clamp(1.75rem, 4vw, 3.25rem) 0 0;
  font: 500 clamp(4.7rem, 11.4vw, 10.2rem)/.88 var(--serif);
  letter-spacing: -.065em;
}
.hero h1 em { color: var(--amber); font-weight: 500; }
.hero-thesis {
  margin: clamp(2rem, 5vw, 4rem) 0 0;
  padding-left: 1.1rem;
  color: #e5dfd4;
  border-left: 1px solid var(--amber);
  font: 500 clamp(1.12rem, 2vw, 1.48rem)/1.55 var(--serif);
}
.hero-thesis span { color: #a7a7a1; font-style: italic; }
.scroll-cue { margin-top: clamp(2.75rem, 7vh, 5rem); display: inline-flex; align-items: center; gap: .8rem; color: #c1bcb2; font-size: .62rem; text-decoration: none; }
.scroll-cue span:last-child { color: var(--amber); font-size: 1rem; }
.scroll-line { width: 32px; height: 1px; background: var(--amber); transition: width .2s ease; }
.scroll-cue:hover .scroll-line { width: 50px; }
.hero-caption { position: absolute; right: var(--page-pad); bottom: 2rem; color: #96938c; font-size: .57rem; writing-mode: vertical-rl; }
.hero-architecture {
  width: min(46vw, 610px);
  height: min(68vh, 600px);
  min-height: 390px;
  position: absolute;
  right: clamp(2rem, 9vw, 9rem);
  top: 50%;
  z-index: -1;
  opacity: .75;
  transform: translateY(-50%);
}
.door {
  position: absolute;
  bottom: 1rem;
  width: 43%;
  height: 88%;
  border: 1px solid rgba(241,174,75,.23);
  border-bottom: 0;
}
.door::before {
  content: '';
  position: absolute;
  inset: 8% 8% 0;
  border: 1px solid rgba(246,242,233,.1);
  border-bottom: 0;
}
.door-left { left: 1%; transform: perspective(700px) rotateY(9deg); transform-origin: right; }
.door-right { right: 1%; transform: perspective(700px) rotateY(-9deg); transform-origin: left; }
.door span { position: absolute; top: 52%; width: 4px; height: 4px; background: var(--amber); border-radius: 50%; }
.door-left span { right: 10%; }
.door-right span { left: 10%; }
.door-left::after, .door-right::after {
  content: '';
  width: 14%; height: 1px;
  position: absolute; top: 50%;
  background: rgba(241,174,75,.25);
}
.door-left::after { right: -15%; }
.door-right::after { left: -15%; }
.signal { position: absolute; top: -2%; left: 50%; display: flex; gap: 5px; transform: translateX(-50%); }
.signal span { width: 4px; height: 4px; background: var(--amber); border-radius: 50%; box-shadow: 0 0 17px rgba(241,174,75,.7); }
.signal span:nth-child(2) { opacity: .5; }
.signal span:nth-child(3) { opacity: .2; }

.section-wrap { padding-left: var(--page-pad); padding-right: var(--page-pad); }
.story { padding-top: clamp(5rem, 10vw, 9rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.section-index { display: flex; align-items: center; gap: .8rem; color: #77746c; font-size: .59rem; }
.section-index > span:first-child { color: var(--amber-deep); }
.index-rule { width: 34px; height: 1px; background: #b5aea1; }
.story-layout {
  margin-top: clamp(3rem, 7vw, 6.5rem);
  display: grid;
  grid-template-columns: minmax(280px, .96fr) minmax(320px, 1fr);
  gap: clamp(2rem, 8vw, 9rem);
  align-items: start;
}
.kicker { color: var(--amber-deep); font-size: .62rem; }
.story h2, .rooms h2, .ending h2 {
  margin: 1rem 0 0;
  font: 500 clamp(2.8rem, 6.3vw, 5.6rem)/.98 var(--serif);
  letter-spacing: -.05em;
}
.story h2 em, .rooms h2 em, .ending h2 em { color: #8e7251; font-weight: 500; }
.story-text { max-width: 550px; padding-top: 1.8rem; color: #444747; font-size: clamp(1rem, 1.45vw, 1.15rem); line-height: 1.9; }
.story-text p:first-child { margin-top: 0; }
.story-text p + p { margin-top: 1.25rem; }
.threshold-note { margin-top: clamp(3.5rem, 8vw, 7rem); display: flex; align-items: center; gap: .8rem; color: #77746c; font-size: .58rem; }
.note-dot { width: 6px; height: 6px; background: var(--amber-deep); border-radius: 50%; }
.note-rule { width: clamp(30px, 16vw, 180px); height: 1px; background: var(--line); }

.rooms { padding-top: 1rem; }
.rooms-head { padding-bottom: clamp(3rem, 7vw, 6rem); position: relative; }
.rooms-head h2 { margin-top: 2.1rem; }
.rooms-intro { max-width: 240px; position: absolute; right: calc(var(--page-pad) + 2vw); bottom: clamp(3rem, 8vw, 7rem); color: #666965; font: italic 1.07rem/1.5 var(--serif); }
.room-panel {
  min-height: 520px;
  padding: clamp(3rem, 8vw, 7rem) var(--page-pad) clamp(3rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(70px, .22fr) minmax(0, 1fr) minmax(28px, .2fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  position: relative;
  overflow: hidden;
}
.room-women { background: var(--rose); }
.room-men { background: var(--slate); }
.room-panel::before { content: ''; width: 37vw; height: 37vw; max-width: 500px; max-height: 500px; position: absolute; right: -7vw; top: -18vw; border: 1px solid rgba(32,35,38,.09); border-radius: 50%; pointer-events: none; }
.room-number { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; color: #77746c; font-size: .55rem; }
.room-number strong { margin-top: .35rem; color: #a57d5e; font: 500 clamp(3.4rem, 6vw, 5.5rem)/1 var(--serif); }
.room-content { width: min(100%, 770px); position: relative; z-index: 1; }
.room-label { margin: .2rem 0 1.35rem; color: #77746c; font-size: .56rem; }
.room-content h3 { margin: 0; font: 500 clamp(2.3rem, 4.6vw, 4.1rem)/1.08 var(--serif); letter-spacing: -.04em; }
.room-lead { max-width: 640px; margin: 1.1rem 0 0; color: #4b4b49; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.8; }
.character-list { margin-top: clamp(2.5rem, 5vw, 4.5rem); border-top: 1px solid rgba(32,35,38,.2); }
.character { display: grid; grid-template-columns: 42px 1fr; gap: 1rem; padding: 1.25rem 0 1.3rem; border-bottom: 1px solid rgba(32,35,38,.2); }
.character-index { padding-top: .28rem; color: #867967; font-size: .58rem; }
.character h4 { margin: 0; font: 500 1.48rem/1.2 var(--serif); }
.character p { max-width: 640px; margin: .35rem 0 0; color: #555856; font-size: .95rem; line-height: 1.72; }
.room-edge { display: flex; align-items: center; flex-direction: column; gap: .8rem; position: relative; z-index: 1; color: #77746c; font-size: .52rem; writing-mode: vertical-rl; }
.edge-rule { width: 1px; flex: 1; background: rgba(32,35,38,.25); }

.ending { padding-top: clamp(5rem, 11vw, 10rem); padding-bottom: clamp(5rem, 11vw, 10rem); }
.ending-grid { margin-top: clamp(3rem, 7vw, 6rem); display: grid; grid-template-columns: minmax(280px, .92fr) minmax(320px, 1fr); gap: clamp(2rem, 8vw, 9rem); align-items: start; }
.ending h2 em { color: var(--amber-deep); }
.ending-copy { max-width: 570px; padding-top: 1.9rem; color: #444747; font-size: clamp(1rem, 1.45vw, 1.15rem); line-height: 1.9; }
.ending-copy p:first-child { margin-top: 0; }
.ending-copy p + p { margin-top: 1.25rem; }
.closing-rule { display: flex; gap: 5px; margin-top: 3.5rem; }
.closing-rule span { display: block; width: 5px; height: 5px; background: var(--amber-deep); border-radius: 50%; }
.closing-rule span:nth-child(2) { opacity: .5; }
.closing-rule span:nth-child(3) { opacity: .22; }

.site-footer { min-height: 120px; padding: 1.5rem var(--page-pad); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; color: #f6f2e9; background: #171a1c; }
.site-footer p { margin: 0; color: #bab8b1; font: .94rem var(--serif); }
.site-footer p strong { color: #f6f2e9; font-weight: 500; }
.footer-wordmark { font-size: .65rem; }
.footer-wordmark .door-mark { width: 27px; height: 27px; }
.back-top { color: #bab8b1; }
.back-top span { margin-left: .55rem; color: var(--amber); }

@media (max-width: 760px) {
  .site-header { height: 66px; }
  .site-header nav { gap: 1rem; }
  .site-header nav a { font-size: .56rem; }
  .site-header nav .nav-mark { width: 26px; height: 26px; }
  .hero { min-height: min(740px, calc(100svh - 66px)); padding-top: 5.3rem; padding-bottom: 4rem; }
  .hero-copy { width: 100%; }
  .hero h1 { font-size: clamp(4.5rem, 16vw, 7.5rem); }
  .hero-architecture { width: 66vw; height: 57vh; min-height: 330px; right: -7vw; top: 59%; opacity: .44; }
  .hero-caption { bottom: 1.4rem; right: 1rem; font-size: .5rem; }
  .story-layout, .ending-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .story-text, .ending-copy { padding-top: 0; }
  .rooms-intro { position: static; margin: 1.5rem 0 0; max-width: 300px; }
  .room-panel { grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 1.1rem; padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .room-number strong { font-size: 3.6rem; }
  .room-label { font-size: .5rem; }
  .character { grid-template-columns: 31px 1fr; gap: .7rem; }
  .character h4 { font-size: 1.35rem; }
  .character p { font-size: .9rem; }
  .site-footer { flex-wrap: wrap; min-height: 150px; }
  .site-footer p { order: 3; flex-basis: 100%; }
}

@media (max-width: 430px) {
  .wordmark { gap: .45rem; font-size: .58rem; }
  .door-mark { width: 25px; height: 25px; }
  .site-header nav { gap: .7rem; }
  .site-header nav a { font-size: .49rem; letter-spacing: .07em; }
  .story h2, .rooms h2, .ending h2 { font-size: 3.1rem; }
  .room-panel { grid-template-columns: 30px minmax(0, 1fr) 15px; gap: .65rem; }
  .room-edge { font-size: .45rem; }
  .room-number { font-size: .48rem; }
  .room-number strong { font-size: 2.85rem; }
  .threshold-note { font-size: .49rem; gap: .55rem; letter-spacing: .08em; }
  .note-rule { width: 24px; }
  .back-top { font-size: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
