@font-face {
  font-family: Cormorant;
  src: url("/assets/fonts/Cormorant-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #110f16;
  --panel: #1b1721;
  --text: #f3ecdf;
  --muted: #c1b6c4;
  --gold: #e0bc83;
  --line: #3b303d;
  --serif: Cormorant, Georgia, serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 75rem;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 1rem/1.65 system-ui, sans-serif;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
[id] { scroll-margin-top: 2rem; }
.shell { width: min(calc(100% - 2 * var(--gutter)), var(--measure)); margin-inline: auto; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 3; opacity: 0; pointer-events: none; }
.skip-link:focus { opacity: 1; pointer-events: auto; }

.site-header {
  background: #110f16;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.header-inner { min-height: 4.75rem; padding-block: .65rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  font: 650 1.55rem/1 var(--serif);
  white-space: nowrap;
}
.wordmark img { width: 1.9rem; height: 1.9rem; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem clamp(.7rem, 2.6vw, 2rem); }
.site-nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 550;
  text-decoration: none;
}
.site-nav a:hover { color: var(--gold); }

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(34rem, 78vh, 54rem);
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.hero-art, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { object-fit: cover; object-position: 59% 50%; z-index: -2; }
.hero::after {
  content: "";
  z-index: -1;
  background:
    linear-gradient(0deg, #110f16 1%, transparent 39%),
    linear-gradient(90deg, #110f16 1%, rgba(17, 15, 22, .95) 24%, rgba(17, 15, 22, .64) 51%, rgba(17, 15, 22, .07) 100%);
}
.hero-content { padding-block: 6rem 7.25rem; }
.kicker {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.kicker::before { content: ""; flex: 0 0 1.6rem; height: 1px; background: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 650; margin: 0; }
h1 { max-width: 13ch; font-size: clamp(3.5rem, 7vw, 7.25rem); line-height: .9; letter-spacing: -.045em; }
h1 span { color: var(--gold); }
html[lang="ru"] h1 { max-width: 12ch; }
.lede { max-width: 36rem; margin: 1.6rem 0 0; color: var(--text); font-size: clamp(1rem, 2vw, 1.15rem); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .6rem 1.25rem;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: var(--gold);
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: #f2d4a6; color: var(--ink); }
.button.secondary { color: var(--text); background: #110f16bf; border-color: #8e778c; }
.button.secondary:hover { border-color: var(--gold); color: var(--gold); }
.art-credit {
  position: absolute;
  right: var(--gutter);
  bottom: 1.4rem;
  margin: 0;
  color: var(--muted);
  font-size: .875rem;
}

.section { padding-block: clamp(3.75rem, 9vw, 7.5rem); }
.section-head { max-width: 44rem; margin-bottom: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(2.7rem, 5vw, 4.75rem); line-height: .96; letter-spacing: -.034em; }
h3 { font-size: clamp(1.95rem, 3.4vw, 2.75rem); line-height: 1.02; letter-spacing: -.022em; }
.section-head > p:last-child, .feature-copy > p:last-child {
  margin: 1rem 0 0;
  color: var(--muted);
  max-width: 61ch;
}
.feature-list { display: grid; gap: 1.5rem; }
.feature {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  background: var(--panel);
  border: 1px solid var(--line);
}
.feature:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.feature:nth-child(even) .feature-art { order: 1; border-right: 0; border-left: 1px solid var(--line); }
.feature-art {
  position: relative;
  margin: 0;
  min-width: 0;
  min-height: 15rem;
  border-right: 1px solid var(--line);
  background: #171521;
}
.feature-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: center; }
.feature-art.map { min-height: 25rem; background: #151315; }
.feature-art.map img { object-fit: contain; }
.feature-art figcaption {
  position: absolute;
  inset: auto auto .7rem .7rem;
  max-width: calc(100% - 1.4rem);
  background: #110f16eb;
  color: var(--text);
  font-size: .875rem;
  padding: .2rem .6rem;
}
.feature-copy { align-self: center; padding: clamp(1.4rem, 4vw, 3rem); }
.feature-copy .kicker { margin-bottom: .7rem; }
.feature-copy .kicker::before { display: none; }

.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.contact-card { padding: 1.4rem; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.contact-card h3 { font-size: 2rem; }
.contact-card p { color: var(--muted); margin: .6rem 0 1rem; }
.contact-card a { color: var(--gold); overflow-wrap: anywhere; text-underline-offset: .2em; }

.site-footer { border-top: 1px solid var(--line); padding-block: 1.4rem; color: var(--muted); }
.site-footer p { margin: 0; font-size: .875rem; }
.site-footer .wordmark { color: var(--text); }

.encounter {
  background: radial-gradient(ellipse at 14% 24%, #29243a, transparent 60%), #17131c;
  border-block: 1px solid var(--line);
}
.encounter-layout {
  display: grid;
  grid-template-columns: minmax(16rem, .8fr) minmax(0, 1.25fr);
  border: 1px solid #55445c;
  background: #110f16;
}
.encounter-portrait {
  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
  min-height: 36rem;
  margin: 0;
  overflow: hidden;
  background: #242032;
}
.encounter-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 31%;
  z-index: -1;
}
.encounter-portrait figcaption {
  display: grid;
  padding: 3rem 1.5rem 1.45rem;
  background: linear-gradient(transparent, #110f16 92%);
}
.encounter-portrait strong { font: 650 2.25rem/1 var(--serif); }
.encounter-portrait span { color: var(--gold); margin-top: .45rem; }
.encounter-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 1.25rem;
  min-width: 0;
  height: 36rem;
  padding: clamp(1rem, 3.1vw, 2.25rem);
}
.encounter-log { overflow-y: auto; scrollbar-color: #735d73 #221c29; }
.encounter-log p {
  margin: 0 .35rem .65rem 0;
  padding: .85rem 1rem;
  background: #221c29;
  border-left: 2px solid var(--gold);
}
.encounter-log .player-line { border-color: #9f81d1; background: #2a2235; }
.encounter-log strong { display: block; color: var(--gold); margin-bottom: .25rem; }
.encounter-log .player-line strong { color: #dfccff; }
.encounter-controls { display: grid; gap: .75rem; }
.encounter-controls audio { width: 100%; max-width: 22rem; height: 2.75rem; }
.encounter-choices { display: grid; gap: .45rem; }
.encounter-choices button, .encounter-reset {
  min-height: 2.75rem;
  padding: .5rem .75rem;
  border: 1px solid #735d73;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  line-height: 1.4;
  text-align: left;
}
.encounter-choices button:hover, .encounter-reset:hover { color: var(--gold); border-color: var(--gold); }
.encounter-reset { justify-self: start; color: var(--gold); }

.engine-map {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
}
.engine-map img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; }
.engine-map figcaption {
  position: absolute;
  bottom: .65rem;
  left: .65rem;
  padding: .2rem .6rem;
  background: #110f16eb;
  font-size: .875rem;
}
.engine-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  margin: 1px 0 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}
.engine-steps li { padding: clamp(1.25rem, 3vw, 2rem); background: var(--panel); }
.engine-steps h3 { font-size: clamp(1.75rem, 2.75vw, 2.3rem); }
.engine-steps p { margin: .7rem 0 0; color: var(--muted); }

@media (max-width: 52rem) {
  .hero { min-height: 39rem; align-items: end; }
  .hero-art { object-position: 60% 28%; }
  .hero::after {
    background: linear-gradient(0deg, #110f16 0%, rgba(17, 15, 22, .96) 25%, rgba(17, 15, 22, .82) 50%, rgba(17, 15, 22, .12) 87%);
  }
  .hero-content { padding-block: 11rem 4.65rem; }
  .feature, .feature:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .feature-art, .feature:nth-child(even) .feature-art {
    order: 0;
    min-height: 0;
    aspect-ratio: 2 / 1;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-art.map { min-height: 0; aspect-ratio: 1; }
  .engine-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .encounter-layout { grid-template-columns: minmax(0, 1fr); }
  .encounter-portrait { min-height: clamp(15rem, 65vw, 24rem); }
  .encounter-panel { height: auto; grid-template-rows: minmax(12rem, 1fr) auto; }
  .encounter-log { max-height: 17rem; }
}

@media (max-width: 35rem) {
  .header-inner, .footer-inner { align-items: start; flex-direction: column; gap: .25rem; }
  .header-inner { padding-block: .85rem .25rem; }
  .footer-inner { gap: .85rem; }
  .art-credit { bottom: 1rem; }
  .engine-steps { grid-template-columns: minmax(0, 1fr); }
  .engine-map img { aspect-ratio: 1.6; }
}

.conversation-tabs {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #55445c;
}
.conversation-tabs button {
  min-height: 2.75rem;
  padding: .6rem .95rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}
.conversation-tabs button:hover { color: var(--gold); }
.conversation-tabs button[aria-selected="true"] {
  background: #221c29;
  border-color: #55445c;
  border-bottom-color: var(--gold);
  color: var(--gold);
}
.conversation-panel { padding-top: 1rem; }
.conversation-panel > p { margin: .9rem 0 1rem; color: var(--muted); max-width: 70ch; }
.conversation-panel video {
  display: block;
  width: 100%;
  aspect-ratio: 32 / 17;
  background: #110f16;
  border: 1px solid #55445c;
}
.conversation-tabs[hidden] { display: none; }
.conversation-panel h3 { margin: 0 0 .8rem; }
