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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); }
p { margin: 0; }
h1, h2, h3, h4, h5 { margin: 0; }
em { font-style: normal; }

/* ── Type ─────────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 0.92;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(10px, 0.78vw, 13px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}

.muted { color: var(--sub); }

/* ── Grain ─────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Nav ─────────────────────────────────────────────────── */
.sitenav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 52px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: transform .45s cubic-bezier(.16,1,.3,1), background .4s, border-color .4s, backdrop-filter .4s;
}

.sitenav.solid {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(23,19,16,0.10);
}

.sitenav.hide { transform: translateY(-105%); }

.sitenav .brand img { height: 30px; width: auto; display: block; }

.sitenav .links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 38px);
}

.sitenav .links a {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.82;
  transition: opacity .25s;
}

.sitenav .links a:hover { opacity: 1; }

.sitenav .links a.join {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  opacity: 1;
  transition: filter .3s;
}

.sitenav .links a.join:hover { filter: brightness(1.07); }

@media (max-width: 720px) {
  .sitenav .links a:not(.join) { display: none; }
}

/* ── Pills ───────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: var(--accent);
  transition: filter .35s, transform .35s, box-shadow .35s;
}

.pill:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}

.pill.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.pill.ghost:hover {
  border-color: var(--ink);
  box-shadow: none;
  filter: none;
  transform: none;
}

.arr { transition: transform .35s cubic-bezier(.16,1,.3,1); }
.pill:hover .arr { transform: translateX(4px); }

/* ── Entrance animations (armed via .go, set by double rAF) ── */
.mask { overflow: hidden; display: block; }
.mask > span { display: block; transform: translateY(0); white-space: nowrap; }
.go .mask > span { animation: riseIn 1.05s cubic-bezier(.16,1,.3,1) both; }
@keyframes riseIn { from { transform: translateY(110%); } to { transform: translateY(0); } }

.stagger > * { opacity: 1; transform: none; }
.go .stagger > * { animation: fadeUp .9s cubic-bezier(.16,1,.3,1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ── Scroll reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s cubic-bezier(.16,1,.3,1), transform 1.1s cubic-bezier(.16,1,.3,1);
}

.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 80ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .go .mask > span,
  .go .stagger > *,
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ── Kinetic rotator ──────────────────────────────────────── */
.rot { display: inline-grid; vertical-align: bottom; }
.rot > span {
  grid-area: 1/1;
  color: var(--accent);
  opacity: 0;
  transform: translateY(40%) rotate(2deg);
  transition: opacity .6s, transform .7s cubic-bezier(.16,1,.3,1);
}
.rot > span.on { opacity: 1; transform: none; }
.rot > span.out { opacity: 0; transform: translateY(-40%) rotate(-2deg); }
.rot-ghost {
  visibility: hidden;
  opacity: 1 !important;
  transform: none !important;
  grid-area: 1/1;
  white-space: pre;
  pointer-events: none;
}

/* ── Scroll cue ──────────────────────────────────────────── */
.scroll-cue { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ── Progress bar ────────────────────────────────────────── */
.progress-track {
  position: relative;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width .5s cubic-bezier(.16,1,.3,1);
}

/* ── Scroll margin for anchor targets ─────────────────────── */
section[id], footer[id] { scroll-margin-top: 60px; }

/* ── Footer ──────────────────────────────────────────────────── */
.foot {
  background: var(--cream);
  color: var(--ink);
  padding: clamp(64px, 9vw, 120px) clamp(20px, 4vw, 52px) 40px;
}

.foot-inner { max-width: 1180px; margin: 0 auto; }

.foot-hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: clamp(48px, 7vw, 84px);
  border-bottom: 1px solid rgba(23,19,16,0.14);
}

.foot-headline {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  font-size: clamp(40px, 6.2vw, 104px);
  margin-top: 18px;
  max-width: 14ch;
}

.foot-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.foot-pill-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-size: 15px;
  padding: 14px 24px;
}

.foot-pill-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }

.foot-pill-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(23,19,16,0.18);
  font-size: 15px;
  padding: 14px 24px;
}

.foot-pill-ghost:hover { border-color: var(--ink); box-shadow: none; filter: none; transform: none; }

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: clamp(40px, 5vw, 64px) 0;
}

.foot-logo { height: 34px; width: auto; display: block; }

.foot-tagline {
  color: rgba(23,19,16,0.6);
  font-size: 15px;
  line-height: 1.6;
  max-width: 34ch;
  margin: 18px 0 22px;
}

.foot-social { display: flex; gap: 10px; }

.social {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(23,19,16,0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background .25s, color .25s, border-color .25s;
}

.social:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.foot-col h4 {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(23,19,16,0.5);
  margin: 0 0 14px;
  font-weight: 700;
}

.foot-col a {
  display: block;
  font-size: 15px;
  font-weight: 500;
  padding: 5px 0;
  opacity: 0.85;
}

.foot-col a:hover { color: var(--accent); opacity: 1; }
.foot-col span { display: block; font-size: 15px; padding: 5px 0; opacity: 0.5; }

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(23,19,16,0.14);
  color: rgba(23,19,16,0.5);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 960px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .foot-hero-row { flex-direction: column; align-items: flex-start; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .foot-social a { width: 38px; height: 38px; }
}
