:root {
  --stagger-dur: 400ms;
  --stagger-distance: 12px;
  --stagger-stagger: 50ms;
  --stagger-blur: 5px;
  --stagger-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --menu-collapse-dur: 450ms;
  --menu-label-dur: 550ms;
  --menu-open-gap: 0.72rem;
  --menu-hover-enter-radius: 24px;
  --menu-hover-exit-radius: 36px;
  --menu-hover-exit-delay: 90ms;
  --surface: #1a1917;
  --text-strong: #ffffff;
  --text-subtle: #9e9a95;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text-strong);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

.demo-shell {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(40px, 8vh, 96px) clamp(24px, 4.75vw, 96px);
}

.fey-layout {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 440px) minmax(300px, 1fr);
  align-items: start;
}

.interaction-card {
  grid-column: 1;
  justify-self: start;
  position: relative;
  width: 300px;
  height: 300px;
  overflow: visible;
  background: transparent;
  transform: translate(100px, -124px);
}

.fey-copy {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  color: #aaa6a0;
  font-size: clamp(16px, 1.05vw, 18px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}

.copy-block {
  margin: 0 0 28px;
  max-width: 100%;
}

.copy-block--lead strong {
  color: var(--text-strong);
  font-weight: 600;
}

.copy-block--closing {
  margin-bottom: 0;
  color: #c6c2bc;
}

.fey-copy a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease;
}

.fey-copy a:hover,
.fey-copy a:focus-visible {
  text-decoration-color: currentColor;
}

.founder-signatures {
  display: block;
  width: 190px;
  height: auto;
  margin-top: 36px;
  opacity: 0.46;
}

.menu-hover-zone {
  position: absolute;
  z-index: 2;
  top: 132px;
  left: 140px;
}

.menu-trigger {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 16px;
  height: 41px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-trigger:focus-visible {
  outline: 1px solid var(--text-subtle);
  outline-offset: 4px;
}

.interaction-card.is-open .menu-trigger {
  pointer-events: none;
}

.menu-panel {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  transition: gap var(--menu-collapse-dur) var(--stagger-ease);
}

.t-stagger.is-shown {
  gap: var(--menu-open-gap);
  pointer-events: auto;
}

.menu-link {
  position: relative;
  display: block;
  width: max-content;
  height: auto;
  color: var(--text-subtle);
  font-weight: 400;
  letter-spacing: -0.002em;
  text-decoration: none;
  font-feature-settings: "ss11" 1, "calt" 0, "liga" 0;
  cursor: pointer;
  transition: color 180ms ease;
}

.menu-label {
  display: block;
  max-width: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-4px);
  filter: blur(var(--stagger-blur));
  transition:
    max-height 300ms var(--stagger-ease),
    max-width var(--menu-label-dur) var(--stagger-ease),
    opacity var(--stagger-dur) ease,
    filter var(--menu-label-dur) var(--stagger-ease),
    transform var(--menu-label-dur) var(--stagger-ease);
  will-change: max-width, max-height, transform, opacity, filter;
}

.menu-line {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 16px;
  height: 1px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.75;
  transition: opacity 250ms ease;
  will-change: opacity;
}

.t-stagger.is-shown .menu-label {
  max-width: 8rem;
  max-height: 1.4em;
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

.t-stagger.is-shown .menu-line {
  opacity: 0;
}

.menu-link:hover,
.menu-link:focus-visible {
  color: var(--text-strong);
}

.menu-link:focus-visible {
  outline: 1px solid var(--text-subtle);
  outline-offset: 3px;
}

/* Fey's live top-to-bottom unfold; close has no stagger. */
.t-stagger.is-shown .t-stagger-line--2 .menu-label { transition-delay: var(--stagger-stagger); }
.t-stagger.is-shown .t-stagger-line--3 .menu-label { transition-delay: calc(var(--stagger-stagger) * 2); }
.t-stagger.is-shown .t-stagger-line--4 .menu-label { transition-delay: calc(var(--stagger-stagger) * 3); }
.t-stagger.is-shown .t-stagger-line--5 .menu-label { transition-delay: calc(var(--stagger-stagger) * 4); }
.t-stagger.is-shown .t-stagger-line--6 .menu-label { transition-delay: calc(var(--stagger-stagger) * 5); }

.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;
}

@media (prefers-reduced-motion: reduce) {
  .menu-panel,
  .menu-label,
  .menu-line { transition: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-label,
  .fey-copy a {
    transition: none !important;
  }
}

@media (max-width: 1040px) {
  .fey-layout {
    grid-template-columns: 300px minmax(340px, 440px);
    gap: clamp(48px, 8vw, 96px);
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .demo-shell {
    align-items: flex-start;
    padding-block: 32px 64px;
  }

  .fey-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .interaction-card,
  .fey-copy {
    grid-column: 1;
  }

  .interaction-card {
    justify-self: center;
    transform: none;
  }

  .fey-copy {
    width: min(440px, calc(100vw - 48px));
    max-width: 100%;
    justify-self: center;
  }
}
