/* Abbs site — base chrome shared by every page (reset, nav, footer, primitives).
   Tokens live in tokens.css (consume, don't redefine). Strictly monochrome:
   var(--online) is the only color on the site. */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
canvas,
video {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

[id] {
  scroll-margin-top: 96px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- Layout util ---------- */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  transform: translateY(-250%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
}

/* ---------- Sticky nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding-block: 10px;
  padding-inline: max(clamp(20px, 5vw, 48px), calc((100% - var(--content-max)) / 2));
  background: rgba(245, 245, 247, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.7);
  backdrop-filter: blur(18px) saturate(1.7);
  border-bottom: 1px solid var(--hairline);
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
}

/* ---------- Wordmark ---------- */
.wordmark {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

.presence-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--online);
  vertical-align: 0.5em;
}

/* ---------- Pills (buttons) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.pill:hover {
  border-color: var(--ink);
}

.pill:active {
  transform: scale(0.97);
}

.pill-solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.pill-solid:hover {
  background: #26262c;
  border-color: #26262c;
}

/* ---------- Quiet nav link ---------- */
.nav-link {
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.18s ease;
}

.nav-link:hover {
  color: var(--ink);
}

/* ---------- Filter capsule (the app's SelectableCapsule silhouette) ---------- */
.capsule {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.capsule-selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.capsule-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--online);
  flex: none;
}

a.capsule {
  transition:
    border-color 0.18s ease,
    color 0.18s ease;
}

a.capsule:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: clamp(48px, 8vh, 72px) 0 32px;
}

.footer-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: clamp(32px, 6vw, 64px);
  align-items: start;
}

.footer-brand .wordmark {
  font-size: 1.2rem;
}

.footer-tagline {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 0.95rem;
}

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

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2); /* ink-3 fails AA on --bg; ink-3 is decorative-only */
}

.footer-col a {
  color: var(--ink-2);
  font-size: 0.92rem;
  transition: color 0.18s ease;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-legal {
  margin-top: clamp(40px, 7vh, 64px);
  padding-inline: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-2); /* ink-3 fails AA on --bg; ink-3 is decorative-only */
}

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

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 32px;
  }
}

@media (max-width: 480px) {
  .site-nav {
    min-height: 54px;
  }

  .wordmark {
    font-size: 1.2rem;
  }
}

/* ---------- Reduced motion: global kill switch ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
