/* Testloop Labs — site chrome: header and footer */

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(247, 246, 242, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand img {
  height: 36px;
  width: auto;
}

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

.site-nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  position: relative;
}

.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.25s ease;
}

.site-nav a:not(.btn):hover::after,
.site-nav a[aria-current="page"]::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 1.5px;
  margin: 6px auto;
  background: var(--ink);
  transition: transform 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .bar:first-of-type {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:last-of-type {
  transform: translateY(-3.75px) rotate(-45deg);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a:not(.btn) {
    width: 100%;
    padding: 14px 0;
    font-size: 1.15rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:not(.btn)::after {
    display: none;
  }

  .site-nav .btn {
    margin-top: 20px;
  }
}

/* Footer */
.site-footer {
  background: var(--night);
  color: #a9aca9;
  padding: 72px 0 40px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}

.footer-brand img {
  height: 32px;
  width: auto;
  filter: invert(1);
  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 22rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f736f;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: #e9ebe8;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--teal);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--night-line);
  font-size: 0.85rem;
  color: #6f736f;
}

.footer-base a {
  color: #a9aca9;
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}
