/* Design tokens come from the shared /tokens.css (linked in base.njk + the
   scanner Pages Function). Single source: packages/design-tokens — adr/0016. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: hsl(var(--paper)); color: hsl(var(--ink)); }
body { font-family: var(--font-sans); font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color 0.12s ease; }
a:not(.btn):not(.brand):hover { color: hsl(var(--pop)); }
button:focus, a:focus { outline: 2px solid hsl(var(--pop)); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-sans); font-weight: 800; letter-spacing: -0.02em; }
code, pre, .mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: hsl(var(--ink));
  color: hsl(var(--paper));
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 100;
}
.skip-link:focus { left: 0; }

@keyframes blinkLook {
  0%, 18%   { transform: translateX(0) scaleY(1); }
  19%, 21%  { transform: translateX(0) scaleY(0.05); }
  24%, 40%  { transform: translateX(-2px) scaleY(1); }
  52%, 70%  { transform: translateX(2px) scaleY(1); }
  78%, 80%  { transform: translateX(0) scaleY(0.05); }
  83%, 100% { transform: translateX(0) scaleY(1); }
}
.brand svg .eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: blinkLook 7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .brand svg .eyes { animation: none; }
}

/* ---------- nav ---------- */
/* Site chrome shared with index.css — keep these rules in sync across both files. */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1.5px solid hsl(var(--ink));
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: hsl(var(--paper));
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand .dot { color: hsl(var(--pop)); }
.brand svg { display: block; }
.nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 14px;
}
.nav-links a {
  color: hsl(var(--ink));
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}
.nav-links a:hover { border-bottom-color: hsl(var(--pop)); }
.nav-ctas { display: flex; gap: 12px; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: hsl(var(--ink));
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
body.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; }
body.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }
.nav-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 48; /* below the header (z-index: 50) so the X stays clickable */
  flex-direction: column;
  gap: 16px;
  padding: 80px 24px 24px; /* top padding clears the sticky header; panel sizes to its content */
  background: hsl(var(--paper));
  border-bottom: 1.5px solid hsl(var(--ink));
  font-family: var(--font-mono);
  font-size: 18px;
}
.nav-menu a:not(.btn) {
  color: hsl(var(--ink));
  text-decoration: none;
}
.nav-menu .btn { align-self: flex-start; }
body.nav-open .nav-menu { display: flex; }
body.nav-open { overflow: hidden; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  background: transparent;
  color: hsl(var(--ink));
  border: 1.5px solid hsl(var(--ink));
  box-shadow: 4px 4px 0 hsl(var(--ink));
  cursor: pointer;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  text-decoration: none;
  transition: transform 150ms ease;
}
.btn--primary {
  background: hsl(var(--ink));
  color: hsl(var(--paper));
  box-shadow: 4px 4px 0 hsl(var(--pop));
}
@media (hover: hover) {
  .btn:hover { transform: translate(-2px, -2px); }
}
.btn:active { transform: translate(2px, 2px); }

/* Pre-launch gate: registration closed until launch (mirrors index.njk .is-soon) */
.is-soon {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

/* ---------- tag ---------- */
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--ink));
  display: inline-block;
  white-space: nowrap;
}
.tag--bordered { border: 1px solid hsl(var(--ink)); padding: 4px 8px; }

/* ---------- legal layout ---------- */
.legal {
  padding: 80px 48px;
  max-width: 880px;
  margin: 0 auto;
}
.legal-head { margin-bottom: 48px; }
.legal-head h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  margin: 16px 0 12px;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.legal-head .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #555;
  letter-spacing: 0.04em;
}
.legal-body { font-size: 17px; line-height: 1.65; }
.legal-body h2 {
  font-size: 28px;
  line-height: 1.15;
  margin: 48px 0 16px;
  border-top: 1.5px solid hsl(var(--ink));
  padding-top: 32px;
}
.legal-body h2:first-of-type { margin-top: 16px; }
.legal-body h3 {
  font-size: 19px;
  line-height: 1.2;
  margin: 32px 0 12px;
  font-weight: 700;
}
.legal-body p { margin: 0 0 16px; max-width: 70ch; }
.legal-body ul, .legal-body ol { margin: 0 0 16px 24px; }
.legal-body li { margin-bottom: 8px; max-width: 68ch; }
.legal-body strong { font-weight: 700; }
.legal-body code {
  font-size: 14px;
  background: hsl(var(--paper-2));
  padding: 1px 6px;
  border: 1px solid #ddd;
}
.legal-body hr {
  border: 0;
  border-top: 1.5px solid hsl(var(--ink));
  margin: 48px 0;
}
.legal-body a { font-weight: 600; }

/* ---------- footer ---------- */
.site-footer {
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: hsl(var(--paper));
  font-family: var(--font-mono);
  font-size: 12px;
  color: #555;
  border-top: 1.5px solid hsl(var(--ink));
}
.site-footer a { color: #555; text-decoration: none; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-links { display: flex; gap: 24px; }
.footer-account { display: flex; gap: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 719px) {
  .nav { padding: 14px 20px; }
  .legal { padding: 56px 20px; }
  .legal-head h1 { font-size: clamp(32px, 9vw, 48px); }
  .legal-body { font-size: 16px; }
  .legal-body h2 { font-size: 24px; padding-top: 24px; margin-top: 40px; }
  .nav-links { display: none; }
  .nav-ctas { display: none; }
  .nav-hamburger { display: flex; }
  .brand { font-size: 16px; }
  .btn { box-shadow: 3px 3px 0 hsl(var(--ink)); }
  .btn--primary { box-shadow: 3px 3px 0 hsl(var(--pop)); }
  .site-footer {
    padding: 24px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .footer-brand { order: 1; }
  .footer-account { order: 2; flex-wrap: wrap; }
  .footer-links { order: 3; flex-wrap: wrap; }
}
@media (max-width: 479px) {
  .nav { padding: 12px 16px; }
  .legal { padding: 40px 16px; }
  .site-footer { padding: 20px 16px; }
}
