/* system.css — layout: container, header, nav, footer, section rhythm */

.page-container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---- section rhythm: even step + thin divider lines ---- */
.site-section {
  padding-top: var(--s-9);
  padding-bottom: var(--s-9);
  border-top: 1px solid var(--c-grid-line);
}

.site-section.site-section-flush {
  border-top: 0;
}

.section-heading-block {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-width: 760px;
  margin-bottom: var(--s-7);
}

.section-heading-block h2 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
}

/* ---- header: centred logo, menu underneath ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background-color: rgba(244, 246, 249, 0.92);
  border-bottom: 1px solid var(--c-grid-line);
  backdrop-filter: blur(10px);
}

.site-header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1240px;
  padding: var(--s-3) 1.5rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--c-text);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--c-text);
}

.site-brand-mark {
  width: 34px;
  height: 34px;
}

.site-brand-word strong {
  font-weight: 600;
}

.primary-nav {
  display: flex;
  justify-content: center;
  width: 100%;
  border-top: 1px solid var(--c-grid-line);
}

.primary-nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-6);
  align-items: center;
  margin: 0;
  padding: var(--s-3) 1.5rem;
  list-style: none;
}

.primary-nav-list a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color 0.12s linear;
}

.primary-nav-list a:hover,
.primary-nav-list a[aria-current='page'] {
  color: var(--c-accent);
}

.nav-toggle {
  display: none;
}

/* ---- footer: stacked, mobile-first ---- */
.site-footer {
  padding-top: var(--s-8);
  padding-bottom: var(--s-7);
  color: var(--c-text-on-dark);
  background-color: var(--c-dark);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
}

.site-footer a {
  color: var(--c-text-on-dark);
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8893a4;
  margin-bottom: var(--s-4);
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-legal {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  font-size: 0.86rem;
  line-height: 1.6;
  border-top: 1px solid rgba(170, 178, 192, 0.25);
}

.footer-legal address {
  font-style: normal;
  overflow-wrap: anywhere;
}

.site-footer a {
  overflow-wrap: anywhere;
}

/* ---- mobile menu panel (state class: drawer-out) ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  padding: 5.5rem 1.5rem 2rem;
  background-color: var(--c-dark);
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform 0.28s ease, visibility 0s linear 0.28s;
}

.mobile-menu.drawer-out {
  visibility: visible;
  transform: translateY(0);
  transition: transform 0.28s ease;
}

.mobile-menu-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-menu-list a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.8rem;
  color: #ffffff;
  text-decoration: none;
}

.mobile-menu-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}

@media (min-width: 880px) {
  .site-footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--s-8);
  }
}

@media (max-width: 760px) {
  /* with JS the burger takes over; without JS the inline nav stays open */
  html.js-enabled .primary-nav {
    display: none;
  }

  .site-header-bar {
    justify-content: space-between;
  }

  html.js-enabled .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
  }
}
