.shared-noise {
  position: fixed;
  z-index: 9998;
  inset: 0;
  pointer-events: none;
  opacity: var(--noise-opacity);
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.91' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  transition: background var(--motion-normal) ease, border-color var(--motion-normal) ease, backdrop-filter var(--motion-normal) ease;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-color: var(--line-soft);
  backdrop-filter: blur(22px) saturate(1.15);
}
.site-header__inner {
  width: var(--page-width);
  height: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.brand-wordmark {
  justify-self: start;
  font-size: clamp(18px, 1.55vw, 25px);
  font-weight: 760;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.primary-nav { display: flex; align-items: center; gap: 30px; }
.primary-nav a {
  position: relative;
  padding: 12px 0;
  color: var(--muted-strong);
  font-size: 13px;
  transition: color var(--motion-fast) ease;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 7px;
  height: 1px;
  background: var(--accent);
  transition: right var(--motion-normal) var(--ease-out);
}
.primary-nav a:hover,
.primary-nav a:focus-visible { color: var(--text); }
.primary-nav a:hover::after,
.primary-nav a:focus-visible::after { right: 0; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-button {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted-strong);
  transition: color var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.icon-button:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: rgba(var(--accent-rgb), .06); transform: translateY(-1px); }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-link {
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 15px 8px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface-glass) 75%, transparent);
  transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.app-link:hover { background: rgba(var(--accent-rgb), .075); border-color: rgba(var(--accent-rgb), .45); transform: translateY(-1px); }
.app-link__copy { display: grid; gap: 1px; line-height: 1.12; }
.app-link__copy strong { font-size: 12px; font-weight: 610; }
.app-link__copy small { color: var(--muted); font-size: 9px; font-weight: 530; letter-spacing: .06em; text-transform: uppercase; }
.app-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle { display: none; width: 45px; height: 45px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
.nav-toggle span:not(.sr-only) { display: block; width: 18px; height: 1px; margin: 5px auto; background: currentColor; transition: transform var(--motion-fast) ease; }

.button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 13px;
  font-weight: 560;
  transition: transform var(--motion-normal) var(--ease-out), color var(--motion-fast) ease, background var(--motion-fast) ease, border-color var(--motion-fast) ease;
}
.button:hover { transform: translateY(-2px); }
.button--primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.button--secondary { background: rgba(var(--accent-rgb), .035); }
.button--secondary:hover { border-color: rgba(var(--accent-rgb), .55); background: rgba(var(--accent-rgb), .085); }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 580;
  transition: color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }
.text-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.cursor {
  position: fixed;
  z-index: 9999;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--motion-fast) ease;
}
.cursor.is-visible { opacity: 1; }
.cursor__ring,
.cursor__dot { position: fixed; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor__ring {
  left: var(--cursor-x);
  top: var(--cursor-y);
  width: 38px;
  height: 38px;
  border: 1px solid rgba(var(--accent-rgb), .82);
  background: rgba(var(--accent-rgb), .035);
  box-shadow: 0 0 26px rgba(var(--accent-rgb), .08);
  transition: width var(--motion-normal) var(--ease-out), height var(--motion-normal) var(--ease-out), background var(--motion-fast) ease;
}
.cursor__dot {
  left: var(--dot-x);
  top: var(--dot-y);
  width: 4px;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), .72);
}
.cursor__label {
  position: fixed;
  left: var(--cursor-x);
  top: var(--cursor-y);
  transform: translate(-50%, -50%);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
  opacity: 0;
}
.cursor.is-active .cursor__ring { width: 62px; height: 62px; background: rgba(var(--accent-rgb), .14); }
.cursor.has-label .cursor__ring { width: 84px; height: 84px; background: var(--accent); }
.cursor.has-label .cursor__dot { opacity: 0; }
.cursor.has-label .cursor__label { opacity: 1; }
.has-custom-cursor,
.has-custom-cursor a,
.has-custom-cursor button { cursor: none !important; }

.design-lab {
  position: fixed;
  z-index: 140;
  right: 18px;
  bottom: 18px;
  display: none;
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.design-lab.is-visible { display: flex; }
.design-lab button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.design-lab button.is-active { background: var(--accent); color: var(--accent-ink); }

@media (max-width: 920px) {
  .site-header__inner { grid-template-columns: 1fr auto; }
  .primary-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    display: grid;
    gap: 0;
    padding: 20px var(--page-gutter) 30px;
    border-bottom: 1px solid var(--line-soft);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(22px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity var(--motion-fast) ease, visibility var(--motion-fast) ease, transform var(--motion-normal) var(--ease-out);
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .primary-nav a { padding: 18px 0; border-bottom: 1px solid var(--line-soft); font-size: 16px; }
  .primary-nav a::after { display: none; }
  .header-actions { gap: 7px; }
  .nav-toggle { display: block; }
  .app-link { display: none; }
}

@media (max-width: 520px) {
  .brand-wordmark { font-size: 19px; }
  .icon-button, .nav-toggle { width: 41px; height: 41px; }
}

.primary-nav__app { display: none; }
.primary-nav__app small { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 920px) {
  .primary-nav__app { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--text) !important; }
}
