/* Cybereum application portal ------------------------------------------------
   Login is not another marketing CTA. It is the threshold into the operating
   system: compact, engineered and unmistakably product-facing while remaining
   subordinate to "Start with one schedule".
   -------------------------------------------------------------------------- */
.cyb-header__login{
  --portal-accent:color-mix(in srgb,var(--cyb-accent) 82%,#dffaff);
  --portal-line:color-mix(in srgb,var(--cyb-accent) 38%,var(--cyb-line-strong));
  position:relative;
  isolation:isolate;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.58rem;
  min-height:44px;
  padding:.48rem .82rem .48rem .68rem;
  overflow:hidden;
  border:1px solid var(--portal-line);
  border-radius:var(--cyb-radius-sm);
  background:linear-gradient(180deg,color-mix(in srgb,var(--cyb-accent) 5%,var(--cyb-surface-solid)),color-mix(in srgb,var(--cyb-bg) 96%,transparent));
  color:var(--cyb-fg-2);
  font:600 .78rem/1 var(--cyb-body);
  letter-spacing:.035em;
  text-decoration:none;
  white-space:nowrap;
  box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 5%,transparent),inset 0 0 22px color-mix(in srgb,var(--cyb-accent) 3%,transparent),0 10px 28px -24px color-mix(in srgb,var(--cyb-accent) 60%,transparent);
  transition:color .18s ease,border-color .18s ease,background .18s ease,box-shadow .22s ease,transform .18s ease;
}

/* Small diamond aperture: a product-access glyph, not a generic user icon. */
.cyb-header__login::before{
  content:"";
  width:13px;
  height:13px;
  flex:0 0 auto;
  border:1px solid color-mix(in srgb,var(--portal-accent) 76%,transparent);
  border-radius:2px;
  background:radial-gradient(circle at 50% 50%,var(--portal-accent) 0 18%,transparent 20%),linear-gradient(135deg,transparent 38%,color-mix(in srgb,var(--portal-accent) 16%,transparent) 39% 61%,transparent 62%);
  box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--cyb-accent) 5%,transparent),0 0 11px color-mix(in srgb,var(--cyb-accent) 24%,transparent);
  transform:rotate(45deg);
  transition:transform .32s cubic-bezier(.34,1.56,.64,1),border-color .2s ease,box-shadow .2s ease;
}

/* Restrained scan: enough motion to read as an application threshold, not a toy. */
.cyb-header__login::after{
  content:"";
  position:absolute;
  z-index:-1;
  inset:-1px;
  pointer-events:none;
  border-radius:inherit;
  background:linear-gradient(105deg,transparent 0 35%,color-mix(in srgb,var(--cyb-accent) 11%,transparent) 46%,color-mix(in srgb,#fff 8%,transparent) 50%,transparent 58% 100%);
  transform:translateX(-115%);
  opacity:0;
}

.cyb-header__login:hover,.cyb-header__login:focus-visible{
  color:var(--cyb-fg);
  border-color:color-mix(in srgb,var(--cyb-accent) 66%,transparent);
  background:linear-gradient(180deg,color-mix(in srgb,var(--cyb-accent) 9%,var(--cyb-surface-solid)),color-mix(in srgb,var(--cyb-bg) 94%,transparent));
  box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 7%,transparent),inset 0 0 26px color-mix(in srgb,var(--cyb-accent) 5%,transparent),0 0 22px -12px color-mix(in srgb,var(--cyb-accent) 58%,transparent);
  transform:translateY(-1px);
}
.cyb-header__login:hover::before,.cyb-header__login:focus-visible::before{
  transform:rotate(135deg) scale(1.06);
  border-color:var(--portal-accent);
  box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--cyb-accent) 7%,transparent),0 0 15px color-mix(in srgb,var(--cyb-accent) 42%,transparent);
}
.cyb-header__login:hover::after,.cyb-header__login:focus-visible::after{animation:cyb-portal-scan .72s cubic-bezier(.2,.7,.2,1) both}
.cyb-header__login:active{transform:translateY(0) scale(.985)}

@keyframes cyb-portal-scan{0%{transform:translateX(-115%);opacity:0}18%{opacity:1}100%{transform:translateX(115%);opacity:0}}

/* Light theme keeps the same hierarchy but loses the heavy dark glow.
   Scoped past the dark-hero header: this gradient hardcodes #fff, so when the
   header borrows the dark token set over a dark hero (site-core.css) the pill
   would otherwise stay white while its label turned pale. */
:root[data-theme="light"] body:not(:has(.concept-hero,.dm-hero)) .cyb-header__login,
:root[data-theme="light"] .cyb-header.is-scrolled .cyb-header__login,
:root[data-theme="light"] .cyb-header.is-open .cyb-header__login{
  background:linear-gradient(180deg,color-mix(in srgb,var(--cyb-accent) 4%,#fff),color-mix(in srgb,#fff 97%,var(--cyb-bg)));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 8px 22px -22px color-mix(in srgb,var(--cyb-accent) 48%,transparent);
}

@media(max-width:1099px){
  .cyb-header__login{width:100%;min-height:48px;justify-content:center;padding:.7rem 1rem;font-size:.92rem;border-color:color-mix(in srgb,var(--cyb-accent) 32%,var(--cyb-line-strong))}
}

@media(prefers-reduced-motion:reduce){
  .cyb-header__login,.cyb-header__login::before{transition:none}
  .cyb-header__login:hover::after,.cyb-header__login:focus-visible::after{animation:none}
  .cyb-header__login:hover::before,.cyb-header__login:focus-visible::before{transform:rotate(45deg)}
}
