/****************************************
Fonts
****************************************/

@font-face {
  font-family: "Arbeit";
  src: url("../fonts/arbeit-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/****************************************
Type
****************************************/

h1 {
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1rem;
  margin-bottom: 1rem;
  max-width: 700px;
}

h1::after,
h2::after {
  content: "";
  display: block;
  width: 1rem;
  height: 2px;
  background-color: currentColor;
  margin-top: 0.5rem;
}

h2 {
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  max-width: 700px;
  display: inline-block;
}

h3 {
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1rem;
  max-width: 700px;
  margin-bottom: 1rem;
}

p {
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1rem;
  margin-bottom: 1rem;
  max-width: 700px;
}

/* Articles: the introductory section uses the larger text size … */
body.article .article-intro p {
  font-size: 0.75rem;
  line-height: 1rem;
}

/* … including numbered lists within the introduction */
body.article .article-intro ol li {
  font-size: 0.75rem;
  line-height: 1rem;
}

/* … and the main body uses the smaller text size */
body.article .article-body p {
  font-size: 0.5rem;
  line-height: 0.8rem;
}

li {
  font-size: 0.5rem;
  font-weight: 300;
  line-height: 0.8rem;
  max-width: 700px;
}

ul {
  margin-bottom: 1rem;
  list-style-type: circle;
  list-style-position: inside;
}

/* Articles: when an ordered- or unordered-list line wraps to a second row,
   hang-indent the wrapped text so it aligns past the marker instead of the
   left edge. */
body.article ul li,
body.article ol li {
  padding-left: 1em;
  text-indent: -1em;
}

ol {
  margin-bottom: 1rem;
  list-style-position: inside;
}

/* Table-of-contents listing (section / documentation / technical pages)
   uses the larger text size */
.articles li {
  font-size: 0.75rem;
  line-height: 1rem;
}

table {
  border-collapse: collapse;
  margin-bottom: 1rem;
  max-width: 700px;
  width: 100%;
}

th,
td {
  font-size: 0.5rem;
  font-weight: 300;
  line-height: 0.7rem;
  padding: 0.25rem 0.25rem;
  border: 1px solid #000;
  text-align: left;
}

th {
  font-weight: 400;
}

code {
  font-family:
    "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 0.5rem;
  line-height: 0.75rem;
}

pre {
  font-family:
    "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 0.5rem;
  line-height: 0.75rem;
  max-width: 700px;
  margin-bottom: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
}

/****************************************
Reset
****************************************/

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

a {
  color: currentColor;
  text-decoration: none; /* Remove underlines for links */
}

html {
  font-size: 30px; /* Rem used as line height*/
  color: #000;
  background-color: #fff;
  height: 100%;
}

body {
  font-family: "Arbeit", serif;
  margin: 1rem;
  height: 100%;
}

/****************************************
Images
****************************************/

figure {
  width: 100%;
  max-width: 700px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Opt-in image that fills the full body content width
   (stays inside the body's 1rem page margin — not edge-to-edge).
   Available in any article or section content. */
figure.full-width {
  max-width: none;
  width: 100%;
}

.diagram {
  margin-left: auto;
  margin-right: auto;
}

img {
  width: 100%;
  margin-bottom: 0rem;
}

.diagram img {
  width: 50%;
}

figcaption {
  font-size: 0.5rem;
  font-weight: 300;
  line-height: 0.75rem;
  margin-top: 0.25rem;
  color: #000;
}

/****************************************
Password Gate
****************************************/

.password-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.password-gate form {
  display: flex;
  gap: 0.5rem;
}

.password-gate input[type="password"],
.password-gate button {
  font-family: "Arbeit", serif;
  font-size: 0.75rem;
  font-weight: 300;
  color: #000;
  padding: 0.5rem 0.75rem;
  border: 1px solid #000;
  border-radius: 8px;
  background: none;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.password-gate input[type="password"]:focus,
.password-gate button:focus {
  outline: none;
  box-shadow: none;
}

.password-gate button {
  cursor: pointer;
}

/****************************************
Poster
****************************************/

.poster {
  position: relative;
  width: 100vw;
  height: calc(100vh - 0rem);
  margin-left: -1rem;
  margin-top: -1rem;
  margin-bottom: 4rem;
  overflow: hidden;
}

.poster-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 1;
}

.poster-text h1 {
  font-size: 1rem;
  margin-bottom: 0;
  letter-spacing: 0.05em;
}

.poster-text h1::after,
.poster-text h2::after {
  display: none;
}

.poster-text p {
  font-size: 0.6rem;
  max-width: 600px;
  line-height: 0.9rem;
}

@keyframes posterZoom {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  animation: posterZoom 4s ease-out forwards;
}

.poster-cta {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  color: #fff;
  font-size: 0.5rem;
  line-height: 0.75rem;
  font-weight: 300;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  z-index: 1;
}

/****************************************
Download Page - Download button
****************************************/

p.download {
  margin-top: 2rem;
}

.download-button {
  display: inline-block;
  background-color: transparent;
  color: #000;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 300;
  padding: 0.75rem 1.5rem;
  border: 1px solid #000;
  border-radius: 999px;
}

/****************************************
Home Page - Poster text
****************************************/

body.home .poster-text h1,
body.home .poster-text h2,
body.home .poster-text p {
  font-size: 0.8rem;
  line-height: 0.9rem;
  letter-spacing: 0;
  margin: 0;
}

body.home .poster-text h1 {
  margin-bottom: 0rem;
}

body.home .poster-text h2 {
  margin-bottom: 1rem;
}

body.home .poster-text p {
  max-width: 700px;
}

/****************************************
Home Page - Centered text elements
****************************************/

body.home .text > p,
body.home .text > h1,
body.home .text > h2,
body.home .text > h3,
body.home .text > ul,
body.home .text > ol,
body.home .text > table,
body.home .text > pre {
  margin-left: auto;
  margin-right: auto;
}

body.home .text > h2 {
  display: block;
}

/****************************************
Home & Feature Page - Edge-to-edge images
****************************************/

body.home .text figure,
body.feature .text figure {
  width: 100vw;
  max-width: none;
  margin-left: -1rem;
  margin-right: -1rem;
}

body.home .text figure {
  margin-top: 4rem;
  margin-bottom: 4rem;
}

body.home .text figure img,
body.feature .text figure img {
  width: 100%;
  height: auto;
}

body.home .text figure figcaption {
  max-width: calc(700px + 2rem);
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: auto;
  margin-right: auto;
}

body.feature .text figure figcaption {
  margin-left: 1rem;
  margin-right: 1rem;
}

/****************************************
Article Prev / Next Navigation
****************************************/

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
  max-width: 700px;
  font-size: 0.5rem;
  line-height: 0.8rem;
  font-weight: 300;
}

.article-nav__next {
  margin-left: auto;
  text-align: right;
}

/****************************************
Footer
****************************************/

footer {
  margin-top: 2rem;
  padding-bottom: 2rem;
  display: flex;
  gap: 2rem;
  font-family:
    "Arbeit",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-weight: 300;
  font-size: 0.5rem;
  color: #000;
}

/****************************************
Documentation Two-Column Layout
****************************************/

.intro-columns {
  display: block;
  max-width: 700px;
  margin-bottom: 2rem;
}

.intro-main {
  max-width: 700px;
}

/****************************************
Sidebar Navigation
****************************************/

/* Menu Button */
.menu-button {
  position: fixed;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1000;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 1.5rem;
  height: 1.5rem;
  color: #000;
  transition: color 0.15s ease;
}

.menu-button.is-on-image {
  color: #fff;
}

.menu-button svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  z-index: 1001;
  visibility: hidden;
}

.sidebar-overlay.is-visible {
  visibility: visible;
}

/* Sidebar Panel */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 600px;
  max-width: 90vw;
  height: 100%;
  background-color: #111111;
  color: #fff;
  z-index: 1002;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  padding: 1rem;
  overflow-y: auto;
}

.sidebar.is-open {
  transform: translateX(0);
}

/* Sidebar Close Button */
.sidebar-close {
  position: absolute;
  top: 20pt;
  right: 20pt;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* Sidebar Heading */
.sidebar h1::after {
  display: none;
}

/* Sidebar Tagline */
.sidebar-tagline {
  font-size: 0.75rem;
  line-height: 1rem;
  margin-bottom: 1rem;
  color: #fff;
  width: 75%;
  min-width: 300px;
}

/* Sidebar Navigation List */
.sidebar-nav {
  list-style: decimal;
  list-style-position: outside;
  margin: 0;
  padding: 0 0 0 1rem;
  width: 75%;
  min-width: 300px;
}

.sidebar-nav > li {
  font-size: 0.75rem;
  line-height: 1rem;
  color: #fff;
}

.sidebar-nav a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.sidebar-nav a:hover {
  opacity: 0.7;
}

/* Sidebar Sub-Navigation */
.sidebar-subnav {
  list-style: decimal;
  list-style-position: inside;
  margin: 0.5rem 0 0 1rem;
  padding: 0;
}

.sidebar-subnav li {
  font-size: 0.5rem;
  line-height: 1rem;
  color: #fff;
  max-width: none;
}

/* Body scroll lock when sidebar is open */
body.sidebar-open {
  overflow: hidden;
}
