/* ==========================================================================
   COMPONENTS — brand, floating nav, menu, buttons, cursor
   ========================================================================== */

/* ── Brand ─────────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand__mark {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--electric);
}

/* ── Nav: a small glass pill that floats ───────────────────── */
.nav {
  position: fixed;
  top: var(--nav-top);
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.nav__pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 62px;
  padding: 0 9px 0 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .34);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 14px 34px -24px rgba(34, 16, 79, .35);
  pointer-events: auto;
  transition:
    height .6s var(--ease),
    border-radius .6s var(--ease),
    background-color .6s var(--ease),
    -webkit-backdrop-filter .6s var(--ease),
    backdrop-filter .6s var(--ease),
    box-shadow .6s var(--ease);
}
.nav.is-scrolled .nav__pill {
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(26px) saturate(1.6);
  backdrop-filter: blur(26px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 18px 40px -22px rgba(34, 16, 79, .45);
}
.nav .brand { margin-right: 18px; }

.nav__links { display: flex; gap: 2px; }
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-2);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.nav__links a:hover { background: rgba(106, 59, 255, .08); color: var(--ink); }
.nav__links a[aria-current="true"] { background: rgba(106, 59, 255, .12); color: var(--electric); }

.nav__cta { margin-left: 12px; }

.nav__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: var(--fs-small);
  font-weight: 500;
}
.nav__toggle i {                 /* two lines that become a cross */
  position: relative;
  width: 14px;
  height: 8px;
}
.nav__toggle i::before,
.nav__toggle i::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform .4s var(--ease), top .4s var(--ease);
}
.nav__toggle i::before { top: 0; }
.nav__toggle i::after  { top: calc(100% - 1.5px); }
.nav__toggle[aria-expanded="true"] i::before { top: 3.25px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] i::after  { top: 3.25px; transform: rotate(-45deg); }

@media (max-width: 899px) {
  .nav__pill { width: 100%; padding-left: 18px; }
  .nav__links,
  .nav__pill .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; margin-left: auto; }
}

/* ── Menu (phones & tablets) ───────────────────────────────── */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 112px var(--gutter) 40px;
  background: rgba(248, 246, 255, .78);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  backdrop-filter: blur(28px) saturate(1.5);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }
.menu__shape {
  position: absolute;
  top: 96px;
  right: -60px;
  width: 260px;
  z-index: -1;
}
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a {
  padding: 10px 0;
  font-size: clamp(2.25rem, 9vw, 3.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--ink);
  transform: translateY(16px);
  opacity: 0;
  transition: transform .6s var(--ease), opacity .6s var(--ease), color .3s;
  transition-delay: calc(var(--i, 0) * 50ms + 80ms);
}
.menu.is-open .menu__nav a { transform: none; opacity: 1; }
.menu__nav a:hover { color: var(--electric); }
.menu__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 40px;
  font-size: var(--fs-small);
  color: var(--text-3);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 8px 0 24px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 500;
  white-space: nowrap;
  translate: var(--mx, 0) var(--my, 0);           /* magnetic (js/magnetic.js) */
  transition:
    background-color .35s var(--ease),
    color .35s var(--ease),
    box-shadow .35s var(--ease),
    translate .5s var(--ease);
}
.btn--sm { height: 44px; padding-left: 18px; font-size: var(--fs-small); gap: 10px; }
.btn--plain { padding-right: 24px; }

.btn__arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  transition: transform .5s var(--spring), background-color .35s;
}
.btn--sm .btn__arrow { width: 30px; height: 30px; }
.btn__arrow svg { width: 15px; height: 15px; }
.btn:hover .btn__arrow { transform: rotate(-45deg); }

.btn--solid {
  background: var(--electric);
  color: var(--white);
  box-shadow: 0 14px 30px -14px rgba(106, 59, 255, .7);
}
.btn--solid:hover { background: var(--royal); }

.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: var(--deep); }

.btn--ghost {
  background: rgba(255, 255, 255, .45);
  border: 1px solid rgba(19, 7, 46, .12);
  color: var(--ink);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--ghost .btn__arrow { background: rgba(106, 59, 255, .1); }
.btn--ghost:hover { background: rgba(255, 255, 255, .8); }

.btn--light { background: var(--white); color: var(--ink); }
.btn--light .btn__arrow { background: var(--electric); color: var(--white); }

.link {
  color: var(--ink);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease), color .3s;
}
.link:hover { background-size: 100% 1px; }

/* ── Cursor (fine pointers only; js/cursor.js) ─────────────── */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.has-cursor .cursor.is-visible { opacity: 1; }
.cursor__dot {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--electric);
  transition: transform .45s var(--ease), background-color .3s, border-color .3s;
  border: 1.5px solid transparent;
}
.cursor.is-hover .cursor__dot {
  transform: scale(3.4);
  background: rgba(106, 59, 255, .1);
  border-color: rgba(106, 59, 255, .5);
}
.cursor__label {
  position: absolute;
  left: 16px;
  top: -18px;
  height: 36px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px) scale(.8);
  transform-origin: left center;
  transition: opacity .3s var(--ease), transform .45s var(--ease);
}
.cursor.is-label .cursor__label { opacity: 1; transform: none; }
.cursor.is-label .cursor__dot { transform: scale(1.3); }
.cursor.is-text { opacity: 0 !important; }

.has-cursor,
.has-cursor * { cursor: none !important; }
.has-cursor :is(input, textarea) { cursor: text !important; }
