/* Дьөгүөр — local, buildless presentation. No runtime dependencies. */
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/noto-serif-variable.woff") format("woff");
}

:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --ink: #28251f;
  --muted: #665e53;
  --red: #9e1c17;
  --rule: #cbc2b4;
  --gutter: clamp(1.5rem, 4.2vw, 5rem);
  --width: 88rem;
  font-family: "Noto Serif", Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

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

html {
  color: var(--ink);
  font-size: 100%;
  line-height: 1.5;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  min-width: 0;
}

::selection {
  color: var(--paper);
  background: var(--red);
  text-shadow: none;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

a:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 6px;
}

a:hover {
  color: var(--red);
}

a:active {
  opacity: 0.7;
}

p,
h1,
h2 {
  margin: 0;
}

p {
  text-wrap: pretty;
}

h1,
h2 {
  font-weight: 400;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.shell {
  width: min(calc(100% - var(--gutter) * 2), var(--width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 5;
  top: 1rem;
  left: var(--gutter);
  padding: 0.75rem 1rem;
  color: var(--paper);
  background: var(--red);
  transform: translateY(-180%);
}

.skip-link:focus {
  color: var(--paper);
  transform: translateY(0);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--red);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.brand span {
  overflow-wrap: anywhere;
}

.header-links,
.languages {
  display: flex;
  align-items: center;
}

.header-links {
  gap: 3rem;
}

.header-purpose {
  font-size: 0.875rem;
  text-decoration: none;
}

.languages {
  gap: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.languages a,
.languages [aria-current="page"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding-inline: 0.5rem;
}

.languages a {
  text-decoration: none;
}

.languages [aria-current="page"] {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 0.5em;
  text-decoration-thickness: 1px;
}

.hero {
  padding-block: clamp(4rem, 7.5vw, 7rem) 5rem;
}

.eyebrow,
.section-label {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 2rem;
  max-width: 100%;
  font-size: clamp(3rem, 6.8vw, 6rem);
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.hero-line {
  display: block;
}

.hero h1 em {
  color: var(--red);
  font-style: normal;
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  margin-top: 3rem;
}

.hero-intro {
  max-width: 39rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.65;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 2.75rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid currentColor;
  color: var(--red);
  font-size: 1rem;
  white-space: nowrap;
  text-decoration: none;
}

.text-link svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.hero-art {
  margin-block: 0 6rem;
}

.hero-art img {
  display: block;
  width: 100%;
  max-height: 48rem;
  object-fit: cover;
}

.purpose {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 3rem;
  padding-block: 5rem 6rem;
  border-top: 1px solid var(--rule);
}

.purpose .section-label {
  padding-top: 0.75rem;
}

.purpose-copy {
  max-width: 59rem;
}

.purpose h2 {
  max-width: 24ch;
  font-size: clamp(2rem, 3.6vw, 3.75rem);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.purpose-copy > p {
  margin-top: 2rem;
  max-width: 39rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.75;
}

.site-footer {
  padding-block: 4rem 1.5rem;
  border-top: 1px solid var(--rule);
}

.footer-top,
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-top {
  align-items: center;
}

.footer-top p {
  max-width: 24rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-top img {
  width: 2rem;
  height: 2rem;
}

.footer-wordmark {
  margin-block: 2rem 2.5rem;
  color: var(--red);
  font-size: clamp(3.75rem, 15.5vw, 14rem);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.footer-bottom {
  align-items: baseline;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.75rem;
}

.footer-bottom a {
  display: inline-block;
  min-height: 2.75rem;
  padding-block: 0.75rem;
}

.document {
  padding-block: 5rem 6rem;
}

.document h1 {
  margin-top: 2rem;
  max-width: 16ch;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.document-copy {
  max-width: 43rem;
  margin-top: 3rem;
}

.document-copy p {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.75;
}

.document-copy h2 {
  margin-top: 3rem;
  font-size: 1.5rem;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.document .text-link {
  margin-top: 3rem;
}

.error-number {
  color: var(--red);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

@media (max-width: 47rem) {
  .site-header {
    gap: 1rem;
    padding-block: 1.25rem;
  }

  .header-purpose {
    display: none;
  }

  .hero {
    padding-block: 3rem 4rem;
  }

  .hero h1 {
    margin-top: 1.5rem;
    font-size: clamp(2.5rem, 9.8vw, 4.5rem);
    line-height: 1.12;
    letter-spacing: -0.05em;
  }

  .hero-bottom {
    display: block;
    margin-top: 2rem;
  }

  .hero-intro {
    max-width: 35rem;
    font-size: 1rem;
    line-height: 1.7;
  }

  .hero-bottom .text-link {
    margin-top: 2rem;
  }

  .hero-art {
    margin-bottom: 4rem;
  }

  .purpose {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 3rem 4rem;
  }

  .purpose .section-label {
    padding-top: 0;
  }

  .purpose h2 {
    max-width: 25ch;
    font-size: clamp(2rem, 5.7vw, 3rem);
  }

  .purpose-copy > p {
    font-size: 1rem;
  }

  .site-footer {
    padding-top: 2rem;
  }

  .footer-wordmark {
    margin-block: 2rem 1rem;
  }

  .document {
    padding-block: 3rem 4rem;
  }

  .document-copy {
    margin-top: 2rem;
  }

  .document-copy p {
    font-size: 1rem;
  }
}

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

@media print {
  .skip-link,
  .header-links,
  .hero-bottom .text-link,
  .footer-bottom {
    display: none;
  }

  .hero,
  .purpose,
  .document,
  .site-footer {
    padding-block: 2rem;
  }

  .brand[href]::after {
    content: none;
  }
}
