/* Deushima Space — editorial shader teaser. Homepage only. */
body.is-home-scroll .space-feature {
  position: absolute;
  z-index: 20;
  top: clamp(9.5rem, 24.8svh, 15.75rem);
  left: 50vw;
  width: 320px;
  height: 400px;
  margin: 0;
  transform: translate3d(calc(-50% + var(--drag-x, 0px)), var(--drag-y, 0px), 0);
  perspective: 1000px;
  pointer-events: auto;
  isolation: isolate;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

body.is-home-scroll .space-feature.is-dragging { cursor: grabbing; }
body.is-home-scroll .space-feature.is-dragging .space-feature__surface { transition: none; }

.space-feature__surface {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 24px;
  background: #111113;
  box-shadow: 0 18px 35px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.02);
  transform: perspective(1000px) rotateX(var(--card-rx, 0deg)) rotateY(var(--card-ry, 0deg)) translateY(var(--card-lift, 0px));
  transform-style: preserve-3d;
  transition: transform 550ms cubic-bezier(.2,.8,.2,1), border-color 350ms ease;
  will-change: transform;
}

.space-feature:is(:hover, :focus-within) .space-feature__surface {
  border-color: rgba(204,207,255,.21);
}

.space-feature__shader,
.space-feature__texture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.space-feature__shader {
  /* A matching soft violet wave remains visible without WebGL. */
  background:
    radial-gradient(ellipse 70% 23% at 64% 73%, #a39de9 35%, rgba(99,91,195,.75) 63%, transparent 100%),
    radial-gradient(ellipse 75% 24% at 6% 78%, #a39de9 40%, rgba(99,91,195,.65) 65%, transparent 100%),
    linear-gradient(180deg, #0c0c0f 40%, #292444 57%, #cecbfd 90%);
}

.space-feature__texture {
  background: linear-gradient(180deg, rgba(14,14,16,.20) 0%, rgba(14,14,16,.03) 48%, transparent 88%);
}

.space-feature__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  padding: 26px 24px 23px;
  pointer-events: none;
  transform: translate3d(var(--content-x, 0px), var(--content-y, 0px), 0);
  transition: transform 550ms cubic-bezier(.2,.8,.2,1);
}

.space-feature__brand {
  display: grid;
  width: 100%;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  margin: 0 0 17px;
}

.space-feature__brand img {
  display: block;
  width: 150px;
  max-width: 80%;
  max-height: 51px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  /* Reserve the exact landing position without drawing a second wordmark. */
  opacity: 0;
  user-select: none;
  pointer-events: none;
}

/* The flying intro/preloader wordmark owns the landing until it finishes.
   If motion is reduced or the flight is skipped, reveal once Home is ready. */
html.is-shared-logo-landed body.is-home-scroll .space-feature__brand img,
html.is-preloader-logo-landed body.is-home-scroll .space-feature__brand img,
html:not(.has-studio-splash):not(.is-shared-logo-active):not(.is-preloader-logo-flight)
  body.is-home-scroll.is-site-ready .space-feature__brand img {
  opacity: 1;
}

.space-feature__description {
  max-width: 235px;
  margin: 0;
  color: #a5a4ac;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.52;
  letter-spacing: -.005em;
}

.space-feature__details {
  display: grid;
  gap: 13px;
  margin-top: 25px;
  color: #d0cfd8;
  font-size: 11px;
  font-weight: 440;
  line-height: 1.2;
}

.space-feature__details span { display: flex; align-items: center; gap: 10px; }
.space-feature__details svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.space-feature__explore {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: auto;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 14px;
  background: #eeedf1;
  color: #141417;
  font-size: 12px;
  font-weight: 570;
  letter-spacing: -.015em;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 250ms ease;
}

.space-feature__explore svg {
  position: absolute;
  right: 16px;
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateX(0);
  transition: transform 180ms ease;
}

.space-feature__explore:hover,
.space-feature__explore:focus-visible {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 25px rgba(204,196,255,.24);
}

.space-feature__explore:hover svg,
.space-feature__explore:focus-visible svg { transform: translateX(3px); }
.space-feature__explore:focus-visible { outline: 2px solid #c9c6ff; outline-offset: 3px; }

@media (max-height: 810px) and (min-width: 641px) {
  body.is-home-scroll .space-feature {
    top: clamp(6rem, 19.5svh, 10.25rem);
    width: 286px;
    height: 358px;
  }
  .space-feature__content { padding: 22px 21px 20px; }
  .space-feature__brand { height: 42px; margin-bottom: 12px; }
  .space-feature__brand img { width: 132px; max-height: 40px; }
  .space-feature__details { gap: 10px; margin-top: 19px; }
  .space-feature__explore { min-height: 38px; }
}

@media (max-width: 640px) {
  body.is-home-scroll .space-feature {
    top: clamp(6.3rem, 15.5svh, 9.5rem);
    width: min(312px, calc(100vw - 46px));
    height: min(390px, calc(100svh - 265px));
    min-height: 295px;
  }
  .space-feature__surface { border-radius: 22px; }
  .space-feature__content { padding: 23px 23px 21px; }
  .space-feature__details { gap: 11px; margin-top: 23px; }
  .space-feature__brand { height: 46px; margin-bottom: 14px; }
  .space-feature__brand img { width: 140px; max-height: 44px; }
  .space-feature__explore { min-height: 42px; }
}

@media (max-width: 640px) and (max-height: 730px) {
  body.is-home-scroll .space-feature { top: 6.1rem; height: max(292px, calc(100svh - 255px)); }
  .space-feature__content { padding: 18px 20px; }
  .space-feature__brand { height: 37px; margin-bottom: 9px; }
  .space-feature__brand img { width: 125px; max-height: 36px; }
  .space-feature__description { font-size: 11.5px; }
  .space-feature__details { gap: 9px; margin-top: 14px; font-size: 10.5px; }
  .space-feature__explore { min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .space-feature__surface,
  .space-feature__content,
  .space-feature__explore,
  .space-feature__explore svg { transition: none; }
}
