/* Base: reset, type defaults, site chrome (header, navigation, footer), utilities. */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--s-5);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--green-900);
  color: var(--paper-50);
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: var(--leading);
  font-optical-sizing: auto;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3 {
  margin: 0 0 var(--s-4);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: var(--display-2); }
h2 { font-size: var(--display-3); }
h3 { font-size: var(--display-4); line-height: 0.95; }
h4, h5, h6 {
  margin: 0 0 var(--s-2);
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: 650;
  line-height: 1.3;
}

p { margin: 0 0 var(--s-4); }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25em; }
strong, b { font-weight: 650; }
small { font-size: var(--text-sm); }
abbr[title] { text-decoration: none; }
hr { border: 0; border-top: var(--rule) solid var(--rule-color); margin: var(--s-6) 0; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
}
a:hover { text-decoration-thickness: 2px; text-decoration-color: currentColor; }

::selection { background: var(--lime-400); color: var(--ink-900); }

:focus-visible {
  outline: 3px solid var(--focus, var(--lime-400));
  outline-offset: 3px;
}
main:focus { outline: none; }

.icon {
  flex: none;
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.14em;
}

/* utilities */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.mono { font-family: var(--font-mono); }
.lang-fallback {
  font-family: var(--font-mono);
  font-size: 0.42em;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  vertical-align: middle;
  color: var(--fg-muted);
  white-space: nowrap;
}
p .lang-fallback, li .lang-fallback, td .lang-fallback { font-size: 0.75em; }

/* long-form reading (both layouts) */
.prose { max-width: var(--measure); }
.prose > * + h2 { margin-top: var(--s-7); }
.prose > * + h3 { margin-top: var(--s-6); }
.prose p,
.prose ul,
.prose ol { margin-bottom: var(--ruling); }
.prose li + li { margin-top: var(--s-1); }

/* skip link */
.skip-link {
  position: absolute;
  z-index: 100;
  top: var(--s-2);
  left: var(--s-2);
  padding: var(--s-3) var(--s-4);
  background: var(--lime-400);
  color: var(--ink-900);
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: var(--label-stretch);
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; outline-color: var(--paper-50); }

.layout-main { flex: 1 0 auto; }

/* ------------------------------------------------------------------ wordmark */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 112%;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper-50);
  text-decoration: none;
  white-space: nowrap;
  padding-top: 0.28em;
}
/* the logo's green O; the dot stays in the letters' colour */
.wordmark__o { color: var(--lime-400); }
.wordmark__ap { position: relative; }
/* the red bar over "AP", from the movement's logo */
.wordmark__ap::before {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.22em;
  top: -0.22em;
  height: 0.14em;
  background: var(--red-600);
}
.wordmark--xl { font-size: clamp(3.25rem, 2rem + 6vw, 6.5rem); margin: 0 0 var(--s-4); }

/* ------------------------------------------------------------------ header */
.site-header {
  position: relative;
  z-index: 20;
  background: var(--bg);
  color: var(--fg);
  border-bottom: var(--rule) solid var(--rule-color);
}
.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  min-height: 4rem;
  padding-block: var(--s-2);
}
.site-header .wordmark { margin-right: auto; }
@media (max-width: 29.99rem) {
  .site-header .wordmark { font-size: 1.35rem; }
}
@media (min-width: 62rem) {
  .site-header__bar { column-gap: var(--s-5); }
}
/* seven nav items: tighter links until the bar has room for the full padding */
@media (min-width: 62rem) and (max-width: 79.99rem) {
  .site-header__bar { column-gap: var(--s-3); }
  .site-nav .site-nav__link { padding-inline: 0.375rem; }
  .site-nav .site-nav__link[aria-current]::after { left: 0.375rem; right: 0.375rem; }
}
.site-header__tools {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.site-nav__list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__link {
  position: relative;
  display: block;
  padding: var(--s-2) var(--s-3);
  font-family: var(--font-display);
  font-weight: 750;
  font-stretch: var(--label-stretch);
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
}
.site-nav__link:hover { color: var(--accent); }
.site-nav__link[aria-current]::after {
  content: "";
  position: absolute;
  left: var(--s-3);
  right: var(--s-3);
  bottom: 0;
  height: 4px;
  background: var(--red-600);
  transform: skewX(-12deg);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin-right: calc(var(--s-2) * -1);
  border: 0;
  background: transparent;
  color: var(--fg);
}
.nav-toggle .icon { width: 1.6rem; height: 1.6rem; }
.nav-toggle__icon { display: inline-flex; }
.nav-toggle__icon--close { display: none; }
[data-open] .nav-toggle__icon--open { display: none; }
[data-open] .nav-toggle__icon--close { display: inline-flex; }

/* narrow screens: without JS the nav is a scrollable strip; with JS it collapses behind the button */
@media (max-width: 61.99rem) {
  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin-inline: calc(var(--gutter) * -1);
    overflow-x: auto;
    border-top: var(--rule) solid var(--rule-color);
  }
  .site-nav__list { padding-inline: calc(var(--gutter) - var(--s-3)); }

  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; overflow: visible; }
  .js [data-open] .site-nav { display: block; }
  .js .site-nav__list {
    flex-direction: column;
    padding: var(--s-2) var(--gutter) var(--s-5);
  }
  .js .site-nav__list > li { border-bottom: var(--rule) solid var(--rule-color); }
  .js .site-nav__link {
    padding: var(--s-3) 0 var(--s-2);
    font-weight: 900;
    font-stretch: var(--display-stretch);
    font-size: 2.4rem;
    line-height: 1;
  }
  .js .site-nav__link[aria-current]::after { left: 0; right: auto; width: 2.5rem; bottom: var(--s-2); }
  .js .site-nav__link[aria-current] { padding-left: 3.25rem; }
  .js .site-nav__link[aria-current]::after { top: 50%; bottom: auto; margin-top: -0.2rem; }
}
@media (max-width: 23rem) {
  .site-header__sign { display: none; }
}

/* ------------------------------------------------------------------ language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--fg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
}
.lang-toggle > a,
.lang-toggle__current {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.6rem;
}
.lang-toggle > a { color: var(--fg); text-decoration: none; }
.lang-toggle > a:hover { background: color-mix(in srgb, var(--fg) 14%, transparent); }
.lang-toggle__current { background: var(--fg); color: var(--bg); }

/* ------------------------------------------------------------------ footer */
.site-footer {
  background: var(--bg);
  color: var(--fg);
  border-top: 6px solid var(--red-600);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.site-footer__inner {
  display: grid;
  gap: var(--s-6) var(--s-7);
  padding-block: var(--s-7) var(--s-6);
}
@media (min-width: 48rem) {
  .site-footer__inner { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.3fr) minmax(0, 1fr); }
}
/* the full logo: teal box, the letters, the movement's name underneath */
.logo-lockup {
  display: inline-grid;
  justify-items: center;
  gap: var(--s-3);
  margin: 0 0 var(--s-4);
  padding: var(--s-5) var(--s-6) var(--s-4);
  background: var(--green-800);
  border-radius: 0.9rem;
  text-align: center;
}
.logo-lockup .wordmark { margin: 0; padding-top: 0.2em; font-size: clamp(3rem, 2.2rem + 3.6vw, 5rem); color: var(--white); }
.logo-lockup__name {
  margin: 0;
  max-width: 17rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1.3;
  color: var(--paper-50);
}
.site-footer__note { color: var(--fg-muted); max-width: 24rem; margin: 0; }
.site-footer__heading {
  margin: 0 0 var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: var(--rule) solid var(--rule-color);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  font-stretch: normal;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: none;
  color: var(--accent);
}
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list li + li { margin-top: var(--s-1); }
.site-footer__link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 2.25rem;
  font-size: var(--text-base);
  text-decoration: none;
}
.site-footer__link:hover { color: var(--accent); }
.site-footer__link .icon { width: 1.15rem; height: 1.15rem; }
.site-footer__email { overflow-wrap: anywhere; font-size: var(--text-sm); }
.site-footer__base {
  display: flex;
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
  padding-top: var(--s-4);
  border-top: var(--rule) solid var(--rule-color);
}
.site-footer__privacy { margin: 0; color: var(--fg-muted); font-size: var(--text-xs); font-family: var(--font-mono); }

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
