.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--margin));
  margin-inline: auto;
  padding-inline: var(--margin);
}
.section {
  padding-block: var(--section);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: var(--c-paper);
  border-bottom: var(--hair) solid transparent;
  transition: border-color var(--dur-2) var(--ease);
}
.header.is-scrolled,
.header.is-open {
  border-bottom-color: var(--line);
}
.header__bar {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  height: var(--header-h);
}
.header__logo {
  display: block;
  flex: none;
  margin-right: auto;
  padding: 6px 0;
}
.header__logo img {
  height: 44px;
  width: auto;
}
.header__nav ul {
  display: flex;
  gap: clamp(20px, 2.4vw, 40px);
}
.navlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.96875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--c-ink-soft);
  transition: color var(--dur-1) var(--ease);
}
.navlink::after {
  /* active state: the logo's full stop after the word */
  content: '';
  position: absolute;
  right: -10px;
  bottom: 14px;
  width: 6px;
  height: 6px;
  border-radius: var(--r-circle);
  background: var(--accent);
  transform: scale(0);
  transition: transform var(--dur-2) var(--ease);
}
.navlink:hover,
.navlink[aria-current='page'] {
  color: var(--c-ink);
}
.navlink[aria-current='page']::after {
  transform: scale(1);
}
.navlink:hover::after {
  transform: scale(0.6);
}
/* Same red-dot fill as every other button, just compact */
.header__cta {
  min-height: 44px;
  padding: 0 18px;
  gap: 10px;
  font-size: 0.9375rem;
}
.header__toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  background: none;
  border: 0;
}
.toggle__lines,
.toggle__lines::before {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1.5px;
  background: var(--c-ink);
  transition: transform var(--dur-2) var(--ease), top var(--dur-2) var(--ease);
}
.toggle__lines {
  top: 18px;
}
.toggle__lines::before {
  content: '';
  left: 0;
  top: 7px;
}
.toggle__lines::after {
  /* the red dot sits after the lines, like the full stop after "361" */
  content: '';
  position: absolute;
  left: 26px;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: var(--r-circle);
  background: var(--accent);
  transition: opacity var(--dur-1);
}
.is-open .toggle__lines {
  top: 21px;
  transform: rotate(45deg);
}
.is-open .toggle__lines::before {
  top: 0;
  transform: rotate(-90deg);
}
.is-open .toggle__lines::after {
  opacity: 0;
}

.menu {
  position: fixed;
  inset: var(--header-h) 0 0;
  overflow-y: auto;
  background: var(--c-paper);
  padding-block: var(--s-6) var(--s-7);
}
.menu__list li {
  border-bottom: var(--hair) solid var(--line);
}
.menu__link {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  padding: 18px 0;
  font-family: var(--f-display);
  font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.menu__link[aria-current='page']::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--r-circle);
  background: var(--accent);
  align-self: center;
  margin-left: -8px;
  transform: translateY(8px);
}
.menu__foot {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-7);
  color: var(--fg-soft);
}
.menu__foot a {
  color: var(--fg);
  font-size: 1.25rem;
}
@media (prefers-reduced-motion: no-preference) {
  .menu:not([hidden]) .menu__list li {
    animation: menuIn var(--dur-3) var(--ease) both;
  }
  .menu__list li:nth-child(2) { animation-delay: 40ms; }
  .menu__list li:nth-child(3) { animation-delay: 80ms; }
  .menu__list li:nth-child(4) { animation-delay: 120ms; }
  .menu__list li:nth-child(5) { animation-delay: 160ms; }
}
@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (max-width: 899px) {
  .header__nav,
  .header__cta {
    display: none;
  }
  .header__toggle {
    display: block;
  }
  .header__logo img {
    height: 36px;
  }
}
@media (min-width: 900px) {
  .menu {
    display: none !important;
  }
}

/* ---------- Footer ---------- */
.footer {
  border-top: var(--hair) solid var(--line);
  padding-block: var(--s-8) var(--s-6);
  font-size: var(--t-small);
}
.footer__grid {
  display: grid;
  gap: var(--s-7) var(--gutter);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.footer__brand {
  grid-column: span 5;
  display: grid;
  gap: var(--s-5);
  align-content: start;
  color: var(--fg-soft);
  max-width: 34ch;
}
.footer__brand img {
  width: 112px;
}
.footer__col {
  grid-column: span 2;
}
.footer__col:last-child {
  grid-column: span 3;
}
.footer__head {
  margin-bottom: var(--s-4);
  font-family: var(--f-text);
  font-size: var(--t-label);
  font-weight: 400;
  color: var(--fg-soft);
}
.footer__col li {
  padding: 4px 0;
}
.footer__col a {
  text-decoration: none;
}
.footer__col a:hover {
  text-decoration: underline;
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-6);
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: var(--hair) solid var(--line);
  color: var(--fg-soft);
  font-size: 0.8125rem;
}
.footer__links {
  display: flex;
  gap: var(--s-5);
  margin-left: auto;
}
@media (max-width: 899px) {
  .footer__brand {
    grid-column: 1 / -1;
  }
  .footer__col,
  .footer__col:last-child {
    grid-column: span 4;
  }
}
@media (max-width: 599px) {
  .footer__col,
  .footer__col:last-child {
    grid-column: span 6;
  }
  .footer__col:last-child {
    grid-column: 1 / -1;
  }
  .footer__links {
    margin-left: 0;
  }
}
