/* =====================================================================
 * standing. — shared site styles
 * Design tokens extracted from brand/assets/tokens.css
 * Source of truth: brand/brand-kit.html § 03
 * ===================================================================== */
:root {
  --color-onyx:     #0F0F10;
  --color-chalk:    #FAFAFA;
  --color-bone:     #ECE6D8;
  --color-slate:    #3A3F4A;
  --color-muted:    #6E727B;
  --color-hairline: #1F2128;

  --font-display: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;

  --motion-duration-fast:    120ms;
  --motion-duration-default: 180ms;
  --motion-duration-slow:    240ms;
  --motion-easing-default:   cubic-bezier(0.32, 0.72, 0, 1);
  --motion-easing-emphasis:  cubic-bezier(0.16, 1, 0.3, 1);

  --container-footer: 1080px;
  --shift-left: 15%;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2 { font-size: inherit; font-weight: inherit; margin: 0; }
p { margin: 0; }

/* Page surface */
body {
  background: var(--color-onyx);
  color: var(--color-chalk);
  font-family: var(--font-display);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-image: linear-gradient(180deg, #141416 0%, #0F0F10 55%, #0A0A0B 100%);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* Hairline grid with focused mask */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right,  var(--color-hairline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-hairline) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 35% 42%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.18) 45%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 35% 42%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.18) 45%, transparent 80%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* Film-grain noise, 90s drift */
body::after {
  content: '';
  position: fixed;
  inset: -10%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  opacity: 0.02;
  pointer-events: none;
  z-index: 1;
  animation: grain-drift 90s linear infinite;
  will-change: transform;
}

@keyframes grain-drift {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-3%, -2%, 0); }
  40%  { transform: translate3d(2%, -4%, 0); }
  60%  { transform: translate3d(-1%, 3%, 0); }
  80%  { transform: translate3d(3%, 1%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Layout */
.page {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px clamp(20px, 4vw, 48px);
  width: 100%;
}

.top-wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.035em;
  color: var(--color-chalk);
  line-height: 1;
  transition: color var(--motion-duration-default) var(--motion-easing-default);
}

.top-wordmark:focus-visible {
  outline: 2px solid var(--color-chalk);
  outline-offset: 4px;
}

.member-access {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-chalk);
  border: 1px solid transparent;
  min-height: 44px;
  transition:
    border-color var(--motion-duration-default) var(--motion-easing-default),
    color        var(--motion-duration-default) var(--motion-easing-default);
}

.member-access:hover { border-color: var(--color-hairline); }
.member-access:focus-visible {
  outline: 2px solid var(--color-chalk);
  outline-offset: 2px;
  border-color: var(--color-hairline);
}

/* Hero (home) */
.hero {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  width: 100%;
}

.hero-inner {
  width: 100%;
  padding-left: var(--shift-left);
  padding-right: clamp(20px, 4vw, 48px);
}

@media (max-width: 768px) {
  .hero-inner { padding-left: clamp(20px, 8vw, 48px); }
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--color-chalk);
  font-size: clamp(72px, 13vw, 168px);
  line-height: 0.92;
}

.hint {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

/* Section pages — slightly smaller heading than the home wordmark */
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--color-chalk);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--color-muted);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.section-line {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  max-width: 56ch;
  line-height: 1.6;
}

/* Footer */
.footer {
  width: 100%;
  padding: 32px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--color-hairline);
}

.footer-inner {
  max-width: var(--container-footer);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  transition: color var(--motion-duration-default) var(--motion-easing-default);
}

.footer-link:hover,
.footer-link[aria-current="page"] { color: var(--color-chalk); }
.footer-link:focus-visible {
  outline: 2px solid var(--color-chalk);
  outline-offset: 2px;
  color: var(--color-chalk);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .footer-nav { gap: 24px; }
}

/* Reveal stagger — within the locked motion envelope */
.reveal {
  opacity: 0;
  transform: translateY(6px);
  animation: reveal 240ms var(--motion-easing-emphasis) forwards;
}
.reveal-1 { animation-delay: 80ms; }
.reveal-2 { animation-delay: 220ms; }
.reveal-3 { animation-delay: 360ms; }
.reveal-4 { animation-delay: 500ms; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* Accessibility helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
