:root {
  color-scheme: dark;
  --bg: #0b0f0d;
  --bg-soft: #101612;
  --panel: #151c18;
  --panel-warm: #1c1a15;
  --text: #f1e8db;
  --muted: #aaa497;
  --sand: #d3b98f;
  --sage: #91aa91;
  --cyan: #77b9c0;
  --line: rgba(241, 232, 219, 0.13);
  --line-strong: rgba(241, 232, 219, 0.24);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 12%, rgba(79, 112, 87, 0.13), transparent 30rem),
    radial-gradient(circle at 7% 58%, rgba(119, 185, 192, 0.07), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::selection {
  background: var(--sand);
  color: var(--bg);
}

img {
  max-width: 100%;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(241, 232, 219, 0.08);
  background: linear-gradient(180deg, rgba(5, 8, 6, 0.9), rgba(5, 8, 6, 0.52));
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand__mark {
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 28px);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.topbar__nav a {
  transition: color 160ms ease;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  color: var(--text);
}

.topbar__portal {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero__image,
.hero__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  z-index: -3;
  object-fit: cover;
  object-position: 50% 37%;
  filter: saturate(0.83) contrast(1.03);
  transform: scale(1.015);
}

.hero__veil {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 10, 8, 0.93) 0%, rgba(7, 10, 8, 0.67) 43%, rgba(7, 10, 8, 0.12) 74%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%, rgba(0, 0, 0, 0.18) 100%);
}

.hero__content {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 132px 0 clamp(72px, 9vh, 112px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.scene-dialog h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(5rem, 14vw, 11rem);
  line-height: 0.72;
  text-wrap: balance;
}

.hero__copy {
  max-width: 570px;
  margin: 34px 0 20px;
  color: #ddd4c7;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.45;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.hero__tags span,
.filter-button {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.hero__tags span {
  padding: 7px 11px;
  color: #d3cec5;
  background: rgba(8, 11, 9, 0.45);
  font-size: 0.76rem;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid rgba(211, 185, 143, 0.56);
  border-radius: 999px;
  background: rgba(211, 185, 143, 0.1);
  color: var(--text);
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  background: rgba(211, 185, 143, 0.18);
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(76px, 10vw, 136px) 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(46px, 8vw, 120px);
  align-items: end;
}

.intro__copy h2,
.section-heading h2,
.woods__copy h2 {
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.88;
}

.intro__copy > p:not(.eyebrow) {
  max-width: 690px;
  color: var(--muted);
  font-size: 1.06rem;
}

.intro__copy .lede,
.woods__copy .lede {
  color: var(--text);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.28;
}

.identity-card {
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(145, 170, 145, 0.1), transparent 45%),
    var(--panel);
  box-shadow: var(--shadow);
}

.identity-card dl {
  margin: 0;
}

.identity-card dl div {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.identity-card dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.identity-card dd {
  margin: 5px 0 0;
  font-weight: 750;
}

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

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 28px;
}

.section-heading > p {
  max-width: 340px;
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.55;
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.world-card {
  grid-column: span 5;
  min-height: 500px;
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--panel);
}

.world-card--wide {
  grid-column: span 7;
}

.world-card img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  display: block;
  object-fit: cover;
  object-position: 50% 34%;
  filter: saturate(0.88);
  transition: transform 500ms ease, filter 500ms ease;
}

.world-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 8, 6, 0.84), transparent 52%);
  pointer-events: none;
}

.world-card:hover img {
  transform: scale(1.025);
  filter: saturate(1);
}

.world-card figcaption {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 13px;
  align-items: baseline;
}

.world-card figcaption span {
  grid-row: 1 / span 2;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
}

.world-card figcaption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.world-card figcaption small {
  color: #c1bbb0;
}

.world-card--portal img {
  filter: saturate(0.5) brightness(0.72);
}

.woods {
  width: min(1320px, calc(100% - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0;
  align-items: stretch;
  padding-top: 40px;
}

.woods__media {
  min-height: 720px;
  overflow: hidden;
  background: #121713;
}

.woods__media img {
  width: 100%;
  height: 100%;
  min-height: 720px;
  display: block;
  object-fit: cover;
}

.woods__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 6vw, 86px);
  background:
    radial-gradient(circle at 92% 7%, rgba(145, 170, 145, 0.14), transparent 25rem),
    var(--panel);
}

.woods__copy > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.68;
}

.woods__copy .lede {
  color: var(--text);
  line-height: 1.28;
}

.character-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 12px;
}

.character-pair div {
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 9, 0.34);
}

.character-pair span {
  display: block;
  color: var(--sand);
  font-weight: 850;
}

.character-pair small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.woods__copy .woods__ending {
  margin-top: 24px;
  color: var(--text);
  font-weight: 850;
}

.woods__characters {
  align-self: flex-start;
  margin-top: 8px;
  color: var(--sand);
  font-weight: 850;
}

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

.archive__heading {
  margin-bottom: 18px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.filter-button {
  min-height: 38px;
  padding: 0 13px;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.is-active {
  border-color: rgba(119, 185, 192, 0.62);
  background: rgba(119, 185, 192, 0.09);
  color: var(--text);
}

.archive-grid {
  columns: 4 230px;
  column-gap: 12px;
}

.archive-card {
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  position: relative;
  display: block;
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: zoom-in;
  text-align: left;
}

.archive-card[hidden] {
  display: none;
}

.archive-card img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.83) brightness(0.92);
  transition: transform 320ms ease, filter 320ms ease;
}

.archive-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(0deg, rgba(4, 7, 5, 0.9), transparent);
  pointer-events: none;
}

.archive-card__caption {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 12px;
}

.archive-card__caption span {
  display: block;
  color: var(--cyan);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.archive-card__caption strong {
  display: block;
  margin-top: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.archive-card:hover img,
.archive-card:focus-visible img {
  transform: scale(1.018);
  filter: saturate(1) brightness(1);
}

.archive-card:focus-visible,
.filter-button:focus-visible,
.button:focus-visible,
.topbar a:focus-visible,
.scene-dialog__close:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.scene-dialog {
  width: min(1050px, calc(100% - 24px));
  max-height: calc(100svh - 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 38px 120px rgba(0, 0, 0, 0.72);
}

.scene-dialog[open] {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.scene-dialog::backdrop {
  background: rgba(3, 5, 4, 0.88);
  backdrop-filter: blur(8px);
}

.scene-dialog__media {
  min-height: min(78svh, 760px);
  background: #050706;
}

.scene-dialog__media img {
  width: 100%;
  height: 100%;
  max-height: 86svh;
  display: block;
  object-fit: contain;
}

.scene-dialog__copy {
  align-self: end;
  padding: 30px;
}

.scene-dialog__copy h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.9;
}

.scene-dialog__copy > p:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.scene-dialog__close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(7, 10, 8, 0.78);
  color: var(--text);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 30px 0 54px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--sand);
  font-weight: 800;
}

@media (max-width: 900px) {
  .intro,
  .woods {
    grid-template-columns: 1fr;
  }

  .identity-card {
    max-width: 620px;
  }

  .world-card,
  .world-card--wide {
    grid-column: span 6;
  }

  .woods {
    width: min(1180px, calc(100% - 24px));
  }

  .woods__media,
  .woods__media img {
    min-height: 620px;
  }

  .scene-dialog[open] {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .scene-dialog__media {
    min-height: 58svh;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 60px;
    padding: 10px 14px;
  }

  .topbar__nav {
    gap: 11px;
    font-size: 0.76rem;
  }

  .topbar__nav a:first-child,
  .topbar__nav a:nth-child(3),
  .topbar__nav a:nth-child(4) {
    display: none;
  }

  .topbar__portal {
    padding: 6px 9px;
  }

  .hero__content,
  .section,
  .footer {
    width: calc(100% - 24px);
  }

  .hero__content {
    padding-bottom: 64px;
  }

  .hero__image {
    object-position: 52% 38%;
  }

  .hero__veil {
    background:
      linear-gradient(0deg, rgba(7, 10, 8, 0.97) 0%, rgba(7, 10, 8, 0.62) 52%, rgba(7, 10, 8, 0.18) 100%),
      linear-gradient(90deg, rgba(7, 10, 8, 0.6), transparent);
  }

  .hero h1 {
    font-size: clamp(4.9rem, 25vw, 7rem);
  }

  .hero__copy {
    margin-top: 24px;
  }

  .section {
    padding: 74px 0;
  }

  .intro__copy h2,
  .section-heading h2,
  .woods__copy h2 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 16px;
  }

  .world-grid {
    display: block;
  }

  .world-card,
  .world-card--wide {
    min-height: 440px;
    margin-bottom: 12px;
  }

  .world-card img {
    min-height: 440px;
  }

  .woods {
    width: calc(100% - 12px);
    padding-top: 20px;
  }

  .woods__media,
  .woods__media img {
    min-height: 520px;
  }

  .woods__copy {
    padding: 28px 18px 36px;
  }

  .character-pair {
    grid-template-columns: 1fr;
  }

  .archive-grid {
    columns: 2 145px;
    column-gap: 8px;
  }

  .archive-card {
    margin-bottom: 8px;
  }

  .archive-card__caption {
    left: 10px;
    right: 10px;
    bottom: 9px;
  }

  .archive-card__caption strong {
    font-size: 1rem;
  }

  .scene-dialog {
    width: calc(100% - 12px);
    max-height: calc(100svh - 12px);
  }

  .scene-dialog__copy {
    padding: 22px;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
