:root {
  color-scheme: light;
  --brand-ink: #2b0a43;
  --brand-deep: #480f6f;
  --brand-mid: #73409d;
  --brand-vivid: #8a1dd3;
  --brand-accent: #7b3ff2;
  --surface: #ffffff;
  --surface-mist: #f3eff7;
  --surface-fog: #fafafa;
  --hairline: #e7ddec;
  --ink: #24152e;
  --muted: #65546f;
  --success: #2e7d32;
  --focus: #7b3ff2;
  --font: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface-fog);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--surface) 0, var(--surface) 360px, var(--surface-fog) 360px);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--brand-deep);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--brand-vivid);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 10px 14px;
  color: white;
  background: var(--brand-ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.96);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-ink);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--brand-deep);
  box-shadow: 3px 3px 0 var(--brand-vivid);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--brand-vivid);
}

.language-button,
.menu-button {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--brand-deep);
  border: 1px solid var(--brand-deep);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.menu-button {
  display: none;
}

main {
  width: min(1120px, 90vw);
  min-height: calc(100vh - 150px);
  margin: 0 auto;
}

.page {
  padding: 72px 0 96px;
}

.page[hidden] {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.4fr);
  gap: 8vw;
  align-items: center;
  min-height: 420px;
}

.status {
  margin: 0 0 18px;
  color: var(--brand-mid);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

h1,
h2 {
  color: var(--brand-ink);
  text-wrap: balance;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero-copy,
.document-heading > p:last-child {
  max-width: 68ch;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  text-wrap: pretty;
}

.sigil {
  display: grid;
  width: min(320px, 70vw);
  aspect-ratio: 1;
  place-content: center;
  justify-self: end;
  border: 2px solid var(--brand-deep);
  border-radius: 16px;
  color: white;
  background: var(--brand-deep);
  box-shadow: 10px 10px 0 var(--brand-vivid);
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: 0.06em;
}

.link-list {
  border-top: 2px solid var(--brand-deep);
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hairline);
  color: var(--brand-deep);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease-out, padding 160ms ease-out;
}

.link-list a:hover {
  padding-right: 10px;
  padding-left: 10px;
  color: var(--brand-vivid);
}

.document-heading {
  padding-bottom: 48px;
  border-bottom: 2px solid var(--brand-deep);
}

.document-heading h1 {
  max-width: 20ch;
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.document {
  max-width: 76ch;
  margin: 0 auto;
  padding: 56px 0 0;
}

.document h2 {
  margin: 48px 0 14px;
  font-size: 1.25rem;
  line-height: 1.35;
}

.document h2:first-child {
  margin-top: 0;
}

.document p,
.document li {
  text-wrap: pretty;
}

.document li + li {
  margin-top: 10px;
}

.document code {
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--brand-deep);
  background: var(--surface-mist);
  font-family: inherit;
  font-size: 0.92em;
}

.notice {
  padding: 16px;
  border: 1px solid var(--brand-mid);
  border-radius: 12px;
  color: var(--brand-ink);
  background: var(--surface-mist);
}

.primary-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 12px;
  color: white;
  background: var(--brand-vivid);
  font-weight: 800;
  text-decoration: none;
}

.primary-link:hover {
  color: white;
  background: var(--brand-deep);
}

.copy-en {
  display: none;
}

html[lang="en"] .copy-pt {
  display: none;
}

html[lang="en"] .copy-en {
  display: block;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 5vw;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  font-size: 12px;
}

@media (max-width: 860px) {
  .site-header {
    flex-wrap: wrap;
    padding: 14px 5vw;
  }

  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 16px;
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

  .site-nav a {
    padding: 12px 0;
    border-top: 1px solid var(--hairline);
  }

  .language-button {
    align-self: flex-start;
    margin-top: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .sigil {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .page {
    padding: 48px 0 72px;
  }

  h1 {
    font-size: 2.25rem;
  }

  .hero-copy,
  .document-heading > p:last-child {
    font-size: 16px;
  }

  .document {
    padding-top: 38px;
  }

  .document h2 {
    margin-top: 38px;
  }

  .site-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;
  }
}
