:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #151714;
  color: #f3f0e7;
  --panel: #21241e;
  --line: #383d33;
  --muted: #bcbaae;
  --accent: #d8bc80;
  --accent-ink: #292314;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

h1, h2, p { margin: 0; }

button, input { font: inherit; }

button { cursor: pointer; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid #edcf91;
  outline-offset: 4px;
}

.shell {
  width: min(74rem, calc(100% - 4rem));
  margin-inline: auto;
}

.header {
  position: relative;
  z-index: 1;
  background: #1b1d18;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 4.6rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.65rem;
}

.brand, .sign-in, .nav, .nav a {
  display: flex;
  align-items: center;
}

.brand {
  justify-self: start;
  gap: .65rem;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 750;
  letter-spacing: .01em;
}

.mark, .section-icon, .gate-icon {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.mark {
  width: 2rem;
  aspect-ratio: 1;
  border: 1px solid #b29965;
  border-radius: .26rem;
}

.mark::before {
  width: .94rem;
  height: .72rem;
  margin-top: .37rem;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(38deg) skewX(-15deg);
  content: "";
}

.nav { gap: .3rem; flex-wrap: wrap; }

.nav a {
  min-height: 2.65rem;
  padding: .5rem .85rem;
  border-radius: .28rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .94rem;
  font-weight: 640;
}

.nav a:hover, .nav a[aria-current="page"] {
  background: #32342a;
  color: #f3e5c2;
}

.sign-in {
  justify-self: end;
  min-height: 2.55rem;
  gap: .6rem;
  padding: .4rem .75rem;
  border: 1px solid #615943;
  border-radius: .3rem;
  background: transparent;
  color: #f3e5c2;
  font-weight: 650;
}

.sign-in:hover { background: #333025; }

.hero {
  min-height: 33rem;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #151711 2%, #151711df 29%, #1517113d 70%, #15171114),
    #303326 url("/rubezh-assets/terrain.jpg") center 52% / cover no-repeat;
}

.hero-inner {
  width: min(74rem, calc(100% - 4rem));
  margin-inline: auto;
  padding-block: clamp(3.3rem, 8vw, 6rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #e3c992;
  font-size: .875rem;
  font-weight: 730;
  letter-spacing: .095em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: .55rem;
  height: .55rem;
  background: var(--accent);
  transform: rotate(45deg);
}

.hero h1, .page-heading h1 {
  font-weight: 840;
  letter-spacing: -.06em;
  line-height: .94;
}

.hero h1 {
  margin-top: 1.15rem;
  font-size: clamp(3.1rem, 8.5vw, 6.9rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.6rem;
}

.primary, .secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.9rem;
  padding: .65rem 1.05rem;
  border: 1px solid transparent;
  border-radius: .28rem;
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
  text-decoration: none;
  font-weight: 770;
}

.primary:hover { background: #ecd29a; }

.secondary {
  border-color: #756a51;
  background: #202119c9;
  color: #f3e5c2;
}

.secondary:hover { background: #363428; }

.sections { padding-block: 2.15rem 3rem; }

.sections h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  letter-spacing: -.02em;
}

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

.section-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
}

.section-link:hover {
  border-color: #857450;
  background: #292d24;
}

.section-link > .lock {
  margin-left: auto;
  color: var(--muted);
}

.section-icon, .gate-icon {
  width: 2.65rem;
  aspect-ratio: 1;
  border: 1px solid #524934;
  border-radius: .35rem;
  background: #383326;
}

.section-icon::before {
  width: 1.1rem;
  height: .85rem;
  border: 1.5px solid currentColor;
  border-radius: .12rem;
  content: "";
}

.forum-icon::before { border-bottom-left-radius: .4rem; }
.map-icon::before { transform: skewY(-13deg); }
.replay-icon::before {
  width: 0;
  height: 0;
  border: .45rem solid transparent;
  border-left: .64rem solid currentColor;
  border-right: 0;
  border-radius: 0;
}

.section-copy {
  display: grid;
  gap: .25rem;
}

.section-copy > span, .footer {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.45;
}

.footer {
  border-top: 1px solid var(--line);
  background: #191b16;
}

.footer-inner {
  min-height: 3.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1.25rem;
  flex-wrap: wrap;
  padding-block: .8rem;
}

.inner-page { padding-block: clamp(2.2rem, 5vw, 4rem) 3.2rem; }

.page-heading { margin-bottom: 1.65rem; }

.page-heading h1 {
  margin-top: .7rem;
  font-size: clamp(2.45rem, 7vw, 4.45rem);
  line-height: 1.04;
}

.page-heading > p:last-child {
  margin-top: .75rem;
  color: var(--muted);
  line-height: 1.55;
}

.gate-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 2rem 1rem;
  text-align: center;
}

.forum-panel {
  min-height: 20rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--panel);
}

.gate-panel h2 {
  margin-top: .8rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.gate-panel p {
  margin-top: .5rem;
  color: var(--muted);
  line-height: 1.5;
}

.gate-panel .primary { margin-top: 1.1rem; }

.map-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--panel);
}

.map-bar, .map-status {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.map-bar {
  justify-content: space-between;
  min-height: 3.45rem;
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: .94rem;
  font-weight: 620;
}

.map-status {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
}

.map-screen {
  min-height: 15rem;
  aspect-ratio: 16 / 8;
  background: #0d0f0c;
}

.guide-steps {
  display: grid;
  gap: .65rem;
  max-width: 53rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 2.05rem minmax(0, 1fr);
  gap: .45rem .9rem;
  align-items: start;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
  background: var(--panel);
  counter-increment: step;
}

.guide-steps li::before {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 2.05rem;
  aspect-ratio: 1;
  border: 1px solid #524934;
  border-radius: .3rem;
  background: #383326;
  color: var(--accent);
  font-weight: 700;
  content: counter(step);
}

.guide-steps h2, .guide-note h2 { font-size: 1.1rem; }
.guide-steps p, .guide-note p { color: var(--muted); line-height: 1.55; }

.guide-note {
  max-width: 53rem;
  margin-block: 1.2rem;
  padding: .5rem 1rem;
  border-left: 2px solid var(--accent);
}

.guide-note p { margin-top: .35rem; }


.lock {
  position: relative;
  display: inline-block;
  flex: none;
  width: .8rem;
  height: .64rem;
  margin-top: .3rem;
  border: 1.4px solid currentColor;
  border-radius: .12rem;
}

.lock::before {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: .49rem;
  height: .43rem;
  border: 1.4px solid currentColor;
  border-bottom: 0;
  border-radius: .35rem .35rem 0 0;
  transform: translateX(-50%);
  content: "";
}

.access {
  width: min(100% - 2rem, 27rem);
  max-height: calc(100% - 2rem);
  padding: 1.5rem;
  border: 1px solid #5c5645;
  border-radius: .45rem;
  background: #23261f;
  color: inherit;
  box-shadow: 0 1.5rem 5rem #0009;
}

.access::backdrop { background: #080a08cf; }

.close {
  position: absolute;
  top: .65rem;
  right: .65rem;
  width: 2.6rem;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: .28rem;
  background: transparent;
  color: #d9d4c2;
  font-size: 1.55rem;
}

.close:hover { background: #373a30; }

.access h2 {
  margin-top: .75rem;
  font-size: 1.5rem;
  letter-spacing: -.025em;
}

.access-context, .access-note {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.45;
}

.access-context { margin-top: .3rem; }

.access form {
  display: grid;
  gap: .55rem;
  margin-top: 1rem;
}

.access label { font-size: .875rem; }

.access input {
  width: 100%;
  min-height: 2.75rem;
  padding: .6rem;
  margin-bottom: .35rem;
  border: 1px solid #54574a;
  border-radius: .28rem;
  background: #161813;
  color: inherit;
}

.access-note:not(:empty) { margin-top: .55rem; }

.access-switch {
  min-height: 2.75rem;
  margin-top: .4rem;
  padding: .3rem 0;
  border: 0;
  background: transparent;
  color: #e8ce98;
  font-size: .875rem;
  font-weight: 650;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.access-switch:hover { color: #f8e1b4; }

@media (max-width: 55rem) {
  .shell, .hero-inner { width: calc(100% - 2rem); }
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: .1rem .75rem;
    padding-block: .6rem .35rem;
  }
  .nav { grid-row: 2; grid-column: 1 / -1; }
  .nav a { padding-inline: .65rem; }
  .hero {
    min-height: 28rem;
    background-image: linear-gradient(90deg, #131510ec, #13151099 72%, #1315105c),
      url("/rubezh-assets/terrain.jpg");
  }
  .section-grid { grid-template-columns: 1fr; }
}
